/* ==========================================================================
   Rate Atlas — main stylesheet
   Tokens → base → layout → header → home → content → footer → dark mode
   ========================================================================== */

:root {
	--ra-primary: #0e6b62;
	--ra-primary-ink: #ffffff;
	--ra-primary-soft: #e3f3f0;
	--ra-accent: #e8912d;
	--ra-accent-soft: #fdf1e2;
	--ra-ink: #14212b;
	--ra-muted: #5a6b78;
	--ra-bg: #fbfcfc;
	--ra-surface: #ffffff;
	--ra-surface-2: #f2f5f6;
	--ra-tint: #f3f7f6;
	--ra-border: #e1e7eb;
	--ra-radius: 16px;
	--ra-shadow: 0 1px 2px rgba(16, 32, 40, .05), 0 10px 30px -18px rgba(16, 32, 40, .25);
	--ra-shadow-lg: 0 30px 60px -30px rgba(10, 40, 50, .35);
	--ra-max: 1180px;
	--ra-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	--ra-font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Map plugin tokens to theme tokens */
	--rac-primary: var(--ra-primary);
	--rac-primary-ink: var(--ra-primary-ink);
	--rac-primary-soft: var(--ra-primary-soft);
	--rac-accent: var(--ra-accent);
	--rac-accent-soft: var(--ra-accent-soft);
	--rac-ink: var(--ra-ink);
	--rac-muted: var(--ra-muted);
	--rac-bg: var(--ra-bg);
	--rac-surface: var(--ra-surface);
	--rac-surface-2: var(--ra-surface-2);
	--rac-border: var(--ra-border);
	--rac-max: var(--ra-max);
	--rac-radius: var(--ra-radius);
	color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--ra-font); font-size: 16px; line-height: 1.6; color: var(--ra-ink); background: var(--ra-bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--ra-primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--ra-font-display); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--ra-primary) 50%, transparent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--ra-primary) 25%, transparent); }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; left: 12px; top: 12px; z-index: 1000; padding: 10px 16px; background: var(--ra-surface); color: var(--ra-ink); border-radius: 8px; box-shadow: var(--ra-shadow); }

.container { width: 100%; max-width: var(--ra-max); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 800px; }
.section { padding: 64px 0; }
.site-main > .section + .section { padding-top: 0; }
.site-main > .section--tint + .section, .site-main > .section + .section--tint { padding-top: 64px; }
.section--tint { background: var(--ra-tint); border-top: 1px solid var(--ra-border); border-bottom: 1px solid var(--ra-border); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head--center { justify-content: center; text-align: center; }
.section-title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); margin: 0; }
.section-sub { color: var(--ra-muted); margin: 8px 0 0; max-width: 60ch; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ra-primary); margin: 0 0 8px; text-decoration: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; }
.link-arrow svg { transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: filter .15s, background-color .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ra-primary); color: var(--ra-primary-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--ra-surface); color: var(--ra-ink); border-color: var(--ra-border); }
.btn--ghost:hover { border-color: var(--ra-primary); color: var(--ra-primary); }
.btn--light { background: #fff; color: var(--ra-primary); }
.btn--light:hover { filter: brightness(.96); }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--ra-border); background: var(--ra-surface); color: var(--ra-ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--ra-primary); color: var(--ra-primary); }

/* ---------- Header ---------- */
.site-header { position: -webkit-sticky; position: sticky; top: 0; z-index: 100; background: var(--ra-bg); border-bottom: 1px solid var(--ra-border); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 20px -12px rgba(10, 30, 40, .35); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.site-branding { flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ra-ink); font-family: var(--ra-font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand__mark { color: var(--ra-primary); display: inline-flex; }
.custom-logo-link img { max-height: 44px; width: auto; }
.primary-nav { flex: 1; display: flex; justify-content: flex-end; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav > ul { display: flex; align-items: center; gap: 2px; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ra-ink); text-decoration: none; font-weight: 550; font-size: .95rem; white-space: nowrap; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { color: var(--ra-primary); background: var(--ra-primary-soft); }
.primary-nav .menu-item-has-children { display: flex; align-items: center; }
.primary-nav .menu-item-has-children > a { padding-right: 4px; }
.submenu-toggle { display: inline-grid; place-items: center; width: 26px; height: 32px; border: 0; background: transparent; color: var(--ra-muted); cursor: pointer; border-radius: 8px; }
.primary-nav .sub-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; padding: 8px; background: var(--ra-surface); border: 1px solid var(--ra-border); border-radius: 14px; box-shadow: var(--ra-shadow-lg); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 10; }
.primary-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.primary-nav .sub-menu a { padding: 9px 12px; font-weight: 500; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu, .primary-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-header__actions { display: flex; gap: 8px; flex: none; }
.menu-toggle { display: none; }
.menu-toggle__bars { display: grid; gap: 4px; width: 18px; }
.menu-toggle__bars span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.theme-toggle__moon { display: none; }
.header-search { padding: 12px 0 16px; border-top: 1px solid var(--ra-border); }
.header-search .rac-search { max-width: 640px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.hero__bg { position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(900px 420px at 85% 10%, color-mix(in srgb, var(--ra-accent) 16%, transparent), transparent 70%),
		radial-gradient(800px 500px at 0% 0%, color-mix(in srgb, var(--ra-primary) 16%, transparent), transparent 70%),
		linear-gradient(var(--ra-bg), var(--ra-bg));
}
.hero__bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--ra-border) 1px, transparent 1px), linear-gradient(90deg, var(--ra-border) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%); opacity: .7; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--ra-surface); border: 1px solid var(--ra-border); font-size: .82rem; font-weight: 600; color: var(--ra-muted); margin: 0 0 18px; }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: #1fa36b; box-shadow: 0 0 0 4px color-mix(in srgb, #1fa36b 20%, transparent); }
.hero__title { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 18px; max-width: 18ch; }
.hero__text { font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); color: var(--ra-muted); max-width: 54ch; margin: 0 0 26px; }
.hero .rac-search { margin-bottom: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__visual { position: relative; min-height: 380px; display: grid; place-items: center; }
.rate-card { width: min(100%, 360px); padding: 22px; background: var(--ra-surface); border: 1px solid var(--ra-border); border-radius: 22px; box-shadow: var(--ra-shadow-lg); transform: rotate(-2deg); }
.rate-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: .85rem; color: var(--ra-muted); }
.rate-card__tag { padding: 3px 10px; border-radius: 999px; background: var(--ra-accent-soft); color: color-mix(in srgb, var(--ra-accent) 65%, var(--ra-ink)); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.rate-card__big { font-family: var(--ra-font-display); font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; color: var(--ra-primary); font-variant-numeric: tabular-nums; }
.rate-card__label { color: var(--ra-muted); font-size: .85rem; margin-bottom: 14px; }
.rate-card__rows { list-style: none; margin: 0; padding: 0; }
.rate-card__rows li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px dashed var(--ra-border); font-size: .92rem; }
.rate-card__rows b { font-variant-numeric: tabular-nums; }
.rate-card__total { border-top: 2px solid var(--ra-ink) !important; font-weight: 700; }
.rate-card__total b { color: var(--ra-primary); }
.rate-card__bar { display: flex; height: 8px; margin-top: 14px; border-radius: 99px; overflow: hidden; background: var(--ra-surface-2); }
.rate-card__bar span:nth-child(1) { background: var(--ra-primary); }
.rate-card__bar span:nth-child(2) { background: var(--ra-accent); }
.rate-card__bar span:nth-child(3) { background: #7b8ea0; }
.float-chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--ra-surface); border: 1px solid var(--ra-border); box-shadow: var(--ra-shadow); font-size: .85rem; font-weight: 600; }
.float-chip svg { color: var(--ra-primary); }
.float-chip--a { top: 0; left: -8px; }
.float-chip--b { bottom: 8%; right: 0; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 44px 0 0; padding: 0; background: var(--ra-surface); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); box-shadow: var(--ra-shadow); }
.hero-stats > div { padding: 18px 22px; border-left: 1px solid var(--ra-border); }
.hero-stats > div:first-child { border-left: 0; }
.hero-stats dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ra-muted); font-weight: 600; }
.hero-stats dd { margin: 2px 0 0; font-family: var(--ra-font-display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- Tools ---------- */
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool-grid__feature { grid-column: span 2; grid-row: span 2; }
.tool-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; background: var(--ra-surface); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); text-decoration: none; color: var(--ra-ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-card:hover { border-color: var(--ra-primary); box-shadow: var(--ra-shadow); transform: translateY(-2px); }
.tool-card__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ra-primary-soft); color: var(--ra-primary); margin-bottom: 6px; }
.tool-card__title { font-weight: 700; font-size: 1.02rem; }
.tool-card__text { color: var(--ra-muted); font-size: .9rem; }
.tool-grid__feature .tool-card { justify-content: flex-end; padding: 28px; background: linear-gradient(140deg, var(--ra-primary), color-mix(in srgb, var(--ra-primary) 60%, #0b2a3a)); color: #fff; border: 0; min-height: 220px; position: relative; overflow: hidden; }
.tool-grid__feature .tool-card::after { content: "₹"; position: absolute; right: -10px; top: -40px; font-size: 220px; font-weight: 800; line-height: 1; opacity: .08; }
.tool-grid__feature .tool-card__icon { background: rgba(255,255,255,.15); color: #fff; }
.tool-grid__feature .tool-card__title { font-size: 1.5rem; font-family: var(--ra-font-display); }
.tool-grid__feature .tool-card__text { color: rgba(255,255,255,.85); font-size: 1rem; max-width: 36ch; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 26px; background: var(--ra-surface); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); }
.step__num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ra-accent); color: #fff; font-weight: 800; margin-bottom: 14px; }
.step__title { font-size: 1.15rem; }
.step p { color: var(--ra-muted); margin: 0; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 46px; right: -21px; width: 22px; height: 2px; background: var(--ra-border); }

/* ---------- Features ---------- */
.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--ra-accent-soft); color: color-mix(in srgb, var(--ra-accent) 75%, var(--ra-ink)); margin-bottom: 14px; }
.feature__title { font-size: 1.08rem; }
.feature p { color: var(--ra-muted); margin: 0; font-size: .95rem; }

/* ---------- Explainer / FAQ ---------- */
.explainer { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.explainer__copy p { color: var(--ra-muted); font-size: 1.03rem; }
.explainer__copy .section-title { margin-bottom: 16px; }
.faq { background: var(--ra-surface); border: 1px solid var(--ra-border); border-radius: 14px; margin-bottom: 10px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 650; position: relative; }
.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(--ra-primary); transition: transform .2s; }
.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { padding: 0 18px 16px; margin: 0; color: var(--ra-muted); }

/* ---------- CTA band ---------- */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 36px 40px; border-radius: 24px; color: #fff; background: radial-gradient(600px 200px at 90% 0%, color-mix(in srgb, var(--ra-accent) 55%, transparent), transparent), linear-gradient(120deg, var(--ra-primary), color-mix(in srgb, var(--ra-primary) 55%, #0b2a3a)); }
.cta-band__title { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin: 0 0 6px; color: #fff; }
.cta-band p { margin: 0; opacity: .88; }

/* ---------- Posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { display: flex; flex-direction: column; background: var(--ra-surface); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.post-card:hover { border-color: var(--ra-primary); box-shadow: var(--ra-shadow); }
.post-card__thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ra-surface-2); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card__thumb--blank { display: grid; place-items: center; color: color-mix(in srgb, var(--ra-primary) 45%, transparent); background: linear-gradient(135deg, var(--ra-primary-soft), var(--ra-accent-soft)); }
.post-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card__title { font-size: 1.1rem; margin: 0 0 8px; }
.post-card__title a { color: var(--ra-ink); text-decoration: none; }
.post-card__title a:hover { color: var(--ra-primary); }
.post-card__excerpt { color: var(--ra-muted); font-size: .93rem; flex: 1; }
.post-card__meta { font-size: .82rem; color: var(--ra-muted); margin: 0; }
.nav-links, .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ra-border); text-decoration: none; color: var(--ra-ink); background: var(--ra-surface); }
.page-numbers.current { background: var(--ra-primary); color: #fff; border-color: var(--ra-primary); }

/* ---------- Page / article ---------- */
.page-hero { padding: 44px 0 30px; background: linear-gradient(180deg, var(--ra-primary-soft), transparent); border-bottom: 1px solid var(--ra-border); }
.page-title { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem); letter-spacing: -.025em; margin: 0 0 10px; }
.page-sub { color: var(--ra-muted); font-size: 1.08rem; max-width: 65ch; margin: 0; }
.page-hero .eyebrow { margin-bottom: 14px; }
.entry-meta { color: var(--ra-muted); font-size: .92rem; margin: 0; }
.page-hero .kicker { display: inline-block; padding: 8px 0; }
.entry-content { font-size: 1.06rem; overflow-wrap: break-word; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { font-size: 1.6rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.4em; }
.entry-content img { border-radius: 12px; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--ra-accent); color: var(--ra-muted); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--ra-border); text-align: left; }
.entry-content th { background: var(--ra-surface-2); }
.entry-content pre { overflow: auto; padding: 16px; border-radius: 12px; background: var(--ra-surface-2); }
.entry-content .alignwide { max-width: 1100px; }
.is-tool-page .entry-content { font-size: 1rem; }
.article__thumb { margin: 0 0 28px; }
.article__thumb img { border-radius: var(--ra-radius); }
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
.article__body, .sidebar { min-width: 0; }
.sidebar .widget { margin-bottom: 28px; padding: 20px; background: var(--ra-surface); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); }
.widget-title { font-size: 1rem; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li a { display: inline-block; padding: 8px 0; }
.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.tag-list a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--ra-surface-2); text-decoration: none; font-size: .85rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-navigation a { display: block; padding: 16px; border: 1px solid var(--ra-border); border-radius: 14px; text-decoration: none; color: var(--ra-ink); background: var(--ra-surface); font-weight: 600; }
.post-navigation .nav-next { text-align: right; }
.nav-sub { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ra-muted); font-weight: 600; }
.search-form { display: flex; gap: 8px; }
.search-field { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--ra-border); border-radius: 999px; font: inherit; background: var(--ra-surface); color: var(--ra-ink); }
.error-404 { text-align: center; }
.error-404__code { font-family: var(--ra-font-display); font-size: clamp(5rem, 3rem + 8vw, 9rem); font-weight: 900; line-height: 1; margin: 0; background: linear-gradient(135deg, var(--ra-primary), var(--ra-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-404 .rac-search { margin: 24px auto; text-align: left; }

/* Comments */
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 16px; border: 1px solid var(--ra-border); border-radius: 14px; margin-bottom: 12px; background: var(--ra-surface); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 12px; border: 1px solid var(--ra-border); border-radius: 10px; font: inherit; background: var(--ra-surface); color: var(--ra-ink); }
.comment-form textarea, .comment-form input { max-width: 100%; box-sizing: border-box; }
.comment-form .submit { background: var(--ra-primary); color: #fff; border: 0; padding: 12px 22px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; padding: 56px 0 28px; background: #0c1a20; color: #b7c5cd; }
.site-footer a { color: #e2eaee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { color: #fff; }
.site-footer .brand__mark { color: var(--ra-accent); }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.site-footer__about p { margin-top: 14px; max-width: 38ch; font-size: .93rem; }
.site-footer__title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #7f949f; margin: 6px 0 14px; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .93rem; }
.site-footer__bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem; }
.site-footer__bottom p { margin: 0; }
.site-footer__disclaimer { max-width: 80ch; color: #8ea1ab; }

/* ---------- WP core bits ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--ra-muted); text-align: center; }
.sticky .post-card__title::before { content: "★ "; color: var(--ra-accent); }
.bypostauthor > .comment-body { border-color: var(--ra-primary); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.tool-grid { grid-template-columns: repeat(3, 1fr); }
	.tool-grid__feature { grid-column: span 3; grid-row: auto; }
	.feature-grid { grid-template-columns: repeat(2, 1fr); }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
	.menu-toggle { display: inline-grid; }
	.primary-nav { position: fixed; inset: 68px 0 0 0; display: none; padding: 16px 20px 40px; background: var(--ra-bg); overflow-y: auto; z-index: 99; }
	.admin-bar .primary-nav { top: 114px; }
	.nav-open .primary-nav { display: block; animation: ra-slide .2s ease; }
	@keyframes ra-slide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
	.nav-open { overflow: hidden; }
	.primary-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav > ul > li { border-bottom: 1px solid var(--ra-border); }
	.primary-nav a { padding: 14px 6px; font-size: 1.05rem; }
	.primary-nav .menu-item-has-children { flex-wrap: wrap; }
	.primary-nav .menu-item-has-children > a { flex: 1; }
	.submenu-toggle { width: 44px; height: 44px; }
	.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.primary-nav .sub-menu { position: static; flex-basis: 100%; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 10px 12px; display: none; min-width: 0; background: transparent; }
	.primary-nav li.is-open > .sub-menu { display: block; }
	.primary-nav li:hover > .sub-menu { display: none; }
	.primary-nav li.is-open:hover > .sub-menu { display: block; }
	.hero__inner { grid-template-columns: 1fr; }
	.hero__visual { min-height: 0; padding: 30px 0 10px; }
	.float-chip--a { left: 4%; top: 0; }
	.float-chip--b { right: 4%; bottom: -6px; }
	.hero-stats { grid-template-columns: repeat(2, 1fr); }
	.hero-stats > div:nth-child(3) { border-left: 0; }
	.hero-stats > div:nth-child(n+3) { border-top: 1px solid var(--ra-border); }
	.steps { grid-template-columns: 1fr; }
	.step:not(:last-child)::after { display: none; }
	.explainer { grid-template-columns: 1fr; gap: 28px; }
	.post-grid { grid-template-columns: repeat(2, 1fr); }
	.with-sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
	.admin-bar .primary-nav { top: 114px; }
}
@media (max-width: 400px) {
	.site-header__inner { gap: 8px; }
	.site-header__actions { gap: 4px; }
	.icon-btn { width: 40px; height: 40px; }
	.site-branding { min-width: 0; flex: 1; }
	.brand { min-width: 0; font-size: 1.02rem; }
	.brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.brand__mark svg { width: 28px; height: 28px; }
	.custom-logo-link img { max-height: 36px; }
}
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
	.admin-bar .primary-nav { top: 68px; }
	.container { padding: 0 16px; }
	.section { padding: 44px 0; }
	.site-main > .section--tint + .section, .site-main > .section + .section--tint { padding-top: 44px; }
	.hero { padding: 36px 0 28px; }
	.hero__visual { display: none; }
	.hero__actions .btn { flex: 1 1 100%; }
	.tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.tool-grid__feature { grid-column: span 2; }
	.tool-card { padding: 16px; }
	.tool-card__text { display: none; }
	.tool-grid__feature .tool-card__text { display: block; }
	.feature-grid { grid-template-columns: 1fr; }
	.post-grid { grid-template-columns: 1fr; }
	.site-footer__grid { grid-template-columns: 1fr; }
	.cta-band { padding: 28px 22px; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.hero-stats dd { font-size: 1.35rem; }
	.hero-stats > div { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ra-primary: #3fb8a8;
		--ra-primary-ink: #04201c;
		--ra-primary-soft: rgba(63, 184, 168, .12);
		--ra-accent: #f0a54c;
		--ra-accent-soft: rgba(240, 165, 76, .13);
		--ra-ink: #e6edf1;
		--ra-muted: #98a9b5;
		--ra-bg: #0b1317;
		--ra-surface: #111c21;
		--ra-surface-2: #17242a;
		--ra-tint: #0e181c;
		--ra-border: #213139;
		--rac-warn-bg: rgba(240, 165, 76, .12);
		--rac-warn-ink: #f3c27f;
		--rac-up: #f08a62;
		--rac-down: #5fd39b;
		color-scheme: dark;
	}
	:root:not([data-theme="light"]) .theme-toggle__sun { display: none; }
	:root:not([data-theme="light"]) .theme-toggle__moon { display: inline; }
	:root:not([data-theme="light"]) .site-footer { background: #070e11; }
}
:root[data-theme="dark"] {
	--ra-primary: #3fb8a8;
	--ra-primary-ink: #04201c;
	--ra-primary-soft: rgba(63, 184, 168, .12);
	--ra-accent: #f0a54c;
	--ra-accent-soft: rgba(240, 165, 76, .13);
	--ra-ink: #e6edf1;
	--ra-muted: #98a9b5;
	--ra-bg: #0b1317;
	--ra-surface: #111c21;
	--ra-surface-2: #17242a;
	--ra-tint: #0e181c;
	--ra-border: #213139;
	--rac-warn-bg: rgba(240, 165, 76, .12);
	--rac-warn-ink: #f3c27f;
	--rac-up: #f08a62;
	--rac-down: #5fd39b;
	color-scheme: dark;
}
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: inline; }
:root[data-theme="dark"] .site-footer { background: #070e11; }

/* ---------- Theme breadcrumbs ---------- */
.breadcrumbs { margin: 0 0 12px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; column-gap: 4px; font-size: .85rem; line-height: 1.5; color: var(--ra-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
.breadcrumbs li + li::before { content: "›"; margin: 0 6px 0 2px; opacity: .6; }
.breadcrumbs a { color: inherit; text-decoration: none; display: inline-block; padding: 10px 0; margin: -8px 0; }
.breadcrumbs a:hover { color: var(--ra-primary); text-decoration: underline; }
.breadcrumbs li:last-child > span { color: var(--ra-ink); font-weight: 600; }
