/* Hamropedia — hand-written stylesheet. Tokens first, then layout, components, pages. */

:root {
  --bg: #ffffff;
  --bg-2: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e3e8f0;
  --border-2: #cfd7e3;
  --link: #1d4ed8;
  --accent: #2453c4;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, transparent);
  --accent-light: color-mix(in srgb, var(--accent) 55%, white);
  --focus: color-mix(in srgb, var(--accent) 55%, white);
  --shadow: 0 1px 2px rgb(15 23 42 / 5%), 0 8px 24px -12px rgb(15 23 42 / 16%);
  --shadow-lg: 0 2px 4px rgb(15 23 42 / 5%), 0 24px 48px -24px rgb(15 23 42 / 26%);
  --code-bg: #f1f5f9;

  --blue: #1d4ed8; --blue-bg: #e7eefe;
  --teal: #0e7490; --teal-bg: #e0f3f7;
  --green: #0f7a55; --green-bg: #e0f4ea;
  --violet: #6d3fd6; --violet-bg: #efe8ff;
  --indigo: #3730a3; --indigo-bg: #e8e9fc;
  --amber: #a16207; --amber-bg: #fdf3d7;
  --crimson: #b4122b; --crimson-bg: #fde7ea; /* warnings only */

  --font-body: 'Mukta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', 'Mukta', Georgia, serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --gutter: 16px;
  color-scheme: light;
}

/* Dark theme */
:root[data-theme='dark'] {
  --bg: #0b1120; --bg-2: #0f172a; --surface: #111a2e; --surface-2: #16213a;
  --text: #e8edf6; --text-2: #cbd5e1; --muted: #94a3b8; --border: #1f2a44; --border-2: #2c3a58;
  --link: #93b4ff; --accent: #6f95ff; --accent-ink: #0b1120; --code-bg: #16213a;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -12px rgb(0 0 0 / 60%);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / 30%), 0 24px 48px -24px rgb(0 0 0 / 70%);
  --blue: #93b4ff; --blue-bg: #17264a; --teal: #67d3e8; --teal-bg: #0f2e38;
  --green: #5fd6a4; --green-bg: #12302a; --violet: #c2a8ff; --violet-bg: #2a2045;
  --indigo: #a5b4fc; --indigo-bg: #1e1f4a; --amber: #fbbf5a; --amber-bg: #3a2c10;
  --crimson: #ff8a99; --crimson-bg: #3a1820;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; font-size: 108%; } /* slightly larger text everywhere */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
svg { display: inline-block; vertical-align: middle; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; letter-spacing: -0.015em; margin: 0 0 .5em; font-weight: 650; color: var(--text); }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--font-mono); font-size: .88em; }
:not(pre) > code { background: var(--code-bg); padding: .12em .38em; border-radius: 6px; border: 1px solid var(--border); overflow-wrap: anywhere; }
kbd { background: var(--surface); border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 6px; padding: .05em .4em; }
[lang='ne'] { font-family: 'Mukta', var(--font-body); }
button { font: inherit; color: inherit; }
.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 { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-mid { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { margin-top: clamp(48px, 7vw, 88px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 500; white-space: nowrap; }

.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 1.3rem/1 var(--font-display); letter-spacing: -0.02em; }
.brand b { color: var(--accent); font-weight: 700; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { color: var(--text-2); text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a[aria-current='page'] { color: var(--accent); background: var(--accent-soft); }
.nav-group { position: relative; display: flex; }
.nav-group > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-group .caret { width: 14px; height: 14px; opacity: .7; transition: transform .15s ease; }
.nav-sub { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; display: none; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.nav-sub::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* keeps the menu open while the pointer moves down */
.nav-sub a { display: block; white-space: nowrap; border-radius: 8px; }
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: grid; }
.nav-group:hover .caret, .nav-group:focus-within .caret { transform: rotate(180deg); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; text-decoration: none; font-size: 1.3rem; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 22px; height: 22px; }
.menu-btn { display: none; }
#theme-btn svg + svg { display: none; }
:root[data-theme='dark'] #theme-btn svg:first-child { display: none; }
:root[data-theme='dark'] #theme-btn svg + svg { display: inline-block; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); padding: 4px; border-radius: 999px; }
.seg button { border: 0; background: none; padding: 7px 10px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--text-2); }
.seg button[aria-checked='true'] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .main-nav { position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); display: none; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 8px; border-radius: 10px; font-size: 1.1rem; }
  .nav-group { display: block; }
  .nav-group .caret { display: none; }
  .nav-sub { position: static; display: grid; min-width: 0; padding: 0 0 0 16px; background: none; border: 0; box-shadow: none; }
  .nav-sub a { font-size: 1rem; padding: 10px 8px; color: var(--muted); }
  .header-actions { margin-left: auto; }
}

/* ---------- buttons & chips ---------- */
.btn, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; text-decoration: none; border-radius: 999px; padding: 10px 18px; cursor: pointer; line-height: 1.2; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn svg { width: 18px; height: 18px; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--text-2); }
.btn-lg { padding: 13px 22px; font-size: 1.05rem; }
.text-link { display: inline-block; margin-top: 12px; font-weight: 500; }
.chip { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip-blue { color: var(--blue); background: var(--blue-bg); }
.chip-green { color: var(--green); background: var(--green-bg); }
.chip-violet { color: var(--violet); background: var(--violet-bg); }
.chip-indigo { color: var(--indigo); background: var(--indigo-bg); }
.chip-live { color: var(--accent-ink); background: var(--accent); }
.chip-soft { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.chip-link { text-decoration: none; }
.lang-switch { display: inline-flex; align-items: center; font-size: .85rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; background: var(--surface); }
.lang-switch:hover { background: var(--accent); color: var(--accent-ink); }
.main-nav a[lang='ne'] { font-weight: 700; }
.eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--text-2); line-height: 1.55; max-width: 62ch; }

/* ---------- page head & breadcrumbs ---------- */
.page-head { position: relative; padding: clamp(28px, 5vw, 56px) 0 clamp(64px, 8vw, 110px); background: var(--bg); margin-bottom: clamp(20px, 3vw, 32px); }
.page-head::after { height: clamp(44px, 6vw, 90px); }
.page-head h1 { max-width: 22ch; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 0 0 18px; font-size: .9rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: '/'; margin-left: 8px; color: var(--border-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs li[aria-current] { color: var(--text-2); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- cards ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; height: 100%; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.card-media { display: block; aspect-ratio: 1200 / 630; overflow: hidden; }
.card-media svg { transition: transform .4s ease; }
.card:hover .card-media svg { transform: scale(1.03); }

/* Cover art: the shapes are inline SVG; the colour comes from here, so it follows the accent */
.cover { --tint: var(--accent); position: relative; display: block; overflow: hidden; color: #fff;
  background:
    radial-gradient(70% 90% at 85% 0%, rgb(255 255 255 / 20%), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--tint) 38%, #050a18), var(--tint)); }
.cover svg { display: block; width: 100%; height: 100%; }
.cover .cv-mark { fill: var(--tint); }
.cover .cv-brand { font: 700 30px Georgia, 'Fraunces', serif; fill: #fff; }
.cover .cv-label { font: 700 18px var(--font-body); letter-spacing: 2px; fill: #fff; text-transform: uppercase; }
.cover .cv-word { font-family: var(--font-display); font-weight: 700; letter-spacing: -3px; fill: #fff; fill-opacity: .96; }
/* Devanagari: no negative tracking (it breaks the headline bar), no uppercase or letter-spacing on labels */
:lang(ne) .cover .cv-word { letter-spacing: 0; font-family: 'Mukta', sans-serif; }
:lang(ne) .cover .cv-label { letter-spacing: 0; }
.card-body { display: flex; flex-direction: column; padding: 16px 18px 18px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.card-title { font-size: 1.2rem; margin: 0 0 8px; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ''; position: absolute; inset: 0; }
.card { position: relative; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--text-2); font-size: .98rem; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-date { margin: auto 0 0; font-size: .85rem; color: var(--muted); }
.card-lg .card-title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
.card-lg .card-excerpt { -webkit-line-clamp: 4; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(32px, 6vw, 80px) 0 clamp(90px, 12vw, 170px); background: var(--bg); }
/* Soft mountain range along the bottom of the hero and page headers (colour follows the theme) */
.hero::after, .page-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none;
  height: clamp(70px, 10vw, 150px); background: color-mix(in srgb, var(--accent) 9%, transparent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160' preserveAspectRatio='none'%3E%3Cpath fill-opacity='.55' d='M0 160V96l90-38 70 26 120-62 95 50 85-30 130 58 110-72 120 64 90-24 130 48 120-58 110 40 90-26 90 34v104z'/%3E%3Cpath d='M0 160v-38l110-30 90 22 140-44 120 48 100-20 150 40 130-52 120 46 110-18 140 36 110-30 120 24v66z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160' preserveAspectRatio='none'%3E%3Cpath fill-opacity='.55' d='M0 160V96l90-38 70 26 120-62 95 50 85-30 130 58 110-72 120 64 90-24 130 48 120-58 110 40 90-26 90 34v104z'/%3E%3Cpath d='M0 160v-38l110-30 90 22 140-44 120 48 100-20 150 40 130-52 120 46 110-18 140 36 110-30 120 24v66z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; }
.hero > .wrap, .page-head > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.9rem); max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-panel { display: grid; gap: 16px; }
.today-mini { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.today-mini { display: grid; gap: 2px; position: relative; overflow: hidden; }
.today-mini::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 180px; height: 110px; background: var(--accent); opacity: .08; clip-path: polygon(0 100%, 35% 30%, 50% 55%, 70% 10%, 100% 100%); }
.today-label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.today-mini b { font: 700 clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem)/1.2 'Mukta', sans-serif; color: var(--text); }
.today-mini a { font-size: .92rem; font-weight: 500; margin-top: 8px; }
.popular { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.popular-h { font: 700 .8rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.popular ol { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
.popular li::marker { color: var(--accent); font-weight: 700; }
.popular a { color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.35; }
.popular a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- tool cards ---------- */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: clamp(16px, 2.4vw, 24px); }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.tool-card h2, .tool-card h3 { margin: 0; font-size: 1.35rem; }
.tool-card p { color: var(--text-2); margin: 0; flex: 1; }
.tool-card .btn { align-self: flex-start; margin-top: 8px; }
.tool-num { font: 700 .9rem var(--font-mono); color: var(--accent); }
.tool-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--border-2); font-size: 1rem; }
.tool-demo code { background: none; border: 0; padding: 0; }
.tool-demo b { font-size: 1.2rem; color: var(--accent); }
.suggest { margin-top: 28px; color: var(--muted); }

/* ---------- news ---------- */
.news-lead { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
.news-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.side-h { font-size: 1.1rem; margin-bottom: 10px; }
.headline-list { list-style: none; margin: 0; padding: 0; counter-reset: h; }
.headline-list li { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.headline-list li:last-child { border-bottom: 0; }
.headline-list li > .chip { justify-self: start; }
.headline-list a { font: 650 1.08rem/1.3 var(--font-display); color: var(--text); text-decoration: none; }
.headline-list a:hover { color: var(--accent); }
.headline-list span:last-child { font-size: .85rem; color: var(--muted); }
.side-note { margin: 12px 0 0; font-size: .92rem; color: var(--muted); }
@media (max-width: 860px) { .news-lead { grid-template-columns: 1fr; } }

/* ---------- roadmap band (home) ---------- */
.roadmap-band { margin-top: clamp(48px, 7vw, 88px); padding: clamp(36px, 6vw, 72px) 0; background: linear-gradient(135deg, #0b1120, color-mix(in srgb, var(--accent) 30%, #0b1120)); color: #ece8e1; position: relative; overflow: hidden; }
.roadmap-band::before { content: ''; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(180deg, transparent, rgb(255 255 255 / 3%)); clip-path: polygon(0 100%, 0 60%, 12% 30%, 22% 52%, 36% 8%, 48% 46%, 60% 22%, 72% 50%, 86% 14%, 100% 44%, 100% 100%); }
.roadmap-band h2 { color: #fff; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.roadmap-band p { color: #c9c3b8; max-width: 52ch; }
.roadmap-band .eyebrow { color: color-mix(in srgb, var(--accent) 45%, white); }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; position: relative; }
.band-phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.band-phases a { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 8%); color: #ece8e1; text-decoration: none; font-weight: 500; transition: background .15s ease, transform .15s ease; }
.band-phases a:hover { background: rgb(255 255 255 / 10%); transform: translateX(4px); }
.band-phases span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ph); color: #0f1218; font: 700 .95rem var(--font-mono); flex: none; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; } }

.promise { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 24px; }
.promise h2 { margin-bottom: 8px; }
.promise p { margin: 0; color: var(--text-2); }
.promise ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promise li { display: grid; gap: 4px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.promise b { color: var(--accent); }
.promise span { font-size: .92rem; color: var(--text-2); }
@media (max-width: 860px) { .promise, .promise ul { grid-template-columns: 1fr; } }

.section-lead { color: var(--text-2); max-width: 70ch; margin: -6px 0 20px; }
.build-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.build-grid li { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.build-grid h3 { font-size: 1.15rem; margin: 6px 0 6px; }
.build-grid p { margin: 0; color: var(--text-2); font-size: .98rem; }
.build-n { font: 700 .85rem var(--font-mono); color: var(--accent); }

/* ---------- blog index ---------- */
.blog-tools { display: grid; gap: 16px; margin-bottom: 28px; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); max-width: 560px; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box svg { width: 20px; color: var(--muted); flex: none; }
.search-box input { flex: 1; border: 0; background: none; padding: 13px 0; font: inherit; color: var(--text); outline: none; min-width: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1px solid var(--border-2); background: var(--surface); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--text-2); }
.pill span { color: var(--muted); font-size: .85em; margin-left: 2px; }
.pill[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill[aria-pressed='true'] span { color: inherit; opacity: .7; }
.grid-item[hidden] { display: none; }
.empty { padding: 32px; text-align: center; color: var(--muted); border: 1px dashed var(--border-2); border-radius: var(--radius); }
.banner { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 16px 20px; margin-bottom: 24px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); text-decoration: none; }
.banner strong { color: var(--accent); }

/* ---------- post ---------- */
.post-head { padding-top: clamp(24px, 4vw, 48px); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.post-head h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.1rem); }
.byline { margin: 22px 0 28px; }
.byline p { margin: 0; line-height: 1.4; }
.byline-name { font-weight: 700; }
.byline-name a { color: var(--text); text-decoration: none; }
.byline-meta { font-size: .9rem; color: var(--muted); }
.post-cover { margin: 0 auto clamp(28px, 4vw, 44px); }
.post-cover .cover { width: 100%; border-radius: var(--radius); aspect-ratio: 1200 / 630; }
.post-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.post-layout.no-toc { grid-template-columns: minmax(0, 760px); justify-content: center; }
.toc { position: sticky; top: 90px; font-size: .92rem; }
.toc summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; list-style: none; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--muted); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc li.toc-l3 a { padding-left: 26px; font-size: .88rem; }
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--accent); border-left-color: var(--accent); }
@media (max-width: 980px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; margin-bottom: 28px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .toc summary { margin: 0; }
  .toc details[open] summary { margin-bottom: 8px; }
}
.post-foot { margin-top: 48px; }
.related { margin-top: clamp(48px, 7vw, 80px); }

/* ---------- prose ---------- */
.prose { font-size: 1.125rem; line-height: 1.75; color: var(--text-2); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2em 0 .6em; font-size: clamp(1.5rem, 1.25rem + 1vw, 1.95rem); }
.prose h3 { margin: 1.6em 0 .5em; font-size: 1.3rem; }
.prose h2, .prose h3 { position: relative; scroll-margin-top: 90px; }
.prose .anchor { position: absolute; left: -1.1em; color: var(--border-2); text-decoration: none; opacity: 0; transition: opacity .15s; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.5em 0; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; margin: 1.4em auto; }
.prose figure { margin: 1.6em 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 8px; }
.prose blockquote { margin: 1.6em 0; padding: 14px 20px; border-left: 4px solid var(--border-2); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .callout { border-left-color: var(--accent); background: var(--accent-soft); }
.prose .callout-update { border-left-color: var(--blue); background: var(--blue-bg); }
.prose .callout-glance { border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); }
.prose .callout-glance .glance-h { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.prose .callout-glance ul { margin: 0; }
.prose .callout-tip { border-left-color: var(--green); background: var(--green-bg); }
.prose .callout-warning, .prose .callout-important { border-left-color: var(--crimson); background: var(--crimson-bg); }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.code-block { position: relative; margin: 1.4em 0; }
.code-block pre { margin: 0; padding: 18px 18px 16px; overflow-x: auto; background: #161b24; color: #e6e1d8; border-radius: var(--radius-sm); font-size: .9rem; line-height: 1.6; }
.code-lang { position: absolute; top: 8px; left: 14px; font: 700 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: #8b93a1; }
.code-block pre { padding-top: 30px; }
.copy-code { position: absolute; top: 6px; right: 6px; border: 1px solid #343c4a; background: #1d232e; color: #c9c3b8; font-size: .78rem; padding: 3px 10px; border-radius: 6px; cursor: pointer; }
.copy-code:hover { color: #fff; }
.hljs-keyword, .hljs-built_in { color: #93b4ff; }
.hljs-string { color: #9fe0a8; }
.hljs-comment { color: #7d8594; font-style: italic; }
.hljs-title, .hljs-title.function_ { color: #67d3e8; }
.hljs-number, .hljs-literal { color: #f5c26b; }
.hljs-meta { color: #c2a8ff; }
.hljs-params { color: #e6e1d8; }

/* ---------- share ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.share-label { font-weight: 700; margin-right: 6px; }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; justify-content: center; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); cursor: pointer; text-decoration: none; }
.share a:hover, .share button:hover { color: var(--accent); border-color: var(--accent); }
.share svg { width: 18px; height: 18px; }
.share .copy-link span { font-size: .9rem; font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { margin: clamp(36px, 5vw, 56px) 0; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 15px 44px 15px 18px; font-weight: 700; color: var(--text); position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent); }
.faq details[open] summary::after { content: '–'; }
.faq-a { padding: 0 18px 16px; color: var(--text-2); }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--border); background: var(--bg-2); padding-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-about p { color: var(--muted); max-width: 42ch; margin-top: 14px; }
.footer-h { font: 700 .8rem var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--text-2); text-decoration: none; }
.site-footer ul a:hover { color: var(--accent); text-decoration: underline; }
.social { display: flex; gap: 8px; }
.social a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-2); color: var(--text-2); }
.social a:hover { color: var(--accent); border-color: var(--accent); }
.social svg { width: 18px; height: 18px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px 0 32px; margin-top: 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.footer-base p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- roadmap ---------- */
.rm-hero h1 { max-width: 18ch; }
.rm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; max-width: 720px; }
.rm-stats div { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); display: grid; }
.rm-stats b { font: 700 1.8rem/1.1 var(--font-display); color: var(--text); }
.rm-stats span { font-size: .88rem; color: var(--muted); }
@media (max-width: 600px) { .rm-stats { grid-template-columns: repeat(2, 1fr); } }
.rm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.rm-rules { position: sticky; top: 90px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.rm-rules h2 { font-size: 1.3rem; }
.rm-rules ol { padding-left: 1.2em; margin: 0 0 16px; color: var(--text-2); }
.rm-rules li { margin-bottom: 8px; }
.rm-rules .kind { margin: 2px 0; }
@media (max-width: 980px) { .rm-layout { grid-template-columns: 1fr; } .rm-rules { position: static; order: -1; } }
.phase-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.phase-card a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--ph); color: var(--text); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.phase-card a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.phase-num { font: 700 .82rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.phase-card h3 { margin: 0; font-size: 1.3rem; }
.phase-card p { margin: 0; color: var(--text-2); font-size: .98rem; flex: 1; }
.phase-stats { font-size: .88rem; color: var(--muted); }
.phase-progress { display: block; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.phase-progress span { display: block; height: 100%; width: 0; background: var(--ph, var(--accent)); transition: width .3s ease; }

.phase-big { max-width: 70ch; color: var(--muted); font-style: italic; }
.phase-bar { display: flex; align-items: center; gap: 14px; max-width: 520px; margin-top: 18px; }
.phase-bar .phase-progress { flex: 1; height: 8px; }
.phase-count { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.phase-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.phase-nav { position: sticky; top: 90px; }
.phase-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.phase-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.phase-nav a span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); font: 700 .82rem var(--font-mono); flex: none; }
.phase-nav a:hover { background: var(--surface-2); }
.phase-nav a[aria-current='page'] { background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.phase-nav a[aria-current='page'] span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 980px) {
  .phase-layout { grid-template-columns: 1fr; gap: 20px; }
  .phase-nav { position: static; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .phase-nav ol { grid-auto-flow: column; grid-auto-columns: max-content; }
}
.rm-backbone { margin-bottom: 40px; }
.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.res-pick { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 60%); }
.res p { margin: 0; }
.res-title { font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.res-title a { color: var(--text); text-decoration-color: var(--border-2); }
.res-title a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.res-src { font-size: .88rem; color: var(--muted); }
.res-why { font-size: .93rem; color: var(--text-2); margin-top: 4px !important; }
.res-why b { color: var(--accent); }
.kind { display: inline-block; text-align: center; font: 700 .7rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.k-watch { color: var(--accent); background: var(--accent-soft); }
.k-play { color: var(--violet); background: var(--violet-bg); }
.k-read { color: var(--teal); background: var(--teal-bg); }
.k-code { color: var(--green); background: var(--green-bg); }
.k-paper, .k-book { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.tag-free, .tag-paid { font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; vertical-align: 2px; }
.tag-free { color: var(--green); background: var(--green-bg); }
.tag-paid { color: var(--amber); background: var(--amber-bg); }
.topic-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 22px; }
.topic { scroll-margin-top: 90px; }
.topic-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.topic-head h3 { margin: 0; font-size: 1.2rem; }
.topic-n { font: 700 .85rem var(--font-mono); color: var(--muted); margin-right: 4px; }
.tick { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; cursor: pointer; }
.tick input { appearance: none; -webkit-appearance: none; margin: 0; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--border-2); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.tick input::after { content: ''; width: 12px; height: 7px; border-left: 3px solid var(--accent-ink); border-bottom: 3px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.tick input:checked { background: var(--accent); border-color: var(--accent); }
.tick input:checked::after { opacity: 1; }
.topic.done h3 { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
.pager a { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; }
.pager a span { font-size: .85rem; color: var(--muted); font-weight: 500; }
.pager a:hover { border-color: var(--accent); }
.pager-next { text-align: right; }
@media (max-width: 600px) { .res { grid-template-columns: 1fr; gap: 6px; } .res .kind { justify-self: start; } .pager { grid-template-columns: 1fr; } }

/* ---------- tools ---------- */
.tool-wrap { margin-bottom: clamp(36px, 5vw, 56px); }
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow); }
.tool-options { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 16px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--border-2); position: relative; cursor: pointer; margin: 0; transition: background .2s; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgb(0 0 0 / 25%); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pane { display: flex; flex-direction: column; min-width: 0; }
.pane-label { font-weight: 700; margin-bottom: 8px; }
.pane textarea { width: 100%; min-height: 220px; resize: vertical; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font: 400 1.1rem/1.6 var(--font-mono); }
.pane-out textarea { font: 500 1.35rem/1.6 'Mukta', sans-serif; background: var(--surface-2); }
.pane textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pane-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: .9rem; }
.pane-foot > span { margin-right: auto; }
.pane-foot .btn, .pane-foot .btn-ghost { padding: 8px 14px; font-size: .95rem; }
@media (max-width: 760px) { .panes { grid-template-columns: 1fr; } .pane textarea { min-height: 150px; } }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.examples > span { color: var(--muted); font-weight: 500; }
.ex { border: 1px dashed var(--border-2); background: var(--surface-2); border-radius: 999px; padding: 5px 12px; font: .9rem var(--font-mono); cursor: pointer; color: var(--text-2); }
.ex:hover { border-color: var(--accent); color: var(--accent); }
.cheatsheet { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.cheatsheet summary { font-weight: 700; cursor: pointer; }
.cheat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px; margin-top: 14px; }
.cheat-grid h3 { font: 700 .8rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cheat { width: 100%; border-collapse: collapse; font-size: .98rem; }
.cheat td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.cheat td:last-child { font-size: 1.1rem; }
.seg-lg { display: inline-grid; margin-bottom: 18px; }
.seg-lg button { padding: 10px 18px; }
.tool-note { color: var(--muted); font-size: .92rem; margin: 14px 0 0; }
.tool-explainer { margin-bottom: 8px; }
.related-tools { margin: 40px 0; }
.related-tools h2 { font-size: 1.3rem; }
.tool-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.tool-mini { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); }
.tool-mini span { color: var(--muted); font-size: .92rem; }
.tool-mini:hover { border-color: var(--accent); }

/* date tool */
.today-card { text-align: center; padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface-2); border: 1px solid var(--border); margin-bottom: 20px; }
.today-card p { margin: 0; }
.today-ne { font: 700 clamp(1.8rem, 1.3rem + 2.2vw, 2.8rem)/1.25 'Mukta', sans-serif; color: var(--text); }
.today-en { font-size: 1.1rem; color: var(--text-2); }
.today-time { font: 500 .95rem var(--font-mono); color: var(--muted); margin-top: 6px !important; }
.convert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.convert-card { padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); display: grid; gap: 10px; align-content: start; }
.convert-card h2 { font-size: 1.3rem; margin: 0; }
.convert-card label { font-weight: 500; font-size: .95rem; display: grid; gap: 6px; }
.convert-card input, .convert-card select { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; min-width: 0; }
.bs-selects { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 10px; }
.result { display: block; min-height: 3.4em; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--border-2); }
.result b { display: block; font-size: 1.25rem; color: var(--text); }
.result .ne { font: 500 1.15rem 'Mukta', sans-serif; color: var(--accent); }
.result .warn { display: block; font-size: .85rem; color: var(--crimson); margin-top: 4px; }
@media (max-width: 760px) { .convert-grid { grid-template-columns: 1fr; } .bs-selects { grid-template-columns: 1fr 1fr; } .bs-selects label:nth-child(2) { grid-column: 1 / -1; grid-row: 1; } }
.calendar { margin-top: 24px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { margin: 0 auto 0 4px; font: 700 1.4rem 'Mukta', sans-serif; order: -1; flex: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal-day { display: grid; place-items: center; gap: 0; aspect-ratio: 1 / .9; padding: 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); line-height: 1.1; cursor: pointer; }
.cal-day b { font: 700 clamp(1rem, .8rem + 1vw, 1.35rem) 'Mukta', sans-serif; color: var(--text); }
.cal-day span { font-size: .72rem; color: var(--muted); }
.cal-day.is-sat b { color: var(--accent); }
.cal-day.is-today { background: var(--accent); border-color: var(--accent); }
.cal-day.is-today b, .cal-day.is-today span { color: var(--accent-ink); }
.cal-day.is-sel { box-shadow: 0 0 0 2px var(--text); }
.cal-blank { visibility: hidden; }

/* keyboard tool */
.kb-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.kb-top .seg-lg { margin: 0; }
#kb-text { width: 100%; min-height: 150px; resize: vertical; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font: 500 1.45rem/1.6 'Mukta', sans-serif; }
#kb-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.kb { display: grid; gap: 6px; margin-top: 16px; padding: 10px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.kb-row { display: flex; gap: 6px; }
.kb-row-1 { padding-left: 2.5%; } .kb-row-2 { padding-left: 5%; } .kb-row-3 { padding-left: 8%; }
.kb-key { position: relative; flex: 1 1 0; min-width: 0; height: 56px; display: grid; place-items: center; padding: 0; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); box-shadow: 0 2px 0 var(--border-2); cursor: pointer; color: var(--text); transition: transform .06s ease, background .1s ease; }
.kb-key:hover { border-color: var(--accent); }
.kb-key:active, .kb-key.is-down { transform: translateY(2px); box-shadow: none; background: var(--accent-soft); border-color: var(--accent); }
.kb-main { font: 500 1.35rem/1 'Mukta', sans-serif; }
.kb-alt { position: absolute; top: 4px; right: 6px; font: .72rem/1 'Mukta', sans-serif; color: var(--muted); }
.kb-cap { position: absolute; bottom: 4px; left: 6px; font: .65rem/1 var(--font-mono); color: var(--muted); }
.kb-ctrl .kb-key { font-weight: 700; font-size: .95rem; }
.kb-ctrl .kb-space { flex-grow: 6; }
.kb-ctrl .kb-shift { flex-grow: 2; }
.kb-ctrl .kb-back, .kb-ctrl .kb-enter { flex-grow: 1.4; font-size: 1.2rem; }
.kb-shift[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 640px) {
  .kb-tool { padding: 12px; }
  .kb { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; padding: 6px; margin-inline: -6px; }
  .kb-row { display: contents; }
  .kb-key { height: 48px; border-radius: 7px; }
  .kb-main { font-size: 1.15rem; }
  .kb-cap { display: none; }
  .kb-alt { top: 2px; right: 3px; font-size: .6rem; }
  .kb-ctrl .kb-shift { grid-column: span 3; }
  .kb-ctrl .kb-space { grid-column: span 4; }
  .kb-ctrl .kb-back { grid-column: span 2; }
  .kb-ctrl .kb-enter { grid-column: span 1; }
}

/* age tool */
.age-tool .seg-lg { margin-bottom: 16px; }
.age-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.age-inputs label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.age-inputs input, .age-inputs select { width: 100%; padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font: inherit; min-width: 0; }
.age-inputs .bs-selects { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px; }
.age-inputs [hidden] { display: none !important; }
.age-result { margin-top: 20px; padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface-2); border: 1px solid var(--border); }
.age-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 16px; font: 700 clamp(2.2rem, 1.4rem + 3vw, 3.4rem)/1.1 var(--font-display); color: var(--text); }
.age-big small { font: 500 1rem var(--font-body); color: var(--muted); margin-left: 4px; }
.age-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.age-stats div { display: grid; padding: 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.age-stats b { font: 700 1.35rem var(--font-display); color: var(--accent); overflow-wrap: anywhere; }
.age-stats span { font-size: .85rem; color: var(--muted); }
.age-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--text-2); }
.age-facts li:empty { display: none; }
.age-facts .warn { color: var(--crimson); }
@media (max-width: 640px) { .age-inputs { grid-template-columns: 1fr; } .age-stats { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- static pages ---------- */
.prose .about-photo { float: left; width: 220px; margin: 4px 36px 16px 0; text-align: center; }
.prose .about-photo img { display: block; width: 100%; height: auto; margin: 0; border: 0; border-radius: 22px; background: none; }
.about-photo figcaption { margin-top: 10px; font-weight: 700; color: var(--text); }
.static ul, .static ol { display: flow-root; } /* lists sit beside the photo instead of under it */
.about-photo figcaption span { display: block; font-weight: 400; font-size: .9rem; color: var(--muted); }
@media (max-width: 600px) { .prose .about-photo { float: none; width: 180px; margin: 0 0 24px; } }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 28px; }
.contact-card { display: grid; gap: 4px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); }
.contact-card svg { width: 22px; height: 22px; color: var(--accent); }
.contact-card span { color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.contact-card:hover { border-color: var(--accent); }
.not-found { text-align: center; padding: clamp(48px, 10vw, 120px) 0 0; }
.not-found .lead { margin-inline: auto; }
.nf-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 32px; }
.nf-links a { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); text-decoration: none; color: var(--text); }
.nf-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- cookie consent ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
.consent-inner { max-width: 960px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); }
.consent-inner > div:first-child { flex: 1 1 420px; }
.consent-inner p { margin: 0; font-size: .95rem; color: var(--text-2); }
.consent-h { font-weight: 700; color: var(--text) !important; margin-bottom: 4px !important; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn, .consent-actions .btn-ghost { min-width: 110px; }
.text-btn { border: 0; background: none; padding: 0; color: var(--text-2); cursor: pointer; font: inherit; text-decoration: none; }
.site-footer .text-btn:hover { color: var(--accent); text-decoration: underline; }
.prose .text-btn { color: var(--link); text-decoration: underline; }
@media print { .consent { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .share, .toc, .related, .progress { display: none !important; }
  body { background: #fff; color: #000; }
}
