/* One light theme on purpose: the same clean page for every visitor. */
:root {
  color-scheme: light;
  --bg: #ffffff; --soft: #f5f7fa; --text: #0f172a; --muted: #526071; --line: #e2e8f0;
  --accent: #4338ca; --accent-soft: #eef0fd;
  --cta: #4f46e5; --cta-hover: #3730a3; --cta-ink: #ffffff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: #312e81; }
img { max-width: 100%; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header */
.notice { background: var(--soft); color: var(--muted); font-size: 13px; text-align: center; padding: 7px 16px; border-bottom: 1px solid var(--line); }
.header { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo { font-weight: 800; text-decoration: none; color: var(--text); font-size: 19px; letter-spacing: -.01em; }
.logo span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }
nav a[aria-current] { color: var(--text); font-weight: 650; }
.crumbs { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .header { padding-bottom: 10px; }
  .header nav { width: 100%; gap: 6px 18px; }
  .header nav a { white-space: nowrap; }
}

/* Text */
h1 { font-size: clamp(30px, 6.5vw, 42px); line-height: 1.15; letter-spacing: -.02em; margin: 20px 0 10px; }
h2 { font-size: clamp(22px, 4.5vw, 27px); line-height: 1.25; letter-spacing: -.01em; margin: 48px 0 14px; }
h3 { font-size: 19px; line-height: 1.3; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
.lead { font-size: 18px; color: #334155; }
.small, .updated, figcaption { font-size: 14px; color: var(--muted); }
.updated { margin-top: 32px; }
.byline { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; }

/* Offer box with the code */
.offerbox { border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin: 20px 0 28px; background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%), 0 10px 30px rgb(15 23 42 / 7%); }
.ob-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ob-top img { border-radius: 12px; display: block; }
.ob-brand { margin: 0; font-weight: 800; font-size: 18px; line-height: 1.2; }
.ob-label { margin: 0; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.ob-offer { margin: 0; font-size: clamp(25px, 6vw, 32px); font-weight: 800; line-height: 1.15; letter-spacing: -.015em; }
.ob-sub { margin: 6px 0 12px; color: var(--muted); font-size: 16px; }
.ob-checks { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; font-weight: 600; }
.ob-checks li { margin: 0; }
.ob-checks li::before { content: "✓"; color: var(--cta); font-weight: 800; margin-right: 6px; }
.ob-code { display: flex; border: 2px dashed #94a3b8; border-radius: 12px; background: var(--soft); overflow: hidden; }
.codelink { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px; text-decoration: none; color: var(--text); }
.codelink code { font: 800 26px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; cursor: pointer; }
.ob-code button { border: 0; border-left: 2px dashed #94a3b8; background: #fff; color: var(--text); font-family: inherit; font-size: 15px; font-weight: 700; padding: 0 20px; cursor: pointer; }
.ob-code button:hover { background: var(--accent-soft); }
.ob-small { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }

/* Buttons */
.cta { display: block; margin-top: 12px; padding: 16px 20px; border-radius: 12px; background: var(--cta); color: var(--cta-ink);
  text-align: center; text-decoration: none; font-weight: 800; font-size: 18px; line-height: 1.2; }
.cta:hover { background: var(--cta-hover); color: var(--cta-ink); }
.cta-inline { max-width: 420px; margin: 20px auto 0; }

/* Table of contents */
.toc { display: block; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 8px; font-size: 15px; }
.toc p { margin: 0 0 6px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }
@media (max-width: 480px) { .toc ol { columns: 1; } }

/* Tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 16px; background: #fff; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { background: var(--soft); font-weight: 650; }
.kv th { width: 38%; }

/* Lists */
ol.numbered { list-style: none; counter-reset: n; padding: 0; margin: 20px 0; }
ol.numbered > li { counter-increment: n; position: relative; padding-left: 50px; margin-bottom: 20px; }
ol.numbered > li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 16px; }
ol.numbered h3 { margin: 4px 0 4px; font-size: 18px; }
ol.numbered p { margin: 0; }
ol.steps li { margin-bottom: 10px; }
ul.checks { list-style: none; padding: 0; }
ul.checks li { position: relative; padding-left: 32px; margin-bottom: 10px; }
ul.checks li::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; }

/* Pros and cons */
.proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pc { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.pc ul { list-style: none; padding: 0; margin: 0; }
.pc li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.pc-title { margin: 0 0 8px; font-weight: 800; }
.pros li::before { content: "+"; position: absolute; left: 4px; font-weight: 800; color: #4f46e5; }
.cons li::before { content: "−"; position: absolute; left: 4px; font-weight: 800; color: #b42318; }

/* Boxes */
.callout { background: #fffaeb; border: 1px solid #fde7b0; border-radius: 12px; padding: 14px 16px; margin: 20px 0; }
details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 8px 0; background: #fff; }
details[open] { background: var(--soft); }
summary { font-weight: 650; cursor: pointer; }
details p { margin: 10px 0 0; }
.author { display: flex; gap: 14px; align-items: flex-start; margin: 36px 0 0; padding: 18px; background: var(--soft); border-radius: var(--radius); }
.author .avatar { width: 48px; height: 48px; font-size: 15px; background: #fff; }
.author p { margin: 0 0 6px; }
.endcta { margin: 28px 0 0; padding: 22px 20px; border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.endcta p { margin: 0; }
.endcta > p:first-child { font-size: 20px; }
.endcta .cta { max-width: 420px; margin: 12px auto 10px; }

/* Screenshots */
.shot { margin: 20px 0; }
.shot img { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; border-radius: 12px; border: 1px solid var(--line); }
.shot figcaption { text-align: center; margin-top: 6px; }
.shot.wide img { max-width: 100%; }
.shot.screen img { max-width: 520px; }
.shot-placeholder { aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center; padding: 16px; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); background: var(--soft); }

/* Perks component (kept for inner pages) */
.perks ul { padding-left: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 24px 0 8px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.stat strong { display: block; font-size: 26px; line-height: 1.1; color: var(--accent); }
.stat span { font-size: 14px; color: var(--muted); }

/* Footer */
footer { margin-top: 48px; padding: 24px 0; border-top: 1px solid var(--line); background: var(--soft); font-size: 14px; color: var(--muted); }

/* Copy toast and the mobile sticky button */
.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: #fff; font-size: 15px; text-align: center; }
.stickycta { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: 80px; }
  .stickycta { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; padding: 14px 16px;
    border-radius: 12px; background: var(--cta); color: var(--cta-ink); font-weight: 800; text-align: center;
    text-decoration: none; box-shadow: 0 8px 24px rgb(15 23 42 / 25%); transition: transform .2s ease, visibility .2s; }
  .stickycta.hide { transform: translateY(160%); visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .stickycta { transition: none; } }
