:root {
  --bg: #f6f2ea; --panel: #fffdf9; --ink: #171512; --muted: #6d655b; --line: #e3dbcd;
  --accent: #8a5a1f; --accent-ink: #fff; --accent-soft: #f1e4cf; --ok: #2f6b3a; --warn: #8a5a00; --err: #a1322b;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(60,40,10,.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141210; --panel: #1d1a17; --ink: #f2ece2; --muted: #a89e90; --line: #2f2a24; --accent: #d9a35a; --accent-ink: #1a1307; --accent-soft: #33281a; --ok: #7fc48a; --warn: #e2b04a; --err: #f08a80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { font-weight: 700; white-space: nowrap; letter-spacing: .01em; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 15px; }
.spacer { flex: 1; }
.credits { font-size: 14px; background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 4px 10px; text-decoration: none; white-space: nowrap; }
h1 { font-size: 28px; line-height: 1.2; margin: 24px 0 8px; }
h2 { font-size: 20px; margin: 24px 0 8px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p.lead { color: var(--muted); margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.thumbs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 10px; padding: 10px 14px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--err); }
button.link { border: 0; background: none; padding: 6px; min-height: 0; color: var(--accent); font-weight: 500; }
button:disabled { opacity: .55; cursor: default; }
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
label .hint { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); min-height: 44px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.body { min-height: 320px; font-family: Georgia, serif; font-size: 16px; }
input[type=checkbox] { width: auto; min-height: 0; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 8px 0 16px; scrollbar-width: none; }
.tabs a { padding: 12px 14px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); }
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.err { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
.findings { list-style: none; padding: 0; margin: 8px 0; } .findings li { padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.product { cursor: pointer; text-align: left; display: block; width: 100%; font-weight: 400; }
.product.on { outline: 2px solid var(--accent); }
.product .icon { font-size: 26px; }
.thumb { aspect-ratio: 3/4; background: var(--accent-soft); border-radius: 10px; overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.land { aspect-ratio: 4/3; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; } .progress > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; z-index: 50; max-width: calc(100% - 32px); box-shadow: var(--shadow); font-size: 15px; }
.toast.err { background: var(--err); color: #fff; }
.section-card summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; }
.section-card summary::-webkit-details-marker { display: none; }
.hero { padding: 32px 0 8px; } .hero h1 { font-size: 36px; }
.steps { counter-reset: s; list-style: none; padding: 0; } .steps li { counter-increment: s; padding: 10px 0 10px 40px; position: relative; } .steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
footer { margin: 48px 0 32px; color: var(--muted); font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-width: 720px) { h1 { font-size: 34px; } .hero h1 { font-size: 46px; } }

/* Keep account/admin navigation usable on narrow phones. */
@media (max-width: 480px) {
  header.top .wrap { flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  header.top .brand { flex: 1 1 calc(100% - 70px); }
  header.top .spacer { display: none; }
  header.top .credits { margin-left: auto; }
}

/* fields the customer still needs to fill in */
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; font-style: italic; }

.terms-dialog{max-width:440px;width:calc(100% - 32px);border:1px solid var(--line);border-radius:14px;padding:20px;background:var(--bg,#fff);color:inherit}
.terms-dialog::backdrop{background:rgba(0,0,0,.45)}
.terms-dialog ul{padding-left:20px}
footer.site{padding:24px 16px 40px;text-align:center}
.check input[type=checkbox]{width:auto;flex:none;margin-top:3px}
[hidden]{display:none!important}

/* Display the server-confirmed account on every signed-in app page. */
header.top .wrap { flex-wrap: wrap; }
.account-status { flex: 1 0 100%; min-width: 0; padding-bottom: 8px; }
.account-identity { display: block; max-width: 100%; color: var(--muted); font-size: 13px; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.account-identity:hover { text-decoration: underline; }
.account-email { color: var(--ink); font-weight: 600; }
