/* GrownCheck Direction B tokens. Logo path is /brand/logo.svg (placeholder; replace that file to swap). */
:root {
  --navy: #0B1C24;
  --card: #14313C;
  --input: #17343F;
  --ink: #E8F2F4;
  --muted: #9AB3BC;
  --line: #1E4654;
  --teal: #2BB8B0;
  --teal-ink: #062025;
  --focus: #7EE8E0;
  --fail: #E8A598;
  --accent: var(--teal);
  --accent-ink: var(--teal-ink);
  --radius: 14px;
  --pad: 0.95rem;
  --brand-logo: url(/brand/logo.svg);
  --brand-logo-on-light: url(/brand/logo-lockup-on-white.svg);
  --brand-mark: url(/brand/logo-mark-teal.svg);
  color-scheme: dark;
}

@font-face {
  font-family: Outfit;
  src: url(/brand/fonts/Outfit-Variable.woff2) format("woff2-variations"),
       url(/brand/fonts/Outfit-Variable.woff2) format("woff2"),
       url(/brand/fonts/Outfit-Variable.woff) format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
}
body {
  font-family: Outfit, "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--teal); overflow-wrap: anywhere; }
a:hover { color: var(--focus); }

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-logo {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 11.5rem;
}
.wordmark { font-weight: 700; letter-spacing: -.03em; font-size: 1.08rem; color: var(--ink); text-decoration: none; }

.eyebrow {
  margin: 0.85rem 0 0;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 650;
}
.step {
  color: var(--teal);
  margin: 1.15rem 0 .35rem;
  font-size: .8rem;
  font-weight: 650;
}

h1 {
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1.12;
  letter-spacing: -.04em;
  margin: .3rem 0 .4rem;
}
h2 { font-size: .95rem; margin: 0 0 .4rem; font-weight: 650; }
.lede { margin: 0 0 .9rem; color: var(--muted); }
.intro { margin: 0 0 1rem; color: var(--muted); font-size: 1.1rem; }
.note { margin: 0 0 1.2rem; color: var(--muted); }
.tip, .capture-foot, .muted, .source, .placeholder { color: var(--muted); font-size: .88rem; }
.source, .placeholder, .capture-foot { font-size: .75rem; }
.muted { font-size: .9rem; }

fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 650; margin-bottom: .55rem; }

.method {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .65rem .8rem;
  margin: 0 0 .4rem;
  cursor: pointer;
}
.method.selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.method input[type=radio] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin: .2rem 0 0;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  display: inline-block;
}
.method.selected input[type=radio],
.method input[type=radio]:checked {
  border-color: var(--teal);
  background: radial-gradient(circle at center, var(--teal) 0 5px, transparent 6px);
}
.method strong { display: block; font-weight: 650; }
.method em { display: block; font-style: normal; color: var(--muted); font-size: .88rem; margin-top: .2rem; }

.storage {
  background: var(--card);
  border-radius: var(--radius);
  padding: .6rem .8rem;
  margin: .2rem 0 .6rem;
}
.storage ul { margin: 0; padding: 0 0 0 1.1rem; }
.storage li { margin: 0 0 .35rem; }

.consent, .check-row {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  margin: .1rem 0 .8rem;
  cursor: pointer;
  min-height: 44px;
}
.consent input[type=checkbox],
.check-row input[type=checkbox],
label.consent input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .15rem;
  border: 2px solid var(--muted);
  border-radius: 4px;
  background: transparent;
  display: inline-block;
}
.consent input[type=checkbox]:checked,
.check-row input[type=checkbox]:checked {
  border-color: var(--teal);
  background-color: var(--teal);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='%23062025' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2 6.2 4.8 9 10 3.2'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

.field { display: block; margin: .65rem 0; }
.field-label, label.field { font-weight: 500; }
input[type=text],
input[type=password],
input[type=email],
input[type=url],
input[type=search],
input:not([type]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: .35rem;
  padding: .7rem .875rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--ink);
}
textarea { min-height: 6rem; resize: vertical; }
input[type=text]:focus-visible,
input[type=password]:focus-visible,
input[type=email]:focus-visible,
input[type=url]:focus-visible,
input[type=search]:focus-visible,
input:not([type]):focus-visible,
select:focus-visible,
textarea:focus-visible { border-color: var(--teal); }

.primary, .secondary, button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 650;
  padding: .7rem 1rem;
  text-decoration: none;
  box-sizing: border-box;
}
button:not(.secondary):not(.flash):not(.text-action),
.primary, a.primary {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
}
.primary:hover, button:not(.secondary):not(.flash):not(.text-action):hover { color: var(--accent-ink); }
.secondary, button.secondary, a.secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.secondary:hover, a.secondary:hover { color: var(--ink); }
button:disabled, .primary:disabled, .secondary:disabled { opacity: .55; cursor: wait; }

.primary:focus-visible,
.secondary:focus-visible,
.flash:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.actions, .capture-actions, .toolbar, .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.actions { flex-direction: column; }
.capture-actions { margin-top: .85rem; }
.capture-actions .primary,
.capture-actions .secondary,
.capture-actions button,
.button-row .primary,
.button-row .secondary,
.button-row button,
.toolbar button {
  width: auto;
  flex: 1 1 auto;
  min-width: 44%;
}
.toolbar { align-items: center; justify-content: space-between; }
.toolbar button, .toolbar .secondary { min-width: 0; width: auto; flex: 0 0 auto; }

.flash {
  min-height: 44px;
  width: auto;
  padding: .55rem .85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  align-self: start;
}

footer, .site-links {
  margin-top: auto;
  padding-top: .55rem;
  border-top: 1px solid var(--line);
}
footer nav, .site-links nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
}
footer a, .site-links a { color: var(--muted); text-decoration: none; font-size: .88rem; }
footer a:hover, .site-links a:hover { color: var(--ink); }

.result { padding-top: 2.2rem; }
.result-mark {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  background: var(--card);
  color: var(--teal);
  border: 1px solid var(--line);
  border-radius: 1rem;
  margin-bottom: 1.1rem;
}
.result-mark.fail { color: var(--fail); }
.result-mark svg { width: 1.85rem; height: 1.85rem; }
.result h1 { font-size: 2.05rem; }
.result .lede { font-size: 1.2rem; color: var(--ink); margin-bottom: 1rem; }

.waiting { padding-top: 2.4rem; text-align: left; }
.spinner {
  width: 1.6rem;
  height: 1.6rem;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 0 1.1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--teal); }
}

.viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 36vh;
  overflow: hidden;
  border-radius: 1rem;
  background: #071218;
  border: 1px solid var(--line);
  margin: .85rem 0 .5rem;
}
.card-guide {
  position: absolute;
  width: 78%;
  max-height: 80%;
  aspect-ratio: 1.586;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px dashed #7EE8E0;
  border-radius: .6rem;
  pointer-events: none;
}
.processing {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  background: rgba(11, 28, 36, .92);
  font-weight: 650;
  gap: .8rem;
}
.processing .spinner { margin: 0 auto .2rem; }
.status-ok {
  border: 1px solid #1E5C58;
  background: #102F32;
  color: #B7F0EA;
  border-radius: .7rem;
  padding: .65rem .8rem;
  font-weight: 650;
  margin: .6rem 0 0;
}

.screen, main.screen {
  min-height: 100vh;
  padding: var(--pad) 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
}
.powered { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.eyebrow-badge {
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}
.site-header, .app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.panel, details, .card-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}
summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
code { overflow-wrap: anywhere; font-size: .9rem; }
ul.plain, .item-list { list-style: none; padding: 0; margin: 0; }
.item-list li, ul.plain li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}
[role=status]:empty:not(.spinner) { display: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 900px) {
  body.flow, body.desktop { display: grid; place-items: start center; }
  body.flow main.screen, body.desktop main.screen, main.narrow {
    width: min(36rem, calc(100% - 4rem));
    min-height: auto;
    margin: 1.6rem auto 1.2rem;
    padding: 0 0 1rem;
    background: var(--navy);
  }
  body.flow h1, body.desktop h1 { font-size: 2.15rem; }
}
