/* 2DSync app styles. Every colour, face and radius comes from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--surface); font: var(--type-body); overflow-x: hidden; }
[data-theme], body { color: var(--ink-body); }
h1, h2, h3, p { margin: 0; }
a { color: var(--eyebrow); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.container { max-width: 1180px; margin: 0 auto; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 16px; }
.stack-xs { display: flex; flex-direction: column; gap: 8px; }
.measure { max-width: 820px; }
.row-between { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }

/* Type */
.eyebrow { font: var(--type-eyebrow); letter-spacing: var(--type-eyebrow-tracking); text-transform: uppercase; color: var(--eyebrow); }
.eyebrow.muted { color: var(--ink-muted); }
.title { font: var(--type-title); font-size: clamp(30px, 4.5vw, 42.67px); line-height: 1.22; color: var(--ink); }
.title .light, .light { font-weight: 400; }
.h-sub { font: var(--type-price); color: var(--ink); }
.card-title { font: var(--type-card-title); color: var(--ink); }
.body-lg { font: var(--type-body-lg); }
.small { font: 400 16px/24px var(--font-sans); }
.caption { font: 400 14.67px/22px var(--font-sans); color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.ink { color: var(--ink); }
.strong { font-weight: 700; }
.code { color: var(--eyebrow); overflow-wrap: anywhere; }
.break { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 24px; border: 0; border-radius: var(--radius-card);
  font: 700 16px/1 var(--font-sans); text-decoration: none; cursor: pointer;
}
.btn-sm { height: 40px; padding: 0 16px; }
.btn-primary { background: var(--indigo); color: var(--on-indigo); }
.btn-primary:hover { background: #3C4063; color: var(--on-indigo); }
.btn-light { background: #FBF7F2; color: var(--indigo); }
.btn-light:hover { background: #FFFFFF; color: var(--indigo); }
input[type="text"], select {
  height: 52px; padding: 0 16px; width: 100%;
  font: var(--type-body); color: var(--indigo);
  background: #FFFFFF; border: 1px solid var(--border-strong); border-radius: var(--radius-card);
}
select { padding: 0 12px; }
input::placeholder { color: #6F6878; }

/* Chips */
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--radius-pill); font: 700 14.67px/20px var(--font-sans); white-space: nowrap; }
.chip-done { background: #E4E2F0; color: #2C2F4A; }
.chip-missing { background: #FDF0E4; color: #A4471F; }
.chip-partial { background: #F0C27B; color: #7A4A12; }
.chip-locked { background: #F1EDE8; color: #6F6878; }

/* Header and footer */
.strip { background: #FBF7F2; }
/* Padding sits inside the container here, so widen it to line up with the sections below. */
.nav { max-width: 1244px; padding: 20px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.nav .home { display: flex; }
.nav .home img { display: block; height: 40px; width: auto; }
.nav nav { display: flex; flex-wrap: wrap; gap: 8px 32px; flex-grow: 1; font: 400 16px/24px var(--font-sans); }
.nav a.link { color: #2C2F4A; text-decoration: none; }
.nav a.link:hover { color: #A4471F; }
.foot { background: #2C2F4A; color: #B5B3C9; padding: 32px; font: 400 16px/24px var(--font-sans); }
.foot .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.foot .name { font: var(--type-card-title); color: #FBF7F2; }

/* Sections */
.band { padding: 80px 32px; }
.band-tail { padding: 0 32px 96px; }
.band-sm { padding: 48px 32px 0; }
.band-sm.last { padding-bottom: 80px; }
.hero { background: #2C2F4A url(/brand/mesa-arch-dusk.jpg) center / cover no-repeat; color: #EEEDF5; padding: 80px 32px 96px; }
.hero .eyebrow { color: #F7A470; }
.hero h1 { font: var(--type-hero); font-size: clamp(34px, 5.5vw, 58.67px); line-height: 1.2; letter-spacing: var(--type-hero-tracking); color: #FBF7F2; }
.entry-intro { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }

/* Entry: three ways in */
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-gap); align-items: stretch; }
.way { border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.way.cream { background: #FBF7F2; color: #4F4A5C; }
.way.cream .eyebrow { color: #A4471F; }
.way.dark { background: #3C4063; color: #EEEDF5; }
.way.dark .eyebrow { color: #F7A470; }
.way.dark .way-title { color: #FBF7F2; }
.way-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.way-title { font: var(--type-card-title); color: #2C2F4A; }
.way .btn { margin-top: 6px; }
.way-note { font: 400 16px/24px var(--font-sans); color: #4F4A5C; }
.way-note strong { color: #2C2F4A; }
.way-note a { color: #A4471F; }
.error { font: 700 16px/24px var(--font-sans); color: #A4471F; }

/* Tables */
.table-scroll { min-width: 0; overflow-x: auto; }
.t { width: 100%; min-width: 520px; border-collapse: collapse; font: 400 16px/24px var(--font-sans); background: var(--surface-raised); }
.t.wide { min-width: 720px; }
.t th, .t td { padding: 10px 14px; border: 1px solid var(--border-strong); text-align: left; vertical-align: top; }
.t th { background: var(--surface-table-head); color: var(--ink); font-weight: 700; }
.s-excellent { color: var(--status-excellent); }
.s-partial { color: var(--status-partial); }
.s-not-started, .s-off-standard { color: var(--status-not-started); }
.s-not-checked { color: var(--ink-muted); }
.req { color: var(--rust); }
.rec { color: var(--on-gold-label); }
.opt { color: var(--ink-muted); }

/* Entry: scorecard and templates */
.split { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.split-intro { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.split-main { flex: 2 1 560px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-gap); }
.card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--space-card); display: flex; flex-direction: column; gap: 8px; }

/* Report */
.report-head { background: var(--surface); padding: 48px 32px; }
.report-head-inner { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; justify-content: space-between; }
.report-title { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.report-title h1 { font: var(--type-title); font-size: clamp(30px, 4.5vw, 42.67px); line-height: 1.22; color: var(--ink); overflow-wrap: anywhere; }
.meta { font: 400 16px/24px var(--font-sans); color: var(--ink-muted); }
.meta .hi { color: var(--ink); }
.type-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 6px; font: 400 16px/24px var(--font-sans); }
.type-form select { width: auto; height: 40px; font-size: 16px; background: #FBF7F2; }
.hint { font: 400 14.67px/22px var(--font-sans); color: var(--ink-muted); }
.maturity-card { flex: 0 1 380px; min-width: 0; background: var(--surface-raised); border-radius: var(--radius-card); padding: var(--space-card); display: flex; flex-direction: column; gap: 10px; }
.maturity-level { font: var(--type-title); line-height: 48px; color: var(--ink); }
.maturity-level .light { font-size: 28px; }

.bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.bar { height: 12px; border-radius: var(--radius-pill); }
.bar.l0 { background: #F1EDE8; }
.bar.l1 { background: #D6D1EA; }
.bar.l2 { background: #F0C27B; }
.bar.l3 { background: #E8895B; }
.bar.l4 { background: #2C2F4A; }
.bars.on-dark .bar.l4 { background: #FBF7F2; }
.bar.current { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.bar.ahead { opacity: 0.35; }
.bar.l4.ahead { opacity: 0.3; }

.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.step-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.next { background: var(--highlight); color: var(--on-highlight); border-radius: var(--radius-card); padding: 32px; display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.next .eyebrow { color: var(--on-highlight-accent); }
.next .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

@media (max-width: 720px) {
  .nav { padding: 16px; }
  .hero { padding: 48px 16px 64px; }
  .band { padding: 56px 16px; }
  .band-tail { padding: 0 16px 64px; }
  .band-sm { padding: 40px 16px 0; }
  .band-sm.last { padding-bottom: 56px; }
  .report-head { padding: 36px 16px; }
  .way, .next { padding: 20px; }
  .foot { padding: 28px 16px; }
}

/* Entry: list and phone cards */
textarea {
  width: 100%; padding: 12px 16px; resize: vertical;
  font: 400 16px/24px var(--font-sans); color: var(--indigo);
  background: #FFFFFF; border: 1px solid var(--border-strong); border-radius: var(--radius-card);
}
.drop { border: 2px dashed var(--border-strong); border-radius: var(--radius-card); background: #FFFFFF; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: #2C2F4A; }
.drop input[type="file"] { max-width: 100%; font: 400 15px/22px var(--font-sans); }
.scan-qr { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.qr { width: 96px; height: 96px; background: #FBF7F2; border-radius: var(--radius-card); padding: 8px; flex: 0 0 auto; }
.qr svg { display: block; width: 100%; height: 100%; }
.on-dark { color: #FBF7F2; }
.accent { color: #F7A470; }

/* List report */
.sep { color: inherit; }
.level-summary { flex: 0 1 460px; }
.t.on-dark { min-width: 0; background: transparent; color: var(--ink-body); }
.t.on-dark th { background: var(--surface-raised); }
.t.list { min-width: 1000px; }
.t.list { font-size: 15px; line-height: 22px; }
.t.list th, .t.list td { padding: 8px 10px; vertical-align: middle; }
.t.list td[data-cell="issue"] { min-width: 200px; }
.lv { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-pill); font: 700 16px/1 var(--font-display); }
.sort { display: flex; align-items: center; gap: 10px; }
.sort select { width: auto; height: 40px; font-size: 16px; }
.next.row-between { max-width: none; flex-direction: row; align-items: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Phone screens */
.phone-body { background: #FBF7F2; }
.dark-body { background: #2C2F4A; }
.phone { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; font: 400 16px/24px var(--font-sans); }
.phone .eyebrow { font-size: 13px; line-height: 18px; letter-spacing: 0.02em; }
.phone h1 { font: 700 24px/30px var(--font-display); color: var(--ink); }
.phone-top { padding: 18px 20px 12px; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.phone-brand { font: 700 20px/28px var(--font-display); color: var(--ink); text-decoration: none; }
.phone-prompt { padding: 4px 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.phone-prompt .muted { font-size: 15px; line-height: 22px; }
.viewfinder { position: relative; flex: 1 1 340px; min-height: 340px; margin: 0 20px; border-radius: var(--radius-card); background: #3C4063; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.viewfinder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.viewfinder.live video { opacity: 1; }
.frame { position: relative; width: 260px; height: 170px; }
.frame i { position: absolute; width: 36px; height: 36px; border: 0 solid #F7A470; }
.frame i:nth-child(1) { left: 0; top: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 10px; }
.frame i:nth-child(2) { right: 0; top: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 10px; }
.frame i:nth-child(3) { left: 0; bottom: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 10px; }
.frame i:nth-child(4) { right: 0; bottom: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 10px; }
.frame b { position: absolute; left: 24px; right: 24px; top: 50%; height: 2px; background: #F7A470; opacity: 0.7; }
.viewfinder-status { position: absolute; top: 14px; left: 12px; right: 12px; text-align: center; font: 400 14px/20px var(--font-sans); color: #EEEDF5; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.viewfinder .pill { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); height: 48px; padding: 0 22px; gap: 8px; border-radius: var(--radius-pill); }
.sheet { margin-top: 16px; background: var(--surface); border-radius: 10px 10px 0 0; padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1 1 auto; min-width: 0; height: 48px; }
.inline-field .btn { height: 48px; padding: 0 18px; }
.sheet select { height: 44px; font-size: 16px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }
.sheet-foot a { min-height: 44px; display: inline-flex; align-items: center; }

.phone-head { background: var(--surface); padding: 0 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.phone-head .phone-top { padding: 18px 0 0; }
.phone-head .meta { font-size: 14px; line-height: 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: 15px; text-decoration: none; }
.phone-level { margin-top: 6px; background: var(--surface-raised); border-radius: var(--radius-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.phone-level .maturity-level { font-size: 28px; line-height: 34px; }
.phone-level .maturity-level .light { font-size: 18px; }
.phone-section { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.phone-section h2 { font: 700 18px/24px var(--font-display); color: var(--ink); }
.phone-section select { height: 44px; font-size: 16px; }
.rows { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 4px 16px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 15px; line-height: 22px; }
.row:first-child { border-top: 0; }
.tap { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; }
.phone-next { margin: 20px; background: var(--highlight); color: var(--on-highlight); border-radius: var(--radius-card); padding: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 22px; }
.phone-next .eyebrow { color: var(--on-highlight-accent); }
.h-phone { font: 700 18px/24px var(--font-display); color: var(--ink); }
.phone-next .btn { height: 48px; margin-top: 4px; }

/* Shared controls */
.btn-secondary { background: #FFFFFF; color: #2C2F4A; border: 1.5px solid #2C2F4A; }
.btn-secondary:hover { background: #F1EDE8; color: #2C2F4A; }
.btn-md { height: 44px; padding: 0 18px; }
.btn.is-disabled { background: #F1EDE8; color: #6F6878; border: 1.5px solid #ECE4DE; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--eyebrow); text-decoration: underline; cursor: pointer; min-height: 32px; }
.link-button:hover { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.row-between.align-end { align-items: flex-end; }
.save-form { display: contents; }
.nav .btn { margin-left: auto; }
.notice { font: 700 16px/24px var(--font-sans); color: #2C2F4A; background: #E4E2F0; border-radius: var(--radius-card); padding: 10px 14px; }

/* Sign-in */
.auth-band { padding: 80px 16px 96px; background: #2C2F4A url(/brand/mesa-arch-dusk.jpg) center / cover no-repeat; }
.auth-card { max-width: 520px; margin: 0 auto; background: #FBF7F2; border-radius: var(--radius-card); padding: 32px; display: flex; flex-direction: column; gap: 14px; color: #4F4A5C; }
.auth-card .eyebrow { color: #A4471F; }
.auth-card input[type="email"] { height: 52px; width: 100%; padding: 0 16px; font: var(--type-body); color: #2C2F4A; background: #FFFFFF; border: 1px solid var(--border-strong); border-radius: var(--radius-card); }
.dev-note { border: 2px dashed #F0C27B; border-radius: var(--radius-card); padding: 12px 14px; background: #FFFFFF; }

/* Workspace shell */
.workspace { display: flex; min-height: 100vh; }
.side { flex: 0 0 248px; background: var(--surface); padding: 24px 16px; display: flex; flex-direction: column; gap: 8px; }
.side-brand { margin: 0 0 20px 14px; font: 700 24px/32px var(--font-display); color: var(--ink); text-decoration: none; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-card); color: var(--ink-body); text-decoration: none; font: 400 16px/24px var(--font-sans); }
a.side-item:hover { background: var(--surface-raised); color: var(--ink); }
.side-item.active { background: var(--surface-raised); color: var(--ink); font-weight: 700; }
.side-item.locked { color: var(--ink-muted); }
.side-item .chip { margin-left: auto; height: 22px; font-size: 12px; padding: 0 8px; }
.side-foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--surface-raised); display: flex; flex-direction: column; gap: 2px; font: 400 14.67px/22px var(--font-sans); color: var(--ink-muted); }
.side-foot .link-button { color: #F7A470; font-size: 14.67px; }
.work { flex: 1 1 0; min-width: 0; padding: 32px 40px 64px; display: flex; flex-direction: column; gap: 24px; max-width: 1240px; }
.banner { background: var(--highlight); border-radius: var(--radius-card); padding: 24px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.banner .eyebrow { color: var(--rust); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.filter { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: #FFFFFF; color: #2C2F4A; text-decoration: none; font: 400 16px/1 var(--font-sans); }
.filter.on { background: #2C2F4A; border-color: #2C2F4A; color: #FBF7F2; font-weight: 700; }
input.search { margin-left: auto; height: 40px; width: 260px; max-width: 100%; font-size: 16px; padding: 0 14px; }
.t a.name { color: var(--ink); font-weight: 700; text-decoration: none; }
.t a.name:hover { color: var(--rust); }
.empty { align-items: flex-start; padding: 32px; }
.crumb { font: 400 16px/24px var(--font-sans); color: var(--ink-muted); }
.crumb a { color: var(--ink-muted); text-decoration: none; }
.crumb a:hover { color: var(--rust); }

/* Product journey */
.journey-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 32px; }
.type-form.light select { background: #FFFFFF; }
.level-card { flex: 0 1 360px; min-width: 0; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.level-card .bars .bar.current { outline-color: #2C2F4A; }
.step-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px 32px; display: flex; flex-wrap: wrap; gap: 20px 32px; }
.step-card.current { border: 1.5px solid var(--indigo); }
.step-card.current .eyebrow { color: var(--rust); }
.step-card.muted-card { background: var(--surface-muted); border-color: transparent; }
.step-side { flex: 0 0 200px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.step-main { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; font: 400 16px/24px var(--font-sans); }
.facts dt { color: var(--ink-muted); }
.facts dd { margin: 0; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.options { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.options legend { margin-bottom: 10px; }
.host-opt { display: flex; gap: 14px; align-items: flex-start; border: 1.5px solid var(--border-strong); border-radius: var(--radius-card); padding: 16px 18px; background: #FFFFFF; font: 400 16px/24px var(--font-sans); }
.host-opt.on { border-color: var(--indigo); background: #FBF7F2; }
.host-opt input { margin-top: 5px; accent-color: #2C2F4A; }
.options:disabled .host-opt { opacity: 0.75; }

/* Linkset form */
.link-group { display: flex; flex-direction: column; gap: 12px; }
.link-row { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 16px 32px; }
.link-about { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.link-fields { flex: 2 1 420px; min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.link-fields input[type="url"], .link-fields select { height: 44px; font-size: 16px; }
input[type="url"] { width: 100%; padding: 0 14px; font: var(--type-body); color: var(--indigo); background: #FFFFFF; border: 1px solid var(--border-strong); border-radius: var(--radius-card); }
.radio { display: flex; align-items: center; gap: 10px; min-height: 32px; font: 400 16px/24px var(--font-sans); color: var(--ink); }
.radio input { width: 18px; height: 18px; accent-color: #2C2F4A; }
.field-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 12px; padding-left: 28px; }
.save-bar { position: sticky; bottom: 0; background: var(--surface); padding: 16px 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

@media (max-width: 860px) {
  .workspace { flex-direction: column; }
  .side { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; }
  .side-brand { margin: 0 12px 0 0; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side-item.locked { display: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; gap: 12px; align-items: center; }
  .work { padding: 24px 16px 48px; }
  .step-card, .link-row { padding: 20px; }
  .auth-card { padding: 24px; }
}

/* Phones: tables marked .stack become one card per row, each cell labelled with its column. */
@media (max-width: 720px) {
  .table-scroll:has(> .t.t-stack) { overflow: visible; }
  .t.t-stack, .t.t-stack tbody, .t.t-stack tr, .t.t-stack td { display: block; width: 100%; }
  .t.t-stack { min-width: 0; background: transparent; border: 0; }
  .t.t-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .t.t-stack tr { background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-card); padding: 6px 14px; margin-bottom: 10px; }
  .t.t-stack td { position: relative; border: 0; padding: 6px 0 6px 8.5em; min-height: 34px; min-width: 0; overflow-wrap: anywhere; }
  .t.t-stack td + td { border-top: 1px solid var(--border); }
  .t.t-stack td::before { content: attr(data-label); position: absolute; left: 0; top: 8px; width: 7.5em; font: 700 13px/18px var(--font-sans); color: var(--ink-muted); }
  .t.t-stack td[data-label=""] { padding-left: 0; }
  .t.t-stack td[data-label=""]::before { content: none; }
  .t.list td[data-cell="issue"] { min-width: 0; }
  .t.t-stack .chip { white-space: normal; height: auto; min-height: 26px; }

  /* Entry: on a phone, scanning comes first and the QR hand-off isn't needed. */
  .way.dark { order: -1; }
  .scan-qr { display: none; }
}
