/* Help Center — public reader REDESIGN PROTOTYPE.
 * Isolated stylesheet. Light mode only. Flat, modern, Filum-blue accent.
 * Hand-written CSS (no Tailwind build step in the backend).
 */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Tokens ── */
:root {
  /* Brand v3.0 (2026) — light only */
  --accent: #057eff;         /* tech-blue — links, interactive */
  --accent-hover: #006bdd;   /* tech-blue-700 */
  --accent-tint: #eaf3ff;    /* light blue surface */
  --accent2: #00de80;        /* emerald-mint — brand mark / gradient partner */
  --cyan: #6337e3;           /* 3rd gradient stop → digital-violet */
  --brand: #00de80;          /* emerald-mint primary */
  --brand-heading: #000675;  /* core-navy — headings */
  --page: #f5f7fe;           /* cool light ground */
  --bg: #fff;
  --surface: #fff;
  --border: #e6e9f5;         /* cool hairline */
  --text: #0a1130;           /* near-navy ink */
  --muted: #5a6683;
  --faint: #8a93ac;
  --cream: #f4f2ee;          /* contact-band base (login gate) */
  --cream-ink: #1c2431;
  --header-bg: rgba(255, 255, 255, 0.82);
  --shell: 1200px;
  --read: 860px;
  --radius: 12px;
  --shadow-card: 0 5px 22px rgba(6, 10, 40, 0.05), 0 0 0 0.5px rgba(6, 10, 40, 0.04);
  --shadow-lift: 0 14px 40px rgba(6, 10, 40, 0.1), 0 0 0 0.5px rgba(6, 10, 40, 0.05);
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Aliases so the verbatim article-body block (copied from the production
   * public styles.css) resolves against this prototype's token set. */
  --color-text: var(--text);
  --color-text-muted: var(--muted);
  --color-link: var(--accent);
  --color-primary: var(--accent);
  --color-primary-hover: var(--accent-hover);
  --color-border: var(--border);
  --color-surface: var(--surface);
  --color-bg: var(--bg);
}

/* ── Base ── */
body {
  font-family: var(--font-sans);
  background:
    radial-gradient(900px 360px at 50% -140px, rgba(0, 222, 128, 0.14), transparent 60%),
    radial-gradient(680px 300px at 88% -40px, rgba(5, 126, 255, 0.12), transparent 55%),
    radial-gradient(620px 300px at 12% -20px, rgba(99, 55, 227, 0.08), transparent 58%),
    var(--page);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

/* ── Skip link ── */
.hc-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  font-weight: 600;
}

.hc-skip:focus {
  left: 0;
}

/* ── Shell ── */
.hc-shell {
  max-width: var(--shell);
  margin: 0 auto;
  width: 100%;
  padding-inline: 1.5rem;
}

/* ── Header ── */
.hc-header {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.hc-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 60px;
}

.hc-header__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 0;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--brand-heading);
  text-decoration: none;
  /* On a narrow phone the logo must yield/clip so the right-hand controls
     (lang + theme) never push the header past the viewport edge. */
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hc-header__mark {
  display: inline-block;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(91, 91, 245, 0.4);
}

/* Admin-configured logo image (replaces the gradient mark when set). */
.hc-header__logo-img {
  display: block;
  height: 28px;
  width: auto;
  max-width: 180px;
  border-radius: 6px;
  object-fit: contain;
}

/* ── Header right group ── */
.hc-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex: 1 1 0;
}

/* ── Language switcher (dropdown) ── */
.hc-lang {
  position: relative;
}

/* The clickable pill that toggles the menu (native <details><summary>). */
.hc-lang__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 34px;
  box-sizing: border-box;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0 0.7rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* Hide the default disclosure triangle. */
.hc-lang__toggle::-webkit-details-marker {
  display: none;
}

.hc-lang__toggle:hover,
.hc-lang[open] .hc-lang__toggle {
  border-color: var(--accent);
  color: var(--text);
}

.hc-lang__caret {
  font-size: 14px;
  opacity: 0.7;
  transition: transform 0.15s;
}

.hc-lang[open] .hc-lang__caret {
  transform: rotate(180deg);
}

.hc-lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 124px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);
}

.hc-lang__opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.hc-lang__opt:hover {
  background: var(--surface);
  color: var(--text);
}

.hc-lang__opt--active {
  color: var(--accent);
  background: var(--accent-tint);
  cursor: default;
}

/* ── Main ── */
.hc-main {
  flex: 1;
  padding-block: 2rem;
}

/* ── Hero ── */
.hc-hero {
  text-align: center;
  padding: 3.4rem 1.5rem 2.4rem;
  margin-bottom: 1.5rem;
}

.hc-hero__title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--brand-heading);
  margin-bottom: 1.7rem;
}

.hc-hero__title--oneline {
  white-space: nowrap;
}

.hc-hero__subtitle {
  font-size: 1.0625rem;
  color: var(--muted);
  margin-bottom: 1.7rem;
}

/* ── Search (gradient-border pill + glow) ── */
.hc-search {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.hc-search__glow {
  position: absolute;
  inset: -14px;
  border-radius: 9999px;
  background: linear-gradient(100deg, var(--accent), var(--accent2), var(--cyan));
  filter: blur(22px);
  opacity: 0.26;
  z-index: 0;
}

.hc-search__bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 9999px;
  border: 1px solid transparent;
  background-image: linear-gradient(var(--bg), var(--bg)), linear-gradient(100deg, var(--accent), var(--accent2), var(--cyan));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 16px 40px rgba(20, 20, 80, 0.10);
}

.hc-search__icon {
  font-size: 20px;
  color: var(--accent);
}

.hc-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1.02rem;
  font-family: var(--font-sans);
  color: var(--text);
}

.hc-search__input::placeholder {
  color: var(--muted);
}

.hc-search__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.12);
  overflow: hidden;
  z-index: 20;
}

.hc-search__dropdown[hidden] {
  display: none;
}

.hc-search__opt {
  display: block;
  padding: 0.6rem 0.9rem;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.hc-search__opt:last-child {
  border-bottom: none;
}

.hc-search__opt:hover {
  background: var(--surface);
}

.hc-search__opt strong {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
}

.hc-search__opt span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.hc-search__btn {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.hc-search__btn:hover {
  background: var(--accent-hover);
}

/* ── Content blocks ── */
.hc-block {
  margin-bottom: 2.5rem;
}

.hc-block__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.hc-block__badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Category / product pillar grid ── */
.hc-cat-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.hc-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.hc-cat:hover {
  border-color: transparent;
  box-shadow: 0 18px 44px rgba(30, 30, 90, 0.12);
  transform: translateY(-3px);
}

/* Gradient border on hover */
.hc-cat::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(120deg, var(--accent), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.hc-cat:hover::after {
  opacity: 0.8;
}

.hc-cat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 23px;
  margin-bottom: 0.55rem;
  background: var(--accent-tint);
  color: var(--accent);
}

.hc-cat__name {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text);
}

.hc-cat__desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.hc-cat__count {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Resources band (Learn / System sections) ── */
.hc-res {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.hc-rescard {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.05rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hc-rescard:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(30, 30, 90, 0.10);
}

.hc-rescard--soon {
  opacity: 0.62;
  background: var(--surface);
  pointer-events: none;
}

.hc-rescard__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.hc-rescard__text {
  min-width: 0;
}

.hc-rescard__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.hc-rescard__desc {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.79rem;
  color: var(--muted);
}

.hc-rescard__ext {
  font-size: 13px;
  color: var(--muted);
}

.hc-soonbadge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(139, 92, 246, 0.1);
  border-radius: 9999px;
  padding: 2px 8px;
}

/* ── Two-column band (Popular | Latest) ── */
.hc-twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.hc-col__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Lists ── */
.hc-list {
  list-style: none;
}

.hc-list__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.hc-list__item:last-child {
  border-bottom: none;
}

.hc-list__link {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  color: var(--accent);
  text-decoration: none;
}

.hc-list__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hc-list__date,
.hc-list__views {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Category header (icon + name + count) ── */
.hc-cathead {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.hc-cathead .hc-cat__icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.hc-cathead__title {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.hc-cathead__count {
  font-size: 0.85rem;
  color: var(--muted);
}

.hc-search__kbd {
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* ── Header search — compact, flat bar that lives in the sticky header on
   inner pages (category / article) so search persists while scrolling.
   Built on the flat `--inline` aesthetic (no hero glow/gradient border). ── */
.hc-search--header {
  flex: 1 1 auto;
  max-width: 420px;
  margin: 0 1rem;
}

.hc-search--header .hc-search__bar {
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  background-image: none;
  box-shadow: none;
}

.hc-search--header .hc-search__bar:focus-within {
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.hc-search--header .hc-search__icon {
  font-size: 16px;
  color: var(--muted);
}

.hc-search--header .hc-search__input {
  font-size: 0.875rem;
}

/* Tight screens: drop the header search rather than crush the logo/actions.
   Inner pages still have full search via the dedicated /search page. */
@media (max-width: 640px) {
  .hc-search--header {
    display: none;
  }

  /* Tighten the header so the logo is never crowded off-screen. */
  .hc-header__inner {
    gap: 0.5rem;
  }

  .hc-header__right {
    gap: 0.4rem;
  }

  .hc-header__nav {
    gap: 0.4rem;
  }

  /* Changelog link collapses to an icon-only button. */
  .hc-header__link-label {
    display: none;
  }

  .hc-header__link {
    padding: 0 0.55rem;
  }
}

/* ── Category article list (title + excerpt + relative date) ── */
.hc-list--cat .hc-list__item {
  align-items: flex-start;
}

.hc-list--cat .hc-list__main {
  flex: 1;
  min-width: 0;
}

.hc-list--cat .hc-list__link {
  display: block;
  font-weight: 600;
}

.hc-list__excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Breadcrumb ── */
.hc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hc-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.hc-breadcrumb a:hover {
  text-decoration: underline;
}

/* Full trail participates in the flex layout (gap) via display:contents. */
.hc-breadcrumb__trail {
  display: contents;
}

/* Condensed "‹ parent" back-link — desktop hides it in favour of the trail;
   the mobile rule below flips them. Placed AFTER the base rules above so it
   wins on source order (media queries add no specificity). */
.hc-breadcrumb__back {
  display: none;
  align-items: center;
  gap: 0.3rem;
}

@media (max-width: 640px) {
  .hc-breadcrumb__trail {
    display: none;
  }

  .hc-breadcrumb__back {
    display: inline-flex;
  }
}

/* ── Article header ── */
.hc-article {
  max-width: var(--read);
}

.hc-article__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hc-article__meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ─────────────────────────────────────────────────────────────────────────
 * Article body typography — COPIED VERBATIM from
 * backend/src/apps/help-center-public/styles.css (lines 167–347).
 * Class names match the shared renderer.tsx output exactly. Do not rename.
 * ───────────────────────────────────────────────────────────────────────── */

/* ── Article typography (HC-018) ── */
/* Wraps the full article page (title + body). */
.hc-article {
  max-width: var(--read);
  margin: 0 auto;
}

.hc-article__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.75rem;
  color: var(--color-text);
}

/* The rendered Tiptap body — all typography lives inside .hc-article__body */
.hc-article__body {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.75;
  /* Long URLs / unbreakable strings must wrap, not push the page wider. */
  overflow-wrap: break-word;
}

/* Headings */
.hc-article__body h1,
.hc-article__body h2,
.hc-article__body h3,
.hc-article__body h4 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.hc-article__body h1 { font-size: 1.75rem; }
.hc-article__body h2 { font-size: 1.375rem; }
.hc-article__body h3 { font-size: 1.125rem; }
.hc-article__body h4 { font-size: 1rem; }

/* Paragraphs */
.hc-article__body p {
  margin-bottom: 1rem;
}

/* Links */
.hc-article__body a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hc-article__body a:hover {
  color: var(--color-primary-hover);
}

/* Inline code */
.hc-article__body .hc-inline-code,
.hc-article__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  background: #f3f4f6;
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  padding: 0.1em 0.35em;
  color: #be185d;
  /* A long inline token (API key, URL) must break rather than overflow. */
  overflow-wrap: anywhere;
}

/* Code blocks */
.hc-article__pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.hc-article__pre code {
  /* Reset the inline code style inside pre */
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Lists */
.hc-article__list {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.hc-article__list--bullet {
  list-style-type: disc;
}

.hc-article__list--ordered {
  list-style-type: decimal;
}

.hc-article__list li {
  margin-bottom: 0.25rem;
}

.hc-article__list li > p {
  /* Paragraphs directly inside list items shouldn't add extra bottom margin */
  margin-bottom: 0.25rem;
}

/* Blockquote */
.hc-article__blockquote {
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface);
  margin: 1.25rem 0;
  padding: 0.75rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.hc-article__blockquote p {
  margin-bottom: 0;
}

/* Horizontal rule */
.hc-article__hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* Images */
.hc-article__img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
  display: block;
}

/* Tables */
.hc-article__table-wrap {
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.hc-article__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.hc-article__th,
.hc-article__td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.hc-article__th {
  font-weight: 600;
  background: var(--color-surface);
  border-bottom-color: var(--color-border);
}

.hc-article__table tr:last-child .hc-article__td,
.hc-article__table tr:last-child .hc-article__th {
  border-bottom: none;
}

/* Unsafe link stripped of href — shown as plain text, no pointer */
.hc-unsafe-link {
  text-decoration: none;
  color: inherit;
}

/* ─────────────────────────────────────────────────────────────────────────
 * End verbatim block.
 * ───────────────────────────────────────────────────────────────────────── */

/* ── Article + TOC layout ── */
.hc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 2.5rem;
  align-items: start;
}

/* Inside the grid the article is a grid child; let the column size it. */
.hc-layout .hc-article {
  max-width: none;
  margin: 0;
}

/* ── Table of contents ── */
.hc-toc {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 0.875rem;
}

.hc-toc__title {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.hc-toc__link {
  display: block;
  padding: 0.3rem 0 0.3rem 0.75rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.hc-toc__link:hover {
  color: var(--text);
}

.hc-toc__link--l3 {
  padding-left: 1.5rem;
}

.hc-toc__link--l4 {
  padding-left: 2.25rem;
}

.hc-toc__link--active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* ── Related articles ── */
.hc-related {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Prev / Next article navigation ── */
.hc-article-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.hc-article-nav__prev,
.hc-article-nav__next {
  flex: 1;
  min-width: 0;
}

.hc-article-nav__next {
  text-align: right;
}

.hc-article-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.hc-article-nav a:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.hc-article-nav__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hc-article-nav__title {
  font-size: 0.9375rem;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .hc-article-nav {
    flex-direction: column;
  }

  .hc-article-nav__next {
    text-align: left;
  }
}

/* ── Rating widget ── */
.hc-rating {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.hc-rating__question {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.hc-rating__buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.hc-rating__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.hc-rating__btn:hover:not(:disabled) {
  background: var(--accent-tint);
  color: var(--accent);
}

.hc-rating__btn:disabled {
  cursor: default;
}

.hc-rating__icon {
  font-size: 1.1rem;
  line-height: 1;
}

.hc-rating__count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.hc-rating__thanks {
  margin-top: 0.9rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── Empty state ── */
.hc-empty {
  color: var(--muted);
  font-size: 0.9375rem;
  padding: 1.5rem 0;
}

/* ── Terminal state pages (state-views.tsx) ────────────────────────────────
 * One centred panel for every dead end: article not found, category not found,
 * article not translated into the requested language. Built entirely on the
 * theme tokens (--bg / --border / --text / --muted / --accent). */
.hc-state {
  max-width: 34rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
  text-align: center;
}

.hc-state__icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 1.75rem;
  line-height: 1;
}

.hc-state__title {
  margin: 0 0 0.625rem;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.hc-state__desc {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hc-state__actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
}

.hc-state__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.hc-state__btn:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.hc-state__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hc-state__btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

@media (max-width: 640px) {
  .hc-state {
    padding: 2.5rem 1rem 3.5rem;
  }

  .hc-state__title {
    font-size: 1.375rem;
  }

  .hc-state__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  /* minmax(0, 1fr) — NOT bare `1fr`. `1fr` is shorthand for minmax(auto, 1fr),
     whose `auto` minimum expands the column to its widest child, so a wide table
     or long code line blows the whole page out horizontally on a phone. */
  .hc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .hc-toc {
    position: static;
    top: auto;
  }

  .hc-hero__title {
    font-size: 1.875rem;
  }

  .hc-twocol {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}

/* ── Uniform widget sizing ── */
.hc-cat-grid, .hc-res { align-items: stretch; }
.hc-cat-grid > li { display: flex; }
.hc-cat, .hc-rescard { height: 100%; width: 100%; }
.hc-cat { min-height: 150px; }
.hc-cat__count { margin-top: auto; }
.hc-cat__name {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.hc-rescard__title { min-width: 0; }
.hc-rescard__desctxt {
  min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── What's New modal ── */
.hc-wn[hidden]{display:none}
.hc-wn{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:1rem}
.hc-wn__backdrop{position:absolute;inset:0;background:rgba(2,6,23,.5)}
.hc-wn__card{position:relative;display:flex;flex-direction:column;max-width:1024px;width:100%;max-height:85vh;background:var(--bg);border:1px solid var(--border);border-radius:18px;padding:1.6rem 1.6rem 1.4rem;box-shadow:0 24px 60px rgba(2,6,23,.3)}
.hc-wn__title{flex:0 0 auto;font-size:1.3rem;font-weight:800;margin-bottom:.6rem;color:var(--text)}
.hc-wn__body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-wrap:break-word;color:var(--muted);font-size:.95rem;line-height:1.65;margin-bottom:1.2rem}
.hc-wn__body a{color:var(--accent)}
/* Mobile: bottom-sheet so the modal doesn't read as a full-screen takeover. */
@media (max-width: 640px) {
  .hc-wn{align-items:flex-end;padding:0}
  .hc-wn__card{max-width:none;max-height:88vh;border-radius:18px 18px 0 0;border-bottom:none;padding:1.2rem 1.1rem calc(1rem + env(safe-area-inset-bottom))}
  .hc-wn__title{font-size:1.15rem}
  .hc-wn__footer{flex-wrap:wrap;gap:.8rem}
}

/* ── Login wall ─────────────────────────────────────────────────────────── */
/* Login/OTP surface. Composition mirrors the platform login
   (apps/platform/src/features/auth/components/LoginForm.tsx): logo above a
   centered card, SSO buttons first, a ruled separator, then the password form.
   Ported by hand — the reader is server-rendered HTML with no Tailwind or
   shadcn — and given dark variants, which the platform login does not have. */
.hc-auth{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--hc-bg,#f7f8fa)}
.hc-auth__stack{width:100%;max-width:384px;display:flex;flex-direction:column;gap:24px}
.hc-auth__brand{display:flex;justify-content:center}
.hc-auth__logo{height:40px;width:auto;max-width:200px;object-fit:contain}
/* Big Filum wordmark above the card (Help Scout composition). Overrides the
   16px button-sized instance of the same inline logo. */
.hc-auth__brand .hc-auth__filum-logo{height:34px;width:auto}
.hc-auth__card{width:100%;background:#fff;border:1px solid #e6e8eb;border-radius:12px;padding:24px;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.hc-auth__head{text-align:center;margin:0 0 20px}
.hc-auth__title{font-size:20px;font-weight:600;margin:0 0 6px;letter-spacing:-.01em}
.hc-auth__sub{color:#5b6470;font-size:14px;margin:0}
.hc-auth__cta{color:#5b6470;font-size:14px;margin:6px 0 0}
.hc-auth__cta a{color:#2563eb;font-weight:500;text-decoration:none;text-underline-offset:4px}
.hc-auth__cta a:hover{text-decoration:underline}
/* Ruled separator — the platform's FieldSeparator: a hairline with the label
   sitting on the card background. */
.hc-auth__sep{display:flex;align-items:center;gap:12px;margin:16px 0;color:#5b6470;font-size:13px}
.hc-auth__sep::before,.hc-auth__sep::after{content:"";flex:1;height:1px;background:#e6e8eb}
.hc-auth__gicon{flex:0 0 auto}
.hc-auth__form{display:flex;flex-direction:column;gap:14px}
.hc-auth__label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:500;color:#37404a}
.hc-auth__input{padding:9px 12px;border:1px solid #d2d6db;border-radius:8px;font-size:14px;font-weight:400}
.hc-auth__input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.hc-auth__btn{padding:10px 14px;border:0;border-radius:8px;background:#2563eb;color:#fff;font-size:14px;font-weight:500;cursor:pointer;line-height:1.4}
.hc-auth__btn:hover{background:#1d4ed8}
.hc-auth__btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
/* Outline treatment, matching the platform's variant="outline" Google button. */
.hc-auth__btn--google{background:#fff;color:#37404a;border:1px solid #d2d6db;display:flex;align-items:center;justify-content:center;gap:8px}
.hc-auth__btn--google:hover{background:#f7f8fa}
/* Google keeps the base .hc-auth__btn look; it just needs to be a full-width
   block so it lines up under the Filum button. */
.hc-auth__btn--google{width:100%;box-sizing:border-box;margin:0 0 10px}
/* "Sign in with Filum" — a white pill with an animated gradient-sweeping border
   and the inline horizontal wordmark. It deliberately does NOT carry the base
   .hc-auth__btn class: the base solid-blue background + :hover would otherwise
   paint over the two-layer gradient. Stays white in both themes on purpose so
   the navy wordmark keeps its contrast. @property drives the sweep; without it
   the conic gradient still renders (static) — the border just doesn't animate. */
@property --hc-filum-ang{syntax:"<angle>";initial-value:0deg;inherits:false}
.hc-auth__btn--filum{
  --hc-filum-ang:0deg;
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;box-sizing:border-box;margin:0 0 10px;height:44px;padding:0 14px;
  border:2px solid transparent;border-radius:10px;
  background:
    linear-gradient(#fff,#fff) padding-box,
    conic-gradient(from var(--hc-filum-ang),#081f73,#24d172 25%,#2563eb 55%,#8b5cf6 78%,#081f73) border-box;
  color:#081f73;font-size:14px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;
  animation:hc-filum-sweep 5s linear infinite;
  transition:box-shadow .18s ease,transform .18s ease;
}
.hc-auth__btn--filum:hover{color:#081f73;transform:translateY(-1px);box-shadow:0 6px 18px -6px rgba(37,99,235,.5)}
.hc-auth__btn--filum:focus-visible{outline:2px solid #2563eb;outline-offset:3px}
.hc-auth__filum-lede{font-size:12.5px;font-weight:600;color:#5b6470}
.hc-auth__filum-logo{height:16px;width:auto;display:block}
@keyframes hc-filum-sweep{to{--hc-filum-ang:360deg}}
@media (prefers-reduced-motion:reduce){.hc-auth__btn--filum{animation:none}}

/* ── Two-column login (prototype A) ──────────────────────────────────────────
   Promo banner (left) + form pane (right). Applies only when .hc-auth__split is
   present, so OTP keeps the narrow single-column card. The brand logo still
   sits above the card (Help Scout composition, and preserves the branding). */
.hc-auth__stack--wide{max-width:960px}
.hc-auth__card.hc-auth__split{padding:0;overflow:hidden;display:grid;grid-template-columns:1.05fr .95fr}
.hc-auth__pane{padding:40px 44px;display:flex;flex-direction:column;justify-content:center}
.hc-auth__banner{position:relative;overflow:hidden;display:flex;flex-direction:column;padding:40px;background:#f4f2ee;color:#1c2431}
/* Text sits above the decorative blobs (positioned siblings would otherwise
   paint over static content). */
.hc-auth__banner-eyebrow,.hc-auth__banner-title,.hc-auth__banner-sub,.hc-auth__banner-cta{position:relative;z-index:1}
.hc-auth__banner-eyebrow{display:inline-flex;align-items:center;gap:8px;margin:0 0 auto;font-size:11.5px;font-weight:650;letter-spacing:.14em;text-transform:uppercase;color:rgba(28,36,49,.74)}
.hc-auth__banner-title{margin:24px 0 12px;font-size:30px;line-height:1.1;font-weight:700;letter-spacing:-.025em;text-wrap:balance}
.hc-auth__banner-sub{margin:0 0 24px;max-width:34ch;font-size:14.5px;line-height:1.55;color:rgba(28,36,49,.68)}
/* Non-interactive nudge toward the form (a <span>, no link), so it reads as a
   hint rather than a button — no hover/cursor affordances. */
.hc-auth__banner-cta{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;padding:10px 18px;border-radius:999px;border:1px solid rgba(28,36,49,.22);background:rgba(255,255,255,.55);color:#1c2431;font-size:14px;font-weight:600}
.hc-auth__banner-blob{position:absolute;inset:auto -70px -90px auto;width:280px;height:280px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#24d172,#2563eb 55%,#8b5cf6);filter:blur(46px);opacity:.5;pointer-events:none}
.hc-auth__banner-blob2{position:absolute;top:-60px;left:-50px;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,#8b5cf6,transparent 68%);filter:blur(38px);opacity:.36;pointer-events:none}
/* Phone: banner stacks below the form so sign-in stays first. */
@media (max-width:720px){
  .hc-auth__card.hc-auth__split{grid-template-columns:1fr}
  .hc-auth__banner{order:2;padding:28px 26px}
  .hc-auth__pane{order:1;padding:32px 26px 24px}
  .hc-auth__banner-title{font-size:24px}
}
.hc-auth__err{background:#fdecec;color:#b42318;font-size:13px;padding:8px 12px;border-radius:8px;margin:0 0 14px}
.hc-wn__footer{flex:0 0 auto;display:flex;align-items:center;gap:1.1rem}
.hc-wn__ok{flex:0 0 auto;padding:.6rem 1.3rem;border:none;border-radius:9999px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;font-weight:600;cursor:pointer}

/* ── Changelog (public) ─────────────────────────────────────────────────────── */
/* Left-aligned within the page shell (main.hc-shell provides the centered 1200
   container + horizontal padding) so the content edge matches article pages. */
.hc-changelog{max-width:var(--read);margin:0;padding:32px 0 56px}
.hc-changelog__title{font-size:30px;font-weight:800;margin:0 0 6px}
.hc-changelog__subtitle{color:#6b7280;font-size:14px;margin:0 0 20px}
.hc-changelog__pills{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.hc-chip{font-size:12px;padding:5px 12px;border-radius:999px;border:1px solid #e3e3e3;color:#555;text-decoration:none}
.hc-chip--on{background:#1a1a1a;color:#fff;border-color:#1a1a1a}
.hc-changelog__post{padding:30px 0;border-top:1px solid #ececec}
.hc-changelog__meta{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.hc-changelog__badge{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;padding:3px 9px;border-radius:5px}
.hc-changelog__date{font-size:12px;color:#9aa0a6}
.hc-changelog__post-title{font-size:22px;font-weight:700;line-height:1.25;margin:0 0 12px}
.hc-changelog__post-title a{color:inherit;text-decoration:none}
/* Collapsed body: clamp to ~9 lines with a fade overlay; JS removes the clamp
   class on short posts and toggles .is-expanded on the post when "Read more" is clicked. */
.hc-changelog__body--clamp{position:relative;max-height:13.5em;overflow:hidden}
.hc-changelog__body--clamp::after{content:"";position:absolute;left:0;right:0;bottom:0;height:64px;background:linear-gradient(to bottom,rgba(255,255,255,0),var(--bg,#fff));pointer-events:none}
.hc-changelog__post.is-expanded .hc-changelog__body--clamp{max-height:none;overflow:visible}
.hc-changelog__post.is-expanded .hc-changelog__body--clamp::after{display:none}
.hc-changelog__readmore{margin-top:12px;font-size:13px;font-weight:600;color:#2962ff;background:none;border:0;padding:0;cursor:pointer}
.hc-changelog__readmore:hover{text-decoration:underline}
.hc-changelog__more{text-align:center;padding:28px 0}
.hc-changelog__back{display:inline-block;margin-bottom:16px;color:#2962ff;text-decoration:none;font-size:13px}
.hc-changelog__empty{color:#9aa0a6;padding:40px 0;text-align:center}
.hc-header__nav{display:inline-flex;align-items:center;gap:.6rem;flex-shrink:0}
.hc-header__link{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:34px;box-sizing:border-box;padding:0 .7rem;border:1px solid var(--border);border-radius:9999px;font-size:.8125rem;font-weight:600;letter-spacing:.02em;color:var(--muted);background:var(--bg);text-decoration:none;transition:color .15s,border-color .15s,background .15s}
.hc-header__link i{font-size:15px}
.hc-header__link:hover{color:var(--accent);border-color:var(--accent);background:var(--accent-tint)}
.hc-wn__all{flex:0 0 auto;color:#2962ff;text-decoration:none;font-size:13px}

/* ── Tickets ────────────────────────────────────────────────────────────────── */

/* Stage badges */
.hc-badge{display:inline-flex;align-items:center;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;letter-spacing:.02em}
.hc-stage-new{background:#f0f4ff;color:#3b5bdb}
.hc-stage-received{background:#f3f4f6;color:#6b7280}
.hc-stage-under_development{background:#e8f5f9;color:#01579b}
.hc-stage-resolved{background:#e8f5e9;color:#1b5e20}
.hc-stage-closed{background:#f3f4f6;color:#6b7280}
/* Coarse status badges (list + detail title) */
.hc-status-submitted{background:#fff3bf;color:#845200}
.hc-status-in_progress{background:#e8f5f9;color:#01579b}
.hc-status-resolved{background:#e8f5e9;color:#1b5e20}
.hc-status-closed{background:#f3f4f6;color:#6b7280}

/* Stage timeline */
.hc-timeline{display:flex;list-style:none;margin:1.2rem 0;padding:0;gap:0}
.hc-timeline__step{flex:1;display:flex;flex-direction:column;align-items:center;position:relative}
.hc-timeline__step::before{content:"";position:absolute;top:15px;left:-50%;right:50%;height:2px;background:#e5e7eb}
.hc-timeline__step:first-child::before{display:none}
.hc-timeline__dot{width:32px;height:32px;border-radius:50%;border:2px solid #d1d5db;background:var(--bg);color:#9ca3af;display:flex;align-items:center;justify-content:center;font-size:16px;z-index:1;flex-shrink:0}
.hc-timeline__label{font-size:11px;color:var(--muted);margin-top:6px;text-align:center;line-height:1.3}
/* Reached stages fill blue with a white icon; the connector into a reached
   step is blue too. Unreached steps stay grey. */
.hc-timeline__step.is-reached .hc-timeline__dot{background:var(--accent);border-color:var(--accent);color:#fff}
.hc-timeline__step.is-reached .hc-timeline__label{color:var(--accent)}
.hc-timeline__step.is-reached::before{background:var(--accent)}
.hc-timeline__step.is-current .hc-timeline__dot{box-shadow:0 0 0 4px var(--accent-tint)}
.hc-timeline__step.is-current .hc-timeline__label{font-weight:700}

/* Ticket form page */
.hc-ticket-form{max-width:640px;margin:2rem auto;padding:0 1rem 3rem}
.hc-ticket-form__title{font-size:1.5rem;font-weight:800;margin:0 0 .5rem}
.hc-ticket-form__signed-in{font-size:.85rem;color:var(--muted);margin:0 0 1rem}
.hc-ticket-form__article{font-size:.85rem;color:var(--muted);margin:0 0 1rem}
.hc-ticket-form__article-label{margin-right:.25rem}
.hc-ticket-form__article-link{color:var(--accent);text-decoration:none}
.hc-ticket-form__article-link:hover{text-decoration:underline}
.hc-ticket-form__form{display:flex;flex-direction:column;gap:1rem}
.hc-ticket-form__type{border:1px solid var(--border);border-radius:8px;padding:.75rem 1rem;display:flex;gap:1.2rem;flex-wrap:wrap}
.hc-ticket-form__legend{font-size:.85rem;font-weight:600;color:var(--muted);padding:0 .25rem}
.hc-ticket-form__radio{display:flex;align-items:center;gap:.4rem;font-size:.9rem;cursor:pointer}
.hc-ticket-form__label{display:flex;flex-direction:column;gap:.4rem;font-size:.875rem;font-weight:600}
.hc-ticket-form__hint{font-size:.75rem;font-weight:400;color:var(--muted)}
.hc-ticket-form__input,.hc-ticket-form__textarea{padding:9px 12px;border:1px solid var(--border);border-radius:8px;font-size:.9375rem;font-family:inherit;background:var(--bg);color:var(--text);resize:vertical}
.hc-ticket-form__input:focus,.hc-ticket-form__textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-tint)}
.hc-ticket-form__file{font-size:.85rem}
.hc-ticket-form__preview{list-style:none;padding:0;margin:.5rem 0 0;display:flex;flex-wrap:wrap;gap:.5rem}
.hc-ticket-form__preview-item{display:flex;align-items:center;gap:.4rem;background:var(--surface,#f8fafc);border:1px solid var(--border);border-radius:8px;padding:.3rem .6rem;font-size:.8rem}
.hc-ticket-form__preview-img{width:32px;height:32px;object-fit:cover;border-radius:4px}
.hc-ticket-form__preview-name{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hc-ticket-form__preview-remove{background:none;border:none;cursor:pointer;font-size:1rem;color:var(--muted);line-height:1;padding:0 .15rem}
.hc-ticket-form__error{background:#fef2f2;color:#b91c1c;border:1px solid #fca5a5;border-radius:8px;padding:.6rem 1rem;font-size:.875rem}
.hc-ticket-form__submit{align-self:flex-start;padding:.65rem 1.6rem;border:none;border-radius:9999px;background:var(--accent);color:#fff;font-size:.9375rem;font-weight:600;cursor:pointer}
.hc-ticket-form__submit:hover{opacity:.9}
.hc-ticket-form__submit:disabled{opacity:.55;cursor:not-allowed}

/* Ticket list page */
/* Fills the page shell (main.hc-shell provides the centered 1200 container +
   1.5rem side padding) so the table spans the full content width and lines up
   with the header; no own top margin — relies on .hc-main's 2rem block padding
   so the top stays tight. */
.hc-ticket-list{margin:0;padding:0 0 2.5rem}
.hc-ticket-list__head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:0 0 1.1rem}
.hc-ticket-list__title{font-size:1.5rem;font-weight:800;margin:0}
.hc-ticket-list__new{display:inline-flex;align-items:center;gap:.4rem;padding:.5rem .95rem;border-radius:9999px;background:var(--accent);color:#fff;font-size:.875rem;font-weight:600;text-decoration:none;white-space:nowrap;transition:opacity .15s}
.hc-ticket-list__new:hover{opacity:.92}
.hc-ticket-list__new i{font-size:16px}
.hc-ticket-list__empty{color:var(--muted);padding:2rem 0}
/* Filter tabs */
.hc-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1.5rem;margin:0 0 1.1rem}
.hc-tabs__group{display:flex;flex-wrap:wrap;gap:.35rem}
.hc-tab{display:inline-flex;align-items:center;padding:.4rem .85rem;border-radius:9999px;font-size:.85rem;font-weight:600;color:var(--muted);text-decoration:none;white-space:nowrap;transition:background .12s,color .12s}
.hc-tab:hover{background:var(--accent-tint);color:var(--accent)}
.hc-tab.is-active{background:var(--accent-tint);color:var(--accent)}
/* Type cell icon */
.hc-ticket-table__cell--type{white-space:nowrap}
.hc-ticket-table__type-ic{margin-right:.4rem;font-size:15px;color:var(--muted);vertical-align:-2px}
/* My-tickets table (header row always shown; empty body when no tickets) */
.hc-ticket-table__wrap{border:1px solid var(--border);border-radius:12px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.hc-ticket-table{width:100%;border-collapse:collapse;font-size:.9rem;min-width:560px;table-layout:fixed}
.hc-ticket-table__th{text-align:left;font-weight:600;font-size:.72rem;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);padding:.7rem .9rem;border-bottom:1px solid var(--border);white-space:nowrap;background:var(--surface,transparent)}
.hc-ticket-table__th--subject{width:55%}
.hc-ticket-table__cell{padding:.8rem .9rem;border-bottom:1px solid var(--border);color:var(--text);vertical-align:middle}
.hc-ticket-table tbody tr:last-child .hc-ticket-table__cell{border-bottom:none}
.hc-ticket-table__row{cursor:pointer;transition:background .12s}
.hc-ticket-table__row:hover{background:var(--accent-tint)}
/* Long titles truncate with an ellipsis (table-layout:fixed constrains the column) */
.hc-ticket-table__link{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-weight:600;text-decoration:none}
.hc-ticket-table__row:hover .hc-ticket-table__link{color:var(--accent)}
.hc-ticket-table__cell--date{color:var(--muted);white-space:nowrap}
.hc-ticket-table__empty{padding:3rem .9rem;text-align:center;color:var(--muted)}
/* Pager */
.hc-pager{display:flex;align-items:center;justify-content:center;gap:1rem;margin:1.2rem 0 0}
.hc-pager__btn{display:inline-flex;align-items:center;gap:.3rem;padding:.45rem .9rem;border:1px solid var(--border);border-radius:9999px;background:var(--bg);color:var(--text);font-size:.85rem;font-weight:600;text-decoration:none;transition:background .12s}
.hc-pager__btn:hover{background:var(--accent-tint)}
.hc-pager__btn.is-disabled{opacity:.45;pointer-events:none}
.hc-pager__status{font-size:.85rem;color:var(--muted)}

/* Ticket detail page */
/* Fills the page shell (like the list) — no narrow centered column, tight top. */
.hc-ticket-detail{margin:0;padding:0 0 2.5rem}
.hc-ticket-detail__back{display:inline-block;margin-bottom:1.2rem;font-size:.875rem;color:var(--accent);text-decoration:none}
.hc-ticket-detail__back:hover{text-decoration:underline}
.hc-ticket-detail__header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem}
.hc-ticket-detail__subject{font-size:1.5rem;font-weight:800;margin:0;flex:1}
/* Created (left) + last-updated (right) on one line — no duplicated date rows. */
.hc-ticket-detail__meta{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap;font-size:.8rem;color:var(--muted);margin:.7rem 0 .25rem}
.hc-ticket-detail__auto-update{font-size:.75rem;color:var(--muted);font-style:italic;margin:0 0 1.2rem}
.hc-ticket-detail__body{background:var(--surface,#f8fafc);border:1px solid var(--border);border-radius:8px;padding:.9rem 1rem;font-size:.9375rem;line-height:1.65;white-space:pre-wrap;word-break:break-word;margin:1rem 0}
.hc-ticket-detail__section-label{font-size:.8rem;font-weight:600;color:var(--muted);margin:.75rem 0 .4rem}
.hc-ticket-detail__thumbs{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:.5rem}
.hc-ticket-detail__thumbs li{display:flex}
.hc-ticket-detail__thumb{width:80px;height:80px;object-fit:cover;border-radius:6px;border:1px solid var(--border)}
.hc-ticket-detail__events{list-style:none;padding:0;margin:1rem 0 0;display:flex;flex-direction:column;gap:.4rem}
.hc-ticket-detail__event{display:flex;align-items:center;gap:.5rem;font-size:.8rem;color:var(--muted)}

/* Raise a ticket CTA (article page) */
.hc-ticket-cta{margin:1.5rem 0;padding:1rem 1.2rem;background:var(--surface,#f8fafc);border:1px solid var(--border);border-radius:10px;display:flex;align-items:center;justify-content:space-between}
.hc-ticket-cta__link{display:inline-flex;align-items:center;gap:.4rem;padding:.5rem 1.2rem;border:1px solid var(--accent);border-radius:9999px;font-size:.875rem;font-weight:600;color:var(--accent);text-decoration:none;transition:background .15s,color .15s}
.hc-ticket-cta__link:hover{background:var(--accent);color:#fff}

/* ═══ Home revamp (2026-08) — Brand v3.0, light only ═══════════════════════ */

/* Headings → core-navy */
.hc-block__title { color: var(--brand-heading); }

/* Centered header nav */
.hc-header__nav--center { flex: 0 0 auto; justify-content: center; }

/* One-line hero title wraps on phones */
@media (max-width: 640px) {
  .hc-hero__title--oneline { white-space: normal; }
}

/* ⌘K affordance + status dot */
.hc-search__kbd {
  display: inline-flex; align-items: center; flex: none;
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--accent-tint); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 9px; margin-left: 8px;
}
.hc-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  display: inline-block; margin-right: 6px; box-shadow: 0 0 0 3px rgba(0, 222, 128, 0.18);
}

/* Search dropdown zero-result CTA */
.hc-search__opt--cta { color: var(--accent-hover); font-weight: 700; }
.hc-search__opt--cta strong { color: var(--accent-hover); }

/* Recently-updated panel */
.hc-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-card); overflow: hidden;
}
.hc-panel__head {
  display: flex; align-items: center; gap: 9px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.hc-panel__icon { color: var(--accent); font-size: 18px; }
.hc-panel__head b { font-size: 15px; font-weight: 700; color: var(--brand-heading); }
/* minmax(0,1fr) — bare 1fr is minmax(auto,1fr), whose auto min expands to the
   widest child, defeating the title's ellipsis and cutting off the right column. */
.hc-panel__rows { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hc-panel__rows .hc-panel__row:nth-child(odd) { border-right: 1px solid var(--border); }
.hc-panel__row {
  display: flex; align-items: center; gap: 13px; padding: 14px 20px;
  border-bottom: 1px solid var(--border); color: var(--brand-heading);
  font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background 0.12s;
}
.hc-panel__row:hover { background: var(--accent-tint); }
.hc-panel__row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-panel__row-date { font-size: 12px; color: var(--faint); font-weight: 500; }
.hc-panel__row-chev { color: var(--faint); opacity: 0; transition: opacity 0.12s; }
.hc-panel__row:hover .hc-panel__row-chev { opacity: 1; }

/* Quick actions */
.hc-quickactions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hc-qa {
  display: flex; flex-direction: column; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 15px;
  box-shadow: var(--shadow-card); text-decoration: none; transition: transform 0.14s, box-shadow 0.14s;
}
.hc-qa:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.hc-qa__ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; }
.hc-qa__ic--blue { background: #eaf3ff; color: var(--accent-hover); }
.hc-qa__ic--violet { background: #f0ebff; color: #6337e3; }
.hc-qa__ic--mint { background: #eafff4; color: #00c370; }
.hc-qa__ic--navy { background: #eaecfb; color: var(--brand-heading); }
.hc-qa b { font-size: 14px; font-weight: 700; color: var(--brand-heading); }
.hc-qa__sub { font-size: 12px; color: var(--faint); font-weight: 500; }

/* Contact band — login-gate soft treatment */
.hc-contactband {
  position: relative; overflow: hidden; border-radius: 24px; padding: 52px 48px;
  background: var(--cream); color: var(--cream-ink); box-shadow: var(--shadow-card);
}
.hc-contactband__blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hc-contactband__blob--1 {
  inset: auto -90px -120px auto; width: 360px; height: 360px;
  background: radial-gradient(circle at 30% 30%, #00de80, #057eff 55%, #6337e3); opacity: 0.42;
}
.hc-contactband__blob--2 {
  top: -80px; left: -70px; width: 240px; height: 240px;
  background: radial-gradient(circle, #6337e3, transparent 68%); opacity: 0.3;
}
.hc-contactband__in {
  position: relative; z-index: 1; display: flex; align-items: center;
  justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.hc-contactband__text h2 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--cream-ink); }
.hc-contactband__text p { margin: 0; font-size: 15.5px; color: rgba(28, 36, 49, 0.7); max-width: 460px; }
.hc-contactband__btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none; font-weight: 700; font-size: 14px;
  border-radius: 9999px; padding: 11px 20px; background: rgba(255, 255, 255, 0.62); color: var(--cream-ink);
  text-decoration: none; box-shadow: inset 0 0 0 1px rgba(28, 36, 49, 0.22); transition: background 0.12s, box-shadow 0.12s;
}
.hc-contactband__btn:hover { background: #fff; box-shadow: inset 0 0 0 1px rgba(28, 36, 49, 0.32), 0 6px 18px rgba(28, 36, 49, 0.08); }

/* Icon-only logo (inner pages) */
.hc-header__logo--icon { flex: 0 0 auto; overflow: visible; }

/* Mobile menu — hamburger disclosure (hidden on desktop) */
.hc-mobmenu { position: relative; display: none; }
.hc-mobmenu__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 9999px; border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  cursor: pointer; list-style: none;
}
.hc-mobmenu__btn::-webkit-details-marker { display: none; }
.hc-mobmenu__btn i { font-size: 18px; }
.hc-mobmenu[open] .hc-mobmenu__btn { border-color: var(--accent); color: var(--text); }
.hc-mobmenu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px;
  display: flex; flex-direction: column; gap: 2px; padding: 8px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--bg);
  box-shadow: 0 16px 40px rgba(6, 10, 40, 0.14);
}
.hc-mobmenu__link {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: var(--brand-heading); text-decoration: none;
}
.hc-mobmenu__link i { font-size: 18px; color: var(--muted); }
.hc-mobmenu__link:hover { background: var(--accent-tint); color: var(--accent-hover); }
.hc-mobmenu__link:hover i { color: var(--accent-hover); }

/* ⌘K command palette (modal popup) */
.hc-cmdk-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(10, 17, 48, 0.42);
  backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 20px;
}
.hc-cmdk-overlay[hidden] { display: none; }
.hc-cmdk {
  width: 100%; max-width: 600px; background: var(--bg); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(6, 10, 40, 0.35); overflow: hidden;
  animation: hc-cmdk-pop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes hc-cmdk-pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
.hc-cmdk__in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.hc-cmdk__in > i { font-size: 20px; color: var(--accent); flex: none; }
.hc-cmdk__input { flex: 1; border: 0; outline: 0; font-family: inherit; font-size: 17px; font-weight: 500; color: var(--text); background: transparent; }
.hc-cmdk__input::placeholder { color: var(--faint); }
.hc-cmdk__esc { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--accent-tint); border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px; }
.hc-cmdk__body { max-height: 52vh; overflow: auto; padding: 8px; }
.hc-cmdk__group { padding: 10px 12px 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.hc-cmdk__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; background: transparent; border-radius: 11px; cursor: pointer; text-decoration: none; text-align: left; font-family: inherit; }
.hc-cmdk__item.is-active { background: var(--accent-tint); }
.hc-cmdk__item-ic { font-size: 17px; color: var(--muted); flex: none; }
.hc-cmdk__item-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; color: var(--brand-heading); }
.hc-cmdk__item-c { font-size: 12px; color: var(--faint); font-weight: 500; flex: none; }
.hc-cmdk__empty { text-align: center; padding: 28px 20px; }
.hc-cmdk__empty p { margin: 0 0 14px; font-weight: 600; color: var(--brand-heading); font-size: 15px; }
.hc-cmdk__cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; border-radius: 9999px; padding: 10px 18px; background: var(--brand); color: var(--brand-heading); text-decoration: none; }
.hc-cmdk__foot { display: flex; align-items: center; gap: 16px; padding: 11px 18px; border-top: 1px solid var(--border); background: var(--accent-tint); font-size: 12px; color: var(--muted); }
.hc-cmdk__foot span { display: inline-flex; align-items: center; gap: 6px; }
.hc-cmdk__foot kbd { font-family: inherit; font-weight: 700; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; font-size: 11px; }

@media (max-width: 1000px) {
  .hc-quickactions { grid-template-columns: repeat(2, 1fr); }
  .hc-panel__rows { grid-template-columns: minmax(0, 1fr); }
  .hc-panel__rows .hc-panel__row:nth-child(odd) { border-right: 0; }
}
@media (max-width: 640px) {
  .hc-header__nav--center { display: none; }
  .hc-mobmenu { display: block; }
  .hc-quickactions { grid-template-columns: 1fr 1fr; }
  .hc-contactband { padding: 32px 26px; }
}
