/* TradeTag — job-site skin. Token system + components adapted from
   ParetoOptimal/PITCHFIGHT_AI (glass cards, chip cards, mic button)
   and ParetoOptimal/small-talk (data-theme token pattern). */

:root {
  --bg-deep: #07080a;
  --bg-panel: rgba(16, 19, 24, 0.82);
  --text-main: #f5f0e6;
  --text-muted: #9aa3b5;
  --accent-gold: #f4d35e;   /* safety yellow */
  --accent-red: #e63946;    /* hazard */
  --accent-cyan: #4ecdc4;   /* info */
  --border-soft: rgba(244, 211, 94, 0.16);
  --glow-gold: rgba(244, 211, 94, 0.42);
  --glow-red: rgba(230, 57, 70, 0.35);
  --bg: var(--bg-deep); --text: var(--text-main); --muted: var(--text-muted);
  --red: var(--accent-red); --gold: var(--accent-gold); --border: var(--border-soft);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  --app-vh: 100svh;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hud: "Rajdhani", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: var(--app-vh, 100svh);
  min-height: var(--app-vh, 100dvh);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hud-font { font-family: var(--font-hud); letter-spacing: 0.08em; }

/* ambient glow — lifted verbatim, re-tinted */
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(244, 211, 94, 0.10), transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(78, 205, 196, 0.07), transparent 30%);
}

#topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem clamp(0.9rem, 3vw, 1.4rem);
  background: rgba(7, 8, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
#topbar .brand { font-weight: 700; font-size: 1.05rem; color: var(--gold); }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 0.65rem; min-width: 0; }
.house-label { font-size: 0.85rem; color: var(--muted); max-width: 60%; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-button {
  min-height: 36px; padding: 0.45rem 0.7rem; border-radius: 9px;
  border: 1px solid var(--border); background: rgba(244, 211, 94, 0.08);
  color: var(--gold); font: 700 0.82rem var(--font-body); cursor: pointer;
}

.app {
  position: relative; z-index: 1;
  width: min(680px, calc(100vw - 24px));
  margin: 0 auto;
  padding: clamp(0.9rem, 2vw, 1.5rem) clamp(0.4rem, 2vw, 1rem) 3rem;
}

/* screens router */
.screen { display: none; }
.screen.active { display: block; animation: screen-in 0.22s ease; }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* glass card */
.glass {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 1.5rem);
}

.center-card { text-align: center; margin-top: 12vh; }

/* type */
h1 { font-family: var(--font-hud); font-size: clamp(1.9rem, 6.5vw, 2.8rem); line-height: 1.12; margin: 0.4rem 0 0.8rem; }
h2 { font-family: var(--font-hud); font-size: clamp(1.25rem, 4.5vw, 1.6rem); margin: 1.1rem 0 0.6rem; }
.accent { color: var(--gold); }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; color: var(--gold);
  text-transform: uppercase; }
.lede { color: var(--muted); font-size: 1.02rem; }
.hint { color: var(--muted); font-size: 0.9rem; }
.opt { color: var(--muted); font-weight: 400; font-size: 0.8rem; }

/* buttons — lifted */
.btn {
  border: none; border-radius: 12px; padding: 0.95rem 1.25rem;
  font-weight: 700; font-size: 1rem; cursor: pointer; min-height: 48px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-primary {
  color: #1a1608;
  background: linear-gradient(135deg, var(--gold), #ffe27a);
  box-shadow: 0 0 18px rgba(244, 211, 94, 0.35);
}
.btn-secondary { color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid transparent; }
.btn-wide { width: 100%; margin-top: 1rem; }
.btn-log { font-size: 1.15rem; padding: 1.15rem; }
.btn-back { padding: 0.4rem 0.2rem; min-height: 0; margin-bottom: 0.2rem; }

/* hero */
.hero { margin-top: 6vh; }
.hero .hint { margin-top: 0.9rem; text-align: center; }

/* brief card */
.brief-card { border-color: rgba(244, 211, 94, 0.35); }
.brief-body { margin-top: 0.6rem; font-size: 1.02rem; }
.brief-body .brief-line { margin: 0.45rem 0; padding-left: 0.2rem; }
.brief-body .brief-hazard {
  color: #ffd9dc;
  background: rgba(230, 57, 70, 0.12);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font-weight: 600;
}

/* history */
.history-head { margin: 1.6rem 0 0.6rem; color: var(--muted); font-size: 0.85rem;
  letter-spacing: 0.15em; text-transform: uppercase; }
.entry-card { margin-bottom: 0.7rem; padding: 0.9rem 1rem; }
.pending-section { margin-top: 1rem; }
.pending-entry { border-color: rgba(244, 211, 94, 0.35); }
.review-actions { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.review-actions .btn { flex: 1; }
.entry-top { display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }
.entry-trade { font-size: 1.15rem; }
.entry-summary { font-weight: 600; flex: 1 1 100%; margin-top: 0.2rem; }
.entry-date { color: var(--muted); font-size: 0.82rem; margin-left: auto; }
.entry-author { color: var(--accent-cyan); font-size: 0.85rem; }
.entry-assurance { padding: 0.16rem 0.42rem; border: 1px solid var(--border);
  border-radius: 999px; color: var(--muted); font-size: 0.72rem; }
.entry-details { margin-top: 0.55rem; font-size: 0.92rem; color: var(--muted); }
.entry-details dt { color: var(--text); font-weight: 600; margin-top: 0.5rem; }
.entry-details dd { margin: 0.1rem 0 0; }
.entry-hazard { color: #ffb3b9; font-weight: 600; }
.entry-card summary { cursor: pointer; color: var(--accent-cyan); font-size: 0.85rem; margin-top: 0.4rem; }
.entry-photos { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.entry-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); }

/* chip cards — persona-card lifted */
.chip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; }
.chip-card {
  text-align: center; padding: 0.9rem 0.85rem; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.22);
  color: var(--text); cursor: pointer; font-size: 1rem; font-weight: 600;
  font-family: inherit; min-height: 52px;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.chip-card:hover, .chip-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(244, 211, 94, 0.18);
  transform: translateY(-2px);
}
.chip-card.selected { background: rgba(244, 211, 94, 0.10); }
.chip-icon { font-size: 1.3rem; }

/* forms — lifted */
input, textarea, select {
  width: 100%; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25); color: var(--text);
  padding: 0.75rem 0.8rem; font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(244, 211, 94, 0.4); border-color: transparent; }
select option { background: #14161b; color: var(--text); }
.startup-form { display: grid; gap: 0.85rem; margin-top: 1rem; }
.startup-form label { display: grid; gap: 0.35rem; font-size: 0.92rem; color: var(--muted); }
.hazard-label { color: #ffb3b9 !important; }
.confirm-card { margin-top: 0.6rem; }
.followup-review {
  margin: 0;
  padding: 0.8rem;
  border: 1px solid rgba(244, 211, 94, 0.25);
  border-radius: 10px;
}
.followup-review legend { color: var(--text); padding: 0 0.35rem; }
.followup-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.7rem;
  align-items: start;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.followup-item:first-child { border-top: 0; }
.followup-item input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
}
.followup-fields { display: grid; gap: 0.45rem; }
.followup-fields input { padding: 0.55rem 0.65rem; }

.author-card { margin-top: 1.2rem; padding: 0.9rem 1rem; }
.author-summary { display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; }

/* mic button — lifted verbatim, re-tinted to gold */
.voice-stage { text-align: center; margin-top: 1rem; }
.voice-mic-btn {
  position: relative; width: 112px; height: 112px; border-radius: 50%;
  border: 2px solid rgba(244, 211, 94, 0.5);
  background: radial-gradient(circle at 30% 30%, rgba(244, 211, 94, 0.25), rgba(10, 9, 4, 0.9));
  color: var(--gold); cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 24px rgba(244, 211, 94, 0.2);
  transition: transform 0.15s, box-shadow 0.2s;
  margin: 1.4rem auto 0.8rem;
}
.voice-mic-btn:hover { transform: scale(1.04); box-shadow: 0 0 32px rgba(244, 211, 94, 0.35); }
.voice-mic-btn.recording {
  border-color: #f87171; color: #f87171;
  box-shadow: 0 0 28px rgba(248, 113, 113, 0.45);
  animation: voice-pulse 1.2s ease-in-out infinite;
}
.voice-mic-btn .mic-ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid transparent; }
.voice-mic-btn.recording .mic-ring { border-color: rgba(248, 113, 113, 0.35); animation: voice-ring 1.2s ease-out infinite; }
@keyframes voice-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes voice-ring { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.35); opacity: 0; } }
.voice-timer { font-size: 1.4rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums;
  font-family: var(--font-hud); }
.voice-status { color: var(--muted); margin-top: 0.2rem; min-height: 1.4em; }

.type-instead { margin-top: 1.6rem; text-align: left; }
.type-instead summary { color: var(--accent-cyan); cursor: pointer; text-align: center; }
.type-instead textarea { margin-top: 0.7rem; }

/* photos */
.photo-strip { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.photo-strip img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); }

/* done */
.done-check {
  width: 84px; height: 84px; margin: 0 auto 0.8rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.6rem; color: #103b1c;
  background: linear-gradient(135deg, #7ee08a, #b9f0be);
  box-shadow: 0 0 28px rgba(126, 224, 138, 0.4);
}

/* busy overlay + spinner */
.busy-overlay { position: fixed; inset: 0; z-index: 20; background: rgba(4, 5, 8, 0.7);
  backdrop-filter: blur(4px); display: grid; place-items: center; }
/* The hidden attribute only works via the UA stylesheet, which any author
   `display:` rule silently overrides — this reset makes hidden always win.
   (Without it the busy overlay was permanently visible from page load.) */
[hidden] { display: none !important; }
.busy-overlay .center-card { margin-top: 0; min-width: 240px; }
.spinner {
  width: 42px; height: 42px; margin: 0 auto 0.7rem; border-radius: 50%;
  border: 3px solid rgba(244, 211, 94, 0.2); border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* brand logo (white badge treatment for the dark theme) */
.brand-logo {
  width: 26px; height: 26px; border-radius: 7px; background: #fff; padding: 2px;
  vertical-align: -7px; margin-right: 7px; display: inline-block;
}
.hero-logo {
  width: 84px; height: 84px; border-radius: 20px; background: #fff; padding: 6px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), 0 0 26px rgba(244, 211, 94, 0.12);
  margin-bottom: 0.9rem; display: block;
}

/* landing code entry (third doorway: typed tag code) */
.code-entry { display: flex; gap: 0.5rem; margin-top: 0.8rem; }
.code-entry input { flex: 1; font-size: 0.9rem; }

/* landing sections */
.land-sec { margin-top: 1.6rem; }
.land-sec h2 { margin: 0.15rem 0 0.8rem; }

.tech-items { display: grid; gap: 0.85rem; }
.tech-item { display: flex; gap: 0.6rem; align-items: flex-start; }
.tech-item > span { font-size: 1.15rem; line-height: 1.35; }
.tech-item b { display: block; font-size: 0.95rem; }
.tech-item small { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.diff-card { padding: 1.1rem 1.2rem; }

/* animated 20s demo: 4 frames x 5s */
.demo-card { padding: 1.1rem 1.2rem 1rem; }
.demo-phone {
  position: relative; margin-top: 0.8rem; height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px;
  background: rgba(0, 0, 0, 0.35); overflow: hidden;
}
.demo-frame {
  position: absolute; inset: 0; padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; justify-content: center; gap: 0.45rem;
  opacity: 0; animation: demo-cycle 20s infinite;
}
.df-1 { animation-delay: 0s; }
.df-2 { animation-delay: 5s; }
.df-3 { animation-delay: 10s; }
.df-4 { animation-delay: 15s; }
@keyframes demo-cycle {
  0% { opacity: 0; } 3% { opacity: 1; } 24% { opacity: 1; } 27% { opacity: 0; }
  100% { opacity: 0; }
}
.demo-big { font-size: 2.2rem; line-height: 1; }
.demo-title { font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; font-size: 1.1rem; }
.demo-sub { color: var(--muted); font-size: 0.88rem; margin: 0; }
.demo-line { font-size: 0.85rem; color: var(--text); }
.demo-hazard { color: #ffb3b9; }
.demo-pulse { animation: demo-pulse 1.2s ease-in-out infinite; }
@keyframes demo-pulse { 50% { transform: scale(1.12); } }
.demo-done { color: #9be29b; }
.demo-dots { display: flex; gap: 0.4rem; justify-content: center; margin-top: 0.7rem; }
.demo-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(244, 211, 94, 0.25);
  animation: demo-dot 20s infinite;
}
.demo-dots i:nth-child(1) { animation-delay: 0s; }
.demo-dots i:nth-child(2) { animation-delay: 5s; }
.demo-dots i:nth-child(3) { animation-delay: 10s; }
.demo-dots i:nth-child(4) { animation-delay: 15s; }
@keyframes demo-dot {
  0% { background: rgba(244, 211, 94, 0.25); } 3% { background: var(--gold); }
  24% { background: var(--gold); } 27% { background: rgba(244, 211, 94, 0.25); }
  100% { background: rgba(244, 211, 94, 0.25); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-frame { opacity: 1; position: static; padding: 0.6rem 0; animation: none; }
  .demo-phone { height: auto; }
}

/* how it works */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.how-step { padding: 0.9rem 1rem; }
.how-step .k {
  font-family: var(--display); font-weight: 700; color: var(--gold);
  font-size: 1.3rem; display: block;
}
.how-step b { display: block; margin: 0.15rem 0 0.2rem; }
.how-step small { color: var(--muted); font-size: 0.84rem; line-height: 1.4; }

/* use cases */
.uc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.uc-card { padding: 0.9rem 1rem; }
.uc-card > span { font-size: 1.3rem; }
.uc-card b { display: block; margin: 0.25rem 0 0.2rem; }
.uc-card small { color: var(--muted); font-size: 0.84rem; line-height: 1.4; }
@media (max-width: 380px) { .how-grid, .uc-grid { grid-template-columns: 1fr; } }

/* pilot CTA */
.cta-card { padding: 1.2rem 1.2rem 1.3rem; text-align: center; }
.cta-card h2 { margin-bottom: 0.4rem; }
.cta-card .btn { margin-top: 0.9rem; }

/* FAQ */
.faq { display: grid; gap: 0.55rem; }
.faq details {
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px; padding: 0.75rem 0.95rem;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.faq p { color: var(--muted); font-size: 0.88rem; line-height: 1.5; margin: 0.55rem 0 0; }

/* house geolocation */
.house-loc { margin: 0.7rem 0 1rem; font-size: 0.9rem; color: var(--muted); }
.house-loc a { color: var(--gold); text-decoration: none; }
.house-loc a:hover { text-decoration: underline; }
.loc-map { margin-top: 0.45rem; }
.loc-map summary { cursor: pointer; font-size: 0.85rem; }
.loc-map iframe { width: 100%; height: 220px; border: 0; border-radius: 12px; margin-top: 0.5rem; }
.loc-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.loc-row .hint { margin: 0; }

.error-banner {
  color: #ffd9dc; background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.4); border-radius: 10px;
  padding: 0.6rem 0.8rem; margin-top: 0.8rem; font-size: 0.92rem;
}

.claim-auth-note {
  margin-top: 1rem; padding: 0.9rem; border: 1px solid rgba(78, 205, 196, 0.35);
  border-radius: 12px; background: rgba(78, 205, 196, 0.08);
}
.claim-auth-note p { margin: 0 0 0.75rem; color: var(--text-muted); }
.account-dialog {
  width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  overflow: auto; color: var(--text); background: #11141a; position: relative;
}
.account-dialog::backdrop { background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(4px); }
.account-close {
  position: absolute; right: 0.75rem; top: 0.6rem; width: 40px; height: 40px;
  border: 0; background: transparent; color: var(--text-muted); font-size: 1.8rem;
  cursor: pointer;
}
.account-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }
.account-email { color: var(--accent-cyan); overflow-wrap: anywhere; }
.account-properties, .account-sessions {
  margin-top: 1.25rem; padding-top: 0.75rem; border-top: 1px solid var(--border);
}
.account-property, .account-session {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.65rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.account-property a { color: var(--gold); }
.account-session small, .account-property small { color: var(--text-muted); display: block; }
.account-session button { min-height: 36px; padding: 0.4rem 0.65rem; font-size: 0.82rem; }

@media (max-width: 480px) {
  .chip-grid { grid-template-columns: 1fr 1fr; }
  body { font-size: 15px; }
  .house-label { display: none; }
  .account-dialog { padding: 1rem; }
}

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

/* ---------- NFC property record + work documentation flow ---------- */
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  color: #041514;
  border-radius: 10px;
  background: var(--gold);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
h1[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus { outline: none; }

.record-hero {
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: clamp(24px, 6vw, 70px);
  padding: clamp(24px, 5vw, 54px) 0 clamp(34px, 6vw, 64px);
}
.record-hero::after {
  content: "";
  position: absolute;
  right: 5%;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(164, 194, 184, 0.28), transparent);
}
.record-hero h1 {
  max-width: 720px;
  margin: 0.45rem 0 1rem;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}
.record-intro {
  max-width: 660px;
  margin: 0;
  color: #c3d9d2;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
}
.access-pill {
  width: max-content;
  max-width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 7px 13px;
  color: var(--gold);
  border: 1px solid rgba(67, 242, 179, 0.34);
  border-radius: 999px;
  background: rgba(67, 242, 179, 0.07);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.access-pill > span:first-child {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(67, 242, 179, 0.09);
}
.access-pill.owner {
  color: var(--accent-cyan);
  border-color: rgba(255, 182, 76, 0.36);
  background: rgba(255, 182, 76, 0.07);
}
.record-facts {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.record-facts span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  color: #93b2a8;
  border: 1px solid rgba(164, 194, 184, 0.18);
  border-radius: 9px;
  background: rgba(7, 31, 29, 0.42);
  font-size: 12px;
}
.record-facts strong { margin-right: 4px; color: var(--text); }

.tap-seal {
  position: relative;
  width: 166px;
  height: 166px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #d9fff1;
  border: 2px solid #4f7770;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #204841, #081c1a 70%);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.42), inset 0 0 0 6px #0a2421;
}
.tap-seal::before,
.tap-seal::after {
  content: "";
  position: absolute;
  inset: -16px;
  border: 1px solid rgba(67, 242, 179, 0.22);
  border-radius: 50%;
}
.tap-seal::after { inset: -30px; opacity: 0.45; }
.tap-seal strong { margin-top: 9px; font-size: 12px; letter-spacing: 0.09em; }
.tap-seal small { color: var(--gold); font-size: 8px; letter-spacing: 0.18em; }
.tap-seal-house {
  position: relative;
  width: 34px;
  height: 29px;
  display: block;
  border: 2px solid var(--gold);
  border-top: 0;
}
.tap-seal-house::before {
  content: "";
  position: absolute;
  width: 23px;
  height: 23px;
  left: 3px;
  top: -11px;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
  transform: rotate(45deg);
}

.brief-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}
.brief-heading-row h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(28px, 4.5vw, 42px);
}
.listen-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 15px;
  color: var(--gold);
  border: 1px solid rgba(67, 242, 179, 0.34);
  border-radius: 999px;
  background: rgba(67, 242, 179, 0.07);
  font: 750 13px/1 var(--font-body);
  cursor: pointer;
}
.listen-button:hover,
.listen-button[aria-pressed="true"] {
  color: #041514;
  border-color: var(--gold);
  background: var(--gold);
}
.listen-button:disabled { opacity: 0.5; cursor: not-allowed; }

.record-actions {
  margin: 22px 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(190px, 0.5fr);
  gap: 12px;
}
.record-actions .btn { margin: 0; }
.btn-log {
  min-height: 80px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.btn-log .action-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(4, 21, 20, 0.35);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}
.btn-log > span:last-child { display: grid; gap: 3px; }
.btn-log strong { font-size: 17px; }
.btn-log small { font-size: 11px; font-weight: 650; opacity: 0.72; }

.visibility-note,
.privacy-callout {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: start;
  gap: 13px;
  padding: 15px 18px;
  color: #adc8bf;
  border: 1px solid rgba(164, 194, 184, 0.18);
  border-radius: 14px;
  background: rgba(7, 31, 29, 0.45);
}
.visibility-note { margin-bottom: 72px; }
.visibility-note p,
.privacy-callout p { margin: 3px 0 0; font-size: 12px; line-height: 1.55; }
.visibility-note strong,
.privacy-callout strong { color: var(--text); }
.visibility-icon,
.privacy-callout > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(67, 242, 179, 0.3);
  border-radius: 50%;
}

.history-heading {
  margin: 60px 0 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}
.history-heading h2 { margin: 0.25rem 0 0; font-size: clamp(28px, 4.5vw, 43px); }
.history-heading > p { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.pending-section { margin: 56px 0; }
.pending-section .history-head { margin: 0 0 8px; }

.flow-toolbar {
  min-height: 56px;
  margin-bottom: clamp(38px, 6vw, 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.back-link {
  min-height: 44px;
  padding: 0;
  color: #bdd5cd;
  border: 0;
  background: transparent;
  font: 750 13px var(--font-body);
  cursor: pointer;
}
.back-link:hover { color: var(--gold); }
.flow-progress {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
}
.flow-progress li {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 6px;
  color: #789a90;
  border: 1px solid rgba(164, 194, 184, 0.17);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.flow-progress li span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(164, 194, 184, 0.08);
}
.flow-progress li.active {
  color: #041514;
  border-color: var(--gold);
  background: var(--gold);
}
.flow-progress li.complete {
  color: var(--gold);
  border-color: rgba(67, 242, 179, 0.32);
  background: rgba(67, 242, 179, 0.07);
}
.flow-lede {
  max-width: 760px;
  margin: 0 0 42px;
  color: #b9d1c9;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
}
#screen-log-trade > h1,
#screen-log-voice > h1,
#screen-log-confirm > h1 {
  max-width: 820px;
  margin: 0.45rem 0 1rem;
  font-size: clamp(44px, 8vw, 72px);
  line-height: 0.99;
  letter-spacing: -0.06em;
}
.choice-fieldset {
  min-width: 0;
  margin: 0 0 34px;
  padding: 0;
  border: 0;
}
.choice-fieldset legend {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}
.work-choice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-choice-grid .chip-card[data-trade="auto"],
.work-choice-grid .chip-card[data-job="auto"] { grid-column: span 2; }
.chip-card span:not(.chip-icon) { display: grid; gap: 3px; }
.chip-card small { font-size: 10px; font-weight: 650; opacity: 0.7; }

.author-card { margin-top: 44px; }
.author-card-heading,
.capture-card-heading,
.confirm-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.author-card-heading h2 { margin: 0.25rem 0 0; font-size: clamp(26px, 4vw, 38px); }
.free-write-badge {
  padding: 7px 11px;
  color: var(--gold);
  border: 1px solid rgba(67, 242, 179, 0.3);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.author-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}
.author-fields #author-organization-field { grid-column: 1 / -1; }
.flow-next { min-height: 62px; margin-top: 18px; }

.capture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.capture-card {
  min-height: 610px;
  display: flex;
  flex-direction: column;
}
.capture-card-heading {
  justify-content: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(164, 194, 184, 0.16);
}
.capture-card-heading h2 { margin: 0.15rem 0 0; font-size: clamp(25px, 3.5vw, 34px); }
.capture-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--gold);
  border: 1px solid rgba(67, 242, 179, 0.34);
  border-radius: 50%;
  font-weight: 850;
}
.voice-capture-card .voice-mic-btn { margin-top: 30px; }
.typed-label {
  margin-top: 25px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}
.voice-capture-card textarea { margin: 8px 0 12px; }
.voice-capture-card .btn { margin-top: auto; }

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.document-drop {
  min-height: 170px;
  margin: 13px 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 20px;
  color: #d9ebe5;
  border: 1px dashed rgba(67, 242, 179, 0.5);
  border-radius: 15px;
  background: rgba(67, 242, 179, 0.045);
  text-align: center;
  cursor: pointer;
}
.document-drop:hover {
  border-color: var(--gold);
  background: rgba(67, 242, 179, 0.09);
}
.visually-hidden-file:focus-visible + .document-drop {
  border-color: var(--gold);
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  background: rgba(67, 242, 179, 0.12);
  box-shadow: 0 0 0 7px rgba(67, 242, 179, 0.16);
}
.document-drop small { color: var(--muted); font-size: 10px; }
.upload-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  color: #041514;
  border-radius: 50%;
  background: var(--gold);
  font-size: 24px;
}
.document-list,
.review-document-list { display: grid; gap: 8px; }
.document-list { margin-bottom: 13px; }
.document-row {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(164, 194, 184, 0.18);
  border-radius: 11px;
  background: rgba(3, 23, 21, 0.5);
}
.document-row-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(67, 242, 179, 0.3);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 850;
}
.document-row-copy { min-width: 0; display: grid; gap: 3px; }
.document-row-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-row-copy small { color: var(--muted); font-size: 10px; }
.document-remove {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #d7e8e2;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.document-remove:hover { color: var(--accent-red); background: rgba(255, 124, 100, 0.08); }
.document-capture-card #btn-document-submit { margin-top: auto; }
.privacy-callout { margin-top: 12px; padding: 12px; grid-template-columns: 32px 1fr; }
.privacy-callout > span { width: 30px; height: 30px; }

.classification-banner {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: #c7ddd6;
  border: 1px solid rgba(67, 242, 179, 0.36);
  border-radius: 15px;
  background: rgba(67, 242, 179, 0.07);
}
.classification-banner p { margin: 4px 0 0; font-size: 12px; }
.classification-banner strong { color: var(--text); }
.classification-spark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #041514;
  border-radius: 50%;
  background: var(--gold);
  font-size: 20px;
}
.confirm-card { display: block; }
.confirm-section {
  padding: 4px 0 30px;
  border-bottom: 1px solid rgba(164, 194, 184, 0.16);
}
.confirm-section + .confirm-section { padding-top: 30px; }
.confirm-section-heading { margin-bottom: 18px; }
.confirm-section-heading span { color: var(--text); font-size: 18px; font-weight: 850; }
.confirm-section-heading small {
  color: var(--gold);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.confirm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.confirm-section label { margin-top: 14px; }
.money-input {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 23, 21, 0.72);
}
.money-input:focus-within { outline: 3px solid rgba(67, 242, 179, 0.35); }
.money-input > span {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--gold);
  border-right: 1px solid var(--line);
  font-weight: 850;
}
.money-input input { border: 0; border-radius: 0; }
.money-input input:focus { outline: 0; }
.review-document-list:empty::before {
  content: "No receipts or documents attached.";
  color: var(--muted);
  font-size: 12px;
}
.review-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.42fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(164, 194, 184, 0.18);
  border-radius: 12px;
  background: rgba(3, 23, 21, 0.45);
}
.review-document-row strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-document-row small { color: var(--muted); font-size: 10px; }
.review-document-row select { min-height: 42px; padding: 0.5rem 0.65rem; }
.save-visibility {
  margin: 28px 0 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.save-visibility > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 10px;
  padding: 14px;
  color: #a9c4bb;
  border: 1px solid rgba(164, 194, 184, 0.18);
  border-radius: 12px;
  background: rgba(3, 23, 21, 0.45);
}
.save-visibility span { color: var(--gold); }
.save-visibility p { margin: 0; font-size: 11px; line-height: 1.5; }
.save-visibility strong { display: block; color: var(--text); }
.confirmation-check {
  min-height: 58px;
  display: grid !important;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 11px !important;
  margin: 0 0 16px;
  padding: 14px;
  color: #c4dad3 !important;
  border: 1px solid rgba(67, 242, 179, 0.24);
  border-radius: 12px;
  background: rgba(67, 242, 179, 0.045);
  font-size: 12px !important;
  line-height: 1.5;
}
.confirmation-check input { width: 20px; height: 20px; margin: 0; }

.evidence-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.evidence-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  color: #b8d2c9;
  border: 1px solid rgba(164, 194, 184, 0.2);
  border-radius: 999px;
  background: rgba(3, 23, 21, 0.55);
  font-size: 10px;
  font-weight: 750;
}
.evidence-badge.confirmed {
  color: var(--gold);
  border-color: rgba(67, 242, 179, 0.32);
}
.document-download {
  min-height: 38px;
  margin-top: 8px;
  padding: 0.45rem 0.75rem;
  color: var(--gold);
  border: 1px solid rgba(67, 242, 179, 0.28);
  border-radius: 9px;
  background: transparent;
  font: 750 11px var(--font-body);
  cursor: pointer;
}

.done-card { max-width: 700px; margin-inline: auto; }
.done-card h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1; }
.done-proof {
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.done-proof span {
  padding: 7px 10px;
  color: var(--gold);
  border: 1px solid rgba(67, 242, 179, 0.28);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .record-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    padding-top: 20px;
  }
  .tap-seal {
    position: absolute;
    width: 86px;
    height: 86px;
    right: 6px;
    top: 18px;
    opacity: 0.42;
  }
  .tap-seal strong,
  .tap-seal small { display: none; }
  .tap-seal-house { transform: scale(0.72); }
  .record-hero > div:first-child { position: relative; z-index: 1; }
  .record-hero h1 { max-width: 90%; }
  .record-actions { grid-template-columns: 1fr; }
  .record-actions .btn-ghost { min-height: 52px; }
  .visibility-note { margin-bottom: 54px; }
  .flow-toolbar { align-items: flex-start; }
  .flow-progress li { padding-right: 6px; }
  .flow-progress li { font-size: 0; gap: 0; }
  .flow-progress li span { font-size: 10px; }
  .work-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capture-grid { grid-template-columns: 1fr; }
  .capture-card { min-height: 0; }
  .voice-capture-card .btn,
  .document-capture-card #btn-document-submit { margin-top: 14px; }
}

@media (max-width: 560px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .app { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .record-hero h1,
  #screen-log-trade > h1,
  #screen-log-voice > h1,
  #screen-log-confirm > h1 { font-size: clamp(39px, 12vw, 54px); }
  .access-pill { max-width: calc(100% - 74px); white-space: normal; }
  .record-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-facts span:last-child { grid-column: 1 / -1; }
  .brief-heading-row,
  .history-heading,
  .author-card-heading { align-items: flex-start; flex-direction: column; }
  .brief-heading-row .listen-button { align-self: stretch; }
  .flow-toolbar { margin-bottom: 38px; }
  .back-link { font-size: 0; }
  .back-link::first-letter { font-size: 20px; }
  .flow-progress { margin-left: auto; }
  .author-fields,
  .confirm-grid,
  .save-visibility { grid-template-columns: 1fr; }
  .author-fields #author-organization-field { grid-column: auto; }
  .classification-banner {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .classification-banner .listen-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .review-document-row { grid-template-columns: 1fr; }
  .confirm-card { padding: 20px 16px; }
  .record-actions {
    position: static;
  }
  .record-actions .btn-ghost { display: none; }
  .btn-log {
    min-height: 70px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 340px) {
  .record-facts { grid-template-columns: 1fr; }
  .record-facts span:last-child { grid-column: auto; }
  .work-choice-grid { grid-template-columns: 1fr; }
  .work-choice-grid .chip-card[data-trade="auto"],
  .work-choice-grid .chip-card[data-job="auto"] { grid-column: auto; }
  .flow-progress { gap: 3px; }
  .flow-progress li { min-height: 32px; }
  .flow-progress li span { width: 20px; height: 20px; }
}
