/* Layout: feature list on the left, a sticky quote on the right; one column with a fixed total bar on phones */
:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #15171c;
  --muted: #5d6270;
  --line: #e2e4ea;
  --accent: #1f4fd8;
  --accent-soft: #e7edfc;
  --good: #137a4b;
  --good-soft: #e3f4ea;
  --warn: #9a5b00;
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111318; --surface: #191c23; --ink: #eceef3; --muted: #a0a6b4; --line: #2b2f39;
  --accent: #7b9cff; --accent-soft: #1f2a4a; --good: #5fd39a; --good-soft: #15301f; --warn: #f0b860; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #111318; --surface: #191c23; --ink: #eceef3; --muted: #a0a6b4; --line: #2b2f39;
  --accent: #7b9cff; --accent-soft: #1f2a4a; --good: #5fd39a; --good-soft: #15301f; --warn: #f0b860; color-scheme: dark }

* { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
[hidden] { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding-block: 32px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
header.top { display: grid; gap: 10px; margin-bottom: 28px; max-width: 720px; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin: 0; text-wrap: balance; }
.lead { color: var(--muted); margin: 0; max-width: 62ch; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.modules { display: grid; gap: 20px; min-width: 0; }
.module { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.module.key { border-color: var(--accent); }
.mhead { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mhead h2 { font-family: var(--font-display); font-size: 18px; margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mnum { font-family: var(--font-display); color: var(--muted); font-weight: 500; }
.autonote { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 4; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.group-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 6px; }
.badge { font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 999px; }
.mhead p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 58ch; }
.mside { display: grid; justify-items: end; gap: 6px; }
.msub { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; padding: 2px 0; }
.linkbtn:focus-visible, .feat input:focus-visible + .box, button:focus-visible, textarea:focus-visible, input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.feats { list-style: none; margin: 0; padding: 6px 0; }
.feat { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; padding: 12px 20px; cursor: pointer; align-items: start; }
.feat:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.feat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 20px; height: 20px; border: 1.5px solid var(--muted); border-radius: 5px; margin-top: 2px; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.feat input:checked + .box { background: var(--accent); border-color: var(--accent); }
.feat input:checked + .box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--surface); border-bottom: 2px solid var(--surface); transform: rotate(-45deg) translate(1px, -1px); }
.fname { font-weight: 600; }
.fwhat { font-size: 14px; margin-top: 2px; max-width: 62ch; }
.fsolves { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.fsolves b { color: var(--good); font-weight: 600; }
.steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink); }
.steps li::marker { color: var(--accent); font-weight: 600; }
.freq { font-size: 12.5px; color: var(--warn); margin-top: 2px; }
.fprice { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.feat.off .fname, .feat.off .fprice { color: var(--muted); }

aside.quote { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 16px; }
@media (max-width: 900px) { aside.quote { position: static; } }
.quote h3 { font-family: var(--font-display); font-size: 16px; margin: 0; }
.lines { display: grid; gap: 8px; font-size: 14px; }
.line { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.line span:first-child { color: var(--muted); }
.line span:last-child { white-space: nowrap; }
.line.disc span:last-child { color: var(--good); font-weight: 600; }
.total { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 2px; }
.total .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.total .amt { font-family: var(--font-display); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.total .dur { color: var(--muted); font-size: 14px; }
.hint { font-size: 13.5px; border-radius: 10px; padding: 10px 12px; background: var(--accent-soft); color: var(--ink); }
.hint.ok { background: var(--good-soft); }
.toggle { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.toggle input { margin-top: 3px; accent-color: var(--accent); }
.toggle small { display: block; color: var(--muted); }
textarea, input[type="text"] { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; font-size: 14px; background: var(--bg); color: var(--ink); }
textarea { min-height: 64px; resize: vertical; }
label.fl { font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
.btn { appearance: none; border: 0; border-radius: 10px; padding: 12px 16px; font: inherit; font-weight: 600; background: var(--accent); color: var(--surface); cursor: pointer; width: 100%; }
.btn.sec { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn[disabled] { opacity: .55; cursor: default; }
.status { font-size: 13px; color: var(--muted); min-height: 1em; }
.status.ok { color: var(--good); }
.note { font-size: 12.5px; color: var(--muted); }

.mbar { display: none; }
@media (max-width: 900px) {
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .mbar strong { font-family: var(--font-display); font-size: 20px; font-variant-numeric: tabular-nums; }
  .mbar a { color: var(--accent); font-weight: 600; text-decoration: none; }
}

/* Admin page */
.admin-list { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: grid; gap: 8px; }
.card h2 { font-family: var(--font-display); font-size: 17px; margin: 0; }
.card .meta { color: var(--muted); font-size: 13.5px; }
.card ul { margin: 0; padding-left: 18px; font-size: 14px; }
.card .comment { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
