/* Stone Oz: clean, Apple-inspired design */
:root {
  --bg: #ffffff; --bg2: #f5f5f7; --card: #ffffff; --ink: #1d1d1f; --ink2: #424245; --muted: #6e6e73;
  --line: #d2d2d7; --line2: #e8e8ed; --accent: #0071e3; --accent-ink: #ffffff; --accent-soft: rgba(0,113,227,.08);
  --ok: #1d8348; --warn: #b25000; --warn-bg: #fff4e5; --shadow: 0 2px 6px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.06);
  --piece: rgba(0,113,227,.16); --piece-line: #0071e3; --glass: rgba(255,255,255,.72);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg2: #101012; --card: #1c1c1e; --ink: #f5f5f7; --ink2: #d2d2d7; --muted: #98989d;
    --line: #3a3a3c; --line2: #2c2c2e; --accent: #2997ff; --accent-ink: #000; --accent-soft: rgba(41,151,255,.12);
    --ok: #30d158; --warn: #ffb340; --warn-bg: #2b2112; --shadow: 0 2px 6px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.5);
    --piece: rgba(41,151,255,.22); --piece-line: #2997ff; --glass: rgba(22,22,24,.72); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg2: #101012; --card: #1c1c1e; --ink: #f5f5f7; --ink2: #d2d2d7; --muted: #98989d;
  --line: #3a3a3c; --line2: #2c2c2e; --accent: #2997ff; --accent-ink: #000; --accent-soft: rgba(41,151,255,.12);
  --ok: #30d158; --warn: #ffb340; --warn-bg: #2b2112; --shadow: 0 2px 6px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.5);
  --piece: rgba(41,151,255,.22); --piece-line: #2997ff; --glass: rgba(22,22,24,.72); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header: frosted glass */
header.top { position: sticky; top: 0; z-index: 20; background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line2); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; border-radius: 6px; }
nav { display: flex; gap: 22px; }
nav a { color: var(--ink2); font-size: .82rem; }
nav a:hover { color: var(--ink); text-decoration: none; }
nav a.on { color: var(--ink); font-weight: 600; }

/* Hero */
.hero { text-align: center; padding: 56px 0 28px; }
.eyebrow { display: inline-block; font-size: .82rem; font-weight: 600; color: var(--accent); margin-bottom: 10px; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.06; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 12px; }
.hero p.sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); margin: 0 auto; max-width: 640px; line-height: 1.4; }
.trust { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: .85rem; color: var(--muted); }
.trust span::before { content: "✓"; color: var(--ok); margin-right: 6px; font-weight: 700; }

/* Tool layout */
.tool { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; margin: 8px 0 40px; }
.panel { background: var(--card); border: 1px solid var(--line2); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.15rem; margin: 0 0 4px; letter-spacing: -0.02em; }
.panel .hint { color: var(--muted); font-size: .86rem; margin: 0 0 14px; }
.step { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg);
  font-size: .75rem; font-weight: 700; align-items: center; justify-content: center; margin-right: 8px; vertical-align: 2px; }
.sec + .sec { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line2); }
.result { position: sticky; top: 72px; }

/* Piece editor */
.piece { background: var(--bg2); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.piece-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.seg { display: flex; flex: 1; background: var(--line2); border-radius: 10px; padding: 2px; gap: 2px; overflow-x: auto; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--ink2); font: inherit; font-size: .78rem; padding: 6px 6px;
  border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.seg button svg { width: 18px; height: 14px; flex: none; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.x { border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; line-height: 1; }
.x:hover { background: var(--line2); color: var(--ink); }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.field label { display: block; font-size: .72rem; color: var(--muted); margin: 0 0 4px 2px; }
.field .inp { position: relative; }
.field input { width: 100%; font: inherit; font-size: 1rem; padding: 10px 30px 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); min-width: 0; -moz-appearance: textfield; }
.field .inp::after { content: "in"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; pointer-events: none; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.adds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pill { font: inherit; font-size: .88rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 980px;
  padding: 8px 14px; cursor: pointer; }
.pill:hover { border-color: var(--ink2); }
.pill.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill.ghost { border-color: transparent; color: var(--accent); background: transparent; }

/* Material chips */
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip { font: inherit; text-align: left; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); border-radius: 14px;
  padding: 10px; cursor: pointer; display: flex; gap: 10px; align-items: center; min-width: 0; }
.chip .sw { width: 30px; height: 30px; border-radius: 8px; flex: none; border: 1px solid rgba(0,0,0,.08); }
.chip b { display: block; font-size: .84rem; font-weight: 600; line-height: 1.2; }
.chip small { display: block; color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.note { color: var(--muted); font-size: .8rem; margin: 10px 2px 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: .88rem; color: var(--ink2); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 26px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
details.adv { margin-top: 12px; font-size: .86rem; }
details.adv summary { cursor: pointer; color: var(--accent); list-style: none; }
details.adv summary::-webkit-details-marker { display: none; }

/* Result */
.answer { text-align: center; padding: 8px 0 14px; }
.answer .lbl { color: var(--muted); font-size: .9rem; }
.answer .num { font-size: clamp(3.6rem, 9vw, 5.2rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; margin: 4px 0; }
.answer .unit { font-size: 1.2rem; font-weight: 600; color: var(--ink2); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 14px; }
.stat { background: var(--bg2); border-radius: 14px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.15rem; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: .72rem; }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; font-size: .86rem; }
.slabs { display: grid; gap: 12px; }
.slabs figure { margin: 0; }
.slabs svg { width: 100%; height: auto; display: block; border-radius: 10px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.12)); }
.slabs figcaption { color: var(--muted); font-size: .76rem; margin-top: 6px; text-align: center; }
.cta-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.fine { color: var(--muted); font-size: .76rem; text-align: center; margin: 12px 0 0; }

/* Mobile sticky answer bar */
.bar { display: none; }

/* Content */
.band { background: var(--bg2); padding: 56px 0; }
.band.white { background: var(--bg); }
h2.big { font-size: clamp(1.6rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 10px; text-align: center; }
p.center { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--card); border-radius: 20px; padding: 22px; color: var(--ink); border: 1px solid var(--line2); display: block; }
a.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.tile { transition: transform .2s, box-shadow .2s; }
.tile .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.tile b { display: block; font-size: 1.05rem; margin-bottom: 4px; letter-spacing: -0.02em; }
.tile span { color: var(--muted); font-size: .88rem; }
.tile .go { display: block; margin-top: 10px; color: var(--accent); font-size: .88rem; }
.tile.soon { opacity: .55; }
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { font-size: 1.6rem; letter-spacing: -0.03em; margin: 36px 0 10px; }
.prose h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.prose p, .prose li { color: var(--ink2); }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 10px 0; }
.prose th, .prose td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.faq details { border-bottom: 1px solid var(--line2); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; }
.page-head { text-align: center; padding: 44px 0 20px; }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
footer { background: var(--bg2); color: var(--muted); font-size: .78rem; padding: 26px 0 40px; border-top: 1px solid var(--line2); }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--ink2); }

@media (max-width: 880px) {
  .tool { grid-template-columns: 1fr; }
  .result { position: static; }
  .tiles { grid-template-columns: 1fr; }
  .bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; align-items: center; justify-content: space-between;
    background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--line2); border-radius: 18px; padding: 10px 14px; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; }
  .bar.hide { opacity: 0; transform: translateY(20px); pointer-events: none; }
  .bar b { font-size: 1.15rem; letter-spacing: -0.02em; }
  .bar span { color: var(--muted); font-size: .78rem; display: block; }
  body.has-bar { padding-bottom: 80px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 36px 0 18px; }
  .panel { padding: 16px; border-radius: 18px; }
  nav { gap: 14px; }
  nav a.hide-sm { display: none; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg button .t { display: none; }
  .seg button { padding: 7px 4px; }
  .seg button[aria-pressed="true"] .t { display: inline; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Roadmap + suggestions */
.road { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.road-card { background: var(--card); border: 1px solid var(--line2); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.road-card b { display: block; font-size: .98rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.road-card span { color: var(--muted); font-size: .84rem; line-height: 1.4; display: block; }
.road-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.road-foot small { color: var(--muted); font-size: .76rem; }
.vote { font: inherit; font-size: .84rem; border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 980px; padding: 6px 12px; cursor: pointer; }
.vote:hover { background: var(--accent-soft); }
.vote[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); cursor: default; }
.suggest { max-width: 720px; margin: 0 auto; }
.suggest h3 { margin: 0 0 4px; font-size: 1.15rem; letter-spacing: -0.02em; }
.suggest textarea, .suggest input { width: 100%; font: inherit; font-size: 1rem; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); resize: vertical; }
.suggest textarea:focus, .suggest input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.suggest-row { display: flex; gap: 8px; margin-top: 8px; }
.suggest-row input { flex: 1; min-width: 0; }
.suggest button[disabled] { opacity: .6; }
.hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 880px) { .road { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .road { grid-template-columns: 1fr; } .suggest-row { flex-direction: column; } }
