@font-face { font-family: "Space Grotesk"; src: url("/assets/space-grotesk-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/assets/space-grotesk-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/assets/space-grotesk-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/assets/sora-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #222522;
  --muted: #5c635e;
  --accent: #146c68;
  --accent-dark: #0d514e;
  --accent-soft: #deeeea;
  --paper: #fbfaf7;
  --surface: #f2efe8;
  --line: #7a827c;
  --danger: #8a241f;
  --focus: #9a5b00;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size-adjust: from-font;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
:where(a, button, input, textarea):focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 10; top: .5rem; left: .5rem; padding: .6rem .85rem; border-radius: .25rem; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
main, footer { width: min(72rem, calc(100% - 2rem)); margin-inline: auto; }
main { padding: clamp(2.5rem, 6vw, 5rem) 0 1rem; }
.intro { max-width: 46rem; margin-bottom: 2rem; }
.eyebrow, .stage-label { margin: 0 0 .5rem; color: var(--accent-dark); font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
h1, h2 { font-family: "Sora", "Space Grotesk", sans-serif; font-size-adjust: from-font; line-height: 1.08; }
h1 { max-width: 15ch; margin: 0 0 1rem; font-size: clamp(2.4rem, 7vw, 4.6rem); letter-spacing: -.035em; }
h2 { margin: 0 0 .75rem; font-size: clamp(1.45rem, 4vw, 2rem); }
.intro > p:last-child { max-width: 43rem; margin: 0; color: var(--muted); font-size: 1.08rem; }
.transfer-card { padding: clamp(1.25rem, 4vw, 2.25rem); border: 1px solid var(--line); border-radius: .65rem; background: #fff; box-shadow: 0 .35rem 1rem rgb(0 0 0 / 8%); }
label, legend { font-weight: 700; }
label > span, .hint, .boundary { color: var(--muted); font-weight: 400; }
.hint { max-width: 44rem; margin: .35rem 0 .65rem; font-size: .88rem; }
input[type="url"], input[type="text"], textarea { display: block; width: 100%; min-height: 3.2rem; padding: .75rem; border: 1px solid var(--line); border-radius: .3rem; background: #fff; color: var(--ink); font: inherit; }
textarea { min-height: 8rem; margin-top: .5rem; resize: vertical; }
.error { min-height: 1.45rem; margin: .25rem 0 .5rem; color: var(--danger); font-size: .86rem; font-weight: 700; }
fieldset { margin: 1rem 0 1.35rem; padding: 0; border: 0; }
legend { margin-bottom: .55rem; }
.field-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.field-options label { display: flex; min-width: 0; gap: .55rem; padding: .75rem; border: 1px solid var(--line); border-radius: .35rem; cursor: pointer; }
.field-options label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.field-options input { flex: 0 0 auto; margin-top: .25rem; accent-color: var(--accent); }
.field-options strong, .field-options small { display: block; }
.field-options small { margin-top: .15rem; color: var(--muted); font-weight: 400; line-height: 1.3; }
button, .new-transfer { min-height: 2.9rem; padding: .7rem 1rem; border: 2px solid var(--accent); border-radius: .35rem; font: inherit; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.primary, .new-transfer { background: var(--accent); color: #fff; }
.primary:hover, .new-transfer:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.secondary { background: #fff; color: var(--accent-dark); }
.secondary:hover { background: var(--accent-soft); }
.destructive { border-color: var(--danger); background: #fff; color: var(--danger); }
.destructive:hover { background: #f9e5e2; }
.boundary { max-width: 45rem; margin: 1rem 0 0; font-size: .85rem; }
.qr-frame { display: grid; width: min(100%, 22rem); min-height: 18rem; margin: 1.5rem auto 1rem; padding: 1rem; place-items: center; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); }
.qr-frame canvas { display: block; width: min(100%, 19rem) !important; height: auto !important; aspect-ratio: 1; }
.same-device, .status { text-align: center; }
.share-option { display: grid; grid-template-columns: .85fr 1.5fr; gap: 1rem 1.5rem; margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); }
.share-option h3 { margin: 0 0 .35rem; font-family: "Sora", "Space Grotesk", sans-serif; font-size: 1.15rem; }
.share-option p { margin: .2rem 0; color: var(--muted); font-size: .86rem; }
.share-controls label { font-size: .82rem; }
.share-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; margin-top: .35rem; }
.share-link-row input { min-width: 0; font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .86rem; }
.share-link-row button { margin: 0; white-space: nowrap; }
.share-status { margin: .35rem 0 0 !important; color: var(--accent-dark) !important; font-weight: 700; }
.share-status:empty { margin: 0 !important; }
.status { min-height: 1.55rem; margin: .75rem 0; color: var(--accent-dark); font-weight: 700; }
#cancel-transfer { display: block; margin-inline: auto; }
.received-fact { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; margin: 1.25rem 0; padding: .8rem; border-left: .3rem solid var(--accent); background: var(--accent-soft); }
.received-fact span { color: var(--muted); }
.result-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: .65rem; margin-top: 1rem; }
.result-actions .destructive { grid-column: 1 / -1; }
#receipt-panel ul { padding-left: 1.3rem; }
#receipt-panel li + li { margin-top: .55rem; }
#receipt-note { color: var(--muted); font-size: .86rem; }
.new-transfer { display: inline-block; margin-top: .5rem; text-decoration: none; }
.security-note { display: grid; grid-template-columns: .8fr 1.6fr; gap: .5rem 2rem; margin: 1.25rem 0 0; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.security-note h2 { grid-row: span 2; font-size: 1.15rem; }
.security-note p { margin: 0; color: var(--muted); }
footer { display: grid; justify-items: center; gap: .65rem; padding: 2rem 0 3rem; color: var(--muted); font-size: .82rem; text-align: center; }
.footer-copy { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem .4rem; margin: 0; text-wrap: balance; }
.footer-copy span { white-space: nowrap; }
footer nav { display: flex; gap: 1rem; }

@media (max-width: 650px) {
  main { padding-top: 2.25rem; }
  h1 { font-size: 2.45rem; }
  .field-options, .result-actions, .security-note, .share-option { grid-template-columns: 1fr; }
  .share-link-row { grid-template-columns: 1fr; }
  .field-options label { min-height: 3.75rem; }
  .result-actions .destructive { grid-column: auto; }
  .security-note h2 { grid-row: auto; }
  .qr-frame { min-height: 0; }
  .footer-copy { display: grid; gap: .1rem; }
}

@media (pointer: coarse) {
  button, .new-transfer, .field-options label { min-height: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
}

@supports not selector(:has(*)) {
  .field-options label { background: var(--surface); }
}

@supports not (font-size-adjust: from-font) {
  :root { line-height: 1.55; }
}
