/* Pallet to Listed. Colors and type from the Ownworks site (~/Developer/ownworks/public/assets/styles.css).
   One system throughout: panels share a header pattern (eyebrow, h2, lede), numbers use one stat tile,
   labels are sentence case at 12px, and every status uses the same three colors:
   jade = ready, brass = check, rose = fix. */
:root {
  --night: #0B1210;
  --ink: #121A17;
  --ink-soft: #46524E;
  --muted: #6E7874;
  --forest: #1D3B32;
  --forest-2: #24493E;
  --jade: #5FB89A;
  --jade-soft: #E6F3EE;
  --brass: #B07F37;
  --brass-soft: #FBF1E1;
  --rose: #B4533F;
  --rose-soft: #F9E8E3;
  --paper: #F6F2EA;
  --paper-2: #EFE9DE;
  --card: #FFFFFF;
  --line: #E6DFD2;
  --line-strong: #D8CFBF;
  --on-dark: #E9EEEB;
  --on-dark-soft: #A9B6B0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(18, 26, 23, .04), 0 14px 32px -20px rgba(18, 26, 23, .22);
  --display: "Inter Tight", "Inter", -apple-system, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gold: linear-gradient(135deg, #F0D7A4 0%, #C9974F 55%, #9E6F2E 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Type scale */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.025em; margin: 0; }
h1 { font-size: 32px; line-height: 1.1; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 15px; line-height: 1.3; letter-spacing: -0.01em; }
em.s { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--forest); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 600; color: var(--brass); }
.lede { margin: 6px 0 0; color: var(--ink-soft); font-size: 15px; max-width: 68ch; }
.fine { margin: 0; color: var(--muted); font-size: 13px; }
.tag { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }

/* Top bar */
.topbar { background: var(--night); color: var(--on-dark); position: sticky; top: 0; z-index: 30; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.03em; color: #fff; }
.brand em { font-family: var(--serif); font-style: italic; font-weight: 400; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 2px; }
.brand .by { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--on-dark-soft); margin-left: 10px; }

/* Header signal: the AI layer, on and working */
.status { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; letter-spacing: .01em; color: var(--on-dark-soft); border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); white-space: nowrap; transition: background .3s, color .3s; }
.signal { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.status.live { color: #fff; border-color: rgba(95, 184, 154, .55); background: rgba(95, 184, 154, .16); }
.status.live .signal, .status.working .signal { background: var(--jade); }
.status.live .signal::before, .status.live .signal::after,
.status.working .signal::before, .status.working .signal::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--jade); animation: signal 2.4s ease-out infinite; }
.status.live .signal::after, .status.working .signal::after { animation-delay: 1.2s; }
.status.working { color: #1B140A; border-color: transparent; background: var(--gold); }
.status.working .signal { background: #1B140A; }
.status.working .signal::before, .status.working .signal::after { border-color: #1B140A; animation-duration: 1.1s; }
.status.working .signal::after { animation-delay: .55s; }
.status.offline .signal { background: #C9974F; }
@keyframes signal { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .signal::before, .signal::after { animation: none !important; display: none; } }

.banner { background: var(--brass-soft); color: #6B4A1C; border-bottom: 1px solid #EAD6B5; text-align: center; padding: 9px 16px; font-size: 13.5px; }

/* Buttons */
.btn { border: 1px solid transparent; border-radius: 999px; padding: 12px 22px; font-weight: 600; font-size: 14.5px; line-height: 1.2; cursor: pointer; transition: transform .15s, background .15s, opacity .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--forest); color: #fff; box-shadow: 0 6px 16px -8px rgba(29, 59, 50, .6); }
.btn.primary:hover:not(:disabled) { background: var(--forest-2); }
.btn.ghost { background: var(--card); border-color: var(--line-strong); color: var(--ink-soft); }
.btn.gold { background: var(--gold); color: #1B140A; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--forest); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* Page rhythm and panels */
.page { padding: 28px 32px 8px; }
.page > * + * { margin-top: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 20px; }
.panel-head > div:first-child { min-width: 0; }

/* Stat tile: pallet figures, readiness and accuracy all use it */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--paper); border: 1px solid transparent; text-align: left; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.stat-value { font-family: var(--display); font-size: 28px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.05; color: var(--ink); }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat.lead { background: var(--jade-soft); }
.stat.lead .stat-value { color: var(--forest); }
.stat.lead .stat-label { color: var(--forest); }

/* Why this exists */
.flows { display: grid; gap: 8px; }
.flow { display: grid; grid-template-columns: 170px 1fr 200px; align-items: center; gap: 16px; padding: 12px 16px; border-radius: var(--radius-sm); }
.flow.today { background: var(--paper); }
.flow.next { background: var(--jade-soft); }
.flow-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.next .flow-label { color: var(--forest); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: step; }
.steps li { counter-increment: step; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.35; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 5px 12px 5px 5px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--paper-2); font-size: 11px; font-weight: 700; color: var(--ink-soft); flex: none; }
.next .steps li::before { background: var(--forest); color: #fff; }
.flow-time { text-align: right; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; line-height: 1.25; }
.flow-time small { display: block; font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: 0; color: var(--muted); }
.today .flow-time { color: var(--rose); }
.next .flow-time { color: var(--forest); }
.calc { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px 24px; margin: 12px 0 14px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.calc-inputs { display: flex; gap: 12px; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.calc input { width: 110px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; font-family: var(--display); font-size: 18px; font-weight: 650; background: var(--card); }
.calc-out { display: grid; gap: 4px; font-size: 14px; color: var(--ink-soft); }
.calc-out b { font-weight: 700; }
.calc-today { color: var(--rose); }
.calc-next { color: var(--forest); }

/* Pallet */
.pallet .panel-head { margin-bottom: 22px; }
.actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.btn-row { display: flex; gap: 10px; }
.progress { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); min-height: 20px; text-align: right; }
.fallback { margin: 0; font-size: 13px; color: var(--muted); text-align: right; }
.stat.profit { background: var(--jade-soft); }
.stat.profit .stat-value, .stat.profit .stat-label { color: var(--forest); }

/* Readiness: three tiles on the same 6-column grid as every other stat row (each spans 2) */
#ready-tiles .stat { grid-column: span 2; }
#ready-action { display: flex; align-items: center; min-height: 36px; }
.stat.pick { cursor: pointer; background: var(--card); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat.pick:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.stat.pick.active { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.stat.pick.ready .stat-value { color: var(--forest); }
.stat.pick.check .stat-value { color: var(--brass); }
.stat.pick.photos .stat-value { color: var(--rose); }
.stat.pick .stat-label { color: var(--ink); }
.grid[data-filter="ready"] .card:not(.is-ready),
.grid[data-filter="check"] .card:not(.is-check),
.grid[data-filter="photos"] .card:not(.is-photos) { display: none; }

/* Accuracy summary */
.switch { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; }
.switch input { accent-color: var(--forest); width: 17px; height: 17px; margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.meta div { display: flex; gap: 6px; align-items: baseline; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-weight: 600; color: var(--ink); }
.meta .quiet dd { font-weight: 500; color: var(--muted); }

/* Item cards: every card is the same stack of fixed-height parts, so cards in a row line up:
   head, 3:4 photo, a 2-line note strip, a 2-line title, paired fields, foot pinned to the bottom. */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 1px 2px rgba(18, 26, 23, .05), 0 22px 40px -22px rgba(18, 26, 23, .32); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px 14px; min-height: 66px; }
.card-title { display: flex; flex-direction: column; gap: 1px; }
.card-title b { font-family: var(--display); font-size: 15px; letter-spacing: -0.01em; }
.card-title span { font-size: 12.5px; color: var(--muted); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.ready { background: var(--jade-soft); color: var(--forest); }
.pill.check { background: var(--brass-soft); color: #7A5418; }
.pill.photos { background: var(--rose-soft); color: #8A3726; }
.pill.working { background: var(--brass-soft); color: #7A5418; }
.raw { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 18px 18px; }
.raw img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--paper-2); display: block; }
.card.working .raw img { opacity: .55; }

.media { display: grid; grid-template-columns: 1fr 56px; gap: 8px; padding: 0 18px; }
.cover { position: relative; aspect-ratio: 3 / 4; background: var(--paper-2); border-radius: var(--radius-sm); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .badge { position: absolute; left: 10px; top: 10px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); }
.thumbs { display: flex; flex-direction: column; gap: 8px; }
.thumb { position: relative; cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid transparent; flex: none; }
.thumb.active { border-color: var(--forest); }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.thumb .shot { position: absolute; inset: auto 0 0 0; font-size: 9px; font-weight: 600; line-height: 1.25; text-align: center; color: #fff; background: rgba(11, 18, 16, .72); padding: 2px 1px; }
.thumb.flag::after { content: "!"; position: absolute; top: 3px; right: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

.note { display: flex; gap: 9px; align-items: center; height: 54px; margin: 14px 18px 0; padding: 0 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; }
.note span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.note.fix { background: var(--rose-soft); color: #7A2E20; }
.note.fix::before { background: var(--rose); }
.note.check { background: var(--brass-soft); color: #6B4A1C; }
.note.check::before { background: var(--brass); }
.note.ok { background: var(--jade-soft); color: var(--forest); }
.note.ok::before { background: var(--jade); }

/* Listing title reads as the card's headline; it's still editable */
.headline { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px 0; }
.headline > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.headline textarea.title { width: 100%; height: calc(2 * 1.3em + 14px); padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px); border: 1px solid transparent; border-radius: 10px; background: transparent; resize: none; overflow: hidden; font-family: var(--display); font-weight: 650; font-size: 16.5px; line-height: 1.3; letter-spacing: -0.015em; transition: background .15s, border-color .15s; }
.headline textarea.title:hover { background: var(--paper); }
.headline textarea.title:focus { outline: none; background: var(--card); border-color: var(--forest); box-shadow: 0 0 0 3px rgba(29, 59, 50, .12); overflow: auto; }

/* Fields: calm values, editable on tap; paired rows so every card has the same grid */
.fields { padding: 12px 18px 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f.wide { grid-column: 1 / -1; }
.f > span { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 18px; font-size: 12px; font-weight: 600; color: var(--muted); }
.f input, .f textarea { width: 100%; border: 1px solid transparent; border-radius: 10px; padding: 9px 12px; background: var(--paper); font-size: 14.5px; font-weight: 500; color: var(--ink); transition: border-color .15s, background .15s, box-shadow .15s; text-overflow: ellipsis; }
.f input:hover, .f textarea:hover { border-color: var(--line-strong); }
.f input:focus, .f textarea:focus { outline: none; background: var(--card); border-color: var(--forest); box-shadow: 0 0 0 3px rgba(29, 59, 50, .12); }
.f textarea { resize: none; line-height: 1.45; }
.f.ref input:disabled { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-soft); }
.f.low input, .f.low textarea { background: var(--brass-soft); border-color: #EBD3AB; }
.f.low > span::after { content: "Check"; font-size: 10.5px; font-weight: 700; color: #7A5418; background: var(--brass-soft); border: 1px solid #E8CFA6; border-radius: 999px; padding: 0 7px; }
.f.edited input { border-color: var(--forest); background: var(--card); }
.theirs { display: none; font-size: 12px; color: var(--muted); padding: 0 2px; min-height: 18px; }
.compare .theirs { display: block; }
.theirs.yes::before { content: "✓ "; color: var(--forest); font-weight: 700; }
.theirs.no { color: var(--rose); }
.theirs.no::before { content: "≠ "; font-weight: 700; }
details.desc { margin: 8px 18px 0; border-top: 1px solid var(--line); }
details.desc summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 12px 0; list-style: none; display: flex; justify-content: space-between; }
details.desc summary::-webkit-details-marker { display: none; }
details.desc summary::after { content: "+"; font-size: 16px; line-height: 1; color: var(--muted); }
details.desc[open] summary::after { content: "–"; }
details.desc .f { margin-bottom: 10px; }
.their-copy { display: none; font-size: 12.5px; color: var(--muted); background: var(--paper); border-radius: 10px; padding: 8px 11px; white-space: pre-wrap; margin-top: 4px; }
.compare .their-copy { display: block; }
.read-note { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: #FCFAF6; }
.approve { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; cursor: pointer; }
.approve input { accent-color: var(--forest); width: 18px; height: 18px; margin: 0; }
.card.approved { border-color: var(--jade); box-shadow: 0 0 0 1px var(--jade), var(--shadow); }
.card.approved .card-foot { background: var(--jade-soft); }
.secs { font-size: 12px; color: var(--muted); }
.card.error .err { padding: 0 18px 18px; color: var(--rose); font-size: 13.5px; }

/* Try a new item */
.try { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: center; background: var(--forest); color: var(--on-dark); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.try .eyebrow { color: #E8C88E; }
.try h2 { color: #fff; }
.try p { color: var(--on-dark-soft); margin: 8px 0 0; }
.try-helper { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--on-dark) !important; }
.station { display: flex; flex-direction: column; gap: 12px; }
.shots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.shot-slot { position: relative; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed rgba(255, 255, 255, .32); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04); color: #fff; cursor: pointer; transition: background .15s, border-color .15s; }
.shot-slot:hover { background: rgba(255, 255, 255, .08); }
.shot-slot .plus { font-size: 28px; line-height: 1; color: var(--jade); }
.shot-slot .shot-label { font-size: 11.5px; font-weight: 600; }
.shot-slot.filled { border-style: solid; border-color: var(--jade); }
.shot-slot.filled img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot-slot.filled .shot-label { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(11, 18, 16, .75); padding: 3px 0; }
.station-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.station-actions #draft-new { margin-left: auto; }
.try .btn.ghost { background: transparent; color: var(--on-dark); border-color: rgba(255, 255, 255, .3); }
.touch .drop { display: none; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 84px; border: 2px dashed rgba(255, 255, 255, .28); border-radius: var(--radius-sm); cursor: pointer; transition: background .15s, border-color .15s; }
.drop.over { background: rgba(255, 255, 255, .06); border-color: var(--jade); }
.drop-big { font-family: var(--display); font-size: 17px; font-weight: 600; color: #fff; }
.drop-small { font-size: 12.5px; color: var(--on-dark-soft); }
.try-result { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.try-result .working-note { grid-column: 1 / -1; }
.try-result:empty { display: none; }
.try-result .card { color: var(--ink); }
.try-result .working-note { color: var(--on-dark); font-size: 14px; margin: 0; }

/* Export */
.export { display: flex; justify-content: space-between; align-items: center; gap: 28px; }

/* Pilot */
.pilot { background: var(--paper-2); box-shadow: none; }
.pilot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pilot-grid > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.pilot-grid h3 { margin: 0 0 4px; }
.pilot-grid p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

/* Passcode (hosted only) */
.login { position: fixed; inset: 64px 0 0 0; z-index: 20; background: var(--paper); display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.login-card input { border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; font-size: 16px; }
.login-error { margin: 0; min-height: 18px; color: var(--rose); font-size: 13.5px; }

.footer { margin-top: 28px; border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: 13px; }
.footer strong { color: var(--ink); }

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #ready-tiles .stat { grid-column: span 1; }
  .try-result { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 150px 1fr; }
  .flow-time { grid-column: 2; text-align: left; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .page { padding: 16px 16px 4px; }
  .page > * + * { margin-top: 14px; }
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .lede { font-size: 14.5px; }
  .brand { font-size: 20px; }
  .brand .by { display: none; }
  .status { padding: 7px 12px 7px 11px; font-size: 13px; }
  .panel { padding: 18px; }
  .panel-head { flex-direction: column; gap: 14px; margin-bottom: 16px; }
  .actions, .btn-row { width: 100%; align-items: stretch; }
  .btn-row .btn { flex: 1; }
  .progress, .fallback { text-align: left; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #ready-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #ready-tiles .stat { padding: 12px; }
  #ready-tiles .stat-sub { display: none; }
  .try-result { grid-template-columns: 1fr; }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 24px; }
  .stat.pick .stat-value { font-size: 28px; }
  .flow { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .flow-time { grid-column: auto; }
  .calc { grid-template-columns: 1fr; }
  .calc-inputs label { flex: 1; }
  .calc input { width: 100%; }
  .switch { width: 100%; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .try { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .station-actions #draft-new { margin-left: 0; flex: 1 1 100%; }
  .export { flex-direction: column; align-items: stretch; }
  .pilot-grid { grid-template-columns: 1fr; }
  .f input, .f textarea { font-size: 16px; } /* stops iOS zooming into fields */
}
