/*
 * Public blog styling.
 *
 * Plain CSS on purpose: these pages must render correctly straight after a
 * `git pull`, without anyone re-running the Tailwind build. Layout is fluid
 * (clamp + auto-fit grids) rather than breakpoint-by-breakpoint, so an article
 * reads the same on a 360px phone as on a 4K monitor.
 */

:root {
  --blog-bg: #090909;
  --blog-surface: #101010;
  --blog-surface-2: #151515;
  --blog-border: #232323;
  --blog-text: #f2f2f2;
  --blog-muted: #9b9b9b;
  --blog-accent: #ff2323;
  --blog-accent-soft: rgba(255, 35, 35, 0.12);
  --blog-radius: 16px;
  /* A little inside the 1440px nav and the 1370px .privacy-container: on a wide
     monitor the blog is mostly running text, which reads better in a slightly
     tighter column. Only bites above this width — narrower screens are still
     governed by the viewport. */
  --blog-max: 1200px;
}

/*
 * No background here: the shell carries the same Tailwind
 * bg-[url('/imgs/login-bg.png')] bg-fixed bg-cover the other marketing pages
 * use, and this file loads after the compiled bundle — declaring one would
 * paint over it and leave the nav sitting on flat black.
 */
.blog-shell {
  color: var(--blog-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.blog-shell main {
  flex: 1;
}

.blog-container {
  width: 100%;
  max-width: var(--blog-max);
  margin-inline: auto;
  padding-inline: 20px; /* px-5, matching the other marketing pages */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- hero */

/* Transparent base so the page background reads behind the masthead, the way
   it does under the hero on the other marketing pages. */
.blog-hero {
  padding: clamp(32px, 7vw, 72px) 0 clamp(24px, 4vw, 40px);
  background: radial-gradient(60% 120% at 50% 0%, rgba(255, 35, 35, 0.16) 0%, transparent 70%);
  border-bottom: 1px solid var(--blog-border);
}

.blog-hero__title {
  font-size: clamp(30px, 6vw, 54px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.blog-hero__intro {
  color: var(--blog-muted);
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.6;
  max-width: 60ch;
  margin: 14px 0 0;
}

.blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--blog-muted);
  margin-bottom: 14px;
}

.blog-breadcrumb a {
  color: var(--blog-muted);
  text-decoration: none;
}

.blog-breadcrumb a:hover {
  color: #fff;
}

/* -------------------------------------------------------------- search */

.blog-search {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  max-width: 520px;
}

.blog-search input {
  flex: 1;
  min-width: 0;
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--blog-text);
  font-size: 15px;
  font-family: inherit;
}

.blog-search input::placeholder {
  color: #6d6d6d;
}

.blog-search input:focus {
  outline: none;
  border-color: var(--blog-accent);
  box-shadow: 0 0 0 3px var(--blog-accent-soft);
}

.blog-search button {
  border: 1px solid var(--blog-accent);
  background: linear-gradient(0deg, rgba(255, 0, 0, 0.35) 0%, rgba(255, 0, 0, 0.1) 100%);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.blog-search button:hover {
  background: var(--blog-accent);
}

/* --------------------------------------------------------------- chips */

.blog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--blog-border);
  background: var(--blog-surface);
  color: var(--blog-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.blog-chip:hover {
  color: #fff;
  border-color: #3d3d3d;
}

.blog-chip.is-active {
  color: #fff;
  border-color: var(--blog-accent);
  background: var(--blog-accent-soft);
}

.blog-chip__count {
  color: #6d6d6d;
  font-size: 12px;
}

/* ---------------------------------------------------------------- body */

.blog-body {
  padding: clamp(28px, 5vw, 52px) 0 clamp(48px, 8vw, 96px);
}

.blog-resultline {
  color: var(--blog-muted);
  font-size: 15px;
  margin: 0 0 24px;
}

.blog-resultline a {
  color: var(--blog-accent);
  margin-left: 8px;
  text-decoration: none;
}

.blog-empty {
  color: var(--blog-muted);
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  padding: 40px 24px;
  text-align: center;
}

.blog-empty a {
  color: var(--blog-accent);
  text-decoration: none;
}

/* ------------------------------------------------------------ featured */

.blog-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  overflow: hidden;
  background: var(--blog-surface);
  text-decoration: none;
  color: inherit;
  margin-bottom: clamp(28px, 4vw, 44px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-featured:hover {
  border-color: #3d3d3d;
  transform: translateY(-2px);
}

@media (min-width: 860px) {
  .blog-featured {
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }
}

.blog-featured__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--blog-surface-2);
  overflow: hidden;
}

.blog-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-featured__body {
  padding: clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.blog-featured__label {
  color: var(--blog-accent);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blog-featured__body h2 {
  font-size: clamp(21px, 3.2vw, 30px);
  line-height: 1.25;
  margin: 0;
  font-weight: 650;
}

.blog-featured__body p {
  color: var(--blog-muted);
  line-height: 1.6;
  margin: 0;
  font-size: 15px;
}

/* ---------------------------------------------------------------- grid */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  background: var(--blog-surface);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  border-color: #3d3d3d;
  transform: translateY(-2px);
}

.blog-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--blog-surface-2);
  overflow: hidden;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #2f2f2f;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.blog-card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-card__body .blog-chip {
  align-self: flex-start;
  margin-top: 0;
  padding: 4px 11px;
  font-size: 12px;
}

.blog-card__title {
  font-size: 18px;
  line-height: 1.35;
  margin: 0;
  font-weight: 600;
}

.blog-card__title a {
  color: var(--blog-text);
  text-decoration: none;
}

.blog-card__title a:hover {
  color: #fff;
}

.blog-card__excerpt {
  color: var(--blog-muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #6d6d6d;
  font-size: 13px;
  margin-top: auto;
}

/* ---------------------------------------------------------- pagination */

.blog-pagination {
  margin-top: clamp(28px, 4vw, 44px);
}

.blog-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.blog-pager__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-pager__link,
.blog-pager__page {
  border: 1px solid var(--blog-border);
  background: var(--blog-surface);
  color: var(--blog-muted);
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.blog-pager__link:hover,
.blog-pager__page:hover {
  color: #fff;
  border-color: #3d3d3d;
}

.blog-pager__link.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.blog-pager__page.is-current {
  color: #fff;
  border-color: var(--blog-accent);
  background: var(--blog-accent-soft);
}

.blog-pager__gap {
  color: #5c5c5c;
  padding: 9px 4px;
}

.blog-tagcloud {
  margin-top: clamp(36px, 6vw, 64px);
  border-top: 1px solid var(--blog-border);
  padding-top: 28px;
}

.blog-tagcloud h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--blog-muted);
}

/* ------------------------------------------------------------- article */

.blog-preview-banner {
  margin: 0;
  padding: 12px 20px;
  text-align: center;
  background: rgba(255, 174, 0, 0.12);
  border-bottom: 1px solid #ffae00;
  color: #ffd88a;
  font-size: 14px;
}

.blog-article {
  padding: clamp(28px, 5vw, 60px) 0 clamp(40px, 6vw, 72px);
}

.blog-article__title {
  font-size: clamp(28px, 5.2vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
}

.blog-article__standfirst {
  color: var(--blog-muted);
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.6;
  margin: 16px 0 0;
}

.blog-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--blog-border);
}

.blog-byline__avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--blog-accent-soft);
  border: 1px solid var(--blog-accent);
  color: #fff;
  font-weight: 600;
}

.blog-byline__name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--blog-text);
}

.blog-byline .blog-meta {
  margin-top: 2px;
}

.blog-article__hero {
  margin: clamp(24px, 4vw, 40px) auto 0;
}

.blog-article__hero img {
  width: 100%;
  height: auto;
  border-radius: var(--blog-radius);
  border: 1px solid var(--blog-border);
  display: block;
}

/* ------------------------------------------------- rendered post body */

.blog-content {
  margin-top: clamp(26px, 4vw, 40px);
  font-size: 17px;
  line-height: 1.75;
  color: #dcdcdc;
  overflow-wrap: anywhere;
}

.blog-content > * + * {
  margin-top: 1.15em;
}

.blog-content h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.25;
  font-weight: 650;
  color: #fff;
  margin-top: 1.8em;
  scroll-margin-top: 24px;
}

.blog-content h3 {
  font-size: clamp(19px, 2.8vw, 23px);
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
  margin-top: 1.6em;
  scroll-margin-top: 24px;
}

.blog-content h4 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-top: 1.4em;
}

.blog-content a {
  color: #ff6a6a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-content a:hover {
  color: #fff;
}

.blog-content strong {
  color: #fff;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.35em;
}

.blog-content ul {
  list-style: disc;
}

.blog-content ol {
  list-style: decimal;
}

.blog-content li + li {
  margin-top: 0.5em;
}

.blog-content img,
.blog-content video,
.blog-content iframe {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--blog-border);
  display: block;
}

.blog-content figure {
  margin-inline: 0;
}

.blog-content figcaption {
  color: #6d6d6d;
  font-size: 13.5px;
  margin-top: 8px;
  text-align: center;
}

.blog-content blockquote {
  border-left: 3px solid var(--blog-accent);
  background: var(--blog-surface);
  border-radius: 0 12px 12px 0;
  padding: 14px 20px;
  color: #cfcfcf;
  font-style: italic;
  margin-inline: 0;
}

.blog-content code {
  background: #1a1a1a;
  border: 1px solid var(--blog-border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #ffb3b3;
}

/* Code blocks scroll inside themselves; the page never scrolls sideways. */
.blog-content pre {
  background: #0d0d0d;
  border: 1px solid var(--blog-border);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.blog-content pre code {
  background: none;
  border: 0;
  padding: 0;
  color: #e6e6e6;
  font-size: inherit;
  white-space: pre;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

.blog-content th,
.blog-content td {
  border: 1px solid var(--blog-border);
  padding: 10px 12px;
  text-align: left;
}

.blog-content th {
  background: var(--blog-surface);
  color: #fff;
}

.blog-content hr {
  border: 0;
  border-top: 1px solid var(--blog-border);
  margin-block: 2em;
}

.blog-article__tags {
  margin-top: clamp(28px, 4vw, 40px);
}

/* ----------------------------------------------------------------- cta */

.blog-cta {
  margin-top: clamp(32px, 5vw, 52px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 35, 35, 0.16) 0%, transparent 60%),
    var(--blog-surface);
  padding: clamp(20px, 3vw, 30px);
}

.blog-cta h2 {
  font-size: clamp(19px, 2.6vw, 24px);
  margin: 0 0 6px;
  font-weight: 650;
  color: #fff;
}

.blog-cta p {
  margin: 0;
  color: var(--blog-muted);
  font-size: 15px;
}

.blog-cta__btn {
  flex: none;
  border: 1px solid var(--blog-accent);
  background: var(--blog-accent);
  color: #fff;
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-cta__btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -12px rgba(255, 35, 35, 0.8);
}

.blog-related {
  padding-bottom: clamp(48px, 8vw, 88px);
}

.blog-related h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 650;
  margin: 0 0 20px;
}

/* -------------------------------------------------------------- footer */

.blog-footer {
  border-top: 1px solid var(--blog-border);
  padding: clamp(28px, 4vw, 44px) 0 24px;
  background: rgba(7, 7, 7, 0.72);
  backdrop-filter: blur(8px);
}

.blog-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.blog-footer__logo {
  width: 132px;
}

.blog-footer__tagline {
  color: var(--blog-muted);
  font-size: 14px;
  margin: 12px 0 0;
  max-width: 42ch;
}

.blog-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.blog-footer__links a {
  color: var(--blog-muted);
  font-size: 14px;
  text-decoration: none;
}

.blog-footer__links a:hover {
  color: #fff;
}

.blog-footer__copy {
  text-align: center;
  color: #5c5c5c;
  font-size: 13px;
  margin: 28px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .blog-featured,
  .blog-cta__btn {
    transition: none;
  }
}

/* ======================================================= knowledge base
 *
 * Reuses the shell above (.blog-container, .blog-hero, .blog-content) and adds
 * the pieces documentation needs that a blog does not: a category directory and
 * dense article lists.
 */

.kb-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.kb-category {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  background: var(--blog-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.kb-category:hover {
  border-color: var(--blog-accent);
  transform: translateY(-2px);
}

.kb-category__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blog-accent-soft);
  color: #ff6a6a;
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
}

/* Uploaded marks vary wildly in aspect ratio; contain keeps them undistorted. */
.kb-category__icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.kb-category__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.kb-category__name {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

.kb-category__desc {
  color: var(--blog-muted);
  font-size: 14px;
  line-height: 1.55;
}

.kb-category__count {
  color: #6d6d6d;
  font-size: 12.5px;
}

.kb-section {
  margin-top: clamp(36px, 5vw, 56px);
}

.kb-section__title {
  font-size: clamp(19px, 2.6vw, 23px);
  font-weight: 650;
  margin: 0 0 16px;
}

.kb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kb-row a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid var(--blog-border);
  border-radius: 12px;
  background: var(--blog-surface);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.kb-row a:hover {
  border-color: #3d3d3d;
  background: var(--blog-surface-2);
}

.kb-row__title {
  color: #fff;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.35;
}

.kb-row__excerpt {
  color: var(--blog-muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.kb-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #6d6d6d;
  font-size: 12.5px;
}

.kb-article__meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--blog-border);
}

.kb-helpful {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: 20px;
  border-top: 1px solid var(--blog-border);
  color: var(--blog-muted);
  font-size: 14.5px;
}

.kb-helpful button {
  border: 1px solid var(--blog-border);
  background: var(--blog-surface);
  color: var(--blog-text);
  border-radius: 999px;
  padding: 7px 20px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.kb-helpful button:hover:not(:disabled) {
  border-color: var(--blog-accent);
}

.kb-helpful button:disabled {
  opacity: 0.45;
  cursor: default;
}

.kb-helpful__thanks {
  color: #7ce07c;
}

.kb-cta {
  margin-top: clamp(32px, 5vw, 52px);
}

/* --------------------------------------- ticket form suggestions (panel) */

.kb-suggest {
  margin-top: 14px;
  border: 1px solid #2f2f2f;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.45);
  padding: 14px 16px;
}

.kb-suggest__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14.5px;
  margin: 0 0 10px;
}

.kb-suggest__title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1aff00;
  box-shadow: 0 0 0 3px rgba(26, 255, 0, 0.15);
}

.kb-suggest__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-suggest__list a {
  display: block;
  padding: 9px 12px;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.kb-suggest__list a:hover {
  border-color: #ff2323;
  color: #fff;
}

.kb-suggest__list span {
  display: block;
  color: #909090;
  font-size: 12.5px;
  margin-top: 2px;
}
