/*
  The page a stranger meets after scanning a sticker on a pole. Mostly a phone outdoors (one hand, sun on the screen,
  weak signal), sometimes a desktop in an office. System fonts only, big targets, hard contrast, and a look borrowed
  from the thing they just scanned: a stamped asset tag. Navy for the network, hi-vis yellow for "act here".

  Layout: one column on phones; from 900px the asset plate moves to a sticky side panel next to the work.
*/
:root {
  --navy: #143a5c;
  --navy-deep: #0c2740;
  --signal: #ffc400;          /* hi-vis; the page payload may replace it with the tenant's primary colour */
  --accent: var(--signal);
  --accent-ink: #14202b;
  --ink: #14202b;
  --ink-soft: #4a5b69;
  --paper: #e8edf0;           /* cool concrete */
  --card: #ffffff;
  --line: #c6d0d7;
  --field: #f6f8f9;
  --tint: #e6eef6;
  --good: #16794c;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --info: #0b5fff;
  --info-bg: #e6eefc;
  --focus: #0b5fff;
  --radius: 16px;
  --radius-s: 12px;
  --shadow: 0 1px 0 rgba(12, 39, 64, 0.06), 0 8px 22px -12px rgba(12, 39, 64, 0.28);
  --gutter: clamp(16px, 4vw, 32px);
  --display: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --plate-font: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #eef3f6;
    --ink-soft: #a9b8c3;
    --paper: #09151f;
    --card: #11232f;
    --line: #2b4152;
    --field: #0c1a24;
    --tint: #16304a;
    --good: #2fa56e;
    --danger: #ff8f86;
    --danger-bg: #3a1d1b;
    --info: #8db6ff;
    --info-bg: #14283f;
    --focus: #8db6ff;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px -14px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme='dark'] {
  --ink: #eef3f6;
  --ink-soft: #a9b8c3;
  --paper: #09151f;
  --card: #11232f;
  --line: #2b4152;
  --field: #0c1a24;
  --tint: #16304a;
  --good: #2fa56e;
  --danger: #ff8f86;
  --danger-bg: #3a1d1b;
  --info: #8db6ff;
  --info-bg: #14283f;
  --focus: #8db6ff;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px -14px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: 140px; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: clamp(16px, 0.4vw + 15px, 18px) / 1.5 var(--display);
  -webkit-tap-highlight-color: transparent;
}
h1, h2 { text-wrap: balance; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top band ---------- */
.top {
  background: var(--navy-deep);
  color: #fff;
  border-bottom: 4px solid var(--signal);
  padding-top: env(safe-area-inset-top);
}
.bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px max(var(--gutter), env(safe-area-inset-right)) 12px max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
}
.brand { font-weight: 800; font-size: clamp(17px, 1vw + 14px, 20px); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-tag {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9fb6c9;
  white-space: nowrap;
}
.logo { border-radius: 8px; object-fit: contain; background: #fff; }

/* language picker: the phone's own list, dressed as a small pill */
.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 40px;
  margin-left: 12px;
  padding: 6px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
@media (hover: hover) { .lang:hover { border-color: var(--signal); background: rgba(255, 255, 255, 0.06); } }
.lang:focus-within { outline: 3px solid var(--signal); outline-offset: 2px; }
.lang .ico { color: var(--signal); }
.lang .lang-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
  /* the open list is drawn by the phone or browser from these colours, not from the white header text */
  color: #14202b;
  background: #ffffff;
  color-scheme: light;
}
.lang .lang-select option { color: #14202b; background: #ffffff; }
@media (max-width: 520px) {
  .bar-tag { display: none; }
  .lang { margin-left: auto; }
}
.mark-bg { fill: var(--signal); }
.mark-line { fill: none; stroke: #0c2740; stroke-width: 2.6; stroke-linecap: round; }
.mark-dot { fill: #0c2740; }

/* ---------- page frame ---------- */
.shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}
main { flex: 1; padding-top: clamp(16px, 3vw, 36px); outline: none; }
.foot {
  padding: 28px 0 max(28px, env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

.layout { display: grid; gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; min-width: 0; }
.side { display: grid; gap: 12px; min-width: 0; }
.side-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.side-note .ico { margin-top: 2px; color: var(--navy); }
.layout.center { max-width: 540px; width: 100%; margin: 0 auto; }

/* on a phone the form names the asset in its own header, so the side panel steps aside */
[data-screen='form'] .side { display: none; }

@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 32px; }
  .layout.center { grid-template-columns: 1fr; }
  .side { position: sticky; top: 24px; }
  [data-screen='form'] .side { display: grid; }
  [data-screen='form'] .form-for { display: none; }
  .stack { max-width: 680px; }
}

/* ---------- loading ---------- */
.loading { display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--ink-soft); padding: 64px 0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--navy); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .layout > *, .stack > * { animation: rise 0.32s ease-out both; }
  .stack > *:nth-child(2) { animation-delay: 0.05s; }
  .stack > *:nth-child(3) { animation-delay: 0.1s; }
  .plate { animation: stamp 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2) both !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.2s; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: scale(1.05) rotate(-0.6deg); } to { opacity: 1; transform: none; } }

/* ---------- the asset plate ---------- */
.plate {
  position: relative;
  padding: 18px 22px;
  background: var(--signal);
  color: #14202b;
  border: 3px solid #14202b;
  border-radius: 10px;
  box-shadow: 0 5px 0 #14202b, 0 16px 24px -12px rgba(12, 39, 64, 0.55);
  background-image:
    radial-gradient(circle at 12px 12px, #14202b 0 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 12px) 12px, #14202b 0 3px, transparent 3.5px),
    radial-gradient(circle at 12px calc(100% - 12px), #14202b 0 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), #14202b 0 3px, transparent 3.5px);
  margin-bottom: 6px;
}
.plate-label { display: block; margin-left: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.8; }
.plate-number {
  display: block;
  margin: 2px 6px 0;
  font: 800 clamp(28px, 7vw, 40px) / 1.08 var(--plate-font);
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}
.plate-meta { margin: 12px 6px 0; padding-top: 10px; border-top: 2px dashed rgba(20, 32, 43, 0.45); display: flex; flex-wrap: wrap; gap: 4px 22px; }
.plate-meta div { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.plate-meta dt { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.plate-meta dd { margin: 0; font-weight: 800; font-size: 18px; overflow-wrap: anywhere; }

/* ---------- choose ---------- */
.eyebrow { margin: 4px 0 -4px; font-size: 14px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.actions { display: grid; gap: 12px; }
@media (min-width: 600px) { .actions { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.act {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 92px;
  padding: 16px;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover: hover) {
  .act:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(12, 39, 64, 0.45); }
  .act:hover .act-go { transform: translateX(3px); color: var(--ink); }
}
.act:active { transform: translateY(1px); }
.act-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 14px;
  background: var(--navy);
  color: var(--signal);
}
.act-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.act-title { font-size: clamp(18px, 1vw + 15px, 21px); font-weight: 800; line-height: 1.2; }
.act-hint { font-size: 14.5px; color: var(--ink-soft); line-height: 1.35; margin-top: 3px; }
.act-go { color: var(--ink-soft); transition: transform 0.15s ease; }

/* ---------- cards, home ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: var(--shadow);
  min-width: 0;
}
.hero-art { display: inline-block; margin-bottom: 14px; filter: drop-shadow(0 8px 12px rgba(12, 39, 64, 0.3)); }
.hero h1 { font-size: clamp(28px, 3vw + 18px, 46px); line-height: 1.06; margin: 0 0 12px; letter-spacing: -0.015em; }
.lede { font-size: clamp(17px, 0.5vw + 15px, 20px); color: var(--ink-soft); max-width: 40ch; }
.how { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.how li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.how-n { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--navy); color: var(--signal); font-weight: 800; font-size: 15px; }
@media (min-width: 900px) {
  .layout.home { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 48px; align-items: center; min-height: 52vh; }
}

/* ---------- buttons ---------- */
.btn, .pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 22px;
  border-radius: var(--radius-s);
  border: 2px solid transparent;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}
.btn.block { display: flex; width: 100%; margin-top: 8px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
@media (hover: hover) { .btn.primary:hover { filter: brightness(1.04); } }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  min-height: 44px;
  margin: -8px 0 -8px -10px;
  padding: 6px 14px 6px 8px;
  background: none;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
@media (hover: hover) { .back:hover { background: var(--tint); } }

/* ---------- forms ---------- */
.form-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--line); }
.form-head h1 { font-size: clamp(22px, 1.4vw + 17px, 28px); line-height: 1.15; margin: 0; }
.form-for { margin: 3px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.form-for strong { color: var(--ink); font-family: var(--plate-font); letter-spacing: 0.03em; }
.field { margin-bottom: 22px; }
.label { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 800; margin: 0 0 8px; }
.req { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.opt { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); background: var(--tint); padding: 1px 8px; border-radius: 99px; }
.help { color: var(--ink-soft); font-size: 15px; margin: 0 0 8px; }
input[type='text'], input[type='tel'], input[type='email'], select, textarea {
  width: 100%;
  min-height: 56px;
  padding: 13px 15px;
  background: var(--field);
  border: 2px solid var(--line);
  border-radius: var(--radius-s);
  font-size: max(16px, 1em);    /* 16px or more stops phones zooming in on focus */
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
select {
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5b69' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}
textarea { min-height: 124px; resize: vertical; }
select option { color: var(--ink); background-color: var(--card); }   /* the open list follows the page theme */
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 28%, transparent); background-color: var(--card); }
[aria-invalid='true'] { border-color: var(--danger) !important; background-color: var(--danger-bg); }
.field.has-error .label { color: var(--danger); }

.choices { display: grid; gap: 10px; }
@media (min-width: 600px) { .choices { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--field);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
@media (hover: hover) { .choice:hover { border-color: var(--ink-soft); } }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: flex; align-items: flex-start; gap: 12px; line-height: 1.35; }
.choice span::before {
  content: '';
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: -2px;
  border: 2px solid var(--ink-soft);
  border-radius: 8px;
  background: var(--card);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.choice:has(input:checked) { border-color: var(--navy); background: var(--tint); }
.choice input:checked + span::before {
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffc400' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.8l4.3 4.3L19 7.3'/%3E%3C/svg%3E") center / 18px no-repeat;
  border-color: var(--navy);
}
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.consent-box { display: grid; gap: 10px; }
.consent-text { margin: 0; padding: 12px 14px; background: var(--tint); border-radius: var(--radius-s); font-size: 14.5px; color: var(--ink-soft); }
.err { color: var(--danger); font-weight: 700; margin: 6px 0 0; }
.err.summary { margin: 0 0 10px; }
.locnote { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; }
.locnote .ico, .side-note .ico { color: var(--navy); }
:root[data-theme='dark'] :is(.locnote, .side-note) .ico { color: var(--signal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) :is(.locnote, .side-note) .ico { color: var(--signal); } }
@media (min-width: 900px) { [data-screen='form'] .locnote { display: none; } }

/* send bar: stays in reach while the form scrolls */
.sendbar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin: 8px calc(-1 * clamp(16px, 3vw, 24px)) calc(-1 * clamp(16px, 3vw, 24px));
  padding: 12px clamp(16px, 3vw, 24px) max(14px, env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 18px -14px rgba(12, 39, 64, 0.4);
  border-radius: 0 0 var(--radius) var(--radius);
}
.sendbar .btn.block { margin-top: 0; }
.meter { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.meter-track { position: relative; flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--navy); border-radius: inherit; transition: width 0.25s ease; }
.meter.ready { color: var(--good); }
.meter.ready .meter-fill { background: var(--good); }
.meter-text { white-space: nowrap; }

/* photos */
.file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pick {
  width: 100%;
  min-height: 108px;
  flex-direction: column;
  gap: 4px;
  color: var(--navy);
  background: var(--field);
  border: 2px dashed var(--ink-soft);
}
.pick-title { font-size: 17px; }
.pick-hint { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.pick.drop { border-color: var(--navy); background: var(--tint); }
@media (hover: hover) { .pick:hover { border-color: var(--navy); background: var(--tint); } }
:root[data-theme='dark'] .pick { color: var(--signal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .pick { color: var(--signal); } }
.photos:has(.file:focus-visible) .pick { outline: 3px solid var(--focus); outline-offset: 2px; }
.thumbs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.thumbs:empty { display: none; }
.thumbs li { position: relative; aspect-ratio: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); }
.thumbs .x {
  position: absolute; top: -10px; right: -10px;
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--card); background: var(--ink); color: var(--paper);
  cursor: pointer;
}

/* ---------- messages ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); border: 2px solid var(--line); margin-bottom: 10px; }
.notice p { margin: 0; font-weight: 700; }
.notice .ico { margin-top: 1px; }
.notice.error { background: var(--danger-bg); border-color: var(--danger); }
.notice.error .ico { color: var(--danger); }
.notice.info { background: var(--info-bg); border-color: var(--info); }
.notice.info .ico { color: var(--info); }
.msg:empty { display: none; }
.msg { display: grid; gap: 8px; }
[data-screen='notice'] .lookup { margin-top: 16px; box-shadow: none; }

/* ---------- sent: a ticket ---------- */
.sent { text-align: center; padding-top: 30px; }
.tick { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; background: var(--good); color: #fff; }
.tick .ico { stroke-width: 3; }
@media (prefers-reduced-motion: no-preference) {
  .tick { animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
  .tick path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.35s 0.25s ease-out forwards; }
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sent h1 { font-size: clamp(24px, 1.5vw + 19px, 30px); margin: 0 0 18px; }
.ref {
  position: relative;
  margin: 4px calc(-1 * clamp(16px, 3vw, 24px)) 16px;
  padding: 16px 20px;
  background: var(--paper);
  border-top: 2px dashed var(--ink-soft);
  border-bottom: 2px dashed var(--ink-soft);
}
.ref::before, .ref::after { content: ''; position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); }
.ref::before { left: -12px; }
.ref::after { right: -12px; }
.ref-label { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.ref-code { display: block; font: 800 clamp(24px, 6vw, 32px) / 1.2 var(--plate-font); letter-spacing: 0.04em; overflow-wrap: anywhere; user-select: all; }
.copy { margin-top: 8px; min-height: 36px; padding: 4px 16px; border: 2px solid var(--line); border-radius: 99px; background: var(--card); font-weight: 700; font-size: 14px; cursor: pointer; }

/* ---------- damaged-code lookup ---------- */
.lookup { padding: 0; overflow: hidden; }
.lookup summary { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 12px 18px; cursor: pointer; font-weight: 700; list-style: none; }
.lookup summary::-webkit-details-marker { display: none; }
.lookup summary span { flex: 1; }
@media (hover: hover) { .lookup summary:hover { background: var(--tint); } }
.sum-ico, .sum-chev { color: var(--ink-soft); }
.sum-chev { transition: transform 0.15s ease; }
.lookup[open] .sum-chev { transform: rotate(90deg); }
.lookup-body { padding: 0 18px 18px; display: grid; gap: 8px; }
.lookup-body .help { margin: 0; }
.lookup label { font-weight: 800; margin-top: 4px; }
.lookup-row { display: flex; gap: 10px; }
.lookup-row input { flex: 1; min-width: 0; text-transform: uppercase; font-family: var(--plate-font); letter-spacing: 0.04em; }
.lookup-row .btn { flex: none; padding: 12px 18px; }
.turnstile:empty { display: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#app:focus, #app:focus-visible { outline: none; }   /* focus moves here on each screen for screen readers; no ring needed */
@media (min-width: 900px) {
  .act { min-height: 128px; padding: 20px; gap: 16px; }
  .act-icon { width: 64px; height: 64px; border-radius: 16px; }
}

/* short landscape phones: keep the header thin */
@media (max-height: 480px) and (orientation: landscape) {
  .bar { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
  .sendbar { position: static; }
}
[hidden] { display: none !important; }
