/* TradeTag v0.5 — application theme adapted from the AWS reference frontend. */
:root {
  --bg-deep: #061c1b;
  --bg-panel: rgba(14, 52, 49, .88);
  --text-main: #f4faf7;
  --text-muted: #a4c2b8;
  --accent-gold: #43f2b3;
  --accent-red: #ff7c64;
  --accent-cyan: #ffb64c;
  --border-soft: rgba(164, 194, 184, .2);
  --glow-gold: rgba(67, 242, 179, .35);
  --glow-red: rgba(255, 124, 100, .3);
  --surface: #0e3431;
  --surface-2: #123d39;
  --line: #23514b;
  --warm: #f5f1e8;
  --warm-ink: #102d27;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hud: var(--font-body);
}

html { color-scheme: dark; }
body {
  background: radial-gradient(circle at 78% -10%, rgba(67,242,179,.12), transparent 34rem), linear-gradient(145deg, #041514, var(--bg-deep) 55%, #082421);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .16;
  background-image: linear-gradient(rgba(164,194,184,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(164,194,184,.12) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(to bottom, black, transparent 62%);
}
.bg-glow { display: none; }
.hud-font, .eyebrow { font-family: inherit; }

#topbar {
  min-height: 76px; padding-inline: max(20px, env(safe-area-inset-left));
  border-color: rgba(164,194,184,.16); background: rgba(4,21,20,.88); backdrop-filter: blur(18px);
}
#topbar .brand { color: var(--text-main); font-weight: 850; letter-spacing: -.035em; }
.brand-logo, .hero-logo { filter: hue-rotate(115deg) saturate(.85) brightness(1.35); }
.house-label { color: var(--text-muted); letter-spacing: .02em; }
.app { width: calc(100vw - 32px); max-width: 960px; padding: 42px 0 90px; }
.screen, .glass, .brief-line, .entry-card, .entry-summary { min-width: 0; overflow-wrap: anywhere; }
.screen.active { animation: tt-enter .35s cubic-bezier(.22,1,.36,1) both; }

.glass {
  border-color: rgba(164,194,184,.2); border-radius: 20px;
  background: linear-gradient(145deg, rgba(14,52,49,.96), rgba(7,31,29,.96));
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.hero { overflow: hidden; position: relative; padding: clamp(36px,7vw,76px); }
.hero::after {
  content: ""; position: absolute; width: 430px; height: 430px; right: -190px; top: -220px;
  border: 1px solid rgba(67,242,179,.2); border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(67,242,179,.025), 0 0 0 140px rgba(67,242,179,.018);
}
.hero > * { position: relative; z-index: 1; }
.eyebrow { color: var(--accent-gold); font-size: 11px; font-weight: 850; letter-spacing: .17em; }
h1, h2, h3 { letter-spacing: -.045em; }
h1 { font-size: clamp(44px,8vw,76px); line-height: .98; }
h2 { font-size: clamp(32px,5vw,50px); line-height: 1.02; }
.lede { color: #c3d9d2; font-size: clamp(16px,2vw,19px); line-height: 1.65; }

.btn {
  min-height: 48px; border-radius: 999px; font: inherit; font-weight: 750;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .chip-card:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(67,242,179,.42); outline-offset: 3px;
}
.btn-primary { color: #032219; border-color: var(--accent-gold); background: var(--accent-gold); box-shadow: 0 10px 30px rgba(67,242,179,.16); }
.btn-primary:hover { border-color: #74fac9; background: #74fac9; }
.btn-secondary { color: var(--text-main); border-color: var(--line); background: var(--surface-2); }
.btn-ghost { color: #d5e8e1; border-color: rgba(164,194,184,.3); background: rgba(255,255,255,.025); }
.btn-ghost:hover { border-color: var(--accent-gold); background: rgba(67,242,179,.1); }

input, textarea, select { color: var(--text-main); border-color: var(--line); border-radius: 12px; background: rgba(3,23,21,.72); }
input::placeholder, textarea::placeholder { color: #698b81; }
label { color: #dcece7; font-weight: 700; }
.land-sec { margin-top: 92px; }
.how-grid, .uc-grid { gap: 14px; }
.how-step, .uc-card { min-height: 190px; padding: 28px; border-radius: 16px; box-shadow: none; }
.how-step .k { color: var(--accent-gold); font-weight: 850; }
.how-step b, .uc-card b { font-size: 20px; }
.tech-items { overflow: hidden; }
.tech-item { border-color: rgba(164,194,184,.15); }
.cta-card { padding: clamp(32px,6vw,62px); background: radial-gradient(circle at 85% 15%, rgba(67,242,179,.15), transparent 28%), #0b302b; }
.faq details { border-color: rgba(164,194,184,.2); background: rgba(14,52,49,.65); }

.center-card, .brief-card, .author-card, .confirm-card { padding: clamp(26px,5vw,48px); }
.brief-card { border-top: 3px solid #ffb64c; background: linear-gradient(145deg,#123732,#092522); }
.brief-card .eyebrow, .brief-hazard { color: #ffb64c; }
.brief-line { border-color: rgba(164,194,184,.15); }
.house-loc { color: var(--text-muted); }
.house-loc a { color: var(--accent-gold); }
.history-head { color: var(--accent-gold); letter-spacing: .14em; }
.entry-card { border-color: rgba(164,194,184,.2); border-radius: 16px; background: rgba(14,52,49,.8); box-shadow: none; }

.chip-grid { gap: 12px; }
.chip-card {
  min-height: 104px; color: #dcece7; border-color: var(--line); border-radius: 16px; background: rgba(14,52,49,.74);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.chip-card:hover { transform: translateY(-2px); border-color: var(--accent-gold); }
.chip-card.selected { color: #05251c; border-color: var(--accent-gold); background: var(--accent-gold); }
.voice-mic-btn { color: #032219; border-color: var(--accent-gold); background: var(--accent-gold); box-shadow: 0 0 0 16px rgba(67,242,179,.08),0 18px 55px rgba(0,0,0,.3); }
.voice-mic-btn.recording { color: white; border-color: var(--accent-red); background: var(--accent-red); }
.done-check { color: #032219; background: var(--accent-gold); }
.busy-overlay { background: rgba(2,14,13,.86); backdrop-filter: blur(12px); }
.spinner { border-color: rgba(164,194,184,.2); border-top-color: var(--accent-gold); }

@keyframes tt-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  #topbar { min-height: 66px; }
  .app { width: calc(100vw - 24px); max-width: 600px; padding-top: 24px; }
  .hero { padding: 34px 24px; }
  .land-sec { margin-top: 68px; }
  .how-step, .uc-card { min-height: 0; }
  .glass { border-radius: 16px; }
  .chip-card { min-height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
