/* ================================================================
   PROZENTRECHNER PLATFORM — styles.css
   Production-ready shared stylesheet
   Design: Clean German Fintech • White + Light Grey + Blue accent
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ----------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   ---------------------------------------------------------------- */
:root {
    --color-white: #ffffff;
    --color-bg: #f4f6f9;
    --color-bg-card: #ffffff;
    --color-bg-section: #f0f2f5;
    --color-border: #e2e6ec;
    --color-border-focus: #2563eb;

    --color-primary: #1d4ed8;
    --color-primary-dk: #1e3a8a;
    --color-primary-lt: #eff6ff;
    --color-primary-mid: #3b82f6;

    --color-text: #111827;
    --color-text-sec: #4b5563;
    --color-text-muted: #9ca3af;
    --color-text-link: #2563eb;

    --color-success: #059669;
    --color-success-lt: #ecfdf5;
    --color-error: #dc2626;
    --color-error-lt: #fef2f2;
    --color-warn: #d97706;
    --color-warn-lt: #fffbeb;
    --color-info-lt: #eff6ff;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --shadow-xs: 0 1px 3px rgba(0, 0, 0, .07);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, .09);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, .10);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-w: 1140px;
    --header-h: 64px;
}

/* ----------------------------------------------------------------
   RESET
   ---------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
    /* Increased from 16px to scale up all rem-based typography globally */
}

body {
    font-family: var(--font);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    text-decoration: underline;
}

ul,
ol {
    padding-left: 1.4rem;
}

button {
    font-family: var(--font);
    cursor: pointer;
}

/* ----------------------------------------------------------------
   LAYOUT
   ---------------------------------------------------------------- */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 3rem 0;
}

.section--grey {
    background: var(--color-bg-section);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ----------------------------------------------------------------
   HEADER / NAV
   ---------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
    height: var(--header-h);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.logo {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-primary-dk);
    text-decoration: none;
}

.logo__icon {
    width: 34px;
    height: 34px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
}

.logo:hover {
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex-wrap: wrap;
}

.nav-link {
    font-size: .82rem;
    font-weight: 500;
    color: var(--color-text-sec);
    padding: .4rem .65rem;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--color-primary-lt);
    color: var(--color-primary);
    text-decoration: none;
}

.nav-link.active {
    font-weight: 600;
}

/* ----------------------------------------------------------------
   BREADCRUMB
   ---------------------------------------------------------------- */
.breadcrumb {
    padding: .9rem 0;
    font-size: .82rem;
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-text-sec);
}

.breadcrumb span {
    margin: 0 .35rem;
}

/* ----------------------------------------------------------------
   HERO STRIP (page top)
   ---------------------------------------------------------------- */
.hero-strip {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 2.25rem 0 2rem;
}

.hero-strip h1 {
    font-size: clamp(1.55rem, 3.5vw, 2.1rem);
    font-weight: 800;
    color: var(--color-primary-dk);
    line-height: 1.2;
    margin-bottom: .65rem;
}

.hero-strip .lead {
    font-size: 1.05rem;
    color: var(--color-text-sec);
    max-width: 660px;
    line-height: 1.7;
}

/* ----------------------------------------------------------------
   TABLES
   ---------------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    margin-bottom: 2rem;
}

/* ----------------------------------------------------------------
   CARDS
   ---------------------------------------------------------------- */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2.25rem;
}

.card--flat {
    box-shadow: none;
}

.card--highlight {
    border-color: var(--color-primary-mid);
    border-width: 2px;
}

.card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary-dk);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.card__title .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--color-primary-lt);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    font-size: .85rem;
    margin-right: .5rem;
    vertical-align: middle;
}

/* ----------------------------------------------------------------
   CALCULATOR FORM ELEMENTS
   ---------------------------------------------------------------- */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.form-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-label small {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: .78rem;
    margin-left: .3rem;
}

.input-wrap {
    position: relative;
}

.calc-input {
    width: 100%;
    padding: .85rem 1.15rem;
    padding-right: 3.5rem;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -moz-appearance: textfield;
    appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
}

.calc-input:focus {
    border-color: var(--color-border-focus);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.calc-input.is-error {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .1);
}

.input-suffix {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    pointer-events: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-hint {
    font-size: .78rem;
    color: var(--color-text-muted);
    margin-top: .2rem;
}

/* Select */
.calc-select {
    width: 100%;
    padding: .85rem 1.15rem;
    font-family: var(--font);
    font-size: 1.05rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
}

.calc-select:focus {
    border-color: var(--color-border-focus);
}

/* ----------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .75rem 1.5rem;
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background .2s, box-shadow .2s, transform .1s;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(29, 78, 216, .3);
}

.btn--primary:hover {
    background: var(--color-primary-dk);
    box-shadow: 0 4px 14px rgba(29, 78, 216, .35);
}

.btn--secondary {
    background: var(--color-bg);
    color: var(--color-text-sec);
    border: 1.5px solid var(--color-border);
}

.btn--secondary:hover {
    background: var(--color-border);
}

.btn--full {
    width: 100%;
}

.btn--sm {
    padding: .5rem 1rem;
    font-size: .85rem;
}

.btn--copy {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-sec);
    padding: .35rem .7rem;
    font-size: .8rem;
    border-radius: var(--radius-sm);
}

.btn--copy:hover {
    background: var(--color-bg);
}

.calc-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}

/* ----------------------------------------------------------------
   RESULT BOX
   ---------------------------------------------------------------- */
.result-box {
    margin-top: 2rem;
    background: var(--color-primary-lt);
    border: 1.5px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: none;
}

.result-box.visible {
    display: block;
}

.result-box.error {
    background: var(--color-error-lt);
    border-color: #fca5a5;
}

.result-box.success {
    background: var(--color-success-lt);
    border-color: #6ee7b7;
}

.result-label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--color-primary);
    margin-bottom: .4rem;
}

.result-box.error .result-label {
    color: var(--color-error);
}

.result-box.success .result-label {
    color: var(--color-success);
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary-dk);
    line-height: 1.1;
    margin-bottom: .3rem;
}

.result-box.error .result-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-error);
}

.result-sub {
    font-size: .875rem;
    color: var(--color-text-sec);
    margin-top: .4rem;
}

.result-actions {
    margin-top: .85rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------------
   FORMULA BOX
   ---------------------------------------------------------------- */
.formula-box {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary-mid);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.formula-box__label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--color-primary);
    margin-bottom: .4rem;
}

.formula-box__text {
    font-family: 'Courier New', monospace;
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-text);
}

/* ----------------------------------------------------------------
   PREMIUM SENTENCE LAYOUT
   ---------------------------------------------------------------- */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: flex-start;
}

.tool-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.tool-section h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-primary-dk);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.tool-section h2::before {
    content: '';
    display: block;
    width: 6px;
    height: 1.8rem;
    background: var(--color-primary);
    border-radius: 3px;
}

.sentence-row {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow .3s, border-color .3s;
}

.sentence-row:hover {
    border-color: var(--color-primary-mid);
    box-shadow: var(--shadow-md);
}

.sentence-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
}

.sentence-input {
    width: 100px;
    padding: .6rem .75rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    color: var(--color-primary);
    transition: all .25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sentence-input:focus {
    border-color: var(--color-primary-mid);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
}

.sentence-select {
    padding: .6rem .5rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-dk);
    cursor: pointer;
}

.sentence-btn {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--color-primary-mid), var(--color-primary));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.sentence-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.35);
}

/* Sidebar TOC */
.sidebar-toc {
    position: sticky;
    top: 100px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-toc h4 {
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--color-border);
}

.toc-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.toc-link {
    display: block;
    padding: .6rem .75rem;
    font-size: .95rem;
    font-weight: 500;
    color: var(--color-text-sec);
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}

.toc-link:hover {
    background: var(--color-primary-lt);
    color: var(--color-primary);
    text-decoration: none;
}

.toc-link.active {
    background: var(--color-primary-lt);
    color: var(--color-primary);
    font-weight: 700;
}

@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-toc {
        display: none;
    }
}

/* Result below sentence */
.sentence-result {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f0fdfa;
    /* Light teal from screenshot */
    border: 1px solid #ccfbf1;
    border-radius: var(--radius-md);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: slideIn .3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sentence-result.visible {
    display: flex;
}

.sentence-res-val {
    font-size: 1.25rem;
    font-weight: 500;
    color: #134e4a;
}

.sentence-res-val strong {
    color: #0d9488;
    font-weight: 700;
}

.sentence-res-copy {
    flex-shrink: 0;
}

/* Info detail under row */
.sentence-info {
    padding: 1rem 0;
}

.sentence-info p {
    font-size: 1.05rem;
    color: var(--color-text-sec);
    line-height: 1.7;
}

.quick-lesson {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.quick-lesson h4 {
    font-size: .9rem;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: .5rem;
}

@media (max-width: 640px) {
    .sentence-row {
        padding: 1.5rem;
    }

    .sentence-line {
        font-size: 1.15rem;
    }

    .sentence-input {
        width: 80px;
        font-size: 1.1rem;
    }
}

/* ----------------------------------------------------------------
   STEP-BY-STEP
   ---------------------------------------------------------------- */
.steps {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: .75rem;
}

.step {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .875rem;
    color: var(--color-text-sec);
}

.step__num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    margin-top: .1rem;
}

.step__text code {
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    background: var(--color-bg);
    padding: .1rem .35rem;
    border-radius: 3px;
    border: 1px solid var(--color-border);
    color: var(--color-primary-dk);
}

/* ----------------------------------------------------------------
   SECTION HEADING
   ---------------------------------------------------------------- */
.section-heading {
    margin-bottom: 1.5rem;
}

.section-heading h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--color-primary-dk);
    margin-bottom: .4rem;
}

.section-heading p {
    color: var(--color-text-sec);
    font-size: .95rem;
}

/* ----------------------------------------------------------------
   CONTENT / PROSE
   ---------------------------------------------------------------- */
.prose h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--color-primary-dk);
    margin: 2.5rem 0 1.25rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--color-border);
}

.prose h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 2rem 0 .75rem;
}

.prose p {
    margin-bottom: 1.25rem;
    color: var(--color-text-sec);
    line-height: 1.8;
}

.prose ul,
.prose ol {
    margin-bottom: 1.25rem;
    color: var(--color-text-sec);
}

.prose li {
    margin-bottom: .5rem;
    line-height: 1.8;
}

.prose strong {
    color: var(--color-text);
    font-weight: 600;
}

.prose .example-box {
    background: var(--color-warn-lt);
    border: 1px solid #fde68a;
    border-left: 4px solid var(--color-warn);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1.2rem 0;
    font-size: .925rem;
}

.prose .example-box strong {
    color: var(--color-warn);
}

/* ----------------------------------------------------------------
   FAQ
   ---------------------------------------------------------------- */
.faq {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    transition: background .15s;
}

.faq-question:hover {
    background: var(--color-bg);
}

.faq-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--color-primary);
    transition: transform .25s;
    font-weight: 400;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .2s;
}

.faq-item.open .faq-answer {
    max-height: 600px;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.25rem;
    font-size: 1rem;
    color: var(--color-text-sec);
    line-height: 1.8;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

/* ----------------------------------------------------------------
   LINK GRID (internal links hub)
   ---------------------------------------------------------------- */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.link-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color .2s, box-shadow .2s, transform .15s;
}

.link-card:hover {
    border-color: var(--color-primary-mid);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--color-primary-dk);
}

.link-card__icon {
    width: 36px;
    height: 36px;
    background: var(--color-primary-lt);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: var(--color-primary);
}

.link-card__text {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.3;
}

.link-card__arrow {
    margin-left: auto;
    color: var(--color-text-muted);
    font-size: .85rem;
}

/* ----------------------------------------------------------------
   INFO BOXES
   ---------------------------------------------------------------- */
.info-box {
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    font-size: .95rem;
    line-height: 1.8;
    margin: 1.25rem 0;
    display: flex;
    gap: .85rem;
    align-items: flex-start;
}

.info-box--blue {
    background: var(--color-info-lt);
    border: 1px solid #bfdbfe;
    color: var(--color-primary-dk);
}

.info-box--green {
    background: var(--color-success-lt);
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.info-box--yellow {
    background: var(--color-warn-lt);
    border: 1px solid #fde68a;
    color: #92400e;
}

.info-box__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: .05rem;
}

/* ----------------------------------------------------------------
   TABLE
   ---------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.data-table th {
    background: var(--color-bg);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-text-sec);
    padding: .7rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--color-border);
}

.data-table td {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-sec);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--color-bg);
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

/* ----------------------------------------------------------------
   BADGE / TAG
   ---------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.badge--blue {
    background: var(--color-primary-lt);
    color: var(--color-primary);
}

.badge--green {
    background: var(--color-success-lt);
    color: var(--color-success);
}

/* ----------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------- */
.site-footer {
    background: var(--color-primary-dk);
    color: rgba(255, 255, 255, .7);
    padding: 3rem 0 1.5rem;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-brand .logo {
    color: #fff;
}

.footer-brand .logo__icon {
    background: rgba(255, 255, 255, .2);
}

.footer-tagline {
    font-size: .85rem;
    color: rgba(255, 255, 255, .5);
    margin-top: .85rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer-col-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    list-style: none;
    padding: 0;
}

.footer-links a {
    font-size: .85rem;
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    transition: color .15s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
}

.footer-copy {
    font-size: .8rem;
    color: rgba(255, 255, 255, .35);
}

.footer-legal {
    display: flex;
    gap: 1.25rem;
}

.footer-legal a {
    font-size: .8rem;
    color: rgba(255, 255, 255, .35);
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
}

/* ----------------------------------------------------------------
   MOBILE MENU TOGGLE
   ---------------------------------------------------------------- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--color-text);
    cursor: pointer;
}

/* ----------------------------------------------------------------
   SCROLL TO TOP
   ---------------------------------------------------------------- */
.scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.scroll-top.show {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top:hover {
    background: var(--color-primary-dk);
}

/* ----------------------------------------------------------------
   LAYOUT MAIN
   ---------------------------------------------------------------- */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    padding: 2rem 0 3rem;
    align-items: start;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.sidebar-card__title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    list-style: none;
    padding: 0;
}

.sidebar-links a {
    font-size: .875rem;
    color: var(--color-text-sec);
    padding: .4rem .6rem;
    border-radius: var(--radius-sm);
    display: block;
    transition: background .15s, color .15s;
    text-decoration: none;
}

.sidebar-links a:hover,
.sidebar-links a.active {
    background: var(--color-primary-lt);
    color: var(--color-primary);
    text-decoration: none;
}

/* ----------------------------------------------------------------
   UTILITY
   ---------------------------------------------------------------- */
.mt-1 {
    margin-top: .5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.tool-section {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    margin-bottom: 3.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: transform .3s ease, box-shadow .3s ease;
}

.tool-section:hover {
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.08);
}

.tool-section h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary-dk);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.tool-section h2::before {
    content: '';
    width: 6px;
    height: 32px;
    background: var(--color-primary);
    border-radius: 3px;
}

.sentence-row {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.mb-1 {
    margin-bottom: .5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

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

.text-sm {
    font-size: .875rem;
}

.text-muted {
    color: var(--color-text-muted);
}

.font-bold {
    font-weight: 700;
}

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

.divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

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

@media (max-width: 768px) {
    .site-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        padding: .75rem 1.25rem 1rem;
        gap: .25rem;
        box-shadow: var(--shadow-md);
        z-index: 199;
    }

    .site-nav.open {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

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

@media (max-width: 480px) {
    :root {
        --header-h: 58px;
    }

    .hero-strip {
        padding: 1.5rem 0 1.25rem;
    }

    .card {
        padding: 1.5rem;
    }

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

    .result-value {
        font-size: 1.6rem;
    }
}

/* SEO Content Styles (index.html) */
.seo-intro {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.seo-explanation {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.seo-explanation h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.seo-explanation h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary-dk);
}

.seo-explanation p {
    margin-bottom: 1.25rem;
    color: var(--color-text-sec);
    line-height: 1.6;
}

.table-responsive {
    width: 100%;
    margin-bottom: 1.5rem;
    overflow-y: hidden;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.seo-explanation .table tbody tr:hover {
    background-color: var(--color-bg);
}

.faq-container {
    background: var(--color-bg-section);
    padding: 2rem;
    border-radius: var(--radius-md);
}

.faq-container h2 {
    margin-top: 0;
    color: var(--color-text);
}

.faq-item {
    background: var(--color-bg-card);
    transition: all 0.2s;
}

.faq-item:hover {
    border-color: var(--color-primary-dk) !important;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    float: right;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.faq-item[open] summary::after {
    content: '-';
}

/* END OF PAGE CTA */
.end-of-page-cta {
    position: relative;
    overflow: hidden;
}

.end-of-page-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.cta-btn {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e6ec;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 1.15rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.cta-btn:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 20px -8px rgba(37, 99, 235, 0.15);
}

.cta-btn:active {
    transform: translateY(0) scale(1.00);
}

.cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    background: #eff6ff;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin-right: 1.5rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.cta-btn:hover .cta-icon {
    background: #3b82f6;
    color: #ffffff;
}

.cta-text {
    flex: 1;
}

/* ----------------------------------------------------------------
   DARK THEME & TRANSLATE
   ---------------------------------------------------------------- */
.dark-theme {
    color-scheme: dark;
    --color-white: #1e293b;
    --color-bg: #0f172a;
    --color-bg-card: #1e293b;
    --color-bg-section: #0f172a;
    --color-border: #334155;
    --color-border-focus: #3b82f6;

    --color-text: #f8fafc;
    --color-text-sec: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-primary-dk: #60a5fa;
    --color-primary-lt: #1e3a8a;
}

.dark-theme .calc-input,
.dark-theme .calc-select {
    color: #f8fafc !important;
}

.dark-theme .calc-input::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--color-text-sec);
    transition: background 0.2s, color 0.2s;
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.goog-te-gadget-simple {
    background-color: var(--color-white) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.2rem 0.5rem !important;
    font-family: var(--font) !important;
}

.goog-te-gadget-simple .goog-te-menu-value span {
    color: var(--color-text-sec) !important;
}

body {
    background-color: var(--color-bg);
    /* Ensure dark mode is consistent */
}

section,
.card {
    /* No animation */
}

/* ----------------------------------------------------------------
   HISTORY UI
   ---------------------------------------------------------------- */
.history-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar for history */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
}

.history-item {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    transition: background 0.2s;
}

.history-item:hover {
    background: #f1f5f9;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.history-mode {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary-mid);
    text-transform: uppercase;
}

.history-time {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.history-item-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.history-item-exp {
    font-size: 0.8rem;
    color: var(--color-text-sec);
    margin-top: 0.2rem;
}

.history-empty {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 2rem 0;
}