@font-face {
    font-family: "Gandom";
    src: url("/assets/fonts/Gandom.woff") format("woff");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --bg: #ffffff;
    --text: #202124;
    --body: #3c4043;
    --muted: #697078;
    --line: #e7eaee;
    --line-strong: #d8dde3;
    --soft: #f8f9fa;
    --soft-blue: #f4f8fc;
    --blue: #1769aa;
    --blue-dark: #10598f;
    --green: #137333;
    --green-soft: #eef7f0;
    --red: #b3261e;
    --red-soft: #fff2f1;
    --amber: #8a5700;
    --amber-soft: #fff8e8;
    --site: 1120px;
    --article: 800px;
    --page-pad: 20px;
    --radius: 10px;
}

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

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 136px;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 0;
    background: var(--bg);
    color: var(--body);
    font-family: "Gandom", Tahoma, "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    line-height: 2.08;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main,
article,
section,
header,
footer,
nav,
figure,
form {
    max-width: 100%;
}

img,
video,
iframe,
svg,
canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--blue);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
}

a:hover {
    color: var(--blue-dark);
}

p {
    margin: 0 0 1.22rem;
    text-align: justify !important;
    text-align-last: right;
    overflow-wrap: anywhere;
    word-break: normal;
}

ul,
ol {
    margin: 0 0 1.35rem;
    padding-right: 1.45rem;
}

li,
span,
strong,
th,
td {
    overflow-wrap: anywhere;
}

li {
    margin-bottom: .45rem;
}

h1,
h2,
h3 {
    max-width: 100%;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
}

h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 3.08rem);
    line-height: 1.55;
}

h2 {
    margin: 4rem 0 1.2rem;
    padding-top: 1.9rem;
    border-top: 1px solid var(--line);
    font-size: clamp(1.42rem, 3.7vw, 1.88rem);
    line-height: 1.7;
}

h3 {
    margin: 2.05rem 0 .65rem;
    font-size: 1.13rem;
    line-height: 1.75;
}

code,
pre {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

code {
    direction: ltr;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .86em;
}

.site-width,
.article-width {
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--page-pad);
}

.site-width {
    max-width: calc(var(--site) + (var(--page-pad) * 2));
}

.article-width {
    max-width: calc(var(--article) + (var(--page-pad) * 2));
}

.header-row > *,
.nav-row > *,
.hero-actions > *,
.quick-grid > *,
.key-point > *,
.scenario-grid > *,
.calc-grid > *,
.results > *,
.author-card > *,
.footer-row > * {
    min-width: 0;
}

.skip {
    position: absolute;
    top: -100px;
    right: 18px;
    z-index: 9999;
    padding: .55rem .9rem;
    background: #111;
    color: #fff;
    border-radius: 7px;
    text-decoration: none;
}

.skip:focus {
    top: 12px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-row {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.brand {
    flex: 0 1 auto;
    min-width: 0;
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 41px;
    padding: .4rem .9rem;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font-size: .83rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

.btn:hover {
    background: #fafafa;
    color: var(--text);
}

.btn-primary {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--blue-dark);
    color: #fff;
}

/* Navigation: wrap instead of horizontal scrolling */

.main-nav {
    width: 100%;
    max-width: 100%;
    border-top: 1px solid #f2f3f4;
}

.nav-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2rem 1.15rem;
    min-height: 45px;
    padding-top: .35rem;
    padding-bottom: .35rem;
    overflow: visible;
}

.nav-row a {
    flex: 0 1 auto;
    color: #5f6368;
    font-size: .79rem;
    line-height: 1.8;
    text-decoration: none;
    white-space: normal;
}

/* Hero */

.hero {
    padding: 4.05rem 0 2.3rem;
}

.kicker {
    margin-bottom: .65rem;
    color: var(--blue);
    font-size: .88rem;
    font-weight: 700;
}

.hero-lead {
    color: #555b63;
    font-size: 1.07rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1.4rem;
}

.byline {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: 1.55rem;
    color: var(--muted);
    font-size: .82rem;
}

.byline img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
}

.byline strong {
    display: block;
    color: var(--text);
}

.hero-media {
    width: min(920px, calc(100% - 40px));
    max-width: 100%;
    margin: 2.2rem auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

.hero-media img {
    width: 100%;
}

.hero-media figcaption,
.figure figcaption {
    padding: .65rem .9rem;
    border-top: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: .78rem;
    overflow-wrap: anywhere;
}

/* Quick navigation */

.quick {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 0;
    background: var(--soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.quick strong {
    display: block;
    margin-bottom: .55rem;
    color: var(--text);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.6rem;
}

.quick-grid a {
    display: block;
    min-width: 0;
    padding: .5rem 0;
    border-bottom: 1px solid #e9eaed;
    color: #4d5156;
    font-size: .85rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* Main article */

.article {
    padding-top: 1.2rem;
    padding-bottom: 4.5rem;
}

.article section {
    scroll-margin-top: 145px;
}

/* Key points */

.key-points {
    margin: 1.8rem 0 2.2rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.key-point {
    padding: .9rem 0;
    display: grid;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    gap: 1rem;
    border-bottom: 1px solid var(--line);
}

.key-point:last-child {
    border-bottom: 0;
}

.key-point strong {
    color: var(--text);
    font-size: .86rem;
}

.key-point p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
}

/* Callouts */

.box,
.note,
.warn,
.good {
    width: 100%;
    max-width: 100%;
    margin: 1.6rem 0;
    padding: 1rem 1.05rem;
    border-radius: 8px;
}

.box {
    background: var(--soft-blue);
    border: 1px solid #d9e6f2;
    border-right: 4px solid var(--blue);
}

.note {
    background: var(--amber-soft);
    border: 1px solid #efddb0;
    border-right: 4px solid var(--amber);
}

.warn {
    background: var(--red-soft);
    border: 1px solid #efcfcb;
    border-right: 4px solid var(--red);
}

.good {
    background: var(--green-soft);
    border: 1px solid #cee5d4;
    border-right: 4px solid var(--green);
}

.box p:last-child,
.note p:last-child,
.warn p:last-child,
.good p:last-child {
    margin-bottom: 0;
}

/* Figures */

.figure {
    width: 100%;
    max-width: 100%;
    margin: 1.9rem 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
}

.figure img {
    width: 100%;
}

/* Video button */

.video-box {
    width: 100%;
    max-width: 100%;
    margin: 1.6rem 0;
    padding: 1.05rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--soft);
}

.video-box p:last-child {
    margin-bottom: 0;
}

.video-button-row {
    margin-top: .8rem;
}

/* Tables: no horizontal scrolling */

.table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 1.55rem 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

th,
td {
    min-width: 0;
    padding: .78rem .72rem;
    text-align: right;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
    word-break: normal;
}

th {
    background: #fafafa;
    color: var(--text);
    font-weight: 700;
}

tbody tr:last-child td {
    border-bottom: 0;
}

/* Steps */

.steps {
    counter-reset: step;
}

.step {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0 3rem 1.25rem 0;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--line);
}

.step:last-child {
    border-bottom: 0;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: .1rem;
    right: 0;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef4fb;
    color: var(--blue);
    font-family: Arial, sans-serif;
    font-size: .82rem;
    font-weight: 700;
}

.step h3 {
    margin-top: 0;
}

/* Scenarios */

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin: 1.4rem 0;
}

.scenario {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.scenario.ok {
    border-top: 3px solid var(--green);
}

.scenario.bad {
    border-top: 3px solid var(--red);
}

.scenario h3 {
    margin: 0 0 .4rem;
    font-size: 1rem;
}

.scenario p:last-child {
    margin-bottom: 0;
}

/* Calculator */

.calculator {
    width: 100%;
    max-width: 100%;
    margin: 1.7rem 0;
    padding: 1.15rem;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
}

.calculator h3 {
    margin: 0 0 .3rem;
}

.calc-intro {
    color: var(--muted);
    font-size: .85rem;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin-top: .9rem;
}

.field {
    min-width: 0;
}

.field label {
    display: block;
    margin-bottom: .3rem;
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
}

.field input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .45rem .65rem;
    border: 1px solid #cfd3d8;
    border-radius: 7px;
    outline: none;
    direction: ltr;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(25,103,210,.08);
}

.calc-button {
    max-width: 100%;
    min-height: 42px;
    margin-top: .85rem;
    padding: .4rem 1rem;
    border: 0;
    border-radius: 7px;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
    margin-top: .85rem;
}

.result {
    min-width: 0;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--soft);
}

.result small {
    display: block;
    margin-bottom: .15rem;
    color: var(--muted);
    font-size: .72rem;
}

.result strong {
    display: block;
    max-width: 100%;
    color: var(--text);
    direction: ltr;
    text-align: right;
    font-family: Tahoma, Arial, sans-serif;
    overflow-wrap: anywhere;
}

.calc-message {
    margin: .8rem 0 0;
    padding: .65rem .75rem;
    border-radius: 7px;
    background: var(--soft-blue);
    color: #454a50;
    font-size: .82rem;
}

/* Checklist */

.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    position: relative;
    padding: .45rem 1.7rem .45rem 0;
    border-bottom: 1px solid #eef0f2;
}

.checklist li:last-child {
    border-bottom: 0;
}

.checklist li::before {
    content: "✓";
    position: absolute;
    right: .1rem;
    color: var(--green);
    font-family: Arial, sans-serif;
    font-weight: 700;
}

/* FAQ */

.faq details {
    width: 100%;
    max-width: 100%;
    margin-bottom: .55rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.faq summary {
    padding: .78rem .9rem;
    cursor: pointer;
    color: var(--text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.faq details p {
    margin: 0;
    padding: 0 .9rem .9rem;
}

/* Author */

.author-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin-top: 2.7rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.author-card img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
}

.author-card h2 {
    margin: 0 0 .25rem;
    padding: 0;
    border: 0;
    font-size: 1.15rem;
}

.author-card p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.method {
    margin-top: 2.3rem;
    color: var(--muted);
    font-size: .85rem;
}

.method h2 {
    margin: 0 0 .55rem;
    padding: 0;
    border: 0;
    font-size: 1.05rem;
}

/* CTA */

.cta-section {
    width: 100%;
    max-width: 100%;
    padding: 2.2rem 0;
    background: var(--soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.cta-section h2 {
    margin: 0 0 .5rem;
    padding: 0;
    border: 0;
    text-align: center;
}

.cta-section p {
    max-width: 680px;
    margin: 0 auto .9rem;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .55rem;
}

/* Footer */

.site-footer {
    width: 100%;
    max-width: 100%;
    padding: 1.8rem 0 2.4rem;
    color: var(--muted);
    font-size: .8rem;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.footer-row p {
    margin: 0 0 .2rem;
}

.age {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--red);
    font-family: Arial, sans-serif;
    font-weight: 700;
}

/* Tablet */

@media (max-width: 900px) {
    :root {
        --page-pad: 16px;
    }

    .nav-row {
        gap: .15rem .9rem;
    }

    .nav-row a {
        font-size: .76rem;
    }
}

/* Mobile */

@media (max-width: 760px) {
    :root {
        --page-pad: 14px;
    }

    html {
        scroll-padding-top: 76px;
    }

    body {
        font-size: 16.25px;
        line-height: 2;
    }

    .header-row {
        min-height: 60px;
        gap: .55rem;
    }

    .brand {
        font-size: 1.02rem;
    }

    .header-actions .btn:not(.btn-primary) {
        display: none;
    }

    .header-actions .btn-primary {
        padding-inline: .7rem;
        font-size: .78rem;
    }

    /* Hide the large desktop nav on phones instead of creating horizontal scroll */
    .main-nav {
        display: none;
    }

    .hero {
        padding: 2.65rem 0 1.9rem;
    }

    h1 {
        font-size: 1.9rem;
        line-height: 1.65;
    }

    h2 {
        margin-top: 3.35rem;
        padding-top: 1.55rem;
        font-size: 1.36rem;
    }

    .hero-media {
        width: calc(100% - 28px);
        border-radius: 9px;
    }

    .quick-grid,
    .scenario-grid,
    .calc-grid,
    .results {
        grid-template-columns: 1fr;
    }

    .key-point {
        grid-template-columns: 1fr;
        gap: .18rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .table-wrap {
        border-radius: 7px;
    }

    table {
        font-size: .78rem;
        line-height: 1.65;
    }

    th,
    td {
        padding: .58rem .42rem;
    }

    .calculator {
        padding: .9rem;
    }

    .author-card {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .author-card img {
        width: 68px;
        height: 68px;
    }

    .footer-row {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 390px) {
    :root {
        --page-pad: 11px;
    }

    body {
        font-size: 15.8px;
    }

    h1 {
        font-size: 1.72rem;
    }

    .header-actions .btn-primary {
        padding-inline: .58rem;
        font-size: .73rem;
    }

    table {
        font-size: .72rem;
    }

    th,
    td {
        padding: .5rem .32rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
