/* Sicut — the public face, in the same metal as the tool.

   THE INSTRUMENT, spoken slightly louder: machined graphite, silvered aluminum, engraved
   mono labels, tungsten warmth, and the answering horizon (horizon.css) holding first light
   at the foot of the page. The serif italic is the Latin voice — the wordmark, the tagline,
   and the emphasized phrase in the hero — and appears nowhere else.

   Everything is classes; the CSP is style-src 'self' with no unsafe-inline. Fonts are
   self-hosted (static/fonts, OFL). Token values match app.css exactly so the front door
   and the tool are one object. */

@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/static/fonts/instrument-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/static/fonts/instrument-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/static/fonts/instrument-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400;
  font-display: swap; src: url("/static/fonts/instrument-serif-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Spline Sans Mono"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/static/fonts/spline-sans-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "Spline Sans Mono"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/static/fonts/spline-sans-mono-500.woff2") format("woff2");
}

:root {
  --void: #060504;
  --graphite: #151210;
  --graphite-raised: #1E1A16;
  --well: #0C0A08;
  --hairline: rgba(237, 234, 227, 0.09);
  --hairline-strong: rgba(237, 234, 227, 0.17);
  --ink: #C9C5BD;
  --ink-bright: #F1EEE7;
  --ink-engraved: #847E73;
  --tungsten: #F2A33C;
  --tungsten-ember: #8A5A22;
  --tungsten-glow: rgba(242, 163, 60, 0.22);
  --tungsten-wash: rgba(242, 163, 60, 0.10);
  --meter-green: #69C46B;
  --dot-red: #D64949;
  --green-wash: rgba(105, 196, 107, 0.10);
  --red-wash: rgba(214, 73, 73, 0.10);
  --panel-metal: linear-gradient(180deg, #1E1A16 0%, #151210 55%, #100D0A 100%);
  --key-metal: linear-gradient(180deg, #DDD9D1 0%, #B4B0A8 62%, #C6C2BA 100%);
  --key-metal-pressed: linear-gradient(180deg, #A8A49C 0%, #C6C2BA 100%);
  --edge-light: inset 0 1px 0 rgba(241, 238, 231, 0.07);
  --key-relief: inset 0 1px 0 rgba(255, 255, 255, 0.85),
                inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.6);
  --well-inset: inset 0 1px 3px rgba(0, 0, 0, 0.7),
                inset 0 0 0 1px rgba(237, 234, 227, 0.06);
  --lamp-glow: 0 0 0 1px rgba(242, 163, 60, 0.35), 0 0 18px var(--tungsten-glow);
  --chamfer: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  --chamfer-sm: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
  --radius: 2px;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "Spline Sans Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --label-tracking: 0.14em;
  --ease-snap: cubic-bezier(0.2, 0, 0, 1);
  --t-micro: 120ms;
  --accent: var(--tungsten);
}

* { box-sizing: border-box; }

body {
  margin: 0; background: var(--void); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--tungsten); color: #060504; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 1px solid var(--tungsten); outline-offset: 2px;
}

.wrap { position: relative; z-index: 1; }

/* ---------------------------------------------------------------------------
   Top rail
   --------------------------------------------------------------------------- */

.topbar {
  display: flex; align-items: center; gap: 1.5rem;
  max-width: 68rem; margin: 0 auto; padding: 1.4rem 1.5rem;
}
.topbar .brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ink-bright); text-decoration: none;
}
.topbar .brand .mark { display: block; flex: none; }
.topbar .brand span:not(.mark) {
  font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1;
}
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem;
              font-size: 0.92rem; }
.topbar nav a { color: var(--ink-engraved); text-decoration: none; }
.topbar nav a:hover { color: var(--ink-bright); }

section { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* The early-access tag: an engraved plate with a live tungsten lamp. */
.tag {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: var(--label-tracking); text-transform: uppercase;
  color: var(--ink-engraved);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  clip-path: var(--chamfer-sm);
  padding: 0.4em 0.9em; background: var(--graphite);
}
.tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--tungsten); box-shadow: var(--lamp-glow);
  animation: lamp 2.8s ease-in-out infinite alternate;
}
@keyframes lamp { from { opacity: 0.45; } to { opacity: 1; } }

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */

.hero { padding-top: 4.5rem; padding-bottom: 5rem; }
.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.3rem);
  line-height: 1.06; letter-spacing: -0.025em; font-weight: 600;
  color: var(--ink-bright);
  margin: 1.6rem 0 0; max-width: 19ch;
}
/* The emphasized phrase is the Latin voice: warm, serif, spoken. */
.hero h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--tungsten); letter-spacing: 0;
}
.hero .lede {
  max-width: 56ch; font-size: 1.08rem; line-height: 1.7; color: var(--ink);
  margin: 1.6rem 0 0;
}
.cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 2.2rem; }

/* Buttons: one silvered key, everything else ghost graphite. */
.btn {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: 0;
  border-radius: var(--radius); clip-path: var(--chamfer-sm);
  padding: 0.6rem 1.25rem;
  transition: transform var(--t-micro) var(--ease-snap),
              filter var(--t-micro) var(--ease-snap);
}
.btn.primary {
  background: var(--key-metal); color: #221E19;
  box-shadow: var(--key-relief);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.primary:active { background: var(--key-metal-pressed); transform: translateY(1px); }
.btn.ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}
.btn.ghost:hover { color: var(--ink-bright);
                   box-shadow: inset 0 0 0 1px rgba(237, 234, 227, 0.3); }

/* Meter readings under the hero. */
.proof { display: flex; gap: 2.4rem; flex-wrap: wrap; margin-top: 3rem; }
.proof div { display: grid; gap: 0.2rem; }
.proof b { font-family: var(--mono); font-weight: 500; font-size: 1.5rem;
           color: var(--ink-bright); font-variant-numeric: tabular-nums; }
.proof span { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase;
              letter-spacing: var(--label-tracking); color: var(--ink-engraved); }

.hint { font-size: 0.85rem; color: var(--ink-engraved); margin-top: 1.4rem; }
.hint a, a.plain { color: var(--tungsten); }

/* ---------------------------------------------------------------------------
   Sections: each opens with an engraved rail.
   --------------------------------------------------------------------------- */

.sec { padding: 4.2rem 1.5rem; }
.eyebrow {
  display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: var(--label-tracking); text-transform: uppercase;
  color: var(--tungsten-ember);
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.sec h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; letter-spacing: -0.02em;
  font-weight: 600; color: var(--ink-bright); margin: 1rem 0 0; max-width: 28ch;
}
.sec .sub { max-width: 62ch; color: var(--ink); margin: 1rem 0 0; }
.sec .sub code { font-family: var(--mono); font-size: 0.85em; color: var(--ink-bright);
                 background: var(--well); padding: 0.1em 0.4em; border-radius: var(--radius); }

/* Feature plates. */
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
         gap: 0.9rem; margin-top: 2.2rem; }
.feat {
  position: relative;
  background: var(--panel-metal); border: 1px solid var(--hairline);
  border-radius: var(--radius); clip-path: var(--chamfer);
  box-shadow: var(--edge-light);
  padding: 1.3rem 1.35rem 1.4rem;
}
.feat::after {
  content: ""; position: absolute; top: 6px; right: 0;
  width: 12px; height: 1px; background: rgba(242, 163, 60, 0.28);
  transform: rotate(45deg); pointer-events: none;
}
.feat .mk { font-family: var(--mono); font-size: 0.7rem; color: var(--tungsten);
            letter-spacing: 0.08em; }
.feat h3 { font-size: 1.02rem; font-weight: 600; color: var(--ink-bright);
           margin: 0.7rem 0 0.45rem; letter-spacing: -0.01em; }
.feat p { margin: 0; font-size: 0.92rem; color: var(--ink); }

/* ---------------------------------------------------------------------------
   The measured table.
   --------------------------------------------------------------------------- */

.scroll-x { overflow-x: auto; margin-top: 2rem; }
.versus { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.95rem; }
.versus th { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase;
             letter-spacing: var(--label-tracking); color: var(--ink-engraved);
             font-weight: 500; text-align: left; padding: 0.6rem 0.9rem;
             border-bottom: 1px solid var(--hairline-strong); }
.versus td { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--hairline);
             color: var(--ink); }
.versus td:first-child { color: var(--ink-engraved); }
.versus td.win { color: var(--meter-green); font-family: var(--mono); font-size: 0.88rem; }

/* ---------------------------------------------------------------------------
   The dictionary plate: sic·ut, engraved. The tagline is the Latin voice.
   --------------------------------------------------------------------------- */

.define {
  margin: 2.4rem 0 0; padding: 1.5rem 1.6rem;
  background: var(--well); box-shadow: var(--well-inset);
  border-radius: var(--radius); max-width: 34rem;
}
.define dt { font-family: var(--sans); font-weight: 600; font-size: 1.25rem;
             color: var(--ink-bright); display: flex; align-items: baseline;
             gap: 0.8rem; flex-wrap: wrap; }
.define .ipa { font-family: var(--mono); font-weight: 400; font-size: 0.8rem;
               color: var(--ink-engraved); }
.define .pos { font-family: var(--mono); font-weight: 400; font-size: 0.66rem;
               text-transform: uppercase; letter-spacing: var(--label-tracking);
               color: var(--tungsten-ember); }
.define dd { margin: 0.6rem 0 0; font-family: var(--serif); font-style: italic;
             font-size: 1.35rem; color: var(--tungsten); }
.define dd.ety { font-family: var(--sans); font-style: normal; font-size: 0.9rem;
                 color: var(--ink-engraved); margin-top: 0.7rem; }
.define dd.ety b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------------------
   Plans: two panels, one carries the silver key.
   --------------------------------------------------------------------------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
         gap: 1rem; margin-top: 2.2rem; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel-metal); border: 1px solid var(--hairline);
  border-radius: var(--radius); clip-path: var(--chamfer);
  box-shadow: var(--edge-light);
  padding: 1.5rem 1.5rem 1.4rem;
}
.plan::after {
  content: ""; position: absolute; top: 6px; right: 0;
  width: 12px; height: 1px; background: rgba(237, 234, 227, 0.18);
  transform: rotate(45deg); pointer-events: none;
}
.plan.lead { border-color: rgba(242, 163, 60, 0.35); }
.plan.lead::after { background: rgba(242, 163, 60, 0.45); }
.plan h3 { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--ink-bright);
           letter-spacing: -0.01em; }
.plan .who { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--ink-engraved); }
.plan .price { margin: 1.1rem 0 0; font-family: var(--mono); font-size: 0.95rem;
               color: var(--tungsten); display: grid; gap: 0.15rem; }
.plan .price small { font-family: var(--mono); font-size: 0.62rem;
                     text-transform: uppercase; letter-spacing: var(--label-tracking);
                     color: var(--ink-engraved); }
.plan ul { margin: 1.1rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.55rem;
           font-size: 0.9rem; flex: 1; }
.plan li { padding-left: 1.1rem; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.55em;
                   width: 5px; height: 5px; border-radius: 50%;
                   background: var(--tungsten-ember); }
.plan.lead li::before { background: var(--tungsten); }
.plan .foot { margin-top: 1.4rem; }

/* ---------------------------------------------------------------------------
   The connect snippet: an inset well with an engraved header.
   --------------------------------------------------------------------------- */

.snippet { margin-top: 2rem; max-width: 44rem; background: var(--well);
           box-shadow: var(--well-inset); border-radius: var(--radius); }
.snippet header { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase;
                  letter-spacing: var(--label-tracking); color: var(--ink-engraved);
                  padding: 0.6rem 1rem 0; }
.snippet pre { margin: 0; padding: 0.6rem 1rem 0.9rem; overflow-x: auto;
               font-family: var(--mono); font-size: 0.84rem; line-height: 1.7;
               color: var(--ink); }
.snippet pre b { color: var(--tungsten); font-weight: 500; }

/* ---------------------------------------------------------------------------
   Access panel, auth pages, forms.
   --------------------------------------------------------------------------- */

.panel {
  position: relative;
  background: var(--panel-metal); border: 1px solid var(--hairline);
  border-radius: var(--radius); clip-path: var(--chamfer);
  box-shadow: var(--edge-light);
  padding: 1.6rem 1.6rem 1.5rem; max-width: 34rem; margin-top: 2rem;
}
.panel::after {
  content: ""; position: absolute; top: 6px; right: 0;
  width: 12px; height: 1px; background: rgba(242, 163, 60, 0.28);
  transform: rotate(45deg); pointer-events: none;
}
.inline-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase;
               letter-spacing: var(--label-tracking); color: var(--ink-engraved); }
.field input {
  font: inherit; color: var(--ink); width: 100%;
  background: var(--well); border: 0; border-radius: var(--radius);
  box-shadow: var(--well-inset); padding: 0.65rem 0.75rem;
  transition: box-shadow var(--t-micro) var(--ease-snap);
}
.field input:focus { box-shadow: var(--well-inset), 0 0 0 1px rgba(242, 163, 60, 0.5);
                     outline: none; }
.field input::placeholder { color: var(--ink-engraved); }
.panel .foot { margin-top: 0.2rem; }
.panel .hint { margin-top: 1.2rem; }

.note { border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 1.1rem;
        font-size: 0.9rem; border: 1px solid var(--hairline); border-left-width: 2px; }
.note.ok  { border-left-color: var(--meter-green); background: var(--green-wash); }
.note.bad { border-left-color: var(--dot-red); background: var(--red-wash); }

/* Auth pages reuse .sec + .panel; keep them narrow and vertically settled. */
.sec.narrow-col { max-width: 40rem; padding-top: 3.5rem; padding-bottom: 6rem; }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */

footer.site { border-top: 1px solid var(--hairline); margin-top: 4rem; }
footer.site .in {
  max-width: 68rem; margin: 0 auto; padding: 1.6rem 1.5rem 2rem;
  display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: baseline;
  font-size: 0.88rem; color: var(--ink-engraved);
}
footer.site b { font-family: var(--serif); font-style: italic; font-weight: 400;
                color: var(--ink); font-size: 1.05rem; }
footer.site nav { margin-left: auto; display: flex; gap: 1.2rem; }
footer.site nav a { color: var(--ink-engraved); text-decoration: none; }
footer.site nav a:hover { color: var(--ink-bright); }

@media (max-width: 640px) {
  .hero { padding-top: 3rem; padding-bottom: 3.5rem; }
  .sec { padding: 3rem 1.5rem; }
  .proof { gap: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* The motto in the topbar: a rotating Sicut quotation (motto.js). Empty without JS. */
.motto {
  flex: 1 1 auto; min-width: 0; text-align: center;
  opacity: 0; transition: opacity 0.9s ease; line-height: 1.25; padding: 0 0.5rem;
}
.motto.lit { opacity: 1; }
.motto i { display: block; font-family: var(--serif); font-style: italic; font-size: 0.95rem;
           color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.motto span { display: block; font-family: var(--mono); font-size: 0.58rem;
              text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-engraved);
              white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .motto { display: none; } }

/* The creed: the Aquinas line, given the full voice. What the product does, said in 1270. */
.creed {
  margin: 2.6rem 0 0; padding: 0; max-width: 46rem; border: 0;
}
.creed .la {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.45;
  color: var(--ink-bright); margin: 0;
}
.creed .en { margin: 0.9rem 0 0; color: var(--ink); max-width: 58ch; }
.creed cite { display: block; margin-top: 0.8rem; font-style: normal;
              font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase;
              letter-spacing: 0.12em; color: var(--tungsten-ember); }
