/* Txpass public site — Discovery / Hilton (2001) sterile white panels.
   One accent (Txpass Blue). Soft geometry, recessed lines, almost no ornament.
   Same-origin CSS only; no CDN fonts. Motif: /assets/odyssey-grid.svg */
:root {
  --fg: #16181d;
  --muted: #5d6472;
  --bg: #fafbfd;
  --card: #ffffff;
  --line: #e4e7ee;
  --line-soft: #eef0f5;
  --accent: #1f5eff;
  --accent-soft: #f0f4ff;
  --accent-line: #c9d6ff;
  --space: #0b0c0f;
  --ok: #11783f;
  --warn: #8a5a00;
  --warn-bg: #fff8e6;
  --warn-line: #ecd49a;
  --err: #b3261e;
  --code: #f3f4f7;
  --panel-rx: 14px;
  --glow: rgba(31, 94, 255, 0.055);
  --header-bg: rgba(255, 255, 255, 0.92);
  --panel-inset: rgba(255, 255, 255, 0.7);
  --lead: #2c313a;
  --accent-hover: #1a4fd8;
  --grid-size: 680px 680px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; overflow-x: hidden; }
body {
  margin: 0;
  line-height: 1.55;
  font-size: 16px;
  /* Soft even field + faint top glow. Panel motif lives on ::before so it can
     sit at a slight 3D wall angle without clipping. Shadowless. */
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 90% 55% at 50% -8%, var(--glow), transparent 58%);
  background-size: auto;
  background-attachment: scroll;
  background-repeat: no-repeat;
  /* Stacking context so ::before (z-index: -1) sits above the field but under content. */
  isolation: isolate;
}
/* Odyssey grid as a quiet wall at a steeper opposite lean — CSS perspective only; SVG stays flat. */
body.theme-odyssey::before {
  content: "";
  position: fixed;
  inset: -22%;
  z-index: -1;
  pointer-events: none;
  background-image: url("/assets/odyssey-grid.svg");
  background-size: var(--grid-size);
  background-repeat: repeat;
  opacity: 0.92;
  transform: perspective(1400px) rotateY(16deg) rotateX(-7deg) scale(1.12);
  transform-origin: center center;
}
@media (max-width: 560px) {
  body.theme-odyssey::before {
    /* Softer than desktop, still opposite + steeper than the prior mild lean. */
    transform: perspective(1200px) rotateY(10deg) rotateX(-4.5deg) scale(1.18);
    opacity: 0.88;
  }
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 34px; margin: 0 0 12px; }
h2 { font-size: 24px; margin: 40px 0 12px; }
h3 { font-size: 18px; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 20; border: 1px solid var(--line); }
.skip:focus { left: 8px; }

/* Header — quiet white bar, soft recessed edge */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 0; color: var(--fg); text-decoration: none; font-size: 18px; }
.brand-logo { display: block; width: auto; height: 28px; max-width: none; }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
.nav a { display: block; padding: 7px 12px; border-radius: 999px; color: var(--fg); text-decoration: none; font-size: 15px; }
.nav a:hover { background: var(--line-soft); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a.nav-cta { border: 1px solid var(--accent); color: var(--accent); }
/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--card); margin-top: 64px; }
.footer-inner { padding-top: 28px; padding-bottom: 36px; display: grid; gap: 12px; }
.footer-inner p { margin: 0 0 4px; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; font-size: 15px; }

/* Buttons — soft rectangles; primary is the single saturated accent */
.btn {
  display: inline-block; font: inherit; font-weight: 600;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg); text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }

/* Sections */
section { padding: 8px 0; }
.hero { padding: 64px 0 40px; }
.hero h1 { font-size: 44px; max-width: 820px; font-weight: 650; }
.hero .lead { font-size: 20px; color: var(--lead); max-width: 720px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 650;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.tagline { font-size: 15px; color: var(--muted); }

/* Soft luminous panels — logo-tile rx echoed as gentle rects, recessed edge only */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--panel-rx);
  padding: 20px 22px;
  box-shadow: inset 0 0 0 1px var(--panel-inset);
}
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0; }
.steps > li { counter-increment: step; position: relative; padding-top: 44px; }
.steps > li::before {
  content: counter(step); position: absolute; top: 16px; left: 20px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700;
  display: grid; place-items: center; font-size: 15px;
}
.steps h3 { margin-top: 4px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.term {
  background: var(--space); color: #e8eaef;
  border-radius: var(--panel-rx); padding: 16px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.6; overflow-x: auto; white-space: pre;
}
.term .c { color: #8b93a3; }
.term .p { color: #7fb0ff; }
.term .k { color: #ffd479; font-weight: 700; }
.note { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; }
.note.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; vertical-align: middle; }
.badge.draft { color: var(--warn); }
.badge.live { color: var(--ok); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 4px 0 4px 26px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.checks.minus li::before { content: "–"; color: var(--muted); }

/* Figures */
figure { margin: 20px 0 28px; }
figure img {
  display: block; width: 100%; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--panel-rx);
}
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
figcaption details { margin-top: 4px; }
figcaption summary { cursor: pointer; color: var(--accent); }

/* Tables */
.table-wrap {
  overflow-x: auto; margin: 12px 0 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--line-soft); font-weight: 600; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }
.al-c { text-align: center; } .al-r { text-align: right; }
.compare td:nth-child(3) { background: #f7fbf8; }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0; }
.tier { display: flex; flex-direction: column; }
.tier .price { font-size: 28px; font-weight: 700; margin: 4px 0 2px; }
.tier .for { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.tier.later { border-style: dashed; }
.tier ul { margin-top: 0; }

/* Code — keep hyphenated tokens (txpass-agent, imprintai-api) intact; scroll rather than break. */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em; background: var(--code); padding: 0.1em 0.3em; border-radius: 5px;
  white-space: pre; overflow-wrap: normal; word-break: normal;
}
pre {
  background: var(--code); border: 1px solid var(--line); padding: 12px 14px;
  border-radius: 12px; overflow-x: auto; white-space: pre; font-size: 14px; line-height: 1.5; position: relative;
}
pre code { background: none; padding: 0; font-size: inherit; white-space: inherit; overflow-wrap: normal; word-break: normal; }
.copy-btn {
  position: absolute; top: 6px; right: 6px; font: inherit; font-size: 12px; padding: 3px 9px;
  border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer;
}
.copy-btn:hover { color: var(--fg); border-color: var(--accent); }

/* Docs */
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; padding-top: 28px; }
.docs-nav { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 88px); overflow-y: auto; font-size: 15px; }
.docs-nav details > summary { display: none; }
.docs-nav h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 6px; }
.docs-nav h2:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.docs-nav a:hover { background: var(--card); }
.docs-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.doc {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px 34px 36px; min-width: 0;
  box-shadow: inset 0 0 0 1px var(--panel-inset);
}
.doc h1 { font-size: 30px; }
.doc h2 { font-size: 22px; margin-top: 34px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.doc h1 + h2, .doc .doc-meta + h2 { border-top: 0; }
.doc h3 { font-size: 18px; }
.doc h4 { font-size: 16px; margin: 20px 0 6px; }
.doc blockquote { margin: 14px 0; padding: 10px 16px; border-left: 4px solid var(--accent-line); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc ul, .doc ol { padding-left: 24px; margin: 0 0 14px; }
.doc li { margin: 4px 0; }
.doc li > p { margin-bottom: 6px; }
.doc li.task-item { list-style: none; margin-left: -20px; }
.doc .task { font-size: 1.05em; }
.doc hr { border: 0; border-top: 1px solid var(--line-soft); margin: 24px 0; }
.doc .doc-meta { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.doc a.external::after { content: "↗"; font-size: .8em; margin-left: 2px; }
.doc :target { scroll-margin-top: 80px; }
.doc-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 15px; }
.doc-pager a { text-decoration: none; }
.doc-pager .next { margin-left: auto; text-align: right; }
.doc-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }
.doc-cards a.card { color: var(--fg); text-decoration: none; }
.doc-cards a.card:hover { border-color: var(--accent); }
.doc-cards h3 { margin: 0 0 6px; color: var(--accent); font-size: 17px; }
.doc-cards p { margin: 0; font-size: 15px; color: var(--muted); }

@media (max-width: 860px) {
  .grid3, .tiers { grid-template-columns: 1fr; }
  .grid2, .doc-cards { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .docs-nav { position: static; max-height: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--panel-rx); padding: 4px 12px; }
  .docs-nav details > summary { display: list-item; cursor: pointer; font-weight: 600; padding: 8px 0; }
  .docs-nav details[open] > summary { margin-bottom: 6px; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .site-header { position: static; }
  .header-inner { flex-wrap: nowrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .brand { flex: none; }
  .brand-logo { height: 24px; }
  .nav { flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 5px 8px; font-size: 13.5px; white-space: nowrap; }
  .hero { padding: 32px 0 16px; }
  .hero h1 { font-size: 28px; }
  .hero .lead { font-size: 17px; }
  h1 { font-size: 26px; }
  .doc { padding: 18px 16px 24px; border-radius: 12px; }
  .doc h1 { font-size: 25px; }
  .wrap { padding: 0 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .nav a, .card { transition: border-color .15s ease, background-color .15s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav a, .card { transition: none; }
  /* Keep the quiet field; drop the repeating motif if motion preference is reduce
     (some readers find dense patterns fatiguing). Soft glow stays — it is static. */
  body.theme-odyssey::before { display: none; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
td code, th code { overflow-wrap: normal; word-break: normal; }

/* Text panels — stacked without JS; tablist after site.ts enhance */
.text-panels {
  margin: 16px 0 8px;
}
.text-panels > .text-panel + .text-panel { margin-top: 16px; }
.text-panels .text-panel-title {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--fg);
}
.text-panels.is-tabs > .text-panel + .text-panel { margin-top: 0; }
.text-panels.is-tabs > .text-panel[hidden] { display: none !important; }
.text-panels.is-tabs > .text-panel {
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 999px;
  background: var(--line-soft);
  border: 1px solid var(--line);
}
.tab {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] {
  background: var(--card);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Native details accordion (Tradeoffs) — works without JS */
.text-panels.accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
}
.text-detail {
  border-bottom: 1px solid var(--warn-line);
  padding: 4px 0 8px;
}
.text-detail:last-child { border-bottom: 0; padding-bottom: 2px; }
.text-detail > summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  padding: 6px 0;
  color: var(--fg);
}
.text-detail > summary::-webkit-details-marker { display: none; }
.text-detail > summary::before {
  content: "+";
  display: inline-block;
  width: 1.1em;
  color: var(--accent);
  font-weight: 700;
}
.text-detail[open] > summary::before { content: "–"; }
.text-detail > p { margin: 0 0 6px; padding-left: 1.1em; }

@media (prefers-reduced-motion: no-preference) {
  .tab { transition: color .15s ease, background-color .15s ease; }
}

/* Throwaway /demo */
.demo-log { list-style: none; padding: 0; margin: 16px 0; }
.demo-log li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; background: var(--card); }
.demo-log li.active { border-color: var(--accent-line); background: var(--accent-soft); }
.demo-log li.done { border-color: #b7e0c6; }
.demo-log li.fail { border-color: #f0c2bf; }
.demo-claims { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 6px 12px; margin: 12px 0 0; }
.demo-claims dt { color: var(--muted); margin: 0; }
.demo-claims dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; overflow-wrap: break-word; }
.demo-link { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.demo-step { font-weight: 650; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.result { color: var(--ok); }
.field-error { color: var(--err); }

/* /brand kit page */
.brand-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.brand-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--panel-rx); padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.brand-item img { max-width: 100%; max-height: 120px; display: block; margin: 0 auto; }
.brand-item code { white-space: normal; }
.brand-dark > a:first-child { background: #16181d; border-radius: 8px; padding: 10px; }
