/* ============================================================
   NFC · app.css — mobile-first crew app
   Editorial white: #ffffff canvas, ink text, one orange accent,
   Inter + JetBrains Mono, pill buttons, flat — depth comes from
   the white → wash → ink surface stack, never from shadows.
   ============================================================ */
:root {
  --bg: #ffffff;      /* paper-white canvas */
  --section: #f6f6f4; /* soft wash — hovers, strips, sheet */
  --card: #ececea;    /* deepest neutral surface — tracks, chips */
  --line: #ebebe8;    /* hairlines */
  --steel: #d9d9d5;   /* stronger borders — inputs, checkboxes */
  --graphite: #bcbcb7;/* faint icons, disabled */
  --fog: #8f8f89;     /* muted secondary text */
  --muted: #62625c;   /* helper text, one step under ink */
  --ink: #141412;     /* near-black text */
  --blue: #e4370f;    /* NorthFinder brand accent — the only color */
  --mint: #178a53;    /* success/done only, tuned for white */
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.17px;
  min-height: 100dvh;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); font-size: 11px; word-break: break-all; }

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); z-index: 5; }
.topbar-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; }
img.brandlogo { width: 150px; height: auto; display: block; }
.spacer { flex: 1; }
.demo-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--blue); border: 1px solid var(--blue); border-radius: 9999px; padding: 2px 8px; }
.livedot { width: 8px; height: 8px; border-radius: 99px; background: var(--graphite); transition: background .3s; }
.livedot.on { background: var(--mint); }
.pill { font-size: 12.5px; font-weight: 500; border: 1px solid var(--steel); border-radius: 9999px; padding: 6px 14px; }
.pill:active { background: var(--card); }

/* ---------- layout ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 18px; }
footer.wrap { color: var(--fog); font-size: 11.5px; padding-top: 32px; padding-bottom: 40px; }

/* hero — flat white, the type carries it */
.hero { padding: 26px 0 22px; }
.eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; color: var(--muted); display: block; margin-bottom: 10px; }
.hero h1 { font-size: 32px; font-weight: 600; letter-spacing: -1.2px; line-height: 1.13; }
.hero p { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 42ch; }

/* ---------- screen 1 · folder list ---------- */
.folders { margin-top: 8px; }
.folderrow {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: 15px 6px;
  border-bottom: 1px solid var(--line);
}
.folderrow:active { background: var(--section); }
.fico { width: 26px; height: 26px; flex: 0 0 26px; color: var(--graphite); }
.folderrow.alldone .fico { color: var(--mint); }
.fbody { flex: 1; min-width: 0; }
.ft { display: block; font-size: 15.5px; font-weight: 500; letter-spacing: -0.25px; overflow-wrap: anywhere; }
.fs { display: block; font-size: 12.5px; color: var(--fog); margin-top: 2px; }
.fcount { font-family: var(--mono); font-size: 11px; color: var(--fog); white-space: nowrap; }
.fcount.ok { color: var(--mint); }
.chev { width: 16px; height: 16px; flex: 0 0 16px; color: var(--graphite); }
.today {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 1.2px;
  color: var(--blue); border: 1px solid var(--blue); border-radius: 9999px;
  padding: 1px 7px; margin-left: 8px; vertical-align: 2px; white-space: nowrap;
}
.pastlbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.5px; color: var(--fog); margin: 22px 6px 2px; }
.folderrow.past { opacity: .5; }
.folderrow.past:active, .folderrow.past:hover { opacity: .8; }

/* ---------- screen 2 · teams (one per camera operator) ---------- */
.tava {
  --pc: var(--graphite);
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 99px; background: var(--pc);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff; /* person colors are saturated — letter stays white */
}
.tava.img { background-size: cover; background-position: center; }
.yours {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 1.2px;
  color: var(--mint); border: 1px solid var(--mint); border-radius: 9999px;
  padding: 1px 7px; margin-left: 8px; vertical-align: 2px; white-space: nowrap;
}

/* ---------- screen 2 · content list ---------- */
.backlink { display: inline-block; font-size: 13px; color: var(--muted); margin: 4px 0 14px; padding: 4px 0; }
.ltitle { font-size: 26px; font-weight: 600; letter-spacing: -0.9px; line-height: 1.15; }
.lsub { color: var(--fog); font-size: 13px; margin: 3px 0 4px; }
.listhead { display: flex; align-items: center; gap: 14px; margin: 14px 0 4px; }
.listhead h2 { font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.progress { flex: 1; height: 3px; background: var(--card); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .3s; }
.progress i.full { background: var(--mint); }

.namestrip {
  display: block; width: 100%; text-align: left;
  background: var(--section); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin: 10px 0; position: relative;
}
.namestrip.copyable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.namestrip.copyable:active { border-color: var(--blue); }
.namestrip.copied { border-color: var(--blue); }
.namestrip .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--fog); display: block; margin-bottom: 4px; }
.namestrip .mono { color: var(--ink); display: block; padding-right: 74px; }
.namestrip .copyico { position: absolute; top: 9px; right: 10px; font-family: var(--mono); font-size: 9px; letter-spacing: .5px; color: var(--blue); white-space: nowrap; }

/* ---------- location blocks (day brief) ---------- */
.locblock { margin-top: 22px; }
.lochead { border-top: 1px solid var(--line); padding-top: 16px; }
.loctop { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.locname { font-size: 18px; font-weight: 600; letter-spacing: -0.4px; }
.locwin { font-family: var(--mono); font-size: 11px; color: var(--blue); font-weight: 500; }
.maplink { display: inline-block; font-size: 12.5px; font-weight: 500; margin-top: 6px; }
.locblock .items { margin-top: 6px; }
.locblock .namestrip { margin-bottom: 4px; }

.items { margin-top: 10px; }
.item {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line);
}
.item:active { background: var(--section); }
.item.done .ttl { color: var(--fog); text-decoration: line-through; }
.chk {
  flex: 0 0 26px; height: 26px; border-radius: 8px;
  border: 1.5px solid var(--steel);
  display: grid; place-items: center;
  color: var(--bg); font-size: 14px; font-weight: 700;
  position: relative;
}
/* invisible 44px hit area around the checkbox */
.chk::after { content: ""; position: absolute; inset: -10px; }
.item.done .chk { background: var(--mint); border-color: var(--mint); }
.body { flex: 1; min-width: 0; display: block; }
.ttl { display: block; font-size: 15px; font-weight: 500; letter-spacing: -0.2px; }
.sub { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .5px; color: var(--fog); margin-top: 2px; }
/* only when one location runs several call times — otherwise the block headline says it */
.tpill { display: inline-block; font-family: var(--mono); font-size: 10px; color: var(--blue); font-weight: 500; margin-top: 4px; }

/* day plan — logistics sitting in the run of the day (meet · lunch · regroup) */
.planrow {
  display: flex; align-items: baseline; gap: 10px;
  margin: 18px 0; padding: 11px 12px;
  border-left: 2px solid var(--blue); border-radius: 0 12px 12px 0;
  background: var(--section);
}
.planrow .pk { font-size: 14px; line-height: 1; }
.planrow .pt { font-family: var(--mono); font-size: 11px; color: var(--blue); font-weight: 500; white-space: nowrap; }
.planrow .pb { min-width: 0; }
.planrow .ptitle { display: block; font-size: 14px; font-weight: 500; letter-spacing: -0.2px; }
.planrow .ploc { display: inline-block; font-size: 12.5px; color: var(--blue); margin-top: 3px; }
.planrow .pnote { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tdot { flex: 0 0 7px; height: 7px; border-radius: 99px; }
.tdot.t-paid { background: var(--blue); }
.tdot.t-organic { background: var(--mint); }

.toolrow { margin: 20px 0; display: flex; gap: 10px; }
.ghostbtn { font-size: 12.5px; font-weight: 500; color: var(--muted); border: 1px solid var(--steel); border-radius: 9999px; padding: 8px 15px; }

.empty { color: var(--fog); font-size: 14px; padding: 28px 6px; }

/* ---------- detail sheet ---------- */
.sheet-veil {
  position: fixed; inset: 0; background: rgba(20,20,18,.28);
  opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 20;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  background: var(--bg); border-top: 1px solid var(--steel);
  border-radius: 20px 20px 0 0;
  max-height: 88dvh; overflow-y: auto;
  transform: translateY(105%); transition: transform .26s cubic-bezier(.3,.9,.3,1);
}
body.sheet-open .sheet-veil { opacity: 1; pointer-events: auto; }
body.sheet-open .sheet { transform: translateY(0); }
body.sheet-open { overflow: hidden; }
.sheet-in { max-width: 720px; margin: 0 auto; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); position: relative; }
.grab { width: 38px; height: 4px; border-radius: 99px; background: var(--graphite); margin: 6px auto 14px; }
.sheet .x { position: absolute; top: 14px; right: 14px; color: var(--muted); font-size: 15px; padding: 6px; }
.typetag { font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; border: 1px solid; border-radius: 9999px; padding: 2px 9px; }
.typetag.t-paid { color: var(--blue); border-color: var(--blue); }
.typetag.t-organic { color: var(--mint); border-color: var(--mint); }
.sheet h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.5px; margin: 10px 0 4px; }
.sec { margin-top: 16px; }
.sec .lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.5px; color: var(--fog); margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13.5px; }
.kv b { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--muted); font-weight: 400; padding-top: 2px; }
.txt { font-size: 14px; white-space: pre-wrap; }
.ref { font-size: 13px; word-break: break-all; }
.reflink {
  display: inline-block; word-break: normal;
  border: 1px solid var(--steel); border-radius: 9999px; padding: 9px 15px;
  font-weight: 500;
}
.script img.scr-img { max-width: 100%; border-radius: 10px; display: block; margin: 6px 0; }
.script {
  font-size: 14px;
  background: var(--section); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.script h1, .script h2, .script h3 { margin: 10px 0 4px; line-height: 1.25; letter-spacing: -0.3px; }
.script h1 { font-size: 19px; } .script h2 { font-size: 16.5px; } .script h3 { font-size: 15px; }
.script p { margin: 3px 0; }
.script ul, .script ol { padding-left: 22px; margin: 4px 0; }
.script blockquote { border-left: 2.5px solid var(--steel); padding-left: 11px; color: var(--muted); font-style: italic; margin: 5px 0; }
.script hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.script .tdo { display: flex; gap: 8px; align-items: flex-start; margin: 3px 0; }
.script .tbox { flex: none; width: 15px; height: 15px; margin-top: 2px; border: 1.5px solid var(--steel); border-radius: 5px; font-size: 9px; line-height: 13px; text-align: center; color: #fff; }
.script .tdo.on .tbox { background: var(--mint); border-color: var(--mint); }
.script .tdo.on .ttx { color: var(--fog); text-decoration: line-through; }
.scopy {
  margin-top: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .5px;
  color: var(--blue); border: 1px solid var(--steel); border-radius: 9999px; padding: 7px 12px;
}
.scopy:active { border-color: var(--blue); }
.donebar { margin-top: 22px; }
.rcinp {
  width: 100%; margin-top: 4px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--steel); border-radius: 12px;
  padding: 11px 12px; font-family: inherit; font-size: 15px;
}
.rcinp:focus { border-color: var(--blue); outline: none; }
.rcerr { color: #c03016; font-size: 13px; margin-top: 10px; min-height: 18px; }
.btn {
  width: 100%; text-align: center;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500;
  border-radius: 9999px; padding: 12px;
}
.btn.is-done { background: transparent; color: var(--mint); border: 1px solid var(--mint); }

.ic { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.locwin .ic, .tpill .ic { width: 11px; height: 11px; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-veil, .progress i { transition: none; }
}

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .hero h1 { font-size: 40px; letter-spacing: -1.6px; }
  .ltitle { font-size: 32px; letter-spacing: -1.2px; }
  .folderrow, .item { padding-left: 10px; padding-right: 10px; }
  .folderrow:hover, .item:hover { background: var(--section); }
}
