/* Yarn portal. System fonts, light and dark, phone first. No external files. */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #1d1b19;
  --muted: #5b5650;
  --line: #d9d2c7;
  --accent: #1f5f4a;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0ea;
  --warn-bg: #fff4d6;
  --warn-ink: #5b4300;
  --bad-bg: #fde6e3;
  --bad-ink: #7a1710;
  --good-bg: #e0f3e6;
  --good-ink: #124a27;
  --focus: #0b57d0;
  --radius: 12px;
  --tap: 48px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --surface: #1f1d19;
    --ink: #f3efe8;
    --muted: #b8b1a6;
    --line: #3a362f;
    --accent: #6cc3a3;
    --accent-ink: #0c1a14;
    --accent-soft: #1d3029;
    --warn-bg: #3a2f10;
    --warn-ink: #ffe29a;
    --bad-bg: #411a16;
    --bad-ink: #ffc9c2;
    --good-bg: #17331f;
    --good-ink: #b9ecc9;
    --focus: #8ab4ff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 1.0625rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 12px; padding-bottom: 56px; outline: none; }
.wide main.wrap { max-width: 1040px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 12px 0 8px; outline: none; }
h2 { font-size: 1.25rem; line-height: 1.25; margin: 28px 0 8px; }
h3 { font-size: 1.05rem; margin: 18px 0 6px; }
p { margin: 0 0 12px; }
a { color: var(--accent); text-underline-offset: 3px; }
a.plain { color: var(--ink); }
.muted, .hint { color: var(--muted); }
.hint { font-size: .95rem; margin: 0 0 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 12px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* header + menu */
#site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.brand { font-weight: 800; font-size: 1.4rem; text-decoration: none; color: var(--accent); letter-spacing: .01em; min-height: var(--tap); display: inline-flex; align-items: center; }
.head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head-right a.plain { min-height: var(--tap); display: inline-flex; align-items: center; }
.switcher { max-width: 190px; }
.site-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.menu summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.nav-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 2px; }
.nav-list a { display: flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.nav-list a[aria-current="page"] { background: var(--accent-soft); font-weight: 700; color: var(--ink); }
.nav-list a:hover { background: var(--accent-soft); }
@media (min-width: 860px) {
  .menu summary { display: none; }
  .nav-list { grid-auto-flow: column; justify-content: start; gap: 4px; margin: 0; padding: 4px 0; }
  .nav-list a { white-space: nowrap; }
}

/* forms */
.field { margin: 0 0 18px; }
label, legend { display: block; font-weight: 600; margin: 0 0 4px; padding: 0; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url], input[type=search], input[type=month], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: 10px; -webkit-appearance: none; appearance: none;
}
select { background-image: none; padding-right: 12px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
input[aria-invalid=true], textarea[aria-invalid=true], select[aria-invalid=true] { border-color: var(--bad-ink); }
.field-error { color: var(--bad-ink); font-size: .95rem; margin: 4px 0 0; }
.field-error:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.choice { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 4px 12px; margin: 0 0 6px; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; }
.choice label { margin: 0; font-weight: 500; flex: 1; min-height: var(--tap); display: flex; align-items: center; }
input[type=radio], input[type=checkbox] { width: 24px; height: 24px; flex: none; accent-color: var(--accent); margin: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; }
.check label { font-weight: 500; margin: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 10px 20px; border-radius: 10px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; border-color: var(--bad-ink); color: var(--bad-ink); }
.btn.danger.solid { background: var(--bad-ink); color: var(--bg); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: .95rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.block { width: 100%; }
/* choosing a file: the real input is hidden (still focusable); its label is the full-size button */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-input:focus-visible + .file-btn { outline: 3px solid var(--focus, #f2b705); outline-offset: 2px; }
.file-btn { margin: 0 0 6px; }
p.label { font-weight: 600; margin: 0 0 4px; }
/* the price block above the sign-up form: one line, the rest behind a tap, so the form starts high on a phone */
.plan-short { margin: 0 0 14px; }
.plan-short .price { font-size: 1.15rem; margin: 0 0 4px; }
.plan-short details { margin: 0; }
.plan-short summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--accent); font-weight: 600; }
.address { overflow-wrap: anywhere; font-weight: 700; }
.q.focus { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.actions .btn { flex: 1 1 140px; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 75%, transparent); padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); margin-top: 8px; }

/* cards, notices, badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.card h2, .card h3 { margin-top: 0; }
.card.next { border: 2px solid var(--accent); }
.notice { border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; border: 1px solid var(--line); background: var(--surface); }
.notice p:last-child { margin-bottom: 0; }
.notice.error { background: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad-ink); }
.notice.good { background: var(--good-bg); color: var(--good-ink); border-color: var(--good-ink); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-ink); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .85rem; font-weight: 700; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--line); }
.badge.good { background: var(--good-bg); color: var(--good-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); }
.loading { color: var(--muted); padding: 24px 0; }
.lead { font-size: 1.15rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
ul.plain, ol.plain { padding-left: 1.2em; margin: 0 0 12px; }
ul.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
ul.tiles a { display: block; padding: 14px; min-height: var(--tap); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; }
ul.tiles a > span:not(.badge) { display: block; font-weight: 400; color: var(--muted); font-size: .95rem; }
pre.pre, .prewrap { white-space: pre-wrap; font: inherit; margin: 0 0 12px; }
pre.code { white-space: pre-wrap; font: .85rem/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-wrap: anywhere; }

/* stage track */
.track { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.track li { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; color: var(--muted); }
.track li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.track li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.track li.current { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.track li.current .dot { border-color: var(--accent); background: var(--surface); }
progress { width: 100%; height: 14px; accent-color: var(--accent); }

/* editors */
.rowset { display: grid; gap: 10px; margin-bottom: 10px; }
.rowitem { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface); }
.rowitem .field { margin-bottom: 10px; }
.rowtools { display: flex; gap: 8px; flex-wrap: wrap; }
.found { border-left: 4px solid var(--accent); padding-left: 12px; }
.q { padding: 16px 0 6px; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; }
.q-text { font-weight: 700; font-size: 1.1rem; }
.photos { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photos li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.photos img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; background: var(--line); }
.tabs { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 14px; border: 2px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); background: var(--surface); }
.tabs a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.record { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface); margin-bottom: 10px; }
.record dl { margin: 0; display: grid; gap: 6px; }
.record dt { font-size: .85rem; color: var(--muted); }
.record dd { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; overflow-wrap: anywhere; }
details.guide { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin: 0 0 10px; }
details.guide summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 700; cursor: pointer; }
details.guide[open] { padding-bottom: 10px; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.data tr { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; background: var(--surface); }
  table.data td { display: flex; gap: 10px; border: 0; padding: 3px 0; }
  table.data td::before { content: attr(data-label); font-weight: 600; min-width: 90px; color: var(--muted); }
}

/* hero on the landing page */
.hero { padding: 20px 0 8px; }
.hero h1 { font-size: 1.9rem; }
.price { font-size: 1.5rem; font-weight: 800; margin: 8px 0; }
.two { display: grid; gap: 14px; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; } .hero h1 { font-size: 2.3rem; } }

/* very short phone screens (iPhone Safari with toolbars) */
@media (max-height: 720px) {
  h1 { font-size: 1.35rem; margin-top: 6px; }
  .head-inner { min-height: 48px; }
  .sticky-actions { position: static; background: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
