:root {
  --violet: #6c4cf1;
  --violet-dark: #5233d6;
  --violet-soft: #efeaff;
  --coral: #ff7a59;
  --coral-soft: #fff0eb;
  --teal: #19b6a4;
  --teal-soft: #e3f8f5;
  --sun: #ffc83d;
  --ink: #221b3a;
  --muted: #62597c;
  --bg: #fbf9ff;
  --card: #ffffff;
  --line: #e6e0f5;
  --ok: #effaf3;
  --ok-line: #a6dfb8;
  --bad: #fff1f1;
  --bad-line: #f1b4b4;
  --r: 18px;
  --shadow: 0 10px 30px rgba(84, 56, 190, 0.10);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --math: "Cambria Math", "STIX Two Math", "Latin Modern Math", "Times New Roman", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.7; font-size: 17px; -webkit-font-smoothing: antialiased; }
a { color: var(--violet); }
a:hover { color: var(--violet-dark); }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header (menu is always visible) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 68px; gap: 6px 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; }
.logo-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--violet), #9a7bff); display: grid; place-items: center; box-shadow: 0 6px 14px rgba(108,76,241,.35); flex: 0 0 auto; }
.logo b { color: var(--violet); }
nav#nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
nav#nav a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: .95rem; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
nav#nav a:hover { background: var(--violet-soft); color: var(--violet-dark); }
nav#nav a.cta { background: var(--violet); color: #fff; margin-left: 6px; box-shadow: 0 6px 14px rgba(108,76,241,.3); }
nav#nav a.cta:hover { background: var(--violet-dark); color: #fff; }
@media (max-width: 900px) {
  .site-header .wrap { padding-top: 8px; padding-bottom: 0; }
  nav#nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; padding: 4px 0 10px; margin: 0 -4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav#nav::-webkit-scrollbar { display: none; }
  nav#nav a { background: var(--violet-soft); color: var(--violet-dark); }
  nav#nav a.cta { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #e5dcff 0%, transparent 60%), radial-gradient(800px 420px at -8% 45%, #ffe6dc 0%, transparent 60%), var(--bg); padding: 54px 0 120px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); color: var(--violet-dark); font-weight: 700; font-size: .86rem; padding: 7px 14px; border-radius: 999px; box-shadow: 0 4px 12px rgba(108,76,241,.08); }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; margin: 18px 0 14px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--violet), var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 33em; margin: 0 0 24px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; padding: 13px 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--violet); color: #fff; box-shadow: 0 10px 22px rgba(108,76,241,.35); }
.btn-primary:hover { background: var(--violet-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--violet-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 26px; padding: 0; list-style: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.chips li::before { content: "✓"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: .8rem; font-weight: 800; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art svg { width: min(100%, 430px); height: auto; filter: drop-shadow(0 24px 30px rgba(84,56,190,.22)); }
.float { animation: bob 5s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.float.d2 { animation-delay: -1.5s; animation-duration: 6s; }
.float.d3 { animation-delay: -3s; animation-duration: 4.5s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.blink { animation: blink 5s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .float, .blink { animation: none; } html { scroll-behavior: auto; } .rate-face.pop { animation: none; } }

/* ---------- Calculator card ---------- */
.calc-wrap { margin-top: -86px; position: relative; z-index: 5; }
.calc { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: var(--shadow); }
.calc h2 { margin: 0 0 4px; font-size: 1.5rem; letter-spacing: -.02em; }
.calc .sub { margin: 0 0 18px; color: var(--muted); }
[role="tablist"] { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--violet-soft); padding: 6px; border-radius: 16px; margin-bottom: 20px; }
[role="tab"] { font: inherit; font-weight: 700; font-size: .9rem; line-height: 1.25; cursor: pointer; padding: 11px 6px; border-radius: 12px; border: 0; background: transparent; color: var(--violet-dark); transition: background .15s, box-shadow .15s; }
[role="tab"]:hover { background: rgba(255,255,255,.65); }
[role="tab"][aria-selected="true"] { background: #fff; box-shadow: 0 4px 12px rgba(108,76,241,.18); }
:focus-visible { outline: 3px solid #a995ff; outline-offset: 2px; }
.hint { color: var(--muted); margin: 0 0 6px; font-size: .98rem; }
.row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.sep { font-weight: 800; font-size: 1.5rem; color: var(--coral); padding-bottom: 8px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: .84rem; font-weight: 700; color: var(--muted); }
label.field small { font-weight: 600; }
input[type="text"] { font: inherit; font-size: 1.1rem; font-weight: 700; width: 120px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input[type="text"]:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.link-btn { font: inherit; font-weight: 700; background: none; border: 0; color: var(--violet); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
.btn-sm { padding: 11px 22px; }

.result { margin-top: 18px; border-radius: 18px; }
.result-ok { background: var(--ok); border: 2px solid var(--ok-line); padding: 18px 20px; }
.result-error { background: var(--bad); border: 2px solid var(--bad-line); padding: 14px 18px; }
.oops { margin: 0; font-weight: 600; }
.answer { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.answer-label { background: var(--teal); color: #fff; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; }
.answer-value { font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
.answer-sub { margin: 6px 0; }
.steps-title { margin: 18px 0 10px; font-size: 1.05rem; }
ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; }
ol.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--ok-line); border-radius: 14px; padding: 11px 14px; }
ol.steps li::before { content: counter(s); flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--violet); color: #fff; font-weight: 800; font-size: .9rem; display: grid; place-items: center; margin-top: 1px; }
ol.steps li span { min-width: 0; overflow-wrap: anywhere; }
table.mini { border-collapse: collapse; margin: 10px 0; width: 100%; max-width: 420px; background: #fff; border-radius: 12px; overflow: hidden; }
table.mini th, table.mini td { border: 1px solid var(--ok-line); padding: 8px 14px; text-align: left; }
table.mini th { background: #dff3e6; }
.bars { display: grid; gap: 8px; margin: 10px 0; }
.bar-row { display: grid; grid-template-columns: 54px 1fr 64px; align-items: center; gap: 10px; }
.bar { height: 16px; background: #fff; border-radius: 99px; overflow: hidden; border: 1px solid var(--ok-line); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--coral)); border-radius: 99px; }
.bar-name { font-weight: 700; color: var(--muted); }
.bar-val { font-weight: 800; text-align: right; }

/* ---------- Maths form ---------- */
.math { margin-top: 6px; background: #fffdf5; border: 2px dashed #f0d98a; border-radius: 16px; padding: 4px 18px 14px; overflow-x: auto; }
.math .steps-title { margin-top: 14px; }
.m-row { font-family: var(--math); font-size: 1.28rem; line-height: 2.1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .4em; color: #2b2347; padding: 2px 0; border-bottom: 1px dotted #ecdca0; }
.m-row:last-child { border-bottom: 0; }
.m-row i { font-style: italic; color: var(--violet-dark); }
.m-row strong { color: #0f7a6d; }
.m-row small { font-family: var(--font); font-size: .78rem; color: var(--muted); }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .15em; line-height: 1.25; text-align: center; }
.frac > span:first-child { padding: 0 .35em .05em; border-bottom: 1.5px solid currentColor; }
.frac > span:last-child { padding: .05em .35em 0; }

/* ---------- Rating ---------- */
.rate-card { display: grid; grid-template-columns: auto 1fr minmax(210px, 280px); gap: 14px 26px; align-items: center; margin-top: 24px; padding: 20px 24px; border-radius: 22px; background: linear-gradient(120deg, var(--coral-soft), var(--violet-soft)); border: 1px solid var(--line); }
.rate-face { font-size: 3.4rem; line-height: 1; width: 86px; height: 86px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 8px 18px rgba(84,56,190,.15); }
.rate-face.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.rate-mid h3 { margin: 0 0 4px; font-size: 1.12rem; letter-spacing: -.01em; }
#rate { display: flex; gap: 2px; margin: 2px -3px; }
#rate button { border: 0; background: none; cursor: pointer; padding: 3px; line-height: 0; border-radius: 10px; transition: transform .12s; }
#rate button svg { fill: #ddd6f0; stroke: #cfc6ea; stroke-width: 1; transition: fill .12s; }
#rate button.on svg { fill: var(--sun); stroke: #e3a900; }
#rate button:hover { transform: translateY(-2px) scale(1.12); }
#rate-label { margin: 0; font-weight: 800; color: var(--violet-dark); min-height: 1.6em; }
#rate-msg { margin: 2px 0 0; font-size: .9rem; color: var(--muted); min-height: 1.4em; }
.rate-note { grid-column: 1 / -1; margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }
.rate-stats { background: rgba(255,255,255,.75); border-radius: 16px; padding: 12px 16px; font-size: .88rem; }
.rs-empty { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }
.rs-top { display: flex; align-items: baseline; gap: 8px; }
.rs-avg { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.rs-of { color: var(--muted); font-weight: 700; }
.rs-count { margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.rs-row { display: grid; grid-template-columns: 26px 1fr 28px; gap: 8px; align-items: center; font-weight: 700; color: var(--muted); }
.rs-bar { height: 8px; background: #e9e3f7; border-radius: 99px; overflow: hidden; }
.rs-bar i { display: block; height: 100%; background: var(--sun); border-radius: 99px; }
.rs-n { text-align: right; }
@media (max-width: 760px) {
  .rate-card { grid-template-columns: auto 1fr; padding: 16px; }
  .rate-stats { grid-column: 1 / -1; }
  .rate-face { width: 64px; height: 64px; font-size: 2.4rem; }
}

/* ---------- Content + TOC ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 48px; align-items: start; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.toc h2 { margin: 0 0 8px; font-size: 1.05rem; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 10px; align-items: baseline; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; padding: 6px 10px; border-radius: 10px; }
.toc a::before { content: counter(t); color: var(--violet); font-weight: 800; font-size: .82rem; }
.toc a:hover, .toc a.active { background: var(--violet-soft); color: var(--violet-dark); }
/* TOC sits above the article at full width so the content is never squeezed */
.toc ol { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 12px; }
@media (min-width: 980px) {
  .toc { padding: 18px 22px 14px; }
}
article section { margin-bottom: 42px; }
article h2 { font-size: clamp(1.45rem, 3.2vw, 1.9rem); line-height: 1.25; letter-spacing: -.02em; margin: 0 0 12px; }
article h3 { font-size: 1.2rem; margin: 26px 0 6px; }
article p, article li { max-width: 70ch; }
.example { background: var(--violet-soft); border-left: 5px solid var(--violet); padding: 14px 18px; border-radius: 0 14px 14px 0; margin: 16px 0; }
.tip { background: var(--teal-soft); border-left: 5px solid var(--teal); padding: 14px 18px; border-radius: 0 14px 14px 0; margin: 16px 0; }
.formulas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; padding: 0; list-style: none; margin: 14px 0; }
.formulas li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-weight: 700; text-align: center; font-family: var(--math); font-size: 1.12rem; }
.table-scroll { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; background: #fff; border-radius: 14px; overflow: hidden; font-size: .97rem; min-width: 480px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
table.data th { background: var(--violet-soft); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 14px; margin: 14px 0; }
.mini-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.mini-card b { display: block; margin-bottom: 4px; font-size: 1.05rem; }
.mini-card .ic { font-size: 1.6rem; display: block; margin-bottom: 4px; }
a.mini-card { display: block; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
a.mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cdbfff; color: var(--ink); }
a.mini-card span.go { display: inline-block; margin-top: 6px; color: var(--violet); font-weight: 800; font-size: .92rem; }
details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; margin: 10px 0; }
details[open] { border-color: #cdbfff; box-shadow: 0 6px 16px rgba(108,76,241,.08); }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--violet); font-size: 1.4rem; line-height: 1; font-weight: 800; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 14px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 60px; background: #1f1740; color: #cfc8ea; position: relative; }
.site-footer .wave { position: absolute; left: 0; right: 0; top: -1px; transform: translateY(-99%); line-height: 0; }
.site-footer .wave svg { width: 100%; height: 46px; display: block; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; padding: 40px 0 26px; }
.site-footer .logo { color: #fff; }
.site-footer p { margin: 12px 0 0; font-size: .95rem; max-width: 30em; }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: #cfc8ea; text-decoration: none; font-size: .96rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 26px; font-size: .88rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.free-pill { display: inline-block; background: rgba(255,255,255,.1); color: #fff; padding: 5px 12px; border-radius: 999px; font-size: .84rem; font-weight: 700; margin-top: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 36px 0 110px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art svg { width: min(78%, 290px); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .calc { padding: 18px 14px; border-radius: 22px; }
  [role="tablist"] { grid-template-columns: 1fr 1fr; }
  input[type="text"] { width: 82px; padding: 11px 10px; }
  .row { gap: 8px; }
  .foot-grid { grid-template-columns: 1fr; }
  .m-row { font-size: 1.12rem; }
}

/* ---------- Blog and inner pages ---------- */
.narrow { max-width: 800px; }
.page-top { padding: 34px 0 10px; background: radial-gradient(900px 360px at 90% -20%, #e5dcff 0%, transparent 60%), radial-gradient(700px 320px at -10% 30%, #ffe6dc 0%, transparent 60%), var(--bg); }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 14px; padding: 0; list-style: none; font-size: .9rem; font-weight: 600; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: #b3a9d6; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--violet-dark); text-decoration: underline; }
.page-top h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); line-height: 1.14; letter-spacing: -.03em; margin: 0 0 10px; font-weight: 800; text-wrap: balance; }
.page-top .lead { color: var(--muted); font-size: 1.12rem; margin: 0 0 14px; max-width: 42em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 22px; font-size: .9rem; font-weight: 700; color: var(--muted); }
.post-meta span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); margin-right: 8px; vertical-align: middle; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; margin: 34px 0 20px; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s, border-color .18s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cdbfff; color: var(--ink); }
.post-art { display: grid; place-items: center; height: 150px; font-family: var(--math); font-size: 3.4rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.art-1 { background: linear-gradient(135deg, #7d5cff, #5233d6); }
.art-2 { background: linear-gradient(135deg, #19b6a4, #0e8c7d); }
.art-3 { background: linear-gradient(135deg, #ff8a6b, #e2563a); }
.art-4 { background: linear-gradient(135deg, #ffc83d, #e8a000); color: #3b2a00; }
.art-5 { background: linear-gradient(135deg, #5b8def, #3a64d1); }
.post-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-body h2, .post-body h3 { margin: 0; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; text-wrap: balance; }
.post-body p { margin: 0; color: var(--muted); font-size: .98rem; }
.post-body .rt { margin-top: auto; padding-top: 6px; font-size: .86rem; font-weight: 800; color: var(--violet); }

.prose { max-width: 740px; margin: 0 auto; padding: 8px 0 10px; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); line-height: 1.25; letter-spacing: -.02em; margin: 40px 0 12px; text-wrap: balance; }
.prose h3 { font-size: 1.2rem; margin: 26px 0 6px; }
.prose p, .prose li { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose .mx { font-family: var(--math); font-size: 1.1em; }
.prose .big-math { font-family: var(--math); font-size: 1.35rem; text-align: center; background: #fffdf5; border: 2px dashed #f0d98a; border-radius: 16px; padding: 14px 16px; margin: 18px 0; overflow-x: auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 .5em; line-height: 2; }
.prose .big-math i { font-style: italic; color: var(--violet-dark); }
.prose .big-math strong { color: #0f7a6d; }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin: 32px 0; padding: 22px 24px; border-radius: 22px; background: linear-gradient(120deg, #efeaff, #fff0eb); border: 1px solid var(--line); }
.cta-box b { display: block; font-size: 1.15rem; margin-bottom: 2px; }
.cta-box p { margin: 0; color: var(--muted); max-width: 34em; }
.related { margin: 46px 0 10px; }
.related h2 { font-size: 1.4rem; margin: 0 0 4px; }
.post-grid.small { margin-top: 16px; }
.post-grid.small .post-art { height: 96px; font-size: 2.2rem; }
.updated { color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) { .cta-box { padding: 18px; } .prose .big-math { font-size: 1.15rem; } }
@media (min-width: 700px) { .post-grid:not(.small) .post-card:first-child { grid-column: span 2; } }
@media (max-width: 560px) { .crumbs li:last-child:not(:first-child):not(:nth-child(2)) { display: none; } }

/* ---------- Single calculator pages ---------- */
.tool-top { margin-top: 26px; position: relative; z-index: 2; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.chip-row a { display: inline-block; text-decoration: none; font-weight: 700; font-size: .92rem; color: var(--violet-dark); background: var(--violet-soft); padding: 8px 14px; border-radius: 999px; }
.chip-row a:hover { background: #e2d9ff; color: var(--violet-dark); }
.chip-label { margin: 22px 0 0; font-weight: 800; font-size: .95rem; color: var(--muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 18px; padding: 0; list-style: none; font-weight: 700; font-size: .92rem; color: var(--muted); }
.pill-row li::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 7px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: .75rem; font-weight: 800; }
