/* =========================================================================
   Lensable — shared styles for the content, support and legal pages.

   The editorial page design from the concept build, re-themed onto the
   parchment tokens the landing page uses, so the whole site reads as one
   thing: warm paper, one accent (#f54e00), Fraunces for small labels,
   EB Garamond for lead copy, system sans for the reading column.

   Linked from each /public/<page>/index.html. The dark /account/ page keeps
   its own legal.css — do not fold the two together.
========================================================================= */
:root {
  --paper:    #f7f7f4;
  --paper-2:  #f2f1ed;
  --paper-3:  #e6e5e0;
  --surface:  #ffffff;

  --text:     #26251e;
  --text-2:   #3a3931;
  --muted:    rgba(38, 37, 30, 0.66);
  --faint:    rgba(38, 37, 30, 0.45);

  --line:     rgba(38, 37, 30, 0.10);
  --line-2:   rgba(38, 37, 30, 0.06);
  --line-3:   rgba(38, 37, 30, 0.19);

  --accent:      #f54e00;
  --accent-deep: #b83b00;
  --accent-soft: rgba(245, 78, 0, 0.10);

  --sh-1: 0 1px 2px rgba(38, 37, 30, 0.05);
  --sh-2: 0 1px 2px rgba(38, 37, 30, 0.04), 0 8px 22px -14px rgba(38, 37, 30, 0.16);

  --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --sans:  ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono:  "Fraunces", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(20px, 5vw, 40px);
  --maxw:   1140px;
  --prose:  760px;

  /* Compatibility aliases: /about/, /faq/ and /pricing/ carry markup written
     against the old dark legal.css vocabulary. Mapping the names here re-themes
     them onto the parchment palette without rewriting their inline styles. */
  --ink:        var(--paper);
  --ink-2:      var(--paper-2);
  --stroke:     var(--line);
  --stroke-2:   var(--line-3);
  --glass:      rgba(38, 37, 30, 0.033);
  --glass-2:    rgba(38, 37, 30, 0.05);
  --spectral-c: var(--accent);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px;
}
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
::selection { background: rgba(245, 78, 0, 0.18); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, p, ul, ol { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
main { flex: 1 0 auto; }

/* Browser-support bar ------------------------------------------------------ */
.topbar {
  background: var(--text); color: rgba(247, 247, 244, 0.66);
  display: flex; align-items: center; justify-content: center; gap: 11px;
  height: 36px; font-size: 12.5px; font-weight: 500; letter-spacing: -0.008em;
  padding-inline: 16px; text-align: center;
}
.topbar b { color: #f7f7f4; font-weight: 600; }
.topbar .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 78, 0, 0.22); flex: none;
}

/* Nav ---------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 247, 244, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 22px; height: 22px; flex: none; color: var(--text); }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 13px; border-radius: 4px; font-size: 14px; font-weight: 500;
  color: var(--muted); transition: color 0.25s ease, background 0.25s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(38, 37, 30, 0.05); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 38px; padding: 0 16px; border-radius: 4px; border: 1px solid transparent;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500; letter-spacing: -0.008em;
  cursor: pointer; white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
/* bare .btn reads as the quiet variant; .solid / .btn-primary is the loud one */
.btn { background: var(--paper-3); color: var(--text); }
.btn:hover { background: #dcdbd3; }
.btn-primary, .btn.solid { background: var(--text); color: #f7f7f4; }
.btn-primary:hover, .btn.solid:hover { background: #3a3931; color: #f7f7f4; }
.btn-ghost { border-color: var(--line-3); background: var(--paper-3); color: var(--text); }
.btn-ghost:hover { background: #dcdbd3; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.static { pointer-events: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Page head ---------------------------------------------------------------- */
.phead { padding: clamp(44px, 7vh, 74px) 0 42px; border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); margin-bottom: 22px; flex-wrap: wrap; }
.crumb a:hover { color: var(--text); }
.phead h1 {
  font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 400;
  letter-spacing: -0.032em; line-height: 1.08; max-width: 20ch; text-wrap: balance;
}
.phead .sum {
  margin-top: 20px; font-family: var(--serif); font-size: clamp(1.1rem, 1.7vw, 1.26rem);
  line-height: 1.55; color: var(--muted); max-width: 62ch;
}
.phead .meta { margin-top: 26px; display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--faint); flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px;
  border-radius: 999px; background: var(--paper-3); font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
}

/* Document body ------------------------------------------------------------ */
.doc { display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: clamp(32px, 4.5vw, 64px); padding: 52px 0 clamp(72px, 11vh, 110px); align-items: start; }
.toc { position: sticky; top: 96px; }
.toc .ttl { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.toc a { display: block; padding: 7px 0 7px 15px; border-left: 1px solid var(--line); font-size: 13.5px; color: var(--muted); transition: color 0.25s ease, border-color 0.25s ease; }
.toc a:hover { color: var(--text); border-color: var(--accent); }

.prose { max-width: 74ch; }
.prose h2 { font-size: 1.36rem; font-weight: 500; letter-spacing: -0.02em; margin: 44px 0 14px; scroll-margin-top: 110px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.014em; margin: 26px 0 8px; }
.prose p { font-size: 1rem; line-height: 1.75; color: var(--text-2); margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 20px; }
.prose li { font-size: 1rem; line-height: 1.75; color: var(--text-2); margin-bottom: 8px; }
.prose li::marker { color: var(--faint); }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(245, 78, 0, 0.3); }
.prose a:hover { border-color: var(--accent); }
.prose strong { font-weight: 600; color: var(--text); }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em;
  background: rgba(38, 37, 30, 0.05); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px;
}

.callout { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 20px 22px; margin: 22px 0; box-shadow: var(--sh-1); }
.callout .k { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }

.tbl-scroll { overflow-x: auto; margin: 18px 0 22px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl th { font-weight: 600; color: var(--text); font-size: 0.86rem; background: var(--paper-2); }
.tbl td { color: var(--text-2); line-height: 1.6; }
.tbl tr:last-child td { border-bottom: 0; }

/* Simple content column — /about/, /faq/, /pricing/ ------------------------ */
.legal { max-width: var(--prose); padding-top: clamp(44px, 8vh, 80px); padding-bottom: clamp(48px, 8vh, 96px); }
.legal.wide { max-width: var(--maxw); }
.legal h1 {
  margin: 16px 0 0; font-size: clamp(2rem, 4.4vw, 2.9rem);
  line-height: 1.08; letter-spacing: -0.032em; font-weight: 400; text-wrap: balance;
}
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--line-3); }
.updated { margin: 16px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--faint); }
.lead {
  margin: 22px 0 0; font-family: var(--serif); font-size: clamp(1.1rem, 1.7vw, 1.26rem);
  line-height: 1.55; color: var(--muted); max-width: 60ch;
}
.lead b { color: var(--text); font-weight: 500; }
.legal .prose { margin-top: 8px; }

/* Cards, FAQ and contact blocks used by the support/pricing/faq pages ------- */
.card { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 26px 24px; box-shadow: var(--sh-1); }
.card .kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.card .price { margin: 10px 0 0; font-size: 2.1rem; font-weight: 500; letter-spacing: -0.026em; }
.card .price span { font-size: 1rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.card ul { margin: 18px 0 0; padding: 0; list-style: none; }
.card li { display: flex; gap: 10px; align-items: flex-start; margin: 0.55em 0; color: var(--muted); font-size: 0.96rem; }
.card li svg { color: var(--accent); flex: 0 0 auto; margin-top: 4px; }

.faq { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0 20px; transition: border-color 0.2s ease; }
.faq details[open] { border-color: var(--line-3); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1.02rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 20px; color: var(--faint); transition: transform 0.2s ease; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { margin: -2px 0 20px; color: var(--muted); font-size: 0.98rem; line-height: 1.7; }

.contact { margin-top: 22px; display: inline-flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; box-shadow: var(--sh-1); }
.contact svg { color: var(--accent); flex: 0 0 auto; }
.contact a { font-weight: 600; color: var(--text); }
.contact a:hover { color: var(--accent); }

/* Footer ------------------------------------------------------------------- */
footer { border-top: 1px solid var(--line); margin-top: auto; padding: 56px 0 40px; background: var(--paper); }
.foot-top { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 40px; padding-bottom: 44px; }
.foot-brand p { font-size: 12.5px; line-height: 1.7; color: var(--faint); max-width: 38ch; margin-top: 16px; }
.foot-col .ttl { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.foot-col a { display: block; font-size: 13.5px; color: var(--muted); padding: 4px 0; transition: color 0.3s ease; }
.foot-col a:hover { color: var(--text); }
.foot-bot {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 24px; border-top: 1px solid var(--line-2); flex-wrap: wrap;
  font-size: 12.5px; color: var(--faint);
}

@media (max-width: 1020px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .toc { position: static; }
  .foot-top { grid-template-columns: repeat(3, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .foot-top { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
