/* ===== EduTools — design tokens & base ===== */
:root {
	--brand: #4f46e5;
	--brand-soft: #eef2ff;
	--brand-strong: #3730a3;
	--accent: #10b981;
	--bg: #ffffff;
	--surface: #ffffff;
	--surface-2: #f8fafc;
	--text: #0f172a;
	--muted: #64748b;
	--border: #e2e8f0;
	--shadow-sm: 0 1px 2px rgba(15,23,42,.06);
	--shadow-md: 0 8px 24px rgba(15,23,42,.08);
	--radius: 14px;
	--radius-lg: 20px;
	--container: 1200px;
	--font-display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="dark"] {
	--bg: #0b1020;
	--surface: #111733;
	--surface-2: #0f1530;
	--text: #e5e7f5;
	--muted: #94a3b8;
	--border: #1f2547;
	--brand-soft: #1a2150;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; line-height: 1.6; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-strong); background: var(--brand-soft); padding: .35rem .7rem; border-radius: 999px; }
.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; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff; padding: .5rem 1rem; z-index: 9999; }
.skip-link:focus { left: 1rem; top: 1rem; }
.link { color: var(--brand); font-weight: 600; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav__menu { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.site-nav__menu a { color: var(--text); font-weight: 500; font-size: .95rem; }
.site-nav__menu a:hover { color: var(--brand); text-decoration: none; }
.site-nav__toggle { display: none; background: transparent; border: 1px solid var(--border); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; position: relative; }
.hamburger, .hamburger::before, .hamburger::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); width: 20px; height: 2px; background: var(--text); transition: .2s; }
.hamburger { top: 50%; transform: translate(-50%, -50%); }
.hamburger::before { top: -6px; left: 0; transform: none; }
.hamburger::after  { top: 6px;  left: 0; transform: none; }
.theme-toggle { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; font-size: 1.05rem; }

@media (max-width: 820px) {
	.site-nav__toggle { display: inline-block; }
	.site-nav__menu { position: absolute; top: 64px; right: 1rem; left: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); flex-direction: column; padding: 1rem; box-shadow: var(--shadow-md); display: none; }
	.site-nav.is-open .site-nav__menu { display: flex; }
}

/* ===== Hero ===== */
.hero { padding: 5rem 0 4rem; background: radial-gradient(1200px 500px at 50% -200px, var(--brand-soft), transparent 60%); }
.hero__inner { max-width: 820px; margin: 0 auto; text-align: center; }
.hero__title { margin: 1rem 0 1rem; }
.hero__lede { color: var(--muted); font-size: 1.15rem; }
.hero__cta { display: flex; gap: .75rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.1rem; border-radius: 12px; font-weight: 600; font-family: inherit; font-size: .95rem; cursor: pointer; border: 1px solid transparent; transition: transform .08s, background .15s, color .15s, border-color .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); color: #fff; }
.btn--outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }

/* ===== Sections ===== */
.section { padding: 4rem 0; }
.section--alt { background: var(--surface-2); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.section__title { margin: 0; }

/* ===== Cards: tools / categories / posts ===== */
.tool-grid, .post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.tool-card { display: flex; flex-direction: column; gap: .9rem; padding: 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); text-decoration: none; }
.tool-card.is-disabled { opacity: .65; pointer-events: none; }
.tool-card__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); font-size: 1.6rem; }
.tool-card__title { margin: 0 0 .25rem; }
.tool-card__desc { color: var(--muted); margin: 0; font-size: .95rem; }
.tool-card__meta { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip { display: inline-block; padding: .15rem .55rem; font-size: .72rem; font-weight: 600; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.chip--accent { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.chip--muted { background: var(--surface-2); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.cat-card { display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.cat-card__emoji { font-size: 1.8rem; }
.cat-card__name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.cat-card__desc { color: var(--muted); font-size: .9rem; }

.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.post-card__media img { width: 100%; height: 180px; object-fit: cover; }
.post-card__body { padding: 1.1rem; }
.post-card__title { font-size: 1.1rem; margin-bottom: .25rem; }

/* ===== Article ===== */
.article { max-width: 800px; padding-top: 3rem; padding-bottom: 4rem; }
.article__title { margin-bottom: .5rem; }
.article__cover { width: 100%; border-radius: var(--radius); margin: 1rem 0 1.5rem; }
.article__body p, .article__body ul, .article__body ol { font-size: 1.05rem; }

.breadcrumbs { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }

/* ===== Calculators (shortcode-rendered) ===== */
.card-elevated { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.calc__grid { display: grid; gap: 1rem; }
.calc__grid--2 { grid-template-columns: repeat(2, 1fr); }
.calc__grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.calc__grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .calc__grid--3, .calc__grid--4 { grid-template-columns: 1fr 1fr; } }
.calc label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .9rem; color: var(--text); }
.calc input, .calc select { width: 100%; padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.calc input:focus, .calc select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.calc__rows { display: grid; gap: .75rem; margin-bottom: 1rem; }
.calc__row { display: grid; grid-template-columns: 1fr 140px 120px auto; gap: .5rem; align-items: end; }
@media (max-width: 640px) { .calc__row { grid-template-columns: 1fr 1fr; } }
.calc__result { margin-top: 1.25rem; padding: 1.25rem; background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.calc__result-label { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.calc__result-value { margin: .35rem 0 0; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; color: var(--brand-strong); }
.calc__note { margin-top: .75rem; font-size: .8rem; color: var(--muted); }

/* ===== Footer ===== */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
.footer__title { font-size: 1rem; font-family: var(--font-display); margin-bottom: .75rem; }
.footer__menu { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer__menu a { color: var(--muted); }
.footer__menu a:hover { color: var(--brand); }
.site-footer__bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; text-align: center; }

/* ===== Back to top ===== */
.back-to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); cursor: pointer; font-size: 1.1rem; z-index: 60; }
.back-to-top[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
	html { scroll-behavior: auto; }
}
