/* financecalc — trustworthy teal/navy tools UI, mobile-first */
:root {
    --bg: #eef4f6;
    --bg-deep: #e4eef1;
    --surface: #ffffff;
    --text: #0c1a22;
    --muted: #3a4f5c;
    --border: #cfdce3;
    --accent: #0c6b78;
    --accent-hover: #09555f;
    --accent-hot: #b45309;
    --accent-hot-hover: #92400e;
    --accent-soft: #e5f3f5;
    --accent-ring: rgba(12, 107, 120, 0.4);
    --header-bg: #062636;
    --header-mid: #0a4554;
    --header-end: #0c6b78;
    --header-gradient: linear-gradient(118deg, var(--header-bg) 0%, var(--header-mid) 48%, var(--header-end) 100%);
    --results-bg: linear-gradient(160deg, #eef8f9 0%, #f4fafb 55%, #ffffff 100%);
    --radius: 10px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(6, 38, 54, 0.06), 0 4px 12px rgba(6, 38, 54, 0.04);
    --shadow-lg: 0 8px 28px rgba(6, 38, 54, 0.1);
    --space: 8px;
    --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Source Sans 3", "Source Sans Pro", ui-sans-serif, system-ui, sans-serif;
    --max: 1120px;
    --prose: 46rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 90% 50% at 10% -10%, rgba(12, 107, 120, 0.09), transparent 55%),
        radial-gradient(ellipse 70% 40% at 100% 0%, rgba(6, 38, 54, 0.06), transparent 50%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 32%, var(--bg) 100%);
    background-attachment: fixed;
    line-height: 1.65;
    min-height: 100vh;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent-hot);
    color: #fff;
    font-weight: 700;
    z-index: 100;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    left: 0.5rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ——— Header / nav ——— */
.site-header {
    background: var(--header-gradient);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 16px rgba(6, 38, 54, 0.28);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--space) * 1.75) calc(var(--space) * 2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--space) * 1.5) calc(var(--space) * 2);
}

.site-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.04em;
    text-decoration: none;
    color: #f0fafb;
    text-shadow: none;
}

.site-logo:hover,
.site-logo:focus {
    color: #ffffff;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--space) * 0.5);
    align-items: center;
}

.site-nav a {
    font-family: var(--font-display);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius-sm);
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 640px) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
        gap: calc(var(--space) * 0.25);
    }

    .site-nav a {
        font-size: 0.8125rem;
        padding: 0.4rem 0.55rem;
        min-height: 2.25rem;
    }
}

/* Hide reserved ad chrome when no unit is pasted — empty blocks
   look like ads-over-content and hurt AdSense inventory-value review. */
.ad-slot:has(.ad-slot__inner:empty) {
    display: none;
}

.ad-slot {
    background: #f8fafb;
    border-bottom: 1px solid var(--border);
}

.ad-slot__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--space) * 1.5) calc(var(--space) * 2);
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.ad-slot--incontent {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: calc(var(--space) * 3);
}

.ad-slot--incontent .ad-slot__inner {
    padding: calc(var(--space) * 2);
}

.ad-slot--sidebar {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    min-height: 250px;
    position: sticky;
    top: calc(var(--space) * 8);
}

.ad-slot--sidebar .ad-slot__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.ad-slot--sidebar:has(.ad-slot__inner:empty) {
    display: none;
    min-height: 0;
}

.site-main {
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--space) * 3) calc(var(--space) * 2) calc(var(--space) * 6);
}

.breadcrumbs {
    margin-bottom: calc(var(--space) * 2);
}

.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--space) * 0.5);
    font-size: 0.875rem;
    color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: calc(var(--space) * 0.5);
    color: #8aa0ad;
}

.breadcrumbs a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ——— Home ——— */
.hero {
    padding: calc(var(--space) * 2) 0 calc(var(--space) * 3.5);
}

.hero__title {
    margin: 0 0 calc(var(--space) * 1);
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.5vw, 2.85rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.08;
    color: var(--header-bg);
}

.hero__tagline {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--muted);
    max-width: 40rem;
    line-height: 1.55;
}

.block {
    margin-bottom: calc(var(--space) * 5);
}

.section-head {
    margin-bottom: calc(var(--space) * 2);
}

.section-head h2 {
    margin: 0 0 calc(var(--space) * 0.5);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--header-bg);
}

.section-head__sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.search-block__label {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--header-mid);
    margin-bottom: calc(var(--space) * 1);
}

.search-block__field {
    max-width: 32rem;
}

.search-block__input {
    width: 100%;
    padding: calc(var(--space) * 1.5) calc(var(--space) * 2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow);
    min-height: 3rem;
}

.search-block__input:focus {
    outline: 2px solid var(--accent-ring);
    outline-offset: 1px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-block__hint {
    display: block;
    margin-top: calc(var(--space) * 1);
    font-size: 0.8125rem;
    color: var(--muted);
}

/* ——— Cards ——— */
.card-grid {
    display: grid;
    gap: calc(var(--space) * 2);
}

.card-grid--categories {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.card-grid--featured,
.card-grid--all,
.card-grid--category {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.category-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: #9ec5cd;
}

.category-card__link {
    display: block;
    padding: calc(var(--space) * 3);
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.category-card__icon {
    display: block;
    font-size: 1.35rem;
    margin-bottom: calc(var(--space) * 1);
    color: var(--accent);
}

.category-card__title {
    margin: 0 0 calc(var(--space) * 1);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--header-bg);
}

.category-card__desc {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--muted);
}

.calc-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.calc-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #9ec5cd;
}

.calc-card__link {
    display: block;
    padding: calc(var(--space) * 2.5);
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.calc-card__title {
    margin: 0 0 calc(var(--space) * 1);
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.calc-card__desc {
    margin: 0 0 calc(var(--space) * 1.5);
    font-size: 0.9375rem;
    color: var(--muted);
}

.calc-card__cta {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calc-card:hover .calc-card__cta {
    color: var(--accent-hover);
}

.no-results {
    text-align: center;
    color: var(--muted);
    margin-top: calc(var(--space) * 2);
}

/* ——— Page intros / layouts ——— */
.page-intro__title {
    margin: 0 0 calc(var(--space) * 1);
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--header-bg);
}

.page-intro__lead {
    margin: 0 0 calc(var(--space) * 3);
    color: var(--muted);
    max-width: 40rem;
    font-size: 1.05rem;
}

.page-intro--center {
    text-align: center;
}

.page-intro--center .page-intro__lead {
    margin-left: auto;
    margin-right: auto;
}

.layout-with-ads {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--space) * 3);
}

@media (min-width: 900px) {
    .layout-with-ads {
        grid-template-columns: minmax(0, 1fr) 300px;
        align-items: start;
    }

    .layout-with-ads:not(:has(.layout-with-ads__sidebar)) {
        grid-template-columns: 1fr;
    }
}

/* ——— Calculator forms ——— */
.calculator-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: calc(var(--space) * 2.5);
    box-shadow: var(--shadow);
}

@media (min-width: 560px) {
    .calculator-shell {
        padding: calc(var(--space) * 3);
    }
}

.calc-form {
    display: grid;
    gap: calc(var(--space) * 2);
}

.calc-row {
    display: grid;
    gap: calc(var(--space) * 1);
}

@media (min-width: 560px) {
    .calc-row--2 {
        grid-template-columns: 1fr 1fr;
    }
}

.calc-form label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
}

.calc-form input,
.calc-form select {
    width: 100%;
    padding: calc(var(--space) * 1.25) calc(var(--space) * 1.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text);
    background: #fff;
    min-height: 2.75rem;
}

.calc-form input:focus,
.calc-form select:focus {
    outline: 2px solid var(--accent-ring);
    outline-offset: 1px;
    border-color: var(--accent);
}

.calc-results {
    margin-top: calc(var(--space) * 2);
    padding: calc(var(--space) * 2) calc(var(--space) * 2.25);
    background: var(--results-bg);
    border-radius: var(--radius);
    border: 1px solid #b8d6dc;
    font-variant-numeric: tabular-nums;
}

.calc-results strong {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--header-mid);
}

.calc-results h2 {
    margin: 0 0 calc(var(--space) * 1);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--header-bg);
}

.calc-results p {
    margin: 0.35rem 0;
    color: var(--muted);
}

.about-block__body,
.category-guide {
    max-width: var(--prose);
}

.about-block__body p,
.category-guide p,
.category-guide__lead {
    margin: 0 0 calc(var(--space) * 1.5);
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.category-guide {
    margin: 0 0 calc(var(--space) * 4);
}

.category-guide__lead {
    color: var(--text);
    font-weight: 600;
}

.how-it-works {
    margin-top: calc(var(--space) * 4);
    padding-top: calc(var(--space) * 3);
    border-top: 1px solid var(--border);
    max-width: var(--prose);
}

.how-it-works h2 {
    margin: 0 0 calc(var(--space) * 1.5);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--header-bg);
}

.how-it-works h3 {
    margin: calc(var(--space) * 2.5) 0 calc(var(--space) * 1);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.how-it-works p,
.how-it-works ul,
.how-it-works ol {
    margin: 0 0 calc(var(--space) * 1.25);
    color: var(--muted);
    font-size: 0.975rem;
    line-height: 1.7;
}

.how-it-works li {
    margin-bottom: 0.4rem;
}

.disclaimer {
    margin-top: calc(var(--space) * 2);
    font-size: 0.8125rem;
    color: var(--muted);
}

.related-block {
    margin-top: calc(var(--space) * 4);
}

.related-block__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 calc(var(--space) * 1);
    color: var(--header-bg);
}

.related-block__list {
    margin: 0;
    padding-left: 1.25rem;
}

.related-block__list a {
    color: var(--accent);
    font-weight: 600;
}

.related-block__list a:hover,
.related-block__list a:focus {
    color: var(--accent-hover);
}

/* ——— Keypads ——— */
.keypad {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: calc(var(--space) * 1);
    max-width: 320px;
    width: 100%;
}

.keypad button {
    padding: calc(var(--space) * 1.75);
    font-size: 1.125rem;
    font-family: var(--font-display);
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    min-height: 3rem;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.keypad button:hover,
.keypad button:focus {
    background: var(--accent-soft);
    border-color: var(--accent);
    outline: none;
}

.keypad button:focus-visible {
    outline: 2px solid var(--accent-ring);
    outline-offset: 1px;
}

.keypad__display {
    grid-column: 1 / -1;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: right;
    padding: calc(var(--space) * 1.5);
    background: linear-gradient(160deg, var(--header-bg) 0%, var(--header-mid) 100%);
    color: #eef8f9;
    border-radius: var(--radius-sm);
    min-height: 3.25rem;
    font-variant-numeric: tabular-nums;
    border: 1px solid var(--header-mid);
}

.keypad--sci {
    max-width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 420px) {
    .keypad--sci {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .keypad button {
        padding: calc(var(--space) * 1.35);
        font-size: 1rem;
        min-height: 2.75rem;
    }
}

.percent-modes {
    display: grid;
    gap: calc(var(--space) * 3);
}

.percent-mode h3 {
    margin: 0 0 calc(var(--space) * 1);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--header-bg);
}

/* ——— Footer ——— */
.site-footer {
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, #f5fafb 0%, #e8f1f3 100%);
    padding: calc(var(--space) * 3.5) calc(var(--space) * 2);
    margin-top: calc(var(--space) * 2);
}

.site-footer__inner {
    max-width: var(--max);
    margin: 0 auto;
}

.site-footer__disclaimer,
.site-footer__copy,
.site-footer__maintain {
    margin: 0 0 calc(var(--space) * 1);
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.55;
    max-width: 48rem;
}

.site-footer__maintain a {
    color: var(--accent);
    font-weight: 600;
}

.site-footer__copy {
    margin: 0;
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--space) * 1.5) calc(var(--space) * 2.5);
    margin-bottom: calc(var(--space) * 2);
}

.site-footer__nav a {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    padding: 0.25rem 0;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ——— Content / guides ——— */
.content-page {
    max-width: var(--prose);
}

.content-prose h2 {
    margin: calc(var(--space) * 3) 0 calc(var(--space) * 1.25);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--header-bg);
}

.content-prose h3 {
    margin: calc(var(--space) * 2.5) 0 calc(var(--space) * 1);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.content-prose p,
.content-prose ul,
.content-prose ol {
    margin: 0 0 calc(var(--space) * 1.25);
    color: var(--muted);
    font-size: 0.975rem;
    line-height: 1.7;
}

.content-prose li {
    margin-bottom: 0.4rem;
}

.content-prose a {
    color: var(--accent);
    font-weight: 600;
}

.content-prose a:hover,
.content-prose a:focus {
    color: var(--accent-hover);
}

.content-prose__related {
    margin-top: calc(var(--space) * 3);
    padding-top: calc(var(--space) * 2);
    border-top: 1px solid var(--border);
}

.card-grid--guides {
    margin-top: calc(var(--space) * 3);
}

.how-it-works h4 {
    margin: calc(var(--space) * 2) 0 calc(var(--space) * 0.75);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.about-block__body a {
    color: var(--accent);
    font-weight: 600;
}

.about-block__body a:hover,
.about-block__body a:focus {
    color: var(--accent-hover);
}

/* Tables — guides + calculator explainers */
.how-it-works table,
.content-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 calc(var(--space) * 1.5);
    font-size: 0.9rem;
    color: var(--muted);
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.how-it-works thead,
.content-prose thead,
.how-it-works tbody,
.content-prose tbody,
.how-it-works tr,
.content-prose tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.how-it-works th,
.content-prose th,
.how-it-works td,
.content-prose td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.how-it-works th,
.content-prose th {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
    background: var(--accent-soft);
}

.how-it-works caption,
.content-prose caption {
    caption-side: bottom;
    padding-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--muted);
    text-align: left;
    display: table-caption;
}

.example-note {
    font-size: 0.875rem;
    color: var(--muted);
    font-style: italic;
    margin: 0 0 calc(var(--space) * 1.25);
    padding: 0.65rem 0.85rem;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Financecalc identity and responsive editorial layout. */
:root {
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #f6f7f3; --surface: #fff; --text: #203a34; --muted: #52655f;
    --header-bg: #123d36; --header-mid: #24564b; --accent: #226549;
    --accent-hover: #123d36; --accent-soft: #edf4e9; --accent-ring: #498265;
    --border: #dce4dc; --results-bg: #edf4e9; --radius: 16px;
    --shadow: 0 3px 14px rgba(25, 55, 43, .025); --max: 1160px;
}
body { background: var(--bg); }
a { color: var(--accent); text-underline-offset: 3px; }
.site-header { background: #fff; border-bottom: 1px solid var(--border); box-shadow: none; }
.site-header__inner { padding-top: 20px; padding-bottom: 20px; }
.site-logo { display: inline-flex; align-items: center; gap: 11px; color: var(--header-bg); font-size: 23px; letter-spacing: -.8px; }
.site-logo:hover, .site-logo:focus { color: var(--accent); }
.site-logo img { flex-shrink: 0; }
.site-logo small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .45px; color: var(--muted); }
.site-nav a { color: var(--text); font-size: 13px; }
.site-nav a:hover, .site-nav a:focus { color: var(--accent); background: var(--accent-soft); }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; padding: 55px 0; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 1.8px; font-size: 11px; font-weight: 750; margin: 0 0 20px; }
.hero__title { font-size: clamp(2.5rem, 4.4vw, 3.6rem); line-height: 1.12; letter-spacing: -2.6px; font-weight: 650; margin-bottom: 22px; }
.hero__tagline { font-size: 17px; max-width: 460px; }
.hero-link { display: inline-flex; gap: 32px; align-items: center; background: var(--header-bg); color: #fff; padding: 13px 20px; border-radius: 8px; margin-top: 26px; text-decoration: none; font-size: 14px; font-weight: 650; }
.hero-link:hover { background: var(--accent); }
.hero-proof { font-size: 11px; margin: 20px 0 0; color: var(--muted); }
.hero-proof span { margin: 0 5px; }
.hero-example { background: #eaf0e4; border: 1px solid #d7e2d0; border-radius: 22px; padding: 30px; position: relative; }
.hero-example .eyebrow { font-size: 10px; }
.hero-example h2 { margin: 14px 0 8px; line-height: 1.3; font-weight: 600; font-size: 23px; letter-spacing: -.6px; }
.hero-example p { color: var(--muted); font-size: 12px; }
.hero-example__number { font-size: 43px; font-weight: 650; letter-spacing: -1.8px; padding: 8px 0 14px; }
.hero-example__number small { font-size: 13px; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.hero-example dl { margin: 0; padding: 15px 0; border-top: 1px solid #ccd8c6; border-bottom: 1px solid #ccd8c6; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-example dt { font-size: 11px; color: var(--muted); }
.hero-example dd { margin: 3px 0 0; font-size: 17px; font-weight: 600; }
.hero-example a { font-size: 12px; font-weight: 650; }
.hero-example .hero-example__note { font-size: 11px; line-height: 1.5; }
.search-block { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 22px 26px; display: flex; align-items: center; gap: 30px; }
.search-block__label { margin: 0; font-size: 16px; }
.search-block__field { flex: 1; max-width: none; }
.search-block__input { background: #f6f7f3; box-shadow: none; border-radius: 8px; }
.search-block__hint { font-size: 11px; }
.section-head h2 { font-size: 23px; font-weight: 650; }
.section-head__sub { font-size: 14px; }
.card-grid--featured, .card-grid--all, .card-grid--guides { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-card__title { font-size: 16px; }
.calc-card__desc, .category-card__desc { font-size: 13px; line-height: 1.7; }
.calc-card__cta { text-transform: none; letter-spacing: 0; font-size: 12px; }
.calc-card__cta::after { content: ' →'; }
.calc-card:hover { border-color: #8caa91; }
.category-card__icon { background: var(--accent-soft); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; }
.category-card__title { font-size: 17px; }
.tool-note { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.calc-tool { max-width: 760px; }
.calc-form input, .calc-form select { background: #fafbf8; }
.calc-results { border-color: #ccdcbc; padding: 24px; }
.calc-results strong { font-size: 27px; }
.content-page { margin: 16px auto 0; }
.page-intro { margin-top: 18px; }
.content-prose, .how-it-works { line-height: 1.8; }
.site-footer { background: #edf1e9; padding-top: 40px; }
.keypad__display { overflow-wrap: anywhere; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 4px; }
@media (max-width: 800px) {
    .hero { gap: 28px; grid-template-columns: 1fr 1fr; }
    .hero__title { font-size: 38px; letter-spacing: -1.8px; }
    .card-grid--featured, .card-grid--all, .card-grid--guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-example { padding: 22px; }
}
@media (max-width: 600px) {
    .site-header__inner { gap: 18px; }
    .site-nav { justify-content: space-between; }
    .site-nav a { font-size: 12px; padding: 5px; }
    .hero { grid-template-columns: 1fr; padding: 24px 0 32px; gap: 30px; }
    .hero__title { font-size: 39px; }
    .hero-example { padding: 24px; }
    .search-block { display: block; padding: 20px; }
    .search-block__label { margin-bottom: 12px; }
    .card-grid--featured, .card-grid--all, .card-grid--guides { grid-template-columns: 1fr; }
    .site-main { padding-top: 18px; }
    .section-head h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Writing and data workbenches share the calculator visual language. */
.workbench { max-width: 900px; }
.workbench > label { display: block; font-weight: 650; margin: 18px 0 8px; font-size: 14px; }
.workbench textarea, .workbench > select { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fafbf8; color: var(--text); font: inherit; }
.workbench textarea { resize: vertical; min-height: 160px; line-height: 1.65; }
.workbench textarea[readonly] { background: #edf4e9; }
.workbench[data-tool="data"] textarea { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 14px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.tool-actions button { cursor: pointer; background: #fff; border: 1px solid #aebfb0; color: var(--header-bg); border-radius: 8px; padding: 10px 14px; min-height: 44px; font: inherit; font-size: 13px; font-weight: 600; }
.tool-actions button:hover { background: var(--accent-soft); }
.tool-actions button:first-child { background: var(--header-bg); color: #fff; }
.tool-actions button:disabled { opacity: .55; cursor: not-allowed; }
.workbench .check-label { font-size: 13px; font-weight: 400; }
.check-label input { margin-right: 8px; width: 18px; height: 18px; vertical-align: middle; }
#tool-status, #ai-availability { font-size: 14px; color: var(--header-mid); min-height: 24px; }
#unit-result { overflow-wrap: anywhere; }
.content-prose code, .how-it-works code { overflow-wrap: anywhere; font-size: .9em; background: var(--accent-soft); padding: 2px 4px; border-radius: 3px; }
#saved-links a { padding: 10px 15px; border: 1px solid var(--border); border-radius: 8px; background: #fff; text-decoration: none; font-size: 14px; }
#clear-saved { background: transparent; border: 0; color: var(--accent); padding: 8px 0; cursor: pointer; text-decoration: underline; }

/* Inline consent validation for the AI writing editor. */
.ai-consent-panel { margin-top: 18px; padding: 14px 16px; border: 1px solid #aebfb0; border-radius: 10px; background: #f6f9f6; }
.ai-consent-panel .check-label { margin: 0; cursor: pointer; }
.ai-consent-feedback { margin: 8px 0 0; font-size: 13px; color: #40584d; }
.ai-consent-panel.is-invalid { border: 2px solid #b42318; background: #fff4f2; }
.ai-consent-panel.is-invalid .ai-consent-feedback { color: #9b1c13; font-weight: 600; }
.ai-consent-panel.is-confirmed { border-color: #28714f; background: #edf7f0; }
.ai-consent-panel.is-confirmed .ai-consent-feedback { color: #205c40; }
#ai-consent:focus-visible { outline: 3px solid #246caa; outline-offset: 3px; }
