/* The Card Safe's pages in CoTour Tools' look (Design E: cotour-tools app/tokens.css and globals.css), copied in so no card
   page loads anything from outside the Safe. Geist and Geist Mono are served from here (SIL Open Font License, fonts/OFL.txt). */
@font-face { font-family: 'Geist'; src: url('/static/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/static/fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ct-body: #ECE7DD; --ct-plate: #F8F5EF; --ct-plate-2: #F1EDE5; --ct-edge: #D6CEC0; --ct-edge-2: #BFB5A4;
  --ct-ink: #1D2440; --ct-strong: #232D54; --ct-ink-2: #4A5170;
  --ct-tool: #232D54; --ct-key: #232D54; --ct-key-on: #FFFFFF; --ct-key-base: #CFC6B6;
  --ct-screen-base: #0E1430; --ct-tint: 24%; --ct-screen-ink: #EDE7DA; --ct-screen-dim: #9CA3BF; --ct-grille: #D3CBBD;
  --ct-good: #237A40; --ct-alert: #B42E2E; --ct-link: #00658A;
  --ct-font-ui: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ct-font-num: 'Geist Mono', ui-monospace, Menlo, monospace;
  --ct-shadow-key: inset 0 -3px 0 var(--ct-key-base);
  --ct-shadow-key-act: inset 0 -3px 0 rgba(0, 0, 0, 0.16);
  --ct-shadow-pressed: inset 0 2px 4px rgba(0, 0, 0, 0.16);
  --ct-shadow-screen: inset 0 2px 8px rgba(0, 0, 0, 0.35);
  --ct-light-logo: block; --ct-dark-logo: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ct-body: #0E1430; --ct-plate: #18213F; --ct-plate-2: #141C38; --ct-edge: #2A3460; --ct-edge-2: #3A4677;
    --ct-ink: #F1EBDD; --ct-strong: #E8E2D4; --ct-ink-2: #BFC3D3;
    --ct-tool: #9AAAE0; --ct-key: #9AAAE0; --ct-key-on: #121933; --ct-key-base: #0A0F24;
    --ct-tint: 13%; --ct-screen-ink: #F1EBDD; --ct-screen-dim: #8F97B5; --ct-grille: #26305A;
    --ct-good: #4CC27A; --ct-alert: #FF7A7A; --ct-link: #3DB2DB;
    --ct-light-logo: none; --ct-dark-logo: block;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ct-body); color: var(--ct-ink); font: 15px/1.5 var(--ct-font-ui);
  font-feature-settings: 'tnum' 1, 'cv11' 1; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--ct-link); }

/* the header: the logo, and what this page is */
.top { max-width: 680px; margin: 0 auto; padding: 24px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; }
.logo img { height: 28px; width: auto; }
.logo-light { display: var(--ct-light-logo); }
.logo-dark { display: var(--ct-dark-logo); }
.wrap { max-width: 680px; margin: 0 auto; padding: 28px 16px 40px; display: grid; gap: 16px; }
.foot { max-width: 680px; margin: 0 auto; padding: 0 16px 32px; font-size: 12px; color: var(--ct-ink-2); }

.ct-label { font-family: var(--ct-font-num); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ct-ink-2); }
h1 { margin: 0; font-size: clamp(28px, 6vw, 40px); font-weight: 300; letter-spacing: -0.035em; line-height: 1.08; color: var(--ct-strong); }
h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--ct-strong); }
h3 { margin: 6px 0 0; font-size: 14.5px; font-weight: 700; color: var(--ct-strong); }
p { margin: 0; }
.lede { font-size: 16.5px; line-height: 1.5; color: var(--ct-ink-2); max-width: 580px; }
.note { color: var(--ct-ink-2); font-size: 13.5px; }

/* plates: cards and panels, no shadows */
.plate { background: var(--ct-plate); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--ct-edge); padding: 22px 24px; display: grid; gap: 14px; }
@media (max-width: 520px) { .plate { padding: 18px 16px; } }
form { display: grid; gap: 16px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
legend { padding: 0; margin-bottom: 4px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ct-strong); }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ct-ink-2); }
.input {
  height: 46px; width: 100%; border-radius: 12px; border: 1px solid var(--ct-edge); background: var(--ct-plate-2); padding: 0 14px;
  font: 15px/1.4 var(--ct-font-ui); color: var(--ct-ink); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.06);
}
.input::placeholder { color: var(--ct-ink-2); opacity: 0.7; }
.textarea { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .btn:focus-visible, a:focus-visible, .check input:focus-visible { outline: 3px solid var(--ct-tool); outline-offset: 2px; }
.hint { font-size: 12.5px; color: var(--ct-ink-2); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.err { color: var(--ct-alert); font-size: 13px; font-weight: 500; }
.err.banner { background: color-mix(in srgb, var(--ct-alert) 12%, var(--ct-plate)); border-radius: 12px; padding: 12px 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--ct-ink); font-size: 14.5px; cursor: pointer; }
.check input { margin: 2px 0 0; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--ct-key); }
.parties { display: grid; gap: 8px; }
.parties .k { font-size: 13px; font-weight: 600; color: var(--ct-ink-2); }
.wording { background: var(--ct-plate-2); border-radius: 12px; padding: 14px 16px; font-size: 14px; box-shadow: inset 0 0 0 1px var(--ct-edge); }

/* keys */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 11px; border: 0;
  font: 700 15px/1 var(--ct-font-ui); color: var(--ct-key-on); background: var(--ct-key); box-shadow: var(--ct-shadow-key-act);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 90ms ease, box-shadow 90ms ease;
}
.btn:active, button:active { transform: translateY(2px); box-shadow: var(--ct-shadow-pressed); }
.btn.big { height: 52px; font-size: 16px; padding: 0 24px; }
form > .btn { justify-self: start; }
.btn.sm { height: 36px; font-size: 13px; padding: 0 12px; border-radius: 9px; }
.btn.ghost { background: var(--ct-plate); color: var(--ct-ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ct-edge-2), var(--ct-shadow-key); }
.keys { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .btn.big { width: 100%; white-space: normal; text-align: center; line-height: 1.2; } }

/* the lit screen: where a card's values show */
.glass {
  background: color-mix(in srgb, var(--ct-tool) var(--ct-tint), var(--ct-screen-base)); color: var(--ct-screen-ink);
  border-radius: 12px; box-shadow: var(--ct-shadow-screen); padding: 18px; display: grid; gap: 10px;
}
.glass .from { font: 500 11px/1.4 var(--ct-font-num); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ct-screen-dim); }
.field-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.field-row:first-child { border-top: 0; }
.field-row .k { font-size: 12.5px; color: var(--ct-screen-dim); }
.field-row .v { font: 500 16px/1.4 var(--ct-font-num); overflow-wrap: anywhere; }
.field-row button { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; background: transparent; color: var(--ct-screen-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }
.field-row button.done { box-shadow: inset 0 0 0 1px var(--ct-good); color: var(--ct-good); }
.timer { font-size: 12.5px; color: var(--ct-screen-dim); border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 10px; }
.gone { color: var(--ct-screen-dim); font-size: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: minmax(0, 1fr) auto; } .field-row .k { grid-column: 1 / -1; } }

/* the agreement */
.agreement { font-size: 14px; line-height: 1.55; gap: 10px; }
.agreement-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agreement .strong { font-weight: 600; }
.offer { gap: 12px; }
.offer .keys { margin-top: 4px; }

/* staff summaries */
.info { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; font-size: 14.5px; }
.info .k { color: var(--ct-ink-2); font-size: 13px; font-weight: 600; padding-top: 1px; }
@media (max-width: 520px) { .info { grid-template-columns: 1fr; gap: 2px; } }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

/* address suggestions under the street field */
label:has(#line1), label:has(#address) { position: relative; }
.suggest { list-style: none; margin: 4px 0 0; padding: 4px; background: var(--ct-plate); border: 1px solid var(--ct-edge-2); border-radius: 12px; display: grid; gap: 2px; position: absolute; top: 100%; left: 0; right: 0; z-index: 5; box-shadow: 0 24px 60px -24px rgba(14, 20, 48, 0.55); }
.suggest[hidden] { display: none; }
.suggest li { padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--ct-ink); font-size: 14px; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--ct-plate-2); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
