:root {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-muted: #f1f5f9;
    --ink-primary: #0f172a;
    --ink-secondary: #334155;
    --ink-muted: #64748b;
    --charcoal-wave: #1a1d21;
    --accent-blue: #2563eb;
    --accent-blue-dark: #1d4ed8;
    --accent-emerald: #059669;
    --accent-orange: #f97316;
    --border-light: #e2e8f0;
    --border-mid: #cbd5e1;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.07), 0 4px 10px -6px rgba(15, 23, 42, 0.05);
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

body.light-theme {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-primary);
    background-color: var(--bg-page);
    overflow-x: clip;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    background: var(--charcoal-wave);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    z-index: 1000;
}

.skip-link:focus {
    left: 12px;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.header-wave-accent {
    width: 100%;
    height: 14px;
    overflow: hidden;
    line-height: 0;
    background: #ffffff;
}

.header-wave-accent svg {
    width: 100%;
    height: 14px;
    display: block;
}

.site-header .container {
    max-width: 1320px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 64px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo img {
    height: 34px;
    width: auto;
}

.primary-nav {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-secondary);
    transition: background-color 0.18s ease, color 0.18s ease;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
    background-color: #eff6ff;
    color: var(--accent-blue);
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 3px 4px 3px 11px;
    max-width: 152px;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.header-search-form:focus-within {
    background: #ffffff;
    border-color: var(--accent-blue);
}

.header-search-form input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 12.5px;
    color: var(--ink-primary);
    width: 102px;
    min-width: 0;
}

.header-search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--accent-blue);
    color: #ffffff;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink-primary);
    border-radius: 2px;
}

.mobile-drawer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    padding: 16px 0 22px;
}

.mobile-search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-search-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    font-size: 15px;
}

.mobile-search-form button {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-blue);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.mobile-nav-list a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-primary);
    font-weight: 600;
    background: var(--bg-page);
}

/* Signature Wave Hero Section */
.hero-wave-section {
    position: relative;
    background: #ffffff;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 46px 0 88px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--accent-blue-dark);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-title {
    margin: 0 0 14px;
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--ink-primary);
    font-weight: 800;
}

.hero-subtitle {
    margin: 0 0 24px;
    font-size: 17px;
    color: var(--ink-secondary);
    max-width: 600px;
}

.hero-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid var(--border-mid);
    border-radius: 14px;
    padding: 6px;
    max-width: 560px;
    box-shadow: var(--shadow-md);
}

.hero-search-box:focus-within {
    border-color: var(--accent-blue);
}

.hero-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 10px 14px;
    color: var(--ink-primary);
    background: transparent;
}

.hero-search-box button {
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    background: var(--charcoal-wave);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.hero-search-box button:hover {
    background: var(--accent-blue);
}

.hero-quick-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-md);
}

.hero-quick-card h2 {
    margin: 0 0 12px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
}

.hero-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hero-quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--ink-primary);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.16s ease;
}

.hero-quick-link:hover {
    border-color: var(--accent-blue);
    background: #eff6ff;
    color: var(--accent-blue);
    text-decoration: none;
    transform: translateY(-1px);
}

.hero-wave-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 82px;
    pointer-events: none;
    z-index: 1;
}

.hero-wave-bottom svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Sub-Hero Banner for Category / Calculator / Legal Pages */
.page-wave-banner {
    position: relative;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
    padding: 26px 0 38px;
}

.page-wave-banner__svg {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 48%;
    height: 100%;
    pointer-events: none;
    opacity: 0.92;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--ink-muted);
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.breadcrumbs a {
    color: var(--ink-secondary);
    font-weight: 500;
}

.page-banner-title {
    margin: 0 0 8px;
    font-size: clamp(1.65rem, 2.8vw, 2.35rem);
    line-height: 1.2;
    font-weight: 800;
    color: var(--ink-primary);
    position: relative;
    z-index: 2;
    max-width: 780px;
}

.page-banner-desc {
    margin: 0;
    font-size: 16.5px;
    color: var(--ink-secondary);
    max-width: 740px;
    position: relative;
    z-index: 2;
}

/* Main Content Sections */
.section-block {
    padding: 36px 0;
}

.section-block--compact {
    padding-top: 8px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0 0 4px;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--ink-primary);
    letter-spacing: -0.015em;
}

.section-subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--ink-muted);
}

/* Category Filter Bar & Zero-Gap Showcase Suites */
.cat-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}

.cat-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--ink-secondary);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.16s ease;
}

.cat-filter-pill:hover {
    border-color: var(--border-mid);
    color: var(--ink-primary);
    transform: translateY(-1px);
}

.cat-filter-pill.is-active {
    background: var(--charcoal-wave);
    border-color: var(--charcoal-wave);
    color: #ffffff;
}

.cat-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    background: var(--bg-muted);
    color: var(--ink-secondary);
}

.cat-filter-pill.is-active .cat-filter-count {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cat-showcase-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cat-showcase {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-top: 3px solid var(--cat-accent, var(--accent-blue));
    border-radius: var(--radius-md);
    padding: 22px 24px 24px;
    box-shadow: var(--shadow-sm);
}

.cat-showcase__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.cat-showcase__meta {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 780px;
}

.cat-showcase__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.cat-showcase__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cat-accent, var(--accent-blue));
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.cat-showcase__title {
    margin: 0 0 4px;
    font-size: 1.22rem;
    font-weight: 800;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cat-showcase__title a {
    color: var(--ink-primary);
}

.cat-showcase__title a:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

.cat-showcase__pill {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--ink-secondary);
}

.cat-showcase__desc {
    margin: 0;
    font-size: 14.5px;
    color: var(--ink-muted);
    line-height: 1.5;
}

.cat-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    color: var(--ink-primary);
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.16s ease;
}

.cat-hub-btn:hover {
    background: #eff6ff;
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    text-decoration: none;
}

/* Balanced Flexbox Bento Tiles (zero empty slots on partial rows) */
.cat-tools-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cat-tools-flex--3 > .tool-tile {
    flex: 1 1 calc(33.333% - 10px);
    min-width: 260px;
}

.cat-tools-flex--4 > .tool-tile {
    flex: 1 1 calc(25% - 10px);
    min-width: 235px;
}

.tool-tile {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    padding: 15px 16px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: inherit;
    transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.tool-tile:hover {
    transform: translateY(-2px);
    background: #ffffff;
    border-color: var(--cat-accent, var(--accent-blue));
    box-shadow: 0 8px 18px -6px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

.tool-tile__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.tool-tile__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink-primary);
}

.tool-tile:hover .tool-tile__title {
    color: var(--accent-blue);
}

.tool-tile__arrow {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-muted);
    transition: transform 0.16s ease, color 0.16s ease;
    flex-shrink: 0;
}

.tool-tile:hover .tool-tile__arrow {
    color: var(--accent-blue);
    transform: translateX(3px);
}

.tool-tile__desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card__cat {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-blue);
}

/* Single-Column Calculator Layout (No Sidebar, Zero Blank Space) */
.calc-single-layout {
    max-width: 1060px;
    margin: 0 auto;
    padding: 28px 0 44px;
}

.related-strip {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}

.related-strip__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.related-strip__header h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--ink-primary);
}

.related-strip__header p {
    margin: 0;
    font-size: 14px;
    color: var(--ink-muted);
}

.related-cats-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.related-cats-bar__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-muted);
    margin-right: 4px;
}

.cat-pill-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    color: var(--ink-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.cat-pill-link:hover,
.cat-pill-link.is-current {
    background: #eff6ff;
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    text-decoration: none;
}

.calc-workbench {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-md);
    margin-bottom: 28px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.calc-form-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-hint {
    font-weight: 500;
    font-size: 12px;
    color: var(--ink-muted);
}

.calc-input,
.calc-select,
.calc-textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border-mid);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink-primary);
    background: #ffffff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.calc-input:focus,
.calc-select:focus,
.calc-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.calc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.btn-primary {
    padding: 11px 20px;
    border: none;
    border-radius: 10px;
    background: var(--accent-blue);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.16s ease;
}

.btn-primary:hover {
    background: var(--accent-blue-dark);
}

.btn-secondary {
    padding: 11px 18px;
    border: 1.5px solid var(--border-mid);
    border-radius: 10px;
    background: var(--bg-page);
    color: var(--ink-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--bg-muted);
}

.calc-results-panel {
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
}

.result-hero-box {
    background: linear-gradient(135deg, #1a1d21 0%, #27303f 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.result-hero-label {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #cbd5e1;
    font-weight: 600;
}

.result-hero-value {
    font-size: clamp(1.6rem, 2.5vw, 2.15rem);
    font-weight: 800;
    margin-top: 4px;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.result-hero-sub {
    font-size: 13.5px;
    color: #94a3b8;
    margin-top: 4px;
}

.result-metrics-list {
    display: grid;
    gap: 10px;
}

.result-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
}

.result-metric-row span:first-child {
    color: var(--ink-secondary);
}

.result-metric-row strong {
    color: var(--ink-primary);
    font-variant-numeric: tabular-nums;
}

.result-bar-wrap {
    margin-top: 14px;
    background: #e2e8f0;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
}

.result-bar-seg-a {
    background: var(--accent-blue);
    height: 100%;
    transition: width 0.25s ease;
}

.result-bar-seg-b {
    background: var(--accent-emerald);
    height: 100%;
    transition: width 0.25s ease;
}

.result-bar-seg-c {
    background: var(--accent-orange);
    height: 100%;
    transition: width 0.25s ease;
}

.calc-extra-table-wrap {
    margin-top: 20px;
    overflow-x: auto;
}

.calc-notice {
    margin-top: 14px;
    padding: 10px 13px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 13px;
}

/* Long-form Editorial Content */
.editorial-article {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px 34px;
    box-shadow: var(--shadow-sm);
    font-size: 16.5px;
    line-height: 1.78;
    color: var(--ink-secondary);
}

.editorial-article h2 {
    margin: 28px 0 12px;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--ink-primary);
    line-height: 1.3;
}

.editorial-article h2:first-child {
    margin-top: 0;
}

.editorial-article h3 {
    margin: 22px 0 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink-primary);
}

.editorial-article p {
    margin: 0 0 16px;
}

.editorial-article ul,
.editorial-article ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.editorial-article li {
    margin-bottom: 8px;
}

.editorial-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14.5px;
    overflow-x: auto;
    display: block;
}

.editorial-article th,
.editorial-article td {
    border: 1px solid var(--border-light);
    padding: 10px 13px;
    text-align: left;
}

.editorial-article th {
    background: var(--bg-muted);
    color: var(--ink-primary);
    font-weight: 700;
}

.editorial-article blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    background: #f8fafc;
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 10px 10px 0;
    color: var(--ink-primary);
    font-style: normal;
}

.editorial-article code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-muted);
    padding: 2px 6px;
    border-radius: 5px;
    color: var(--ink-primary);
}

/* FAQ Accordion */
.faq-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}

.faq-section h2 {
    margin: 0 0 18px;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--ink-primary);
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-page);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 16px 18px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.faq-question::after {
    content: "+";
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.faq-item.is-open .faq-question::after {
    content: "−";
}

.faq-answer {
    padding: 0 18px 16px;
    font-size: 15px;
    color: var(--ink-secondary);
    line-height: 1.65;
}

/* Author Bio Box */
.author-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-left: 5px solid var(--accent-blue);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}

.author-card__avatar {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-card__eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.author-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.author-card__name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink-primary);
}

.author-card__creds {
    font-size: 12.5px;
    font-weight: 700;
    background: #eff6ff;
    color: var(--accent-blue-dark);
    padding: 2px 9px;
    border-radius: 999px;
}

.author-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-muted);
    margin: 4px 0 10px;
}

.author-card__bio {
    margin: 0;
    font-size: 14.5px;
    color: var(--ink-secondary);
}

/* Partner / Ad Containers */
.partner-slot {
    background: #ffffff;
    border: 1px dashed var(--border-mid);
    border-radius: 10px;
    padding: 10px;
    margin: 14px 0;
    text-align: center;
}

.partner-slot__tag {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 6px;
}

.ad-wrapper-top {
    padding-top: 12px;
}

/* Contact Page Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 28px;
    margin-bottom: 28px;
}

.contact-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    padding: 14px 16px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-weight: 600;
    margin-bottom: 16px;
}

.alert-error {
    padding: 14px 16px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Footer */
.site-footer {
    margin-top: 40px;
}

.footer-wave-top {
    line-height: 0;
    overflow: hidden;
    height: 92px;
}

.footer-wave-top svg {
    width: 100%;
    height: 92px;
    display: block;
}

.footer-body {
    background: var(--charcoal-wave);
    color: #cbd5e1;
    padding: 32px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
    height: 38px;
    width: auto;
    margin-bottom: 14px;
}

.footer-about {
    margin: 0 0 16px;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

.footer-contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 13px;
}

.footer-contact-pill a {
    color: #ffffff;
    font-weight: 600;
}

.footer-heading {
    margin: 0 0 14px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #ffffff;
    font-weight: 700;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.footer-list a {
    color: #cbd5e1;
    font-size: 14px;
}

.footer-list a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: #94a3b8;
}

.footer-copy,
.footer-note {
    margin: 0;
}

.footer-cookie-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: 14px;
    color: #cbd5e1;
    cursor: pointer;
    text-align: left;
}

.footer-cookie-btn:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Cookie Consent Popup */
.cookie-banner {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 950;
    width: calc(100% - 44px);
    max-width: 430px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.22), 0 4px 14px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    animation: cookieSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cookie-banner__accent {
    height: 4px;
    background: linear-gradient(90deg, #1a1d21 0%, #2563eb 55%, #10b981 82%, #f97316 100%);
}

.cookie-banner__body {
    padding: 20px 22px 18px;
}

.cookie-banner__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.cookie-banner__icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #1a1d21 0%, #27303f 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cookie-banner__title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--ink-primary);
    line-height: 1.25;
}

.cookie-banner__sub {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
}

.cookie-banner__text {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-secondary);
}

.cookie-banner__text a {
    font-weight: 600;
}

.cookie-custom-panel {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 4px 2px;
}

.cookie-option--locked {
    cursor: default;
    opacity: 0.88;
}

.cookie-option__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cookie-option__meta strong {
    font-size: 13px;
    color: var(--ink-primary);
}

.cookie-option__meta span {
    font-size: 11.5px;
    color: var(--ink-muted);
    line-height: 1.35;
}

.cookie-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.cookie-switch {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background-color 0.18s ease;
}

.cookie-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.18s ease;
}

.cookie-option input:checked + .cookie-switch {
    background: var(--accent-blue);
}

.cookie-option input:checked + .cookie-switch::after {
    transform: translateX(16px);
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cookie-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    border-radius: 9px;
    padding: 9px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cookie-btn--primary {
    border: none;
    background: var(--accent-blue);
    color: #ffffff;
    flex: 1 1 auto;
}

.cookie-btn--primary:hover {
    background: var(--accent-blue-dark);
}

.cookie-btn--ghost {
    border: 1px solid var(--border-mid);
    background: var(--bg-page);
    color: var(--ink-secondary);
}

.cookie-btn--ghost:hover {
    background: var(--bg-muted);
    color: var(--ink-primary);
}

.cookie-btn--save {
    border: none;
    background: var(--accent-emerald);
    color: #ffffff;
    flex: 1 1 auto;
}

.cookie-btn--save:hover {
    background: #047857;
}

.cookie-btn--link {
    border: none;
    background: transparent;
    color: var(--ink-muted);
    padding: 8px 6px;
}

.cookie-btn--link:hover {
    color: var(--ink-primary);
    text-decoration: underline;
}

@media (max-width: 640px) {
    .cookie-banner {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
    }

    .cookie-banner__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-btn--link {
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 1240px) {
    .nav-link {
        padding: 6px 6px;
        font-size: 12.5px;
    }

    .header-search-form input {
        width: 86px;
    }
}

@media (max-width: 1120px) {
    .primary-nav,
    .header-search-form {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 36px 0 84px;
    }

    .cat-tools-flex--3 > .tool-tile,
    .cat-tools-flex--4 > .tool-tile {
        flex: 1 1 calc(50% - 8px);
        min-width: 240px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .calc-grid,
    .field-row-2,
    .contact-grid,
    .hero-quick-links {
        grid-template-columns: 1fr;
    }

    .cat-tools-flex--3 > .tool-tile,
    .cat-tools-flex--4 > .tool-tile {
        flex: 1 1 100%;
    }

    .cat-showcase,
    .related-strip {
        padding: 18px;
    }

    .editorial-article {
        padding: 22px 20px;
    }

    .calc-workbench {
        padding: 18px;
    }

    .author-card {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .site-header,
    .site-footer,
    .related-strip,
    .partner-slot,
    .calc-actions {
        display: none !important;
    }

    .calc-single-layout {
        max-width: 100%;
    }
}

/* ---- Eami Blog (added 2026-11-19) ---- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.blog-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.blog-card__img-link { display: block; }
.blog-card__img-link img,
.blog-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}
.blog-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card__meta { font-size: 13px; color: #64748B; display: flex; gap: 8px; flex-wrap: wrap; }
.blog-card__title { font-size: 20px; line-height: 1.3; margin: 0; }
.blog-card__title a { color: #1A1D21; text-decoration: none; }
.blog-card__title a:hover { color: #2563EB; text-decoration: underline; }
.blog-card__excerpt { color: #475569; margin: 0; flex: 1; }
.blog-card__byline { font-size: 13px; color: #64748B; margin: 0; }
.blog-card__more { font-weight: 700; color: #2563EB; text-decoration: none; }
.blog-card__more:hover { text-decoration: underline; }
.blog-post-layout { max-width: 860px; margin: 0 auto; }
.blog-hero-img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    margin-bottom: 16px;
}
.blog-post-meta { font-size: 14px; color: #64748B; margin: 0 0 8px; }
.blog-article h2 { margin-top: 32px; }
.sources-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 28px 0;
}
.sources-box h2 { margin-top: 0; font-size: 20px; }
.sources-box ul { margin: 0 0 10px; padding-left: 20px; }
.sources-box p { margin: 0; color: #475569; }
.guide-callout {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 14px;
    padding: 20px 22px;
    margin: 28px 0;
}
.guide-callout h2 { margin-top: 0; font-size: 20px; }
.guide-callout__card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    margin-top: 12px;
}
.guide-callout__card:hover { border-color: #2563EB; }
.guide-callout__card img { width: 180px; height: 120px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.guide-callout__text { display: flex; flex-direction: column; gap: 4px; }
.guide-callout__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #2563EB; }
.guide-callout__title { font-size: 18px; font-weight: 700; color: #1A1D21; line-height: 1.3; }
.guide-callout__excerpt { font-size: 14px; color: #475569; }
.guide-callout__fineprint { font-size: 13px; color: #64748B; margin: 14px 0 0; }
@media (max-width: 1200px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .blog-grid { grid-template-columns: 1fr; }
    .guide-callout__card { flex-direction: column; }
    .guide-callout__card img { width: 100%; height: auto; }
}
