/* Clicker website – draft styles. Jack, 12 Oct 2026.
   Mobile first (375 px), then wider screens. System fonts only: nothing external. */

:root {
  --bg: #E8EEF5;          /* 21 Oct: softer page tone (was #F6F8FB) */
  --bg-deep: #DCE5F0;     /* was #EAF0F7 */
  --surface: #F5F8FB;     /* off-white cards (was #FFFFFF) */
  --render-bg: #EEF2F7;    /* matches the render background (was #F5F4F1) */
  --ink: #2A2D32;
  --muted: #596170;
  --line: #CFD9E5;        /* a touch darker so cards still show (was #DCE3EC) */
  --accent: #1769C2;
  --accent-dark: #0F4F99;
  --accent-soft: #E2EFFC;
  --ok: #2E7656;
  --ok-soft: #E3F1EA;
  --warn-bg: #FFFCEF;      /* softened 17 Oct (was #FFF6D6) */
  --warn-line: #EED98A;    /* softened 17 Oct (was #E2B500) */
  --ph: #FFE45C;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 35, 60, .06), 0 6px 20px rgba(20, 35, 60, .07);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- Draft banner ---------- */
.draft-banner {
  background: repeating-linear-gradient(-45deg, #2A2D32 0 14px, #363A41 14px 28px);
  color: #FFE9A8;
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  padding: 8px 16px;
  letter-spacing: .01em;
}

/* ---------- Placeholders ---------- */
mark.ph {
  background: var(--ph);
  color: #3B2A00;
  border: 1px dashed #B88F00;
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 600;
}

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding-top: 10px; padding-bottom: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.1rem; padding: 4px 0; }
.brand img { width: 52px; height: 52px; }
@media (min-width: 900px) { .brand img { width: 64px; height: 64px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.foot-logo { width: 64px; height: 64px; margin-bottom: 10px; }
.brand-banner { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); margin: 0 0 8px; }
.brand-banner img { width: 100%; }
@media (max-width: 600px) {
  /* phones: show just the logo side, the tagline is too small to read */
  .brand-banner img { aspect-ratio: 860 / 347; height: auto; object-fit: cover; object-position: left center; }
}
.nav { display: flex; gap: 4px; overflow-x: auto; width: 100%; padding: 6px 0 10px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem;
  padding: 7px 12px; border-radius: 999px; background: var(--bg);
}
.nav a:hover { background: var(--accent-soft); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn[aria-disabled="true"], .btn:disabled { background: #E3E7ED; color: #5E6672; border-color: #E3E7ED; cursor: not-allowed; }
.btn[data-pay] { flex-direction: column; gap: 0; line-height: 1.2; }
.btn[data-pay] small { font-size: .74rem; font-weight: 600; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Sections ---------- */
section { padding: 44px 0; }
.section-alt { background: var(--bg-deep); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; color: var(--accent-dark); margin-bottom: .6em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.page-head { padding-top: 36px; padding-bottom: 8px; }

/* ---------- Hero ---------- */
.hero { padding: 32px 0 40px; }
.hero-grid { display: grid; gap: 24px; align-items: center; }
.hero h1 span { color: var(--accent); }
.price-badge {
  display: inline-block; background: var(--ink); color: #fff; font-weight: 800;
  border-radius: 999px; padding: 6px 14px; margin-bottom: 14px; font-size: .95rem;
}

/* ---------- Figures (renders) ---------- */
figure { margin: 0; }
.render { background: var(--render-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.render figcaption { font-size: .8rem; color: var(--muted); padding: 6px 12px 8px; background: var(--surface); border-top: 1px solid var(--line); }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .3em; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 14px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 64px; position: relative; margin: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center;
}
.steps strong { display: block; }

/* Product cards (shop) */
.product { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product .render { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.product-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-meta { color: var(--muted); font-size: .92rem; margin: 0; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.price-table td:last-child { text-align: right; font-weight: 800; font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .85rem; letter-spacing: .06em; }
.product .btn-row { margin-top: auto; }
.size-mini { text-decoration: none; color: var(--ink); }
.size-mini .render { margin-bottom: 8px; }
.size-mini strong { display: block; }

/* Deals */
.deal { display: flex; gap: 14px; align-items: flex-start; }
.deal-num { flex: 0 0 auto; font-size: 1.5rem; font-weight: 800; color: var(--accent); min-width: 64px; }

/* Swatches */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.swatch-card { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .85rem; text-align: center; }
.swatch-dot { width: 46px; height: 46px; border-radius: 12px; border: 1px solid rgba(0,0,0,.15); box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-extra { background: var(--accent-soft); color: var(--accent-dark); }

/* Warning and notes */
.warning {
  background: var(--warn-bg); border-left: 6px solid var(--warn-line); border-radius: var(--radius-sm);
  padding: 12px 16px; font-weight: 700; margin: 0 0 1em;
}
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 1em; }
.note-ok { border-left: 6px solid var(--ok); }
.note-accent { border-left: 6px solid var(--accent); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--bg-deep); font-size: .9rem; }
table.data tr:last-child td { border-bottom: 0; }

/* Two paths (how to order) */
.path h3 { display: flex; align-items: center; gap: 10px; }
.path-badge { font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; }
.path ol { padding-left: 1.2em; }
.link-sample { font-family: Consolas, "Courier New", monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: inline-block; word-break: break-all; }

/* FAQ */
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; position: relative; padding-right: 44px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 1.4rem; color: var(--accent); }
details.faq[open] summary::after { content: "–"; }
details.faq .faq-body { padding: 0 16px 6px; }

/* ---------- Builder ---------- */
.builder { display: grid; gap: 20px; }
.preview-panel { position: sticky; top: 98px; z-index: 5; }
.preview-stage {
  background: radial-gradient(120% 90% at 50% 30%, #F7F9FC 0%, var(--render-bg) 70%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.preview-svg { width: 100%; display: flex; justify-content: center; min-height: 70px; align-items: center; }
.preview-svg svg { display: block; height: auto; filter: drop-shadow(0 4px 6px rgba(20, 35, 60, .18)); }
.preview-caption { font-size: .8rem; color: var(--muted); text-align: center; }
.preview-word { font-weight: 800; letter-spacing: .14em; font-size: 1.1rem; min-height: 1.4em; }
.live-price { display: flex; justify-content: space-between; align-items: baseline; background: var(--ink); color: #fff; border-radius: var(--radius-sm); padding: 10px 16px; margin-top: 10px; }
.live-price strong { font-size: 1.5rem; }

.step-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step-box h3 { display: flex; align-items: center; gap: 10px; }
.step-box h3 .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .9rem; flex: 0 0 auto; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg button {
  font: inherit; border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius-sm);
  padding: 10px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink);
}
.seg button .k { font-weight: 800; }
.seg button .p { font-size: .8rem; color: var(--muted); }
.seg button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.word-input {
  width: 100%; font: inherit; font-size: 1.6rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.word-input:focus, .field:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.hint { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.hint-bad { color: #B3261E; font-weight: 600; }
.picker { margin-top: 14px; }
.picker-label { font-weight: 700; font-size: .95rem; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.picker-label span { font-weight: 600; color: var(--muted); }
.sw-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sw {
  position: relative; aspect-ratio: 1; border-radius: 10px; border: 2px solid rgba(0,0,0,.12); cursor: pointer; padding: 0;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.12);
}
.sw[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.sw .x { position: absolute; right: -6px; top: -8px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 800; border-radius: 999px; padding: 1px 4px; }
.key-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.key-tabs button { font: inherit; font-size: .85rem; border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.key-tabs button[aria-pressed="true"] { border-color: var(--ink); }
.key-tabs i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.2); display: inline-block; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { font: inherit; font-weight: 800; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; }
.qty output { min-width: 36px; text-align: center; font-weight: 800; }
.order-list { list-style: none; padding: 0; margin: 0 0 10px; }
.order-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.order-list .desc { font-size: .92rem; }
.order-list .amt { font-weight: 800; text-align: right; }
.order-list .rm { grid-column: 2; justify-self: end; font: inherit; font-size: .8rem; border: 0; background: none; color: var(--accent-dark); text-decoration: underline; cursor: pointer; padding: 0; }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; }
.sum-total { font-size: 1.3rem; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; }
.message-box {
  width: 100%; min-height: 270px; font: inherit; font-size: .95rem; line-height: 1.45; padding: 12px;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); resize: vertical;
}
.field { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
label.lbl { display: block; font-weight: 700; margin: 12px 0 6px; }
.form-grid { display: grid; gap: 0 16px; }
.copy-status { font-size: .9rem; color: var(--ok); font-weight: 700; min-height: 1.3em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #E6EAF0; padding: 36px 0 28px; margin-top: 20px; font-size: .92rem; }
.site-footer a { color: #9CCBFF; }
.site-footer .foot-grid { display: grid; gap: 22px; }
.site-footer h4 { color: #fff; margin: 0 0 8px; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer .warning { color: var(--ink); }
.foot-warning { margin: 18px 0 0; font-weight: 600; }
.foot-bottom { border-top: 1px solid #454A53; margin-top: 18px; padding-top: 14px; color: #B5BCC7; font-size: .85rem; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .sw-row { grid-template-columns: repeat(12, 1fr); }
}
@media (min-width: 900px) {
  body { font-size: 18px; }
  .nav { width: auto; margin-left: auto; padding: 8px 0; }
  .header-inner { padding-bottom: 10px; flex-wrap: nowrap; }
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr 1.15fr; gap: 40px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .builder { grid-template-columns: 1.05fr 1fr; align-items: start; }
  .preview-panel { top: 100px; }
  .site-footer .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  section { padding: 60px 0; }
}
@media (max-width: 899px) {
  /* On phones the header scrolls away and the preview stays in view while picking */
  .site-header { position: static; }
  .preview-panel { top: 0; background: var(--bg); padding: 8px 0 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; box-shadow: 0 6px 10px -8px rgba(20, 35, 60, .25); }
  .preview-stage { padding: 10px 10px 6px; gap: 4px; }
  .preview-caption { display: none; }
  .preview-word { font-size: .95rem; min-height: 1.2em; }
  .preview-svg { min-height: 54px; }
  .live-price { margin-top: 6px; padding: 6px 14px; }
  .live-price strong { font-size: 1.2rem; }
}
.preview-note { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }

/* Send order (21 Oct): the small "Copy the message instead" backup link under the Send button */
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.send-hint { margin-top: 8px; }
