/* Freshservice Import — Zest brand.
   One stylesheet for the landing page, the tool and the info pages.
   Pink is for actions and focus only; status colours stay separate from it. */

@font-face {
  font-family: "Montserrat";
  src: url("./fonts/montserrat-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --pink: #de4866;
  --pink-hover: #c93a57;
  --pink-press: #b23049;
  --pink-tint: #fce9ee;
  --on-pink: #ffffff;
  --ink: #22172a;
  --ink-soft: #3b2e44;
  --muted: #6e6576;
  --page: #f6f4f7;
  --card: #ffffff;
  --field: #ffffff;
  --sunk: #f1edf3;
  --line: #e4dee7;
  --line-strong: #cfc6d4;
  --band: #22172a;
  --band-ink: #f6f1f8;
  --band-muted: #bdb2c4;
  --ok: #1c7c54;
  --ok-bg: #e5f3ec;
  --warn: #a36a00;
  --warn-bg: #fdf3e1;
  --err: #b42318;
  --err-bg: #fdecea;
  --on-err: #ffffff;
  --info: #3a4fb4;
  --info-bg: #ebeefb;
  --r-card: 14px;
  --r-ctl: 10px;
  --shadow: 0 1px 2px rgba(34, 23, 42, 0.05);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --pink: #ee6a85;
    --pink-hover: #f3849b;
    --pink-press: #e05674;
    --pink-tint: #3a1f2a;
    --on-pink: #22172a;
    --ink: #f3eef5;
    --ink-soft: #ddd3e3;
    --muted: #b4a9bc;
    --page: #17111b;
    --card: #221a27;
    --field: #1b1520;
    --sunk: #2a2130;
    --line: #3a2f40;
    --line-strong: #52455a;
    --band: #0f0a12;
    --band-ink: #f3eef5;
    --band-muted: #a99fb1;
    --ok: #5cc795;
    --ok-bg: #173126;
    --warn: #e7b14a;
    --warn-bg: #33270f;
    --err: #ff8a7a;
    --err-bg: #3a1a17;
    --on-err: #22172a;
    --info: #9cabff;
    --info-bg: #1f2340;
    --shadow: none;
  }
}
/* Dark chosen in the accessibility panel, whatever the system setting. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --pink: #ee6a85;
  --pink-hover: #f3849b;
  --pink-press: #e05674;
  --pink-tint: #3a1f2a;
  --on-pink: #22172a;
  --ink: #f3eef5;
  --ink-soft: #ddd3e3;
  --muted: #b4a9bc;
  --page: #17111b;
  --card: #221a27;
  --field: #1b1520;
  --sunk: #2a2130;
  --line: #3a2f40;
  --line-strong: #52455a;
  --band: #0f0a12;
  --band-ink: #f3eef5;
  --band-muted: #a99fb1;
  --ok: #5cc795;
  --ok-bg: #173126;
  --warn: #e7b14a;
  --warn-bg: #33270f;
  --err: #ff8a7a;
  --err-bg: #3a1a17;
  --on-err: #22172a;
  --info: #9cabff;
  --info-bg: #1f2340;
  --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
  font-feature-settings: "tnum" 0;
}
h1, h2, h3 { color: var(--ink); line-height: 1.2; }
a { color: var(--pink); text-underline-offset: 2px; }
a:hover { color: var(--pink-hover); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--sunk); padding: 1px 6px; border-radius: 5px; font-size: 0.86em;
}
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }
main, main.wrap { padding-top: 28px; padding-bottom: 12px; }
.hint { color: var(--muted); font-size: 0.87rem; }
.w-9 { width: 9rem; }
.w-6 { width: 6rem; }

/* ---------- Site header ---------- */
.site-head { background: var(--band); color: var(--band-ink); }
.site-head .bar { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--band-ink); text-decoration: none; }
.brand .logo { display: block; height: 30px; width: auto; }
.brand:hover { color: var(--band-ink); }
.brand .mark { font-weight: 800; font-size: 1.45rem; letter-spacing: -0.04em; color: var(--pink); }
.brand .product { font-weight: 600; font-size: 0.95rem; color: var(--band-ink); padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.22); }
.site-head nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.site-head nav a {
  color: var(--band-muted); text-decoration: none; font-weight: 600; font-size: 0.88rem;
  padding: 6px 10px; border-radius: 8px;
}
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--band-ink); background: rgba(255, 255, 255, 0.08); }
@media (max-width: 560px) {
  .brand .product { display: none; }
  .site-head nav a { padding: 6px 7px; }
}

/* Page intro (tool and info pages) */
.page-intro { background: var(--band); color: var(--band-ink); padding: 8px 0 30px; border-bottom: 3px solid var(--pink); }
.page-intro h1 { color: var(--band-ink); font-size: 2rem; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 6px; }
.page-intro .sub { margin: 0; max-width: 64ch; color: var(--band-muted); }
.page-intro .sub strong { color: var(--band-ink); font-weight: 600; }
.page-intro a { color: var(--pink); }

/* ---------- Landing ---------- */
.hero { background: var(--band); color: var(--band-ink); border-bottom: 3px solid var(--pink); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding-top: 44px; padding-bottom: 56px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; padding-bottom: 40px; } }
.hero h1 { color: var(--band-ink); font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; margin: 0 0 16px; }
.hero .lead { color: var(--band-muted); font-size: 1.08rem; max-width: 46ch; margin: 0 0 26px; }
.hero .actions { margin-top: 0; }
.hero .button.ghost { color: var(--band-ink); border-color: rgba(255, 255, 255, 0.28); background: transparent; }
.hero .button.ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--band-ink); }
.hero .fine { color: var(--band-muted); font-size: 0.82rem; margin: 14px 0 0; max-width: 52ch; }
.hero .fine a { color: var(--band-ink); }

/* The sheet: rows becoming tickets */
.sheet {
  margin: 0; background: #ffffff; color: #22172a; border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); overflow: hidden; font-size: 0.84rem;
}
.sheet .tabbar { display: flex; gap: 2px; padding: 8px 10px 0; background: #ece7ef; }
.sheet .tabbar span { padding: 5px 12px; border-radius: 6px 6px 0 0; font-size: 0.75rem; font-weight: 600; color: #6e6576; }
.sheet .tabbar span:first-child { background: #ffffff; color: #22172a; }
.sheet table { width: 100%; border-collapse: collapse; font-size: inherit; }
.sheet th, .sheet td { padding: 9px 12px; border-bottom: 1px solid #ece7ef; text-align: left; white-space: nowrap; }
.sheet th { font-size: 0.75rem; font-weight: 600; color: #6e6576; background: #faf8fb; text-transform: none; letter-spacing: 0; }
.sheet td:first-child, .sheet th:first-child { color: #a59bad; width: 2.2em; text-align: right; padding-right: 6px; font-variant-numeric: tabular-nums; }
.sheet td.subject { max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
.sheet tr:last-child td { border-bottom: 0; }
.sheet .result { position: relative; min-width: 8em; }
.sheet td.result { white-space: normal; }
.sheet .tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-weight: 600; font-size: 0.75rem; }
.sheet .tag.ready { background: #ebeefb; color: #3a4fb4; }
.sheet .tag.sent { background: #fce9ee; color: #b23049; font-variant-numeric: tabular-nums; }
.sheet .tag.fix { background: #fdf3e1; color: #8a5a00; }
.sheet .note { display: block; font-size: 0.72rem; color: #8a5a00; margin-top: 2px; white-space: normal; }
.sheet .result .then { position: absolute; left: 12px; top: 9px; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .sheet .result .now { animation: sheet-out 0.25s ease forwards; }
  .sheet .result .then { animation: sheet-in 0.3s ease forwards; }
  .sheet tr:nth-child(1) .now, .sheet tr:nth-child(1) .then { animation-delay: 0.9s; }
  .sheet tr:nth-child(2) .now, .sheet tr:nth-child(2) .then { animation-delay: 1.5s; }
  .sheet tr:nth-child(3) .now, .sheet tr:nth-child(3) .then { animation-delay: 2.1s; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet .result .now { display: none; }
  .sheet .result .then { position: static; opacity: 1; }
}
@keyframes sheet-out { to { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) {
  .sheet { font-size: 0.76rem; }
  .sheet th, .sheet td { padding: 8px 7px; }
  .sheet td:first-child, .sheet th:first-child { display: none; }
  .sheet td.subject { max-width: 8.5em; }
  .sheet .result { min-width: 0; }
  .sheet .tag { white-space: nowrap; font-size: 0.7rem; padding: 2px 7px; }
  .sheet .result .then { left: 7px; top: 8px; }
}
.sheet figcaption { padding: 10px 12px; font-size: 0.75rem; color: #6e6576; background: #faf8fb; border-top: 1px solid #ece7ef; }

/* Landing sections */
.section { padding: 56px 0 8px; }
.section > .wrap > h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 8px; }
.section > .wrap > .intro { color: var(--muted); max-width: 60ch; margin: 0 0 26px; }
.modes-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.modes-list > div { padding: 20px 24px 22px 0; border-bottom: 1px solid var(--line); }
.modes-list > div:nth-child(odd) { padding-right: 32px; }
.modes-list > div:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
.modes-list h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; }
.modes-list p { margin: 0; color: var(--muted); max-width: 44ch; }
@media (max-width: 680px) {
  .modes-list { grid-template-columns: 1fr; }
  .modes-list > div:nth-child(n) { padding: 18px 0; border-left: 0; }
}
.safety { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; max-width: 860px; }
@media (max-width: 640px) { .safety { grid-template-columns: 1fr; } }
.safety > div { border-left: 3px solid var(--pink); padding: 2px 0 2px 16px; }
.safety h3 { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.safety p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.section .more { margin: 22px 0 0; font-weight: 600; }
.notice { padding: 14px 18px; }
.notice .button { margin-top: 10px; display: inline-block; padding: 8px 14px; font-size: 0.86rem; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 18px; }
.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.plan.chosen { border-color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }
.plans .business-use { grid-column: 1 / -1; margin: 0 0 4px; }
.plans .plan-group { grid-column: 1 / -1; margin: 14px 0 0; font-size: 1rem; font-weight: 700; }
.plans .plan-group:first-of-type { margin-top: 0; }
.plan h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.plan p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.plan .price { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; margin: 4px 0 6px; }
.plan .price small { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan .min-term { color: var(--ink); font-weight: 600; }
.plan button, .plan .button { margin-top: auto; width: 100%; text-align: center; }
.plan > :last-child { margin-top: auto; }
.section .plans + .hint { margin-top: 14px; }
.pricing-sub { margin: 34px 0 6px; font-size: 1.15rem; font-weight: 700; }
[data-packs] .intro { color: var(--muted); max-width: 60ch; margin: 0; }

/* ---------- Cards and steps (tool) ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow); padding: 22px 24px; margin: 0 0 18px;
}
@media (max-width: 480px) { .card { padding: 18px 16px; } }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; flex: 0 0 auto; }
.step {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--pink); color: var(--on-pink); font-weight: 800; font-size: 0.9rem; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.card-head .pill { margin-left: auto; }
.card-head .link { margin-left: 12px; font-size: 0.9rem; font-weight: 600; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.9rem; }
label small { font-weight: 400; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select {
  font: inherit; font-weight: 500; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl); background: var(--field); color: var(--ink); max-width: 100%;
}
textarea {
  font: inherit; font-weight: 500; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl); background: var(--field); color: var(--ink); max-width: 100%; resize: vertical; line-height: 1.5;
}
textarea:focus { outline: 3px solid var(--pink-tint); outline-offset: 0; border-color: var(--pink); }
.form-stack { display: grid; gap: 16px; max-width: 44rem; }
.form-stack label small { white-space: normal; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#complaint-done p { margin: 0 0 8px; }
input::placeholder { color: var(--muted); opacity: 0.8; }
input:focus, select:focus { outline: 3px solid var(--pink-tint); outline-offset: 0; border-color: var(--pink); }
select:disabled, input:disabled { background: var(--sunk); color: var(--muted); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--pink); width: 16px; height: 16px; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
label.check input { margin-top: 3px; flex: 0 0 auto; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-size: 0.9rem; }
label.inline select { max-width: 32rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.actions.tight { margin-top: 0; align-self: end; }

/* Import type choice */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
label.mode {
  flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl); padding: 14px; cursor: pointer;
  background: var(--field);
}
label.mode:hover { border-color: var(--pink); }
label.mode:has(input:checked) { border-color: var(--pink); background: var(--pink-tint); box-shadow: inset 0 0 0 1px var(--pink); }
label.mode input { margin-top: 3px; flex: 0 0 auto; }
label.mode span { display: flex; flex-direction: column; gap: 2px; }
label.mode strong { font-weight: 700; }
label.mode small { font-size: 0.8rem; }

/* ---------- Buttons ---------- */
button, a.button {
  font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer; line-height: 1.2;
  border-radius: var(--r-ctl); padding: 11px 18px; border: 1px solid transparent;
  display: inline-block; text-decoration: none; text-align: center;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary, a.button.primary { background: var(--pink); color: var(--on-pink); }
button.primary:hover:not(:disabled), a.button.primary:hover { background: var(--pink-hover); color: var(--on-pink); }
button.primary:active:not(:disabled), a.button.primary:active { background: var(--pink-press); }
button.secondary, a.button.secondary { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover:not(:disabled), a.button.secondary:hover { border-color: var(--ink); color: var(--ink); }
button.danger { background: var(--card); color: var(--err); border-color: var(--line-strong); }
button.danger:hover:not(:disabled) { background: var(--err-bg); border-color: var(--err); }
button.link { background: none; border: 0; color: var(--pink); padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Status ---------- */
.pill {
  font-size: 0.78rem; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  background: var(--sunk); color: var(--muted); white-space: nowrap;
}
.pill[data-state="ok"] { background: var(--ok-bg); color: var(--ok); }
.pill[data-state="err"] { background: var(--err-bg); color: var(--err); }
.msg { font-size: 0.88rem; font-weight: 500; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }
.msg.warn { color: var(--warn); }
div.msg.warn, p.msg.warn, p.msg.err { padding: 10px 14px; border-radius: var(--r-ctl); }
div.msg.warn, p.msg.warn { background: var(--warn-bg); }
p.msg.err { background: var(--err-bg); }
p.msg.err:empty { display: none; }
#personal-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }

/* API key permissions (tool) */
details.perm-list { font-size: 0.82rem; font-weight: 400; color: var(--muted); }
details.perm-list summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details.perm-list ul { margin: 6px 0; padding-left: 1.1rem; }
details.perm-list li { margin: 3px 0; }
details.perm-list p { margin: 4px 0 0; }
#domain-msg:empty { display: none; }

/* Account panel */
.acct-line { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -6px 0 6px; }
.acct-line span { color: var(--muted); font-size: 0.87rem; }
.acct-line span:first-child { color: var(--ink); font-weight: 600; }
.meter { height: 8px; background: var(--sunk); border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.meter span { display: block; height: 100%; width: 0; background: var(--ok); transition: width 0.3s; }
.meter[data-level="high"] span { background: var(--warn); }
.meter[data-level="full"] span { background: var(--err); }
#usage-text { font-variant-numeric: tabular-nums; margin: 0; }
#plan-picker { margin-bottom: 4px; }
details.data { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
details.data summary { cursor: pointer; font-weight: 700; color: var(--pink); }
details.data .actions { margin-top: 12px; }

/* Upload */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--r-card);
  padding: 34px 20px; text-align: center; color: var(--muted); background: var(--page);
  transition: background-color 0.15s, border-color 0.15s;
}
.dropzone strong { color: var(--ink); }
.dropzone.drag { border-color: var(--pink); background: var(--pink-tint); }
.dropzone p { margin: 4px 0; }
.dropzone .hint { font-size: 0.84rem; }

/* Review & send */
.summary, .counts { font-size: 0.9rem; }
.summary { margin-top: 14px; }
.counts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { padding: 6px 12px; border-radius: 8px; background: var(--sunk); font-weight: 700; font-variant-numeric: tabular-nums; }
.chip.ready { background: var(--info-bg); color: var(--info); }
.chip.done { background: var(--ok-bg); color: var(--ok); }
.chip.error { background: var(--err-bg); color: var(--err); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.run-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-bottom: 14px; }
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.progress .bar { flex: 1; height: 8px; background: var(--sunk); border-radius: 999px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--pink); transition: width 0.25s; }
#progress-text { font-size: 0.85rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.item-name { font-weight: 700; margin: 4px 0 12px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); }
table { border-collapse: collapse; width: 100%; font-size: 0.87rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--sunk); font-size: 0.8rem; font-weight: 700; color: var(--muted); }
td { font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
td .state { font-weight: 700; }
td .state a { color: inherit; }
tr[data-status="created"] { background: var(--ok-bg); }
tr[data-status="created"] .state { color: var(--ok); }
tr[data-status="failed"] { background: var(--err-bg); }
tr[data-status="failed"] .state { color: var(--err); }
tr[data-status="invalid"] .state { color: var(--warn); }
tr[data-status="raising"] .state { color: var(--info); }
tr[data-status="skipped"] .state { color: var(--muted); }
tr[data-status="uncertain"] { background: var(--warn-bg); }
tr[data-status="uncertain"] .state { color: var(--warn); }
td .err-detail, td .warn-detail { white-space: normal; font-size: 0.82rem; }
td .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 0.82rem; white-space: normal; }
td .row-actions button { padding: 4px 10px; font-size: 0.8rem; }
td .err-detail { color: var(--err); }
td .warn-detail { color: var(--warn); }

/* ---------- Info pages (security, privacy, terms, support) ---------- */
main.doc { padding-top: 40px; }
main.doc th, main.doc td { white-space: normal; vertical-align: top; }
.doc > * { max-width: 72ch; }
.doc .card { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 0 0 26px; margin: 0 0 26px; border-bottom: 1px solid var(--line); }
.doc .card:last-child { border-bottom: 0; }
.doc h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 10px; }
.doc h3 { font-size: 1rem; font-weight: 700; margin: 22px 0 4px; }
.doc p, .doc li { font-size: 0.97rem; }
.doc ul, .doc ol { padding-left: 1.2rem; margin: 8px 0; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--pink); }
.doc code { white-space: nowrap; }

/* Collapsible sections (security page) */
.doc details.fold { padding-bottom: 0; margin-bottom: 0; }
.doc details.fold summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 18px 0;
}
.doc details.fold summary::-webkit-details-marker { display: none; }
.doc details.fold summary h2, .doc details.fold summary h3 { margin: 0; flex: 1; font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
.doc details.fold summary::after {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2.5px solid var(--pink); border-bottom: 2.5px solid var(--pink);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.15s;
}
.doc details.fold[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.doc details.fold summary:hover h2, .doc details.fold summary:hover h3 { color: var(--pink); }
.doc details.fold[open] { padding-bottom: 22px; }
.doc details.fold > ul, .doc details.fold > p { margin-top: 0; }
/* Privacy & security: two groups on one page */
.doc-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.doc-jump a {
  font-weight: 700; font-size: 0.88rem; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px;
}
.doc-jump a:hover { border-color: var(--pink); color: var(--pink); }
.doc-group { scroll-margin-top: 16px; margin-bottom: 44px; }
.doc-group > h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 4px; }
.doc-group > .hint { margin: 0 0 8px; }
.doc-group > details.fold:first-of-type { border-top: 1px solid var(--line); }
.doc-group > details.fold:last-child { border-bottom: 1px solid var(--line); }

.trust-callout {
  border: 1px solid var(--line); border-left: 4px solid var(--pink); border-radius: var(--r-ctl);
  background: var(--card); padding: 18px 20px; margin: 0 0 40px;
}
.trust-callout h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 6px; }
.trust-callout p { margin: 0 0 12px; }
.trust-callout p:last-child { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

td.wrap-cell { white-space: normal; min-width: 18em; }
.doc-group > ol, .doc-group > ul { margin-top: 10px; }

/* FAQ questions (support page) */
.doc .faq-list { padding-top: 28px; }
.doc .faq-list h2 { margin-bottom: 10px; }
.doc details.faq { border-top: 1px solid var(--line); }
.doc details.faq:last-child { border-bottom: 1px solid var(--line); }
.doc details.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 13px 0; font-weight: 700; font-size: 1rem;
}
.doc details.faq summary::-webkit-details-marker { display: none; }
.doc details.faq summary::after {
  content: "+"; margin-left: auto; color: var(--pink); font-weight: 600; font-size: 1.35rem; line-height: 1;
}
.doc details.faq[open] summary::after { content: "\2212"; }
.doc details.faq summary:hover { color: var(--pink); }
.doc details.faq > p { margin: 0 0 14px; }
@media (prefers-reduced-motion: reduce) { .doc details.fold summary::after { transition: none; } }

/* ---------- Footer ---------- */
.foot { color: var(--muted); font-size: 0.82rem; padding: 26px 20px 40px; border-top: 1px solid var(--line); margin-top: 28px; text-align: center; }
.foot p { margin: 0 auto 8px; max-width: 72ch; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.foot nav a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.foot nav a:hover { color: var(--pink); }
.foot .legal { margin-top: 10px; }

/* ---------- Accessibility panel ---------- */
html[data-text="large"] { font-size: 112.5%; }
html[data-text="larger"] { font-size: 125%; }
html[data-links="underline"] a { text-decoration: underline !important; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html[data-motion="reduce"] .sheet .result .now { display: none; }
html[data-motion="reduce"] .sheet .result .then { position: static; opacity: 1; }

.a11y { position: fixed; right: 18px; bottom: 18px; z-index: 50; font-size: 15px; }
.a11y-btn {
  width: 48px; height: 48px; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: var(--ink); color: var(--page); border: 2px solid var(--page);
  box-shadow: 0 6px 18px rgba(34, 23, 42, 0.28);
}
.a11y-btn:hover { background: var(--pink); color: var(--on-pink); }
.a11y-btn svg { width: 26px; height: 26px; }
.a11y-panel {
  position: absolute; right: 0; bottom: 60px; width: min(300px, calc(100vw - 36px));
  background: var(--card); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--r-card); box-shadow: 0 16px 40px rgba(34, 23, 42, 0.25); padding: 16px;
}
.a11y-panel h2 { font-size: 1rem; font-weight: 800; margin: 0 0 12px; }
.a11y-panel fieldset { border: 0; margin: 0 0 14px; padding: 0; }
.a11y-panel legend { font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; padding: 0; }
.a11y-seg { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); overflow: hidden; }
.a11y-seg label { flex: 1; display: block; font-weight: 600; font-size: 0.84rem; gap: 0; }
.a11y-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.a11y-seg span { display: block; text-align: center; padding: 8px 4px; cursor: pointer; }
.a11y-seg label + label span { border-left: 1px solid var(--line-strong); }
.a11y-seg input:checked + span { background: var(--pink); color: var(--on-pink); }
.a11y-seg input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: -3px; }
.a11y-panel label.check { font-size: 0.88rem; margin: 6px 0; }
.a11y-reset { font-size: 0.84rem; padding: 8px 12px; margin-top: 4px; }
@media print { .a11y { display: none; } }

/* ---------- Guided tour (tool) ---------- */
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 16px 0 0; }
.intro-actions a { font-weight: 600; font-size: 0.9rem; }
.page-intro .button.ghost { color: var(--band-ink); border-color: rgba(255, 255, 255, 0.3); background: transparent; padding: 9px 16px; }
.page-intro .button.ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--band-ink); }
.tour-shade { position: fixed; inset: 0; z-index: 60; background: transparent; }
.tour-ring {
  position: fixed; z-index: 61; pointer-events: none; border-radius: 12px;
  border: 3px solid var(--pink); box-shadow: 0 0 0 9999px rgba(20, 12, 26, 0.55);
}
.tour-ring[hidden] { display: none; }
.tour-card {
  position: fixed; z-index: 62; width: min(360px, calc(100vw - 24px));
  background: var(--card); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--r-card); box-shadow: 0 18px 50px rgba(20, 12, 26, 0.35); padding: 18px 18px 14px;
}
.tour-card { opacity: 0; }
.tour-card.in { opacity: 1; transition: opacity 0.12s ease-out; }
.tour-card.centre { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 24px)); }
.tour-shade.dim { background: rgba(20, 12, 26, 0.55); }
.tour-count { margin: 0 0 4px; font-size: 0.78rem; font-weight: 700; color: var(--pink); font-variant-numeric: tabular-nums; }
.tour-card h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 6px; }
.tour-card p { margin: 0 0 10px; font-size: 0.92rem; }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tour-actions .tour-skip { margin-right: auto; font-size: 0.85rem; color: var(--muted); }
.tour-actions button.primary, .tour-actions button.secondary { padding: 8px 14px; font-size: 0.88rem; }
@media (prefers-reduced-motion: reduce) { .tour-card.in { transition: none; } }

/* ---------- Confirmation dialogs ---------- */
dialog.zdialog {
  width: min(480px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line-strong);
  border-top: 4px solid var(--pink); border-radius: var(--r-card);
  background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(20, 12, 26, 0.4);
}
dialog.zdialog.danger { border-top-color: var(--err); }
dialog.zdialog::backdrop { background: rgba(20, 12, 26, 0.6); }
.zdialog h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 10px; }
.zdialog p { margin: 0 0 10px; font-size: 0.93rem; }
.zdialog ul { margin: 0 0 12px; padding-left: 1.2rem; font-size: 0.93rem; }
.zdialog li { margin: 5px 0; }
.zdialog li::marker { color: var(--pink); }
.zdialog.danger li::marker { color: var(--err); }
.zdialog-note { color: var(--muted); }
.accept-box { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; font-size: 0.93rem; }
.accept-box input { margin-top: 4px; flex: none; }
.zdialog-check { display: block; margin: 14px 0 4px; font-size: 0.93rem; font-weight: 700; }
.zdialog-check input { margin-right: 4px; }
.zdialog-check small { display: block; margin: 4px 0 0 22px; font-size: 0.84rem; font-weight: 400; color: var(--muted); }
.zdialog-type { margin: 14px 0 4px; font-size: 0.88rem; }
.zdialog-type input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.zdialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
button.danger-solid { background: var(--err); color: var(--on-err); }
button.danger-solid:hover:not(:disabled) { filter: brightness(1.08); }

/* Renewal and terms line under plans (in-app picker and landing pricing). */
.plan-terms { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; line-height: 1.5; margin: 12px 0 0; max-width: 72ch; }
