/* Drop page styles. From the prototype (planning/prototype/src/style.css); the mockup panel, the phone
   frame and the luis.denut.fi mockup views are left out. Fonts are self-hosted (CSP font-src 'self'). */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/atkinson-next.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Mono';
  src: url('/fonts/atkinson-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Tokens: values copied from HTML Lab app/ui/style.css (read 2026-11-08). Light on :root. */
:root {
  --win: #E8EDF4;
  --panel: #FFFFFF;
  --strip: #F1F4F9;
  --line: #CFD8E4;
  --rowLine: #E4EAF2;
  --ink: #14233C;
  --ink2: #4A5A73;
  --ink3: #2B3B55;
  --placeholder: #5F6F86;
  --brand: #0B6E69;
  --onBrand: #FFFFFF;
  --hover-primary: #095A56;
  --link: #095A56;
  --focus: #1D56C9;
  --field: #8796AB;
  --amber: #B45309;
  --hintBg: #FEF3C7;
  --hintLine: #B98A1F;
  --warn: #92400E;
  --html: #C2410C;
  --css: #1D56C9;
  --tile-brand: #DCF1EF;
  --tile-amber: #FEF3C7;
  --tile-html: #FDE8DC;
  --tile-css: #E1EBFD;
  --tile-gray: #E4EAF2;
  --tile-ink: #095A56;
  --tile-html-ink: #C2410C;
  --tile-css-ink: #1D56C9;
  --tile-gray-ink: #4A5A73;
  --tile-amber-ink: #B45309;
  --hover-row: #F1F4F9;
  --hover-tb: #D6DFEA;
  --hover-tab: #E4EAF2;
  --hover-card: #F7FBFA;
  --active: #EEF3F9;
  --segBg: #D6DFEA;
  --pill: #E4EAF2;
  --pill-ink: #4A5A73;
  --scrim: rgba(20, 35, 60, .5);
  --dlg-shadow: 0 18px 50px rgba(20, 35, 60, .3);
  --qr-ink: #14233C;
  --qr-bg: #FFFFFF;
  --qr-caption: #4A5A73;
  --frame-bg: #FFFFFF;
  --accent: var(--brand);

  --font-ui: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', 'Helvetica Neue', Arial, sans-serif;
  --font-code: 'Atkinson Hyperlegible Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --win: #0F1A2B;
    --panel: #16243A;
    --strip: #1B2A42;
    --line: #2F4262;
    --rowLine: #2F4262;
    --ink: #E7EDF6;
    --ink2: #A9B7CB;
    --ink3: #A9B7CB;
    --placeholder: #8B9BB2;
    --brand: #5EEAD4;
    --onBrand: #0F1A2B;
    --hover-primary: #99F6E4;
    --link: #5EEAD4;
    --focus: #8AB6FF;
    --field: #6B7C96;
    --amber: #FBBF24;
    --hintBg: #3A2E12;
    --hintLine: #7A6420;
    --warn: #FBBF24;
    --html: #FF9E66;
    --css: #8AB6FF;
    --tile-brand: #1F3049;
    --tile-amber: #1F3049;
    --tile-html: #1F3049;
    --tile-css: #1F3049;
    --tile-gray: #1F3049;
    --tile-ink: #5EEAD4;
    --tile-html-ink: #FF9E66;
    --tile-css-ink: #8AB6FF;
    --tile-gray-ink: #A9B7CB;
    --tile-amber-ink: #FBBF24;
    --hover-row: #1F3049;
    --hover-tb: #22324B;
    --hover-tab: #22324B;
    --hover-card: #1F3049;
    --active: #1F3049;
    --segBg: #22324B;
    --pill: #22324B;
    --pill-ink: #A9B7CB;
    --scrim: rgba(0, 0, 0, .6);
    --dlg-shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --qr-ink: #14233C;
    --qr-bg: #FFFFFF;
    --qr-caption: #4A5A73;
    --frame-bg: #FFFFFF;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --win: #0F1A2B;
  --panel: #16243A;
  --strip: #1B2A42;
  --line: #2F4262;
  --rowLine: #2F4262;
  --ink: #E7EDF6;
  --ink2: #A9B7CB;
  --ink3: #A9B7CB;
  --placeholder: #8B9BB2;
  --brand: #5EEAD4;
  --onBrand: #0F1A2B;
  --hover-primary: #99F6E4;
  --link: #5EEAD4;
  --focus: #8AB6FF;
  --field: #6B7C96;
  --amber: #FBBF24;
  --hintBg: #3A2E12;
  --hintLine: #7A6420;
  --warn: #FBBF24;
  --html: #FF9E66;
  --css: #8AB6FF;
  --tile-brand: #1F3049;
  --tile-amber: #1F3049;
  --tile-html: #1F3049;
  --tile-css: #1F3049;
  --tile-gray: #1F3049;
  --tile-ink: #5EEAD4;
  --tile-html-ink: #FF9E66;
  --tile-css-ink: #8AB6FF;
  --tile-gray-ink: #A9B7CB;
  --tile-amber-ink: #FBBF24;
  --hover-row: #1F3049;
  --hover-tb: #22324B;
  --hover-tab: #22324B;
  --hover-card: #1F3049;
  --active: #1F3049;
  --segBg: #22324B;
  --pill: #22324B;
  --pill-ink: #A9B7CB;
  --scrim: rgba(0, 0, 0, .6);
  --dlg-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --qr-ink: #14233C;
  --qr-bg: #FFFFFF;
  --qr-caption: #4A5A73;
  --frame-bg: #FFFFFF;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--win);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The band behind the sticky header, under a phone's status bar. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--win);
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: var(--link); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@supports not selector(:focus-visible) { :focus { outline: 3px solid var(--focus); outline-offset: 2px; } }
[tabindex="-1"]:focus { outline: none; }

.ic { display: block; flex: none; width: 24px; height: 24px; fill: currentColor; }
.ic-16 { width: 16px; height: 16px; }
.ic-18 { width: 18px; height: 18px; }
.ic-20 { width: 20px; height: 20px; }
.ic-26 { width: 26px; height: 26px; }
.ic-28 { width: 28px; height: 28px; }
.ic-32 { width: 32px; height: 32px; }
.ic-42 { width: 42px; height: 42px; }
.ic-72 { width: 72px; height: 72px; }
.ic-96 { width: 96px; height: 96px; }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--font-code); }
.muted { color: var(--ink2); }
.small { font-size: 15px; line-height: 20px; }
.tiny { font-size: 13px; line-height: 18px; font-weight: 700; }
.body-text { font-size: 17px; line-height: 24px; font-weight: 400; text-wrap: pretty; }
.lead { font-size: 18px; line-height: 26px; font-weight: 400; color: var(--ink2); text-wrap: pretty; }
.display { font-size: 28px; line-height: 34px; font-weight: 700; text-wrap: balance; }
.title { font-size: 24px; line-height: 30px; font-weight: 700; text-wrap: balance; }
.heading { font-size: 20px; line-height: 26px; font-weight: 700; text-wrap: balance; }
.group-label { margin: 20px 0 8px; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--ink2); }
.group-label.amber { color: var(--amber); }
[hidden] { display: none !important; }

/* ---------- App frame ---------- */
#app {
  container: app / inline-size;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: var(--gl);
  padding-right: var(--gr);
  padding-block: 0;
  background: var(--win);
}

/* ---------- Header (drop.denut.fi) ---------- */
.hdr {
  position: sticky;
  top: var(--top);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  margin-left: calc(-1 * var(--gl));
  margin-right: calc(-1 * var(--gr));
  padding-left: var(--gl);
  padding-right: var(--gr);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand-mark { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 18px; line-height: 24px; font-weight: 700; color: var(--ink); text-decoration: none; border-radius: 10px; }
.brand-mark svg { width: 24px; height: 24px; flex: none; }
.hdr-right { margin-left: auto; display: flex; gap: 4px; min-width: 0; }
.tb {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-weight: 500; white-space: nowrap;
}
.tb .ic { color: var(--brand); }
.tb:hover { background: var(--hover-tb); }
.tb-gallery { display: none; }

/* ---------- Stage and sideways views ---------- */
.stage { position: relative; }
.view { position: relative; padding-block: 16px 32px; max-width: 640px; margin-inline: auto; }
.view.leaving { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.view.in-fwd { animation: inFwd 220ms var(--ease) both; }
.view.in-back { animation: inBack 220ms var(--ease) both; }
.view.out-fwd { animation: outFwd 220ms var(--ease) both; }
.view.out-back { animation: outBack 220ms var(--ease) both; }
@keyframes inFwd { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes inBack { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes outFwd { to { opacity: 0; transform: translateX(-24px); } }
@keyframes outBack { to { opacity: 0; transform: translateX(24px); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-weight: 600; text-align: center; text-decoration: none;
}
.btn-primary { padding: 0 20px; background: var(--brand); color: var(--onBrand); }
.btn-primary:hover { background: var(--hover-primary); }
.btn-secondary { box-shadow: inset 0 0 0 2px var(--line); }
.btn-secondary:hover { background: var(--hover-row); }
.btn-big { min-height: 56px; width: 100%; gap: 12px; border-radius: 14px; font-size: 19px; line-height: 24px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { background: var(--brand); }
.btn-secondary:disabled { background: transparent; }
.btn.busy { cursor: progress; }
.quiet {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.quiet:hover { background: var(--hover-tab); }
.quiet.amber .ic { color: var(--amber); }
.link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--link); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link-big { font-size: 17px; }
.btn-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.btn-back:hover { background: var(--hover-tab); }

/* ---------- Panels (desktop) ---------- */
.panel { min-width: 0; display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.panel-head h2 { font-size: 16px; line-height: 22px; font-weight: 700; }
.panel-body { min-width: 0; }
.count-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); font-size: 13px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); font-size: 13px; line-height: 18px; font-weight: 700; white-space: nowrap; }

/* ---------- Home ---------- */
.home { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin-inline: auto; }
.home .sites-panel { order: -1; }
.home-title { display: flex; align-items: center; gap: 10px; }
.drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 8px; padding: 32px 24px; border: 2px dashed var(--field); border-radius: 14px; background: var(--panel);
}
.drop-zone:hover { background: var(--hover-card); }
.drop-zone.over, .drag-on .drop-zone { border: 3px dashed var(--brand); background: var(--tile-brand); }
.drop-zone .hero { color: var(--brand); margin-bottom: 8px; }
.drop-zone .btn-big { width: 320px; max-width: 100%; margin-top: 16px; }
.drop-note { display: flex; gap: 10px; align-items: flex-start; max-width: 460px; margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: var(--hintBg); color: var(--ink); text-align: left; }
.drop-note .ic { color: var(--amber); }
.how-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--ink2); font-size: 15px; line-height: 20px; font-weight: 400; }
.how-foot .ic { color: var(--brand); }
.size-note { margin-top: 4px; font-weight: 400; }
.publish-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--strip); }
.publish-card .row1 { display: flex; gap: 12px; align-items: center; }
.publish-card .row1 .ic { color: var(--brand); }
.publish-card .btn { width: 100%; }

.site-list { display: flex; flex-direction: column; }
.site-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 8px; border-bottom: 1px solid var(--rowLine); border-radius: 0; }
.site-row:hover { background: var(--hover-row); }
.site-row.just { background: var(--active); }
.site-row .row-link { position: absolute; inset: 0; border-radius: 10px; z-index: 0; }
.site-row .row-link:focus-visible { outline-offset: -3px; }
.site-row > *:not(.row-link) { position: relative; z-index: 1; }
.site-row .info { flex: 1; min-width: 0; pointer-events: none; }
.site-row .t { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.site-row .t span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%; }
@container app (max-width: 899.98px) {
  /* Phone: Open shows only its icon (the button keeps its name), so the title has room. */
  .site-row .quiet span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-row .quiet { padding: 0 10px; }
}
.site-row .addr { font-family: var(--font-code); font-size: 15px; line-height: 22px; font-weight: 400; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row .when { color: var(--ink2); font-size: 15px; font-weight: 400; white-space: nowrap; pointer-events: none; display: none; }
.site-row .caret { color: var(--ink2); pointer-events: none; }
.site-row.down .thumb { filter: grayscale(1); opacity: .7; }
.thumb { flex: none; width: 64px; height: 40px; border-radius: 7px; overflow: hidden; background: var(--frame-bg); box-shadow: inset 0 0 0 1px var(--line); }
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.letter-tile { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }
.lt-0 { background: var(--tile-brand); color: var(--tile-ink); }
.lt-1 { background: var(--tile-html); color: var(--tile-html-ink); }
.lt-2 { background: var(--tile-css); color: var(--tile-css-ink); }
.lt-3 { background: var(--tile-gray); color: var(--tile-gray-ink); }
.lt-4 { background: var(--tile-amber); color: var(--tile-amber-ink); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 32px 16px; }

/* ---------- Tiles ---------- */
.tile { flex: none; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--tile-brand); color: var(--brand); }
.tile.amber { background: var(--tile-amber); color: var(--amber); }

/* ---------- Wizard ---------- */
.wiz { display: flex; flex-direction: column; min-height: calc(100dvh - 56px - var(--top)); }
.wiz-head { display: flex; align-items: center; gap: 8px; min-height: 52px; margin-bottom: 8px; }
.stepper { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stepper .full { display: none; }
.stepper .short { font-size: 15px; line-height: 20px; color: var(--ink2); }
.step { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 15px; line-height: 20px; }
.step .dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--segBg); color: var(--ink2); font-size: 14px; font-weight: 700; flex: none; }
.step[aria-current="step"] { color: var(--ink); }
.step[aria-current="step"] .dot { background: var(--brand); color: var(--onBrand); }
.step.done .dot { background: var(--tile-brand); color: var(--brand); }
.step-sep { width: 24px; height: 2px; background: var(--line); flex: none; }
.wiz-head .cancel { margin-left: auto; }
.wiz-body { flex: 1; min-width: 0; padding-bottom: 16px; }
.wiz-body > * + * { margin-top: 12px; }
.wiz-foot {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column-reverse; gap: 10px;
  margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr));
  padding: 12px var(--gr) calc(12px + var(--bottom)) var(--gl);
  background: var(--panel); border-top: 1px solid var(--line);
}
.wiz-foot .btn { width: 100%; }
.wiz-foot .foot-left { display: flex; justify-content: center; }
.wiz-foot .spacer { display: none; }
.wiz-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 32px 0; }
.wiz-center .hero { color: var(--brand); }
.progress { width: 100%; max-width: 480px; height: 12px; border-radius: 999px; background: var(--segBg); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--brand); transition: width 150ms ease-out; }
.progress.paused > i { background: var(--amber); }

/* Check results */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); }
.chip .i-html { color: var(--html); }
.chip .i-css { color: var(--css); }
.fact-row { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-weight: 600; }
.fact-row .ic { color: var(--brand); }
.nav-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; box-shadow: inset 0 0 0 2px var(--line); }
.nav-row:hover { background: var(--hover-card); }
.nav-row .grow { flex: 1; min-width: 0; }
.nav-row .ic:first-child { color: var(--brand); }
.nav-row .caret { color: var(--ink2); }

.card-hint { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--hintBg); color: var(--ink); }
.card-hint > .ic { color: var(--amber); }
.card-tip { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--strip); color: var(--ink); }
.card-tip > .ic { color: var(--ink2); }
.card-body { min-width: 0; flex: 1; }
.card-title { font-size: 17px; line-height: 24px; font-weight: 700; text-wrap: balance; }
.card-hint .card-title { color: var(--amber); }
.card-where { margin-top: 2px; font-family: var(--font-code); font-size: 15px; line-height: 22px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.card-text { margin-top: 4px; font-size: 16px; line-height: 22px; font-weight: 400; overflow-wrap: anywhere; text-wrap: pretty; }
.card-fixed { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--brand); font-weight: 700; font-size: 15px; }
.cards > * + * { margin-top: 8px; }
.tick-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; font-weight: 600; }
.tick-row:hover { background: var(--hover-card); }
.tick-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); flex: none; }
.see-all { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--link); font-weight: 700; text-align: left; }
.see-all:hover { background: var(--hover-row); }
.see-all .grow { flex: 1; }
.waiting-strip { display: flex; flex-direction: column; gap: 10px; align-items: stretch; padding: 14px; border: 2px dashed var(--field); border-radius: 12px; background: var(--panel); }
.waiting-strip .row1 { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.waiting-strip .row1 .ic { color: var(--brand); }

.stop-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; border-radius: 14px; background: var(--strip); }
.big-files { width: 100%; }
.big-files li { display: flex; gap: 12px; justify-content: space-between; min-height: 40px; align-items: center; border-bottom: 1px solid var(--rowLine); font-family: var(--font-code); font-size: 15px; font-weight: 400; }
.big-files li span:first-child { min-width: 0; overflow-wrap: anywhere; }

.choice-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 10px 14px; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--line); background: var(--panel); cursor: pointer; }
.choice:hover { background: var(--hover-card); }
.choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brand); }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); flex: none; }
.choice input:focus-visible { outline-offset: 3px; }
.choice .grow { min-width: 0; flex: 1; }
.choice .ic { color: var(--html); }

/* Files list */
.file-row { display: flex; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--rowLine); }
.file-row .name { flex: 1; min-width: 0; font-family: var(--font-code); font-size: 15px; line-height: 22px; font-weight: 400; overflow-wrap: anywhere; }
.file-row .size { color: var(--ink2); font-size: 15px; font-weight: 400; white-space: nowrap; }
.k-html { color: var(--html); }
.k-css { color: var(--css); }
.k-pic { color: var(--ink2); }
.k-file { color: var(--ink2); }

/* Address */
.lbl { display: block; margin-bottom: 6px; font-weight: 600; }
.field { display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 6px 0 14px; border-radius: 10px; background: var(--panel); font-size: 17px; box-shadow: inset 0 0 0 1px var(--field); }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.field.err { box-shadow: inset 0 0 0 2px var(--warn); }
.field.off { background: var(--strip); opacity: .45; }
.field input { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; outline: none; background: transparent; font-weight: 400; }
.field input::placeholder { color: var(--placeholder); }
.field .quiet { min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 15px; }
.note { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink2); }
.note.warn { color: var(--warn); }
.note.ok { color: var(--brand); }
.get-box { padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.get-box .addr { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--font-code); font-size: 16px; line-height: 22px; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.get-box .addr .ic { color: var(--brand); }
.taken-card { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--strip); }
.taken-card .thumb { width: 80px; height: 50px; }

/* Done */
.done-grid { display: grid; gap: 24px; }
.done-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.done-check { color: var(--brand); }
.done-check.grow { animation: grow 320ms ease-out both; }
@keyframes grow { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.addr-box { padding: 16px; border-radius: 12px; background: var(--strip); min-width: 0; }
.addr-box a { font-family: var(--font-code); font-size: 18px; line-height: 26px; font-weight: 700; color: var(--link); overflow-wrap: anywhere; text-decoration: none; }
.addr-box a:hover { text-decoration: underline; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }
.qr-card { display: none; flex-direction: column; align-items: center; gap: 10px; width: 232px; padding: 16px; border-radius: 14px; background: var(--qr-bg); box-shadow: inset 0 0 0 2px var(--line); }
.qr-card svg.qr { width: 168px; height: 168px; display: block; }
.qr-card .qr-bg { fill: var(--qr-bg); }
.qr-card .qr-ink { fill: var(--qr-ink); }
.qr-card .cap { display: flex; gap: 8px; align-items: flex-start; color: var(--qr-caption); font-size: 15px; line-height: 20px; font-weight: 600; }
.qr-card .cap .ic { fill: var(--qr-caption); }
.qr-fallback { width: 168px; height: 168px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--qr-caption); font-size: 15px; }
.line-ok { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); font-size: 15px; line-height: 20px; font-weight: 600; }
.line-ok .ic { color: var(--brand); }
.line-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 20px; font-weight: 600; }
.line-warn .link, .line-ok .link { display: inline; min-height: 0; padding: 0; }
.line-warn .ic { color: var(--amber); }

/* Amber box (errors) */
.amber-box { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--hintBg); color: var(--ink); }
.amber-box > .ic { color: var(--amber); }
.amber-box .card-title { color: var(--ink); }
.box-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hint-link { min-height: 44px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--hintLine); }
.hint-link:hover { box-shadow: inset 0 0 0 2px var(--hintLine); }
.hint-link.main { background: var(--brand); color: var(--onBrand); box-shadow: none; }
.hint-link.main:hover { background: var(--hover-primary); }
.details { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--panel); font-family: var(--font-code); font-size: 14px; line-height: 20px; font-weight: 400; overflow-wrap: anywhere; }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border-radius: 12px; background: var(--tile-brand); color: var(--ink); }
.status-line > .ic { color: var(--brand); }
.status-line .grow { flex: 1; min-width: 0; }

/* Manage */
.manage { display: flex; flex-direction: column; gap: 16px; }
.manage-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.manage-head h1 { min-width: 0; overflow-wrap: anywhere; }
.cover { width: 100%; aspect-ratio: 16 / 10; max-height: 320px; border-radius: 12px; overflow: hidden; background: var(--frame-bg); box-shadow: inset 0 0 0 1px var(--line); }
.cover img, .cover svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .letter-tile { font-size: 64px; }
.cover.down { filter: grayscale(1); opacity: .7; }
.addr-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.addr-row a { font-family: var(--font-code); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.facts { display: flex; flex-direction: column; gap: 2px; color: var(--ink2); font-size: 15px; line-height: 20px; font-weight: 400; }
.opt-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: var(--ink); font-weight: 600; }
.opt-row:hover { background: var(--hover-row); }
.opt-row .grow { flex: 1; min-width: 0; }
.opt-row .sub { display: block; color: var(--ink2); font-size: 15px; line-height: 20px; font-weight: 400; }
.opt-row > .ic:first-child { color: var(--brand); }
.opt-row.amber > .ic:first-child { color: var(--amber); }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.switch { position: relative; flex: none; width: 44px; height: 26px; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 999px; background: var(--segBg); cursor: pointer; transition: background 150ms; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--panel); box-shadow: 0 1px 2px rgba(20, 35, 60, .3); transition: transform 150ms var(--ease); }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(18px); }
.switch:hover { box-shadow: inset 0 0 0 1px var(--ink2); }
label.opt-row { cursor: pointer; }
.share-box { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.mini-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 200px; padding: 16px; border: 2px dashed var(--field); border-radius: 14px; text-align: center; }
.mini-drop:hover { background: var(--hover-card); }
.mini-drop .ic-32 { color: var(--brand); }
.update-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--strip); }
.version-row { display: flex; align-items: center; gap: 12px; min-height: 64px; border-bottom: 1px solid var(--rowLine); }
.version-row .grow { flex: 1; min-width: 0; }

/* Sign in */
.signin-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding-block: 24px; }
.signin-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; }
.signin-card .app-mark { width: 56px; height: 56px; margin-bottom: 4px; }
.under-card { margin-top: 20px; max-width: 440px; text-align: center; color: var(--ink2); font-size: 15px; line-height: 20px; font-weight: 400; }


/* ---------- Overlays ---------- */
#drop-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); }
#drop-overlay.passive { pointer-events: none; }
.drop-card { display: flex; align-items: center; gap: 14px; max-width: 560px; padding: 24px 28px; border-radius: 18px; background: var(--panel); color: var(--ink); font-size: 22px; line-height: 28px; font-weight: 700; box-shadow: var(--dlg-shadow); }
.drop-card .ic { color: var(--brand); }

dialog.dlg { width: 540px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 28px; border: 0; border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: var(--dlg-shadow); }
dialog.dlg::backdrop { background: var(--scrim); }
.dlg-head { display: flex; gap: 18px; }
.dlg-head > div { min-width: 0; }
.dlg-title { margin: 0 0 6px; font-size: 24px; line-height: 30px; font-weight: 700; text-wrap: balance; }
.dlg-line { font-size: 17px; line-height: 25px; color: var(--ink2); font-weight: 400; }
.dlg-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 26px; }
dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; padding-bottom: calc(28px + var(--bottom)); animation: sheetUp 200ms var(--ease) both; }
dialog.sheet .dlg-btns { flex-direction: column-reverse; }
dialog.sheet .dlg-btns .btn { width: 100%; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Desktop: 900 px and up (container query on #app) ---------- */
@container app (min-width: 900px) {
  .hdr { height: 60px; background: var(--win); border-bottom: 0; }
  .brand-mark svg { width: 28px; height: 28px; }
  .tb-gallery { display: flex; }
  .display { font-size: 34px; line-height: 40px; }
  .title { font-size: 26px; line-height: 32px; }
  .view { max-width: none; padding-block: 0 12px; }
  .only-phone { display: none !important; }

  /* 128 px: the header plus a free strip at the bottom, as in the prototype. */
  .home { flex-direction: row; max-width: none; height: calc(100dvh - 128px - var(--top)); min-height: 560px; }
  .home .sites-panel { order: 0; }
  .home > .panel { flex: 1 1 0; }
  .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .panel-head { flex: none; padding: 0 16px; background: var(--strip); border-bottom: 1px solid var(--line); }
  .panel-body { flex: 1; min-height: 0; overflow-y: auto; }
  .drop-panel .panel-body { display: flex; flex-direction: column; padding: 12px; }
  .drop-panel .drop-zone { flex: 1; }
  .how-foot { flex: none; border-top: 1px solid var(--line); background: var(--strip); }
  .sites-panel .panel-body { padding: 4px 12px 12px; }
  .site-row .when { display: block; }
  .thumb { width: 80px; height: 50px; }
  .home-title, .gallery-link { display: none !important; }

  .wiz { max-width: 760px; margin-inline: auto; height: calc(100dvh - 128px - var(--top)); min-height: 520px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .wiz-head { flex: none; margin: 0; padding: 0 12px 0 16px; background: var(--strip); border-bottom: 1px solid var(--line); }
  .stepper .full { display: flex; align-items: center; gap: 8px; }
  .stepper .short { display: none; }
  .wiz-body { overflow-y: auto; padding: 24px 32px; }
  /* row-reverse: the first button (the main one) sits on the right, Back on the left. */
  .wiz-foot { position: static; flex: none; flex-direction: row-reverse; align-items: center; min-height: 76px; margin: 0; padding: 12px 16px; }
  .wiz-foot .btn { width: auto; }
  .wiz-foot .foot-left { justify-content: flex-start; }
  .wiz-foot .spacer { display: block; flex: 1; }
  .wiz-center { padding: 48px 0; }

  .done-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .qr-card { display: flex; }
  .btn-col { flex-direction: row; flex-wrap: wrap; }
  .btn-col .btn-big { width: auto; padding: 0 24px; }

  .manage { flex-direction: row; height: calc(100dvh - 128px - var(--top)); min-height: 560px; }
  .manage > .panel { flex: 1 1 0; }
  .manage .panel-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

  .signin-card.boxed { padding: 32px; border-radius: 18px; background: var(--panel); box-shadow: var(--dlg-shadow); }
  .signin-card .app-mark { width: 64px; height: 64px; }
}

@container app (max-width: 899.98px) {
  .only-desk { display: none !important; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .view.in-fwd, .view.in-back, .view.out-fwd, .view.out-back, .done-check.grow, dialog.sheet { animation: none; }
  .spin { animation: none; }
  .progress > i, .switch, .switch::after { transition: none; }
}

/* ---------- Drop page additions ----------
   The prototype set these with style attributes and one style block; CSP style-src 'self' allows
   neither, so they live here as classes. */
.fw-400 { font-weight: 400; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.w-full { width: 100%; }
.min0 { min-width: 0; }
.block { display: block; }
.wrap-any { overflow-wrap: anywhere; }
.ui-font { font-family: var(--font-ui); }
.brand-ink { color: var(--brand); }
.pad-list { padding: 16px 8px; }
.bare-fieldset { border: 0; margin: 0; padding: 0; width: 100%; min-width: 0; }
@container app (max-width: 899.98px) { .home.empty .sites-panel { order: 1; } }

/* Starting up: the page waits for the first answer from Drop. */
.boot { display: flex; align-items: center; justify-content: center; min-height: 60vh; color: var(--brand); }

/* Room meter under the drop zone (room left of the storage room). */
.room { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 320px; margin-top: 4px; }
.room .progress { height: 8px; max-width: none; }
.room-line { font-size: 15px; line-height: 20px; font-weight: 400; color: var(--ink2); }
.publish-card .room { max-width: none; }

/* Loading rows in My websites (no shimmer). */
.site-row.ph .thumb, .ph-line { background: var(--strip); box-shadow: none; }
.ph-line { display: block; height: 14px; border-radius: 7px; width: 60%; }
.ph-line + .ph-line { margin-top: 8px; width: 35%; }

/* Online-copy switches on the check screen (GPS and big pictures). */
.opt-box { border-radius: 12px; box-shadow: inset 0 0 0 2px var(--line); }
