/* Zeichen Members — instrument-panel restraint: deep night ground, steel text, one signal red.
   Layout: single centered column for the guest flow; wide two-pane grid for the dashboards. */
:root {
  --bg: #0b0d11;
  --panel: #11141a;
  --panel-2: #161a22;
  --line: rgba(232, 236, 243, 0.12);
  --line-strong: rgba(232, 236, 243, 0.32);
  --fg: #f2f3f5;
  --soft: #c3c9d3;
  --muted: #9aa3b2;
  --accent: #e5484d;
  --ok: #4cc38a;
  --warn: #f0b429;
  --bad: #ff8a8f;
  --paper: #f7f7f4;
  --ink: #141824;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --track: 0.22em;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--fg); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.app { min-height: 100vh; display: flex; flex-direction: column; }

.demo-banner {
  background: var(--accent); color: #fff; text-align: center; font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
}
.linkbtn { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; font-weight: 600; letter-spacing: inherit; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 18px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line); background: rgba(11, 13, 17, 0.94);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-word { font-size: 17px; font-weight: 300; letter-spacing: 0.42em; }
.brand-word sup { font-size: 0.5em; letter-spacing: 0; }
.top-nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.view { flex: 1; width: 100%; outline: none; }
.foot {
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7;
  padding-block: 28px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 32px;
}
.foot p { margin: 0; }

/* ---------- type ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.3em; color: var(--accent); text-transform: uppercase; }
.eyebrow.dim { color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 300; letter-spacing: 0.06em; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw + 12px, 52px); line-height: 1.1; }
h2 { font-size: clamp(24px, 2vw + 14px, 34px); line-height: 1.15; }
h3 { font-size: 18px; font-weight: 400; letter-spacing: 0.12em; }
.lede { color: var(--soft); font-size: 18px; line-height: 1.7; max-width: 62ch; margin: 0; }
.small { font-size: 13px; color: var(--muted); }
p { margin: 0; }

/* ---------- guest flow column ---------- */
.col {
  max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px;
  padding-block: clamp(48px, 7vw, 96px); padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.col.wide { max-width: 1240px; }

.steps { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.steps li {
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); padding: 7px 12px;
  border: 1px solid var(--line); text-transform: uppercase;
}
.steps li.on { color: var(--fg); border-color: var(--fg); }
.steps li.done { color: var(--ok); border-color: rgba(76, 195, 138, 0.45); }

.panel { background: var(--panel); border: 1px solid var(--line); padding: clamp(22px, 4vw, 40px); display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .label { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.input {
  width: 100%; background: transparent; border: 1px solid var(--line-strong); color: var(--fg);
  padding: 14px 16px; font-size: 16px; border-radius: 0;
}
.input:focus { border-color: var(--fg); outline: none; }
.input.pin { font-size: 22px; letter-spacing: 0.28em; text-transform: uppercase; text-align: center; }
select.input { background: var(--panel); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--soft); line-height: 1.6; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.err { color: var(--bad); font-size: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); padding: 14px 26px;
  font-size: 12px; font-weight: 600; letter-spacing: var(--track); text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #ffffff; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--fg); }
.btn.small { min-height: 36px; padding: 8px 14px; font-size: 11px; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255, 138, 143, 0.5); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- agreement ---------- */
.doc {
  background: var(--paper); color: var(--ink); padding: clamp(20px, 4vw, 44px); max-height: 460px; overflow-y: auto;
  font-size: 14px; line-height: 1.65; border: 1px solid var(--line);
}
.doc.full { max-height: none; }
.doc h3 { color: var(--ink); font-weight: 600; letter-spacing: 0.02em; font-size: 20px; margin-bottom: 12px; }
.doc p + p { margin-top: 10px; }
.doc .pre p { margin-top: 2px; }
.doc .sec { margin-top: 14px; }
.doc .sec b { font-weight: 600; }
.doc .draft { background: #fff4d6; border: 1px solid #e3b341; color: #5b4300; padding: 10px 12px; font-weight: 600; margin-bottom: 14px; }
.sigblocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 22px; }
.sigblock { border: 1px solid #c9ccd3; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sigblock .party { font-weight: 600; font-size: 13px; }
.sigblock .sigimg { height: 70px; display: flex; align-items: flex-end; border-bottom: 1px solid #9097a3; }
.sigblock .sigimg img { max-height: 70px; }
.sigblock .typed { font-family: "Snell Roundhand", "Brush Script MT", cursive; font-size: 28px; color: #1d2a6b; }
.sigblock dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; }
.sigblock dt { color: #5d6472; }
.sigblock dd { margin: 0; overflow-wrap: anywhere; }

.sigpad-wrap { display: flex; flex-direction: column; gap: 8px; }
.sigpad {
  width: 100%; height: 170px; background: var(--paper); border: 1px solid var(--line-strong); touch-action: none; cursor: crosshair; display: block;
}
.sigpad-hint { font-size: 13px; color: var(--muted); }

/* ---------- dashboards ---------- */
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h3 { font-size: 15px; }
.card p { color: var(--soft); font-size: 15px; line-height: 1.65; }
.soon { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; margin-top: auto; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--line-strong); color: var(--soft); white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { color: var(--ok); border-color: rgba(76, 195, 138, 0.45); }
.chip.warn { color: var(--warn); border-color: rgba(240, 180, 41, 0.45); }
.chip.bad { color: var(--bad); border-color: rgba(255, 138, 143, 0.45); }
.chip.plain::before { display: none; }
.chip.sample { color: var(--muted); border-style: dashed; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); background: var(--panel); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat .n { font-size: 30px; font-weight: 300; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 18px; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.toolbar .field { flex: 1 1 180px; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
table.list th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
table.list td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr.clickable { cursor: pointer; }
table.list tr.clickable:hover td { background: var(--panel-2); }
table.list td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.who { display: flex; flex-direction: column; gap: 2px; }
.who b { font-weight: 500; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
table.list td:first-child { min-width: 250px; }
.who span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.06em; }

.drawer-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--bg); border-left: 1px solid var(--line);
  z-index: 41; overflow-y: auto; display: flex; flex-direction: column; gap: 22px;
  padding: calc(24px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) 24px;
}
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.empty { border: 1px dashed var(--line-strong); padding: 28px; color: var(--muted); text-align: center; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  background: var(--fg); color: var(--bg); padding: 12px 20px; font-size: 14px; font-weight: 500; max-width: calc(100% - 32px);
}

.hero-mark { width: 120px; height: auto; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .view > * { animation: rise 0.35s ease-out both; }
  @keyframes rise { from { opacity: 0.85; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media print {
  .top, .foot, .demo-banner, .no-print, .toast { display: none !important; }
  body, html { background: #fff; color: #000; }
  .doc { max-height: none; border: 0; padding: 0; }
}

/* concept pages (inline-styled sections from the concept site) */
.concept { width: 100%; overflow-x: hidden; }
.concept a { color: var(--fg); text-decoration: none; }
.concept video, .concept img { max-width: 100%; }

/* ---------- public front page ---------- */
.home-hero { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); padding-block: clamp(48px, 7vw, 96px) 0; }
.home-intro { max-width: 1240px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.home-intro h1 { font-size: clamp(34px, 5vw + 12px, 68px); }
.home-pin { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }
.home-figure { margin: 0; background: var(--bg); }
.home-figure { background: #000; }
.home-figure img, .home-figure video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 auto; }
.home-figure figcaption { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; padding: 8px max(24px, env(safe-area-inset-right, 0px)) 8px max(24px, env(safe-area-inset-left, 0px)); text-align: right; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0; border-top: 1px solid var(--line); }
.home-grid article { display: flex; flex-direction: column; gap: 14px; padding: 32px 28px 8px 0; min-width: 0; }
.home-grid h3 { font-size: 17px; letter-spacing: 0.14em; }
.home-grid p { color: var(--soft); line-height: 1.7; }
.home-story { align-items: center; text-align: center; border-top: 1px solid var(--line); max-width: 860px; }
.home-story .row { justify-content: center; }

/* members-only teaser in the front-page intro */
.home-secret { display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; max-width: 62ch; }
.home-secret p { margin: 0; color: var(--fg); font-size: 17px; line-height: 1.65; }

/* Rolex-style statement under the film */
.home-wear { text-align: center; padding: clamp(56px, 8vw, 112px) max(16px, env(safe-area-inset-right, 0px)) clamp(48px, 6vw, 88px) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.home-wear p { margin: 0; }
.home-wear-roles { color: var(--soft); font-size: clamp(16px, 1vw + 12px, 22px); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400; line-height: 1.7; }
.home-wear-line { color: var(--fg); font-size: clamp(30px, 3.4vw + 14px, 60px); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 300; line-height: 1.15; }
.home-wear-roles span { white-space: nowrap; }
@media (max-width: 640px) { .home-wear-roles span { display: block; } }
.home-wear-invite { color: var(--soft); font-size: clamp(17px, 0.8vw + 13px, 22px); font-style: italic; font-weight: 300; letter-spacing: 0.02em; margin-top: 10px !important; }
.home-ask { margin: 24px 0 4px; font-weight: 300; letter-spacing: 0.08em; font-size: clamp(24px, 2.2vw + 14px, 40px); line-height: 1.2; text-align: center; }
.home-ask-top { text-align: left; margin: 8px 0 0; font-size: clamp(20px, 1.4vw + 12px, 28px); color: var(--fg); }

/* request form: model checklist dropdown and tail-number rows */
.dd { position: relative; }
.dd-sum { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.dd-sum::-webkit-details-marker { display: none; }
.dd-sum::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--soft); border-bottom: 1.5px solid var(--soft); transform: rotate(45deg) translateY(-3px); flex: none; transition: transform .15s; }
.dd[open] .dd-sum::after { transform: rotate(-135deg) translateY(-1px); }
.dd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 16px; padding: 16px; border: 1px solid var(--line-strong); border-top: 0; background: var(--panel); }
.dd-list .check { font-size: 15px; }
.tails { display: flex; flex-direction: column; gap: 12px; }
.tail-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto; gap: 12px; align-items: end; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tail-own { align-self: center; margin-top: 22px; white-space: nowrap; }
.tail-del { align-self: end; }
@media (max-width: 640px) { .tail-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tail-own { margin-top: 0; } .tail-del { justify-self: end; } }
.field .check, .field .check span { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 400; color: var(--soft); line-height: 1.4; }
.dd-list { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.dd-list .check { align-items: center; }
.dd-list .check input, .tail-own input { margin-top: 0; }
.dd-list .check span { white-space: nowrap; }
@media (max-width: 640px) { .dd-list { padding: 12px; gap: 10px 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .dd-list .check { gap: 8px; } .dd-list .check span { font-size: 14px; } }
/* keep every single-line control the same height so side-by-side boxes line up */
input.input, select.input, .dd-sum { height: 56px; box-sizing: border-box; }
.grid2 > .field { justify-content: flex-end; }
.tail-row { align-items: end; }
.tail-own { height: 56px; margin-top: 0; align-self: end; display: flex; align-items: center; }
.tail-del { height: 56px; align-self: end; }
@media (max-width: 640px) { .tail-own, .tail-del { height: 44px; } }

.tail-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
@media (max-width: 640px) { .tail-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tail-del { grid-column: 1 / -1; justify-self: end; } }

/* tail rows with proof upload */
.tail-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.4fr) auto; }
.input.file { padding: 12px 12px; font-size: 14px; color: var(--soft); cursor: pointer; }
.input.file::file-selector-button { font: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; background: transparent; color: var(--fg); border: 1px solid var(--line-strong); padding: 7px 12px; margin-right: 12px; cursor: pointer; }
@media (max-width: 640px) { .tail-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tail-row .field:nth-child(3) { grid-column: 1 / -1; } .tail-del { grid-column: 1 / -1; justify-self: end; } }
.docs { display: flex; flex-direction: column; gap: 10px; }
.docs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.docs li { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.docs li span { color: var(--soft); flex: 1; min-width: 160px; overflow-wrap: anywhere; }

/* evidence: request form proof rows, member card, admin list */
.co-docs { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.co-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px 16px; }
.docs li .ev-k { flex: none; min-width: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.docs li b { flex: none; }
.ev-card { gap: 14px; }
.ev-add { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 16px; align-items: end; }
.ev-grid .field { justify-content: flex-end; }
.ev-grid .ev-file { grid-column: 1 / -1; }
.toolbar .grow { flex: 1 1 260px; }
.docs li .chip { flex: none; min-width: 0; }
.docs li > span:not(.chip):not(.ev-k):not(.small) { flex: 1; }

/* File picker box */
.filebox { position: relative; display: flex; align-items: center; height: 56px; box-sizing: border-box; border: 1px solid var(--line-strong); background: transparent; padding: 0 14px; cursor: pointer; min-width: 0; }
.filebox input.input.file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; padding: 0; border: 0; }
.filebox .fb-text { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.filebox.has .fb-text { font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.filebox:hover { border-color: var(--fg); }
.filebox:focus-within { outline: 2px solid var(--fg); outline-offset: 2px; }
/* Solo and checkride rows */
.ev-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; align-items: end; }
.ev-row .field { justify-content: flex-end; }
.ev-row:not(.ck-row) .field:last-child { grid-column: 1 / -1; }
.cks { display: flex; flex-direction: column; gap: 12px; }
.ck-row { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ck-row .tail-del { grid-column: 1 / -1; justify-self: end; }
