/* =========================================================================
   Curtains 3 — site styles
   A light, bright design system. Everything is driven by the custom
   properties in :root — change those to re-tune the whole site.
   ========================================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand */
  --violet:        #6c4dff;
  --violet-deep:   #5334ef;
  --violet-soft:   #efeaff;
  --pink:          #ff5a86;
  --pink-soft:     #ffe8ee;
  --amber:         #ffb13c;
  --amber-soft:    #fff2dd;
  --teal:          #00bfa6;
  --teal-soft:     #ddf7f2;
  --sky:           #2f9dff;
  --sky-soft:      #e3f1ff;

  /* Neutrals */
  --ink:           #141733;
  --ink-2:         #383e63;
  --muted:         #666d92;
  --line:          #e6e8f4;
  --line-soft:     #f0f1f9;
  --bg:            #ffffff;
  --bg-soft:       #f7f8fd;
  --bg-tint:       #fbfaff;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: var(--font);

  /* Shape */
  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(20, 23, 51, .06), 0 2px 8px rgba(20, 23, 51, .04);
  --shadow:    0 2px 6px rgba(20, 23, 51, .05), 0 12px 32px rgba(20, 23, 51, .07);
  --shadow-lg: 0 8px 24px rgba(20, 23, 51, .08), 0 32px 64px rgba(20, 23, 51, .10);
  --ring: 0 0 0 4px rgba(108, 77, 255, .22);

  /* Layout */
  --container: 1160px;
  --gutter: 24px;
  --header-h: 74px;
  --control-h: 54px;   /* height every single-line form control lands on */
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.022em;
  font-weight: 800;
}

h1 { font-size: clamp(2.05rem, 1.5rem + 1.95vw, 3.15rem); }
h2 { font-size: clamp(1.7rem, 1.35rem + 1.35vw, 2.3rem); }
h3 { font-size: clamp(1.18rem, 1.05rem + .45vw, 1.4rem); font-weight: 750; }
h4 { font-size: 1.03rem; font-weight: 700; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--violet-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: .45em; }
li:last-child { margin-bottom: 0; }

strong { color: var(--ink); font-weight: 700; }

hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--violet-soft); color: var(--ink); }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--radius-sm); font-weight: 650;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

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

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }
.container--mid    { max-width: 960px; }

.section { padding: clamp(56px, 7vw, 104px) 0; position: relative; }
.section--tight { padding: clamp(40px, 5vw, 68px) 0; }
.section--soft  { background: var(--bg-soft); }
.section--tint  { background: var(--bg-tint); }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.09rem; margin-bottom: 0; }

.stack > * + * { margin-top: 18px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }

/* Inline icons carry a viewBox but no width/height, so give them a sane
   default size. Anything inside a sized container overrides this below. */
main svg:not([width]) { width: 22px; height: 22px; flex: none; }
.icon-chip svg:not([width]) { width: 24px; height: 24px; }
.download-icon svg:not([width]) { width: 22px; height: 22px; }
.route-card .icon-chip svg:not([width]) { width: 21px; height: 21px; }

/* ---------- 4. Typographic accents ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 750; letter-spacing: .09em;
  text-transform: uppercase; color: var(--violet-deep);
  background: var(--violet-soft);
  padding: 7px 14px; border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.eyebrow--pink  { color: #d62c5c; background: var(--pink-soft); }
.eyebrow--teal  { color: #00806f; background: var(--teal-soft); }
.eyebrow--amber { color: #96590a; background: var(--amber-soft); }

.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}

.lede {
  font-size: clamp(1.06rem, 1rem + .35vw, 1.28rem);
  color: var(--muted);
  line-height: 1.6;
}

.gradient-text {
  background: linear-gradient(96deg, var(--violet) 0%, var(--pink) 52%, var(--amber) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 680; font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .18s ease,
              background-color .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(100deg, var(--violet) 0%, #8a53ff 55%, var(--pink) 130%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(108, 77, 255, .32);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(108, 77, 255, .40); color: #fff; }

.btn-ghost {
  background: #fff; color: var(--ink); border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: #c9cdec; color: var(--ink); }

.btn-quiet { background: transparent; color: var(--violet-deep); padding-inline: 8px; }
.btn-quiet:hover { background: var(--violet-soft); }

.btn-sm { padding: 10px 18px; font-size: .93rem; }
.btn-lg { padding: 17px 32px; font-size: 1.06rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn-row--center { justify-content: center; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 680; color: var(--violet-deep);
}
.arrow-link::after { content: "→"; transition: transform .18s ease; }
.arrow-link:hover { text-decoration: none; }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- 6. Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(20, 23, 51, .05);
}

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.28rem; letter-spacing: -.032em;
  color: var(--ink); line-height: 1;
}
.brand-word .three {
  color: var(--violet-deep);
}

.site-nav { margin-left: auto; }
.nav-list {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-list > li { margin: 0; position: relative; }

.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--radius-pill);
  font-weight: 620; font-size: .96rem; color: var(--ink-2);
  background: none; border: 0; font-family: inherit; cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.nav-link:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--violet-deep); background: var(--violet-soft); }

.nav-caret { width: 10px; height: 10px; transition: transform .2s ease; }
.nav-link[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 264px; padding: 10px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  list-style: none; margin: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-menu[data-open="true"] {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-menu li { margin: 0; }
.nav-menu a {
  display: block; padding: 11px 13px; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 650; font-size: .95rem;
}
.nav-menu a:hover { background: var(--bg-soft); text-decoration: none; }
.nav-menu .nav-menu-desc {
  display: block; font-weight: 450; font-size: .84rem;
  color: var(--muted); margin-top: 2px; line-height: 1.45;
}

.header-cta { flex: none; margin-left: 6px; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; color: var(--ink);
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: currentColor; position: relative;
  transition: background-color .15s ease;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0;
  width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 14px var(--gutter) 26px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    display: none;
  }
  .site-nav[data-open="true"] { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { justify-content: space-between; padding: 13px 14px; font-size: 1.02rem; }
  .nav-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; border: 0; border-left: 2px solid var(--line);
    border-radius: 0; margin: 2px 0 8px 14px; padding: 0 0 0 8px;
    min-width: 0; display: none;
  }
  .nav-menu[data-open="true"] { display: block; transform: none; }
  .header-cta { display: none; }
  .nav-cta-mobile { display: block; margin-top: 14px; }
}
@media (min-width: 961px) { .nav-cta-mobile { display: none; } }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding: clamp(52px, 6.5vw, 96px) 0 clamp(52px, 6.5vw, 92px);
  overflow: hidden;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(108, 77, 255, .16), transparent 62%),
    radial-gradient(680px 400px at 92% 4%, rgba(255, 90, 134, .14), transparent 60%),
    radial-gradient(600px 400px at 60% 108%, rgba(255, 177, 60, .16), transparent 62%),
    #fff;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: var(--line);
}

.hero-grid {
  display: grid; gap: clamp(36px, 5vw, 64px);
  grid-template-columns: 1.08fr .92fr; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 20px; max-width: 20ch; }
.hero .lede { max-width: 34em; margin-bottom: 30px; }

.hero-note {
  margin-top: 26px; font-size: .93rem; color: var(--muted);
  display: flex; align-items: center; gap: 9px;
}
.hero-note svg { flex: none; width: 20px; height: 20px; color: var(--teal); }

/* Curtain illustration panel */
.hero-art {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #fff;
  border: 1px solid var(--line);
}
.hero-art svg { width: 100%; display: block; }

/* ---------- 8. Cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.card h3 { margin-bottom: 10px; }
.card p  { color: var(--muted); font-size: .98rem; }
.card--lift:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d8dcf2; }
.card--flat { box-shadow: none; }
.card--pad-lg { padding: 34px; }

.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { text-decoration: none; }

.icon-chip {
  width: 48px; height: 48px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--violet-deep); background: var(--violet-soft);
}
.icon-chip svg { width: 24px; height: 24px; }
.icon-chip--pink  { color: #d62c5c; background: var(--pink-soft); }
.icon-chip--teal  { color: #00806f; background: var(--teal-soft); }
.icon-chip--amber { color: #96590a; background: var(--amber-soft); }
.icon-chip--sky   { color: #0f6fc4; background: var(--sky-soft); }

.tag {
  display: inline-block; font-size: .74rem; font-weight: 750;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--bg-soft); color: var(--muted);
}
.tag--live    { background: var(--teal-soft);  color: #00806f; }
.tag--soon    { background: var(--amber-soft); color: #96590a; }
.tag--new     { background: var(--violet-soft); color: var(--violet-deep); }

.card-tag { position: absolute; top: 22px; right: 22px; }

/* Feature list with ticks */
.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li {
  position: relative; padding-left: 32px; margin-bottom: 13px;
  color: var(--ink-2);
}
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: .28em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300806f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Split feature rows */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.split + .split { margin-top: clamp(48px, 6vw, 88px); }
.split--flip .split-media { order: -1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split-media { order: 0; }
}

.split-media {
  border-radius: var(--radius-lg); padding: 28px;
  background: linear-gradient(150deg, var(--violet-soft), #fff 65%);
  border: 1px solid var(--line);
}
.split-media--warm { background: linear-gradient(150deg, var(--amber-soft), #fff 65%); }
.split-media--cool { background: linear-gradient(150deg, var(--teal-soft), #fff 65%); }

/* ---------- 9. Steps / numbered ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { position: relative; padding-left: 62px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.02rem; color: #fff;
  background: linear-gradient(140deg, var(--violet), var(--pink));
  box-shadow: 0 4px 12px rgba(108, 77, 255, .28);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin-bottom: 0; }

/* ---------- 10. CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(38px, 5vw, 62px);
  background: linear-gradient(115deg, #2c1c66 0%, #5334ef 46%, #a04bff 78%, #ff5a86 122%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: ""; position: absolute; right: -80px; top: -120px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 177, 60, .40), transparent 66%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; max-width: 16ch; }
.cta-band p { color: rgba(255, 255, 255, .86); max-width: 52ch; font-size: 1.06rem; }
.cta-band .btn-ghost { background: #fff; border-color: #fff; color: var(--ink); }
.cta-band .btn-outline {
  background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff;
}
.cta-band .btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- 11. FAQ accordion ---------- */
.faq-group + .faq-group { margin-top: 44px; }
.faq-group > h3 {
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 750; margin-bottom: 16px;
}

.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; margin-bottom: 12px; overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.faq-item[data-open="true"] { border-color: #cfd4f0; box-shadow: var(--shadow-sm); }

.faq-q {
  width: 100%; text-align: left; font: inherit; font-weight: 680;
  color: var(--ink); font-size: 1.03rem;
  background: none; border: 0; cursor: pointer;
  padding: 20px 56px 20px 22px; position: relative;
  display: block;
}
.faq-q:hover { color: var(--violet-deep); }
.faq-q::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666d92' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
.faq-item[data-open="true"] .faq-q::after { transform: rotate(180deg); }

.faq-a { padding: 0 22px 22px; color: var(--muted); }
.faq-a p:first-child { margin-top: 0; }
.faq-a[hidden] { display: none; }

.faq-search {
  position: relative; margin-bottom: 28px;
}
.faq-search input {
  padding-left: 46px;
}
.faq-search::before {
  content: ""; position: absolute; left: 17px; top: 50%; margin-top: -9px;
  width: 18px; height: 18px; z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666d92' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
}
.faq-empty {
  padding: 26px; border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); text-align: center;
}

/* ---------- 12. Downloads ---------- */
.download-item {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.download-item:hover { border-color: #d8dcf2; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.download-icon {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--violet-soft); color: var(--violet-deep);
}
.download-icon svg { width: 22px; height: 22px; }
.download-body { flex: 1 1 auto; min-width: 0; }
.download-body h3 { font-size: 1.04rem; margin-bottom: 3px; }
.download-body p { margin: 0; color: var(--muted); font-size: .92rem; }
.download-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px;
  font-size: .82rem; color: var(--muted);
}
.download-meta span { display: inline-flex; align-items: center; gap: 5px; }
.download-action { flex: none; }
@media (max-width: 640px) {
  .download-item { flex-wrap: wrap; }
  .download-action, .download-action .btn { width: 100%; }
}

.notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--sky-soft); border: 1px solid #c5e2ff;
  color: #14456f; font-size: .96rem;
}
.notice svg { flex: none; width: 22px; height: 22px; margin-top: 3px; }
.notice--warm { background: var(--amber-soft); border-color: #ffdda6; color: #7a4a06; }
.notice--soft { background: var(--bg-soft); border-color: var(--line); color: var(--ink-2); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- 13. Forms ---------- */
.form-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 42px);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }
.field label, .field .field-label {
  display: block; font-weight: 670; color: var(--ink);
  font-size: .95rem; margin-bottom: 7px;
}
.field .hint {
  display: block; font-weight: 400; color: var(--muted);
  font-size: .86rem; margin-top: -3px; margin-bottom: 8px;
}
.req { color: var(--pink); font-weight: 700; }

/* Every text-like input, spelled out. A type missing from this list falls
   back to the browser's default control and looks broken next to the rest of
   the form - which is exactly what happened to password fields. There is a
   test in test/forms.test.js that fails if a template uses a type that is not
   covered here. */
input[type="text"], input[type="email"], input[type="tel"],
input[type="search"], input[type="password"], input[type="url"],
input[type="number"], input[type="date"], input[type="datetime-local"],
input[type="month"], input[type="week"], input[type="time"],
select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  min-height: var(--control-h);
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 12px; padding: 13px 15px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
input::placeholder, textarea::placeholder { color: #9aa0bf; }
input:hover, select:hover, textarea:hover { border-color: #d2d7ef; }
input:focus, select:focus, textarea:focus {
  outline: none; background: #fff;
  border-color: var(--violet); box-shadow: var(--ring);
}
textarea { min-height: 148px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666d92' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 15px;
  padding-right: 44px;
}

/* Every single-line control gets exactly the same height. Without this, a
   text input sizes itself from its line box while a date control uses a taller
   intrinsic box, and the two do not line up when they sit side by side in a
   .field-row. textarea is deliberately absent - it grows. */
input[type="text"], input[type="email"], input[type="tel"],
input[type="search"], input[type="password"], input[type="url"],
input[type="number"], input[type="date"], input[type="datetime-local"],
input[type="month"], input[type="week"], input[type="time"],
select {
  height: var(--control-h);
}

/* File inputs cannot take the same treatment - the control is drawn by the
   browser - so they get a matching dashed well plus a styled picker button. */
input[type="file"] {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink-2);
  background: var(--bg-soft);
  border: 1.5px dashed var(--line); border-radius: 12px;
  padding: 12px 14px; cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}
input[type="file"]:hover { border-color: #c9cdec; background: #fff; }
input[type="file"]:focus-visible {
  outline: none; border-color: var(--violet); box-shadow: var(--ring);
}
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 650; font-size: .9rem;
  margin-right: 14px; padding: 8px 16px;
  border: 0; border-radius: var(--radius-pill); cursor: pointer;
  background: var(--violet-soft); color: var(--violet-deep);
  transition: background-color .16s ease;
}
input[type="file"]::file-selector-button:hover { background: #e3dcff; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
/* Labels in a row are not always the same height - one may carry a hint like
   "Optional" and wrap to two lines. Bottom-align the controls so they line up
   regardless of how tall the label above each one is. */
.field-row > .field { display: flex; flex-direction: column; }
.field-row > .field > input,
.field-row > .field > select,
.field-row > .field > textarea { margin-top: auto; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.choice {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 14px 16px; border: 1.5px solid var(--line);
  border-radius: 12px; background: var(--bg-soft); cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
  font-size: .95rem;
}
.choice:hover { border-color: #d2d7ef; }
.choice input { margin: 3px 0 0; accent-color: var(--violet); flex: none; width: auto; }
.choice:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); }
.choice span { color: var(--ink-2); }
.choice strong { display: block; }

.form-status {
  margin-top: 18px; padding: 15px 18px; border-radius: 12px;
  font-size: .95rem; font-weight: 600;
}
.form-status[hidden] { display: none; }
.form-status--ok   { background: var(--teal-soft); color: #00695c; border: 1px solid #a8e6dc; }
.form-status--err  { background: var(--pink-soft); color: #a01840; border: 1px solid #ffc4d3; }
.form-status--info { background: var(--sky-soft); color: #14456f; border: 1px solid #c5e2ff; }

.field-error {
  display: block; color: #c21f4d; font-size: .86rem;
  font-weight: 600; margin-top: 6px;
}
.field-error[hidden] { display: none; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: #f3809f; background: #fff8fa;
}

.form-footnote { font-size: .87rem; color: var(--muted); margin-top: 16px; }

/* Contact route cards */
.route-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}
.route-card .icon-chip { margin-bottom: 0; width: 42px; height: 42px; border-radius: 12px; }
.route-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.route-card p { font-size: .93rem; color: var(--muted); margin-bottom: 8px; }

/* ---------- 14. Footer ---------- */
.site-footer {
  background: #0f1230; color: #b9bede;
  padding: clamp(48px, 6vw, 76px) 0 30px;
  margin-top: 0;
}
.site-footer a { color: #d8dcf5; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid; gap: 36px;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .brand-word { color: #fff; }
.footer-brand .brand-word .three { color: #ffb13c; }
.footer-brand p {
  margin-top: 16px; font-size: .94rem; color: #9aa0c8; max-width: 34ch;
}

.footer-col h4 {
  color: #fff; font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; font-size: .95rem; }

.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 12px 26px;
  justify-content: space-between; align-items: center;
  font-size: .87rem; color: #868cb6;
}
.footer-bottom ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-bottom li { margin: 0; }

/* ---------- 15. Page header (interior pages) ---------- */
.page-head {
  padding: clamp(44px, 5.5vw, 78px) 0 clamp(36px, 4.5vw, 56px);
  background:
    radial-gradient(620px 320px at 8% -20%, rgba(108, 77, 255, .15), transparent 62%),
    radial-gradient(560px 320px at 96% -10%, rgba(255, 177, 60, .16), transparent 60%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 16px; max-width: 18ch; }
.page-head .lede { max-width: 60ch; }
.page-head--center { text-align: center; }
.page-head--center h1, .page-head--center .lede { margin-inline: auto; }

.breadcrumb {
  font-size: .88rem; color: var(--muted); margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--violet-deep); }
.breadcrumb span { padding: 0 7px; opacity: .6; }

/* ---------- 16. Logo strip / partners ---------- */
.partner-strip {
  display: flex; flex-wrap: wrap; gap: 12px 14px;
  align-items: center; justify-content: center;
}
.partner-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: #fff; border: 1px solid var(--line);
  font-weight: 680; color: var(--ink-2); font-size: .95rem;
  box-shadow: var(--shadow-sm);
}
.partner-pill .dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
}

/* ---------- 17. Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .6s cubic-bezier(.22,.8,.3,1), transform .6s cubic-bezier(.22,.8,.3,1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 18. Chat assistant ---------- */
.chat-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 120;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px 14px 16px; border: 0; cursor: pointer;
  font: inherit; font-weight: 680; font-size: .97rem; color: #fff;
  border-radius: var(--radius-pill);
  background: linear-gradient(105deg, var(--violet) 0%, #8a53ff 55%, var(--pink) 120%);
  box-shadow: 0 8px 26px rgba(83, 52, 239, .38);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.chat-launcher:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(83, 52, 239, .46); }
.chat-launcher svg { width: 21px; height: 21px; flex: none; }
.chat-launcher[data-hidden="true"] { opacity: 0; pointer-events: none; transform: scale(.9); }
@media (max-width: 520px) {
  .chat-launcher { right: 16px; bottom: 16px; padding: 14px; }
  .chat-launcher .chat-launcher-label { display: none; }
}

.chat-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 130;
  width: min(400px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 40px));
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(20, 23, 51, .26);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.98);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.chat-panel[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 520px) {
  .chat-panel {
    right: 8px; left: 8px; bottom: 8px; width: auto;
    height: min(80vh, calc(100vh - 16px));
  }
}

.chat-header {
  padding: 16px 18px; color: #fff; flex: none;
  background: linear-gradient(105deg, var(--violet) 0%, #8a53ff 58%, var(--pink) 130%);
  display: flex; align-items: center; gap: 12px;
}
.chat-header .chat-avatar {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center;
}
.chat-header h2 { color: #fff; font-size: 1.02rem; margin: 0; }
.chat-header p { margin: 2px 0 0; font-size: .8rem; color: rgba(255, 255, 255, .85); }
.chat-close {
  margin-left: auto; width: 34px; height: 34px; flex: none;
  border: 0; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.chat-close:hover { background: rgba(255, 255, 255, .28); }

.chat-log {
  flex: 1 1 auto; overflow-y: auto; padding: 18px;
  background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}

.chat-msg { max-width: 88%; font-size: .94rem; line-height: 1.58; }
.chat-msg p { margin: 0 0 .7em; }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-msg ul { margin: .4em 0 .6em; padding-left: 1.15em; }
.chat-msg li { margin-bottom: .3em; }

.chat-msg--bot .chat-bubble {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px 16px 16px 5px; padding: 13px 15px;
  color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.chat-msg--user { align-self: flex-end; }
.chat-msg--user .chat-bubble {
  background: linear-gradient(105deg, var(--violet), #8a53ff);
  color: #fff; border-radius: 16px 16px 5px 16px; padding: 13px 15px;
}
.chat-msg--user .chat-bubble a { color: #fff; text-decoration: underline; }

.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chat-chip {
  font: inherit; font-size: .85rem; font-weight: 620;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: #fff; border: 1.5px solid #ddd9ff; color: var(--violet-deep);
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.chat-chip:hover { background: var(--violet-soft); border-color: var(--violet); }

.chat-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.chat-typing i {
  width: 7px; height: 7px; border-radius: 50%; background: #b9bede;
  animation: chat-bounce 1.1s infinite ease-in-out;
}
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-form {
  flex: none; padding: 12px; border-top: 1px solid var(--line);
  background: #fff; display: flex; gap: 9px; align-items: flex-end;
}
.chat-form textarea {
  flex: 1 1 auto; min-height: 46px; max-height: 120px;
  padding: 12px 14px; border-radius: 14px; font-size: .95rem;
  resize: none; background: var(--bg-soft);
}
.chat-send {
  flex: none; width: 46px; height: 46px; border: 0; cursor: pointer;
  border-radius: 14px; color: #fff;
  background: linear-gradient(105deg, var(--violet), #8a53ff);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s ease, transform .15s ease;
}
.chat-send:hover { transform: translateY(-1px); }
.chat-send:disabled { opacity: .4; cursor: default; transform: none; }

.chat-disclaimer {
  flex: none; padding: 9px 14px 12px; background: #fff;
  font-size: .74rem; color: var(--muted); text-align: center;
  border-top: 1px solid var(--line-soft);
}

/* ---------- 19. Print ---------- */
@media print {
  .site-header, .site-footer, .chat-launcher, .chat-panel, .cta-band { display: none !important; }
  body { color: #000; font-size: 12pt; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   20. Application surfaces
   Sign-in, account, admin, articles and listings. Same tokens as the
   marketing pages, so the two halves of the site read as one thing.
   ========================================================================= */

/* ---------- Flash messages ---------- */
.flash-bar { border-bottom: 1px solid var(--line); font-size: .95rem; font-weight: 600; }
.flash-inner { padding-block: 13px; }
.flash-bar--ok   { background: var(--teal-soft);  color: #00695c; border-bottom-color: #a8e6dc; }
.flash-bar--err  { background: var(--pink-soft);  color: #a01840; border-bottom-color: #ffc4d3; }
.flash-bar--info { background: var(--sky-soft);   color: #14456f; border-bottom-color: #c5e2ff; }
.flash-bar--warn { background: var(--amber-soft); color: #7a4a06; border-bottom-color: #ffdda6; }
.flash-bar a { color: inherit; text-decoration: underline; }

/* ---------- Account nav ---------- */
.nav-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .74rem; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--violet), var(--pink));
}
.nav-menu--right { left: auto; right: 0; transform: translateY(-6px); }
.nav-menu--right[data-open="true"] { transform: translateY(0); }
@media (max-width: 960px) {
  .nav-menu--right { right: auto; transform: none; }
}
.nav-menu-head {
  padding: 11px 13px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px;
}
.nav-menu-head strong { display: block; font-size: .95rem; color: var(--ink); }
.nav-menu-form { margin: 0; }
.nav-menu-signout {
  width: 100%; text-align: left; font: inherit; font-weight: 650; font-size: .95rem;
  padding: 11px 13px; border: 0; border-radius: var(--radius-sm);
  background: none; color: #c21f4d; cursor: pointer;
}
.nav-menu-signout:hover { background: var(--pink-soft); }

/* ---------- Auth cards ---------- */
.auth-wrap {
  min-height: 60vh; display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(36px, 6vw, 76px) 0;
  background:
    radial-gradient(620px 340px at 12% -18%, rgba(108, 77, 255, .14), transparent 62%),
    radial-gradient(560px 320px at 92% -6%, rgba(255, 177, 60, .14), transparent 60%),
    #fff;
}
.auth-card { width: 100%; max-width: 480px; }
.auth-card--wide { max-width: 640px; }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: clamp(1.7rem, 1.4rem + 1.1vw, 2.1rem); margin-bottom: 10px; }
.auth-head p { color: var(--muted); margin: 0; }
.auth-alt { text-align: center; margin-top: 22px; font-size: .95rem; color: var(--muted); }

/* ---------- Prose (rendered markdown) ---------- */
.prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink-2); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 1.5rem; margin: 1.9em 0 .55em; }
.prose h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.prose h4 { margin: 1.4em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { margin-bottom: .5em; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; border: 1px solid var(--line); }
.prose blockquote {
  margin: 1.5em 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--violet); color: var(--muted);
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; background: var(--bg-soft); color: #5334ef;
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-soft);
}
.prose pre {
  background: #14173a; color: #e6e8fb; padding: 18px 20px;
  border-radius: var(--radius); overflow-x: auto; font-size: .9rem; line-height: 1.6;
}
.prose pre code { background: none; border: 0; color: inherit; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .96rem; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 700; background: var(--bg-soft); }
.prose hr { margin: 2.2em 0; }

/* ---------- Article / listing ---------- */
.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  font-size: .9rem; color: var(--muted); margin-bottom: 18px;
}
.article-meta .tag { text-transform: uppercase; }

.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card .post-card-meta { font-size: .84rem; color: var(--muted); margin-bottom: 10px; }
.post-card h3 { margin-bottom: 8px; }
.post-card p { flex: 1 1 auto; }
.post-card .arrow-link { margin-top: 14px; }

.empty-state {
  padding: 48px 28px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
  color: var(--muted); background: var(--bg-soft);
}
.empty-state h3 { color: var(--ink-2); margin-bottom: 8px; }

/* ---------- Release notes ---------- */
.release {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; padding: clamp(24px, 3.5vw, 36px); margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.release-head {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: baseline;
  margin-bottom: 6px;
}
.release-head h2 { margin: 0; font-size: 1.5rem; }
.release-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem; font-weight: 700; color: var(--violet-deep);
  background: var(--violet-soft); padding: 5px 11px; border-radius: var(--radius-pill);
}
.release-date { font-size: .9rem; color: var(--muted); }

.locked-panel {
  margin-top: 22px; padding: 24px; border-radius: var(--radius);
  border: 1px dashed #cfd4f0; background: var(--bg-tint);
  display: flex; gap: 16px; align-items: flex-start;
}
.locked-panel svg { flex: none; width: 22px; height: 22px; color: var(--violet-deep); margin-top: 3px; }
.locked-panel h4 { margin-bottom: 5px; }
.locked-panel p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }

.customer-panel {
  margin-top: 24px; padding-top: 24px; border-top: 1px dashed var(--line);
}
.customer-flag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  color: #00806f; background: var(--teal-soft);
  padding: 5px 12px; border-radius: var(--radius-pill); margin-bottom: 14px;
}

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.data th, table.data td { padding: 13px 16px; text-align: left; vertical-align: middle; }
table.data thead th {
  background: var(--bg-soft); color: var(--muted); font-weight: 700;
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data tbody tr { border-bottom: 1px solid var(--line-soft); }
table.data tbody tr:last-child { border-bottom: 0; }
table.data tbody tr:hover { background: var(--bg-tint); }
table.data td strong { display: block; }
table.data .muted { color: var(--muted); font-size: .88rem; }
table.data .actions { text-align: right; white-space: nowrap; }
table.data .actions form { display: inline; }

.badge {
  display: inline-block; font-size: .74rem; font-weight: 750;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--bg-soft); color: var(--muted); white-space: nowrap;
}
.badge--pending   { background: var(--amber-soft); color: #96590a; }
.badge--active    { background: var(--teal-soft);  color: #00806f; }
.badge--rejected,
.badge--suspended { background: var(--pink-soft);  color: #a01840; }
.badge--admin     { background: var(--violet-soft); color: var(--violet-deep); }
.badge--draft     { background: var(--bg-soft); color: var(--muted); }
.badge--published { background: var(--teal-soft); color: #00806f; }
.badge--public    { background: var(--sky-soft); color: #0f6fc4; }
.badge--customer  { background: var(--violet-soft); color: var(--violet-deep); }

/* ---------- Admin shell ---------- */
.admin-head {
  padding: 30px 0 26px; border-bottom: 1px solid var(--line); background: #fff;
}
.admin-head .container { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.admin-head h1 { margin: 0; font-size: clamp(1.5rem, 1.3rem + .8vw, 1.9rem); }
.admin-head .spacer { margin-left: auto; }

.admin-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 0;
  border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.admin-tabs a {
  padding: 9px 15px; border-radius: var(--radius-pill);
  font-weight: 640; font-size: .95rem; color: var(--ink-2);
}
.admin-tabs a:hover { background: #fff; text-decoration: none; }
.admin-tabs a[aria-current="page"] { background: var(--violet); color: #fff; }
.admin-tabs .count {
  display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 6px;
  border-radius: var(--radius-pill); background: var(--pink); color: #fff;
  font-size: .74rem; font-weight: 800; text-align: center;
}
.admin-tabs a[aria-current="page"] .count { background: rgba(255,255,255,.28); }

.stat-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.stat .stat-label {
  font-size: .78rem; font-weight: 750; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.stat .stat-value { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat .stat-note { font-size: .86rem; color: var(--muted); margin-top: 6px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px;
}
.toolbar .spacer { margin-left: auto; }
.toolbar form { display: flex; gap: 10px; align-items: center; margin: 0; }
.toolbar input[type="search"], .toolbar select { width: auto; min-width: 190px; }

.btn-danger { background: #fff; color: #c21f4d; border-color: #ffc4d3; }
.btn-danger:hover { background: var(--pink-soft); color: #a01840; }
.btn-icon { padding: 8px 13px; font-size: .88rem; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  margin-top: 40px; flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 9px 15px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); font-weight: 640; font-size: .93rem;
  color: var(--ink-2); background: #fff;
}
.pagination a:hover { border-color: var(--violet); color: var(--violet-deep); text-decoration: none; }
.pagination [aria-current="page"] { background: var(--violet); border-color: var(--violet); color: #fff; }
.pagination .disabled { opacity: .45; }

/* ---------- Misc ---------- */
.meta-list { list-style: none; padding: 0; margin: 0; font-size: .94rem; }
.meta-list li {
  display: flex; gap: 14px; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.meta-list li:last-child { border-bottom: 0; }
.meta-list dt, .meta-list .k { color: var(--muted); }
.meta-list .v { color: var(--ink); font-weight: 620; text-align: right; }

.code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86rem; background: var(--bg-soft); padding: 3px 8px;
  border-radius: 6px; border: 1px solid var(--line); word-break: break-all;
}

/* =========================================================================
   21. Explore page
   The Explore page is long by design - it is the one place to look at what
   the platform does - so it carries its own in-page navigation.
   ========================================================================= */
.jump-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px;
}
.jump-nav a {
  padding: 9px 17px; border-radius: var(--radius-pill);
  background: #fff; border: 1px solid var(--line);
  font-weight: 640; font-size: .93rem; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, color .16s ease, transform .16s ease;
}
.jump-nav a:hover {
  border-color: var(--violet); color: var(--violet-deep);
  text-decoration: none; transform: translateY(-2px);
}

/* Files listed underneath the notes for the release they belong to. */
.release-files { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line); }
.release-files h4 {
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.release-files .download-item:last-child { margin-bottom: 0; }

/* A card that is a button (the "ask the assistant" tile) should not inherit
   the browser's button chrome. */
button.card {
  appearance: none; -webkit-appearance: none;
  background: #fff; border: 1px solid var(--line);
  font-family: inherit; color: inherit;
}

/* A card whose last line is an arrow link pushes that link to the bottom, so a
   row of cards has its calls to action on one line even when the descriptions
   above them run to different lengths. Browsers without :has() simply keep the
   previous behaviour. */
.card:has(> p:last-child > .arrow-link) { display: flex; flex-direction: column; }
.card:has(> p:last-child > .arrow-link) > p:last-child {
  margin-top: auto; padding-top: 14px; margin-bottom: 0;
}

/* =========================================================================
   22. Rich text editor
   ========================================================================= */
.rte {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.rte:focus-within { border-color: var(--violet); box-shadow: var(--ring); }
.rte.is-busy { opacity: .7; pointer-events: none; }

.rte-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  padding: 8px 10px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  position: sticky; top: var(--header-h); z-index: 2;
}

.rte-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--ink-2);
  font: inherit; font-size: .85rem; font-weight: 680;
  transition: background-color .14s ease, color .14s ease;
}
.rte-btn:hover { background: #fff; color: var(--ink); }
.rte-btn.is-active { background: var(--violet-soft); color: var(--violet-deep); }
.rte-btn--text { letter-spacing: -.01em; }

.rte-sep {
  width: 1px; height: 20px; margin: 0 6px;
  background: var(--line); flex: none;
}

.rte-area {
  padding: 22px 24px;
  min-height: 380px;
  max-height: 62vh;
  overflow-y: auto;
  outline: none;
  font-size: 1.02rem;
}
.rte-area.is-dropping { background: var(--violet-soft); }
.rte-area > *:first-child { margin-top: 0; }
.rte-area p:empty::after { content: ""; display: inline-block; }

/* Images sit as blocks in the flow, with a hint that they are selectable. */
.rte-area img {
  max-width: 100%; height: auto; display: block;
  margin: 18px 0; border-radius: var(--radius); border: 1px solid var(--line);
}
.rte-area img:hover { outline: 2px solid var(--violet); outline-offset: 2px; }

.rte-status {
  margin: 0; padding: 9px 14px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
  font-size: .86rem; color: var(--muted); min-height: 36px;
}
.rte-status--error { color: #c21f4d; font-weight: 600; }

/* The plain textarea shown when scripting is unavailable. */
textarea[data-editor] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 620px) {
  .rte-toolbar { position: static; }
  .rte-area { padding: 16px; min-height: 300px; }
}

/* Figures, which the editor can produce around an image with a caption. */
.prose figure { margin: 1.8em 0; }
.prose figure img { margin: 0; }
.prose figcaption {
  margin-top: 10px; font-size: .9rem; color: var(--muted); text-align: center;
}
