/* Ship Desk — shared styles. Mobile-first (360px), light/dark via tokens. */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f0f0ec;
  --text: #1b1c1e;
  --muted: #5d6068;
  --border: #deded8;
  --accent: #1f5fd1;
  --accent-text: #ffffff;
  --accent-soft: #e6eefc;
  --ok: #1d7a46;
  --ok-soft: #e3f3e9;
  --warn: #8a5a00;
  --warn-soft: #fbf0d9;
  --danger: #b3261e;
  --focus: #1f5fd1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121315;
    --surface: #1b1c1f;
    --surface-2: #24262a;
    --text: #ececea;
    --muted: #a3a6ad;
    --border: #33363c;
    --accent: #7aa7ff;
    --accent-text: #0d1320;
    --accent-soft: #1b2a45;
    --ok: #6fd39a;
    --ok-soft: #173325;
    --warn: #f0c060;
    --warn-soft: #3a2d10;
    --danger: #ff8a80;
    --focus: #7aa7ff;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121315; --surface: #1b1c1f; --surface-2: #24262a; --text: #ececea;
  --muted: #a3a6ad; --border: #33363c; --accent: #7aa7ff; --accent-text: #0d1320;
  --accent-soft: #1b2a45; --ok: #6fd39a; --ok-soft: #173325; --warn: #f0c060;
  --warn-soft: #3a2d10; --danger: #ff8a80; --focus: #7aa7ff; --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin-top: 1.6em; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .9em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
small, .muted { color: var(--muted); }

/* Layout */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); margin-right: auto; }
nav.site a { text-decoration: none; color: var(--muted); font-size: .95rem; padding: 4px 0; }
nav.site a[aria-current="page"] { color: var(--text); font-weight: 600; }
nav.site { display: flex; gap: 2px 14px; flex-wrap: wrap; }
main { padding: 24px 0 48px; }
.lede { font-size: 1.05rem; color: var(--muted); }
footer.site { border-top: 1px solid var(--border); padding: 20px 0 32px; color: var(--muted); font-size: .85rem; }
footer.site p { margin: 0 0 .4em; }

/* Components */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 14px;
  box-shadow: var(--shadow);
}
.note {
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 14px;
}
.note.info { border-left-color: var(--accent); background: var(--accent-soft); }
.note p:last-child, .card p:last-child { margin-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px;
  border-radius: 8px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

label { font-weight: 600; display: block; margin: 0 0 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; display: block; margin-top: 2px; }
input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 160px; resize: vertical; font-family: var(--mono); font-size: .9rem; }
.field { margin: 0 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--accent); }

.tag {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.tag.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

ol.steps, ul.plain { padding-left: 1.3em; margin: 0 0 .9em; }
ol.steps li, ul.plain li { margin-bottom: .35em; }

pre.reply {
  white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px; font-family: var(--mono); font-size: .85rem; margin: 0 0 8px;
}

details { border-top: 1px solid var(--border); padding: 8px 0; }
details > summary { cursor: pointer; font-weight: 600; min-height: 32px; }

/* Decoder */
.result-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.result-head h3 { margin: 0; }

/* Checklist */
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .2s; }
.stage-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.item { padding: 10px 0; border-top: 1px solid var(--border); }
.item:first-of-type { border-top: 0; }
.item .why { font-size: .88rem; color: var(--muted); margin: 4px 0 0 30px; }
.item.done .text { color: var(--muted); text-decoration: line-through; }

/* Pricing */
.tiers { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 20px; }
@media (min-width: 620px) { .tiers { grid-template-columns: 1fr 1fr; } }
.tier .price { font-size: 1.6rem; font-weight: 700; margin: 0 0 4px; }
.tier ul { padding-left: 1.2em; margin: 8px 0 12px; font-size: .93rem; }
.tier.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.status { min-height: 1.5em; font-weight: 600; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media print {
  header.site, footer.site, .no-print { display: none; }
  body { background: #fff; color: #000; }
}
h4 { font-size: .95rem; margin: 1em 0 .35em; }
