:root {
    color-scheme: light;
    --ink: #2e2b3c;
    --muted: #6f6b7e;
    --line: #e7e1f2;
    --surface: #ffffff;
    --soft: #fffaf7;
    --brand: #6d62c8;
    --brand-dark: #5146a8;
    --brand-soft: #a49ce3;
    --accent: #e06f4f;
    --warm: #fff2df;
    --warm-line: #f4d6ad;
    --nav-bg: #4e477f;
    --hero-bg:
        linear-gradient(120deg, rgba(78, 71, 127, 0.98), rgba(109, 98, 200, 0.91)),
        radial-gradient(circle at 86% 20%, rgba(255, 210, 139, 0.55), transparent 31%);
    --button-bg: linear-gradient(135deg, #7468d3, #5b50ba);
    --button-shadow: rgba(91, 80, 186, 0.25);
    --focus-ring: rgba(109, 98, 200, 0.19);
    --input-line: #c7bfdf;
    --highlight-bg: linear-gradient(180deg, #f5f2ff, #ffffff);
    --highlight-line: #d5cef4;
    --highlight-orb: rgba(241, 160, 112, 0.17);
    --pill-bg: #fff4e7;
    --pill-line: #f2d5b7;
    --table-line: #f0ebf5;
    --table-head: #faf8fd;
    --row-hover: #fcfaff;
    --level-highest: #efeaff;
    --level-good: #f0f9e8;
    --level-low: #fff4df;
    --level-very-low: #f9f8fb;
    --article-point: #faf8fd;
    --page-glow-1: rgba(220, 211, 255, 0.38);
    --page-glow-2: rgba(255, 215, 181, 0.28);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --shadow: 0 18px 44px rgba(71, 58, 115, 0.09);
    --shadow-hover: 0 24px 54px rgba(71, 58, 115, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 0%, var(--page-glow-1), transparent 28rem),
        radial-gradient(circle at 100% 18%, var(--page-glow-2), transparent 25rem),
        var(--soft);
    font-family: "Nunito Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--brand-dark);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.08em;
}

a:hover {
    color: var(--accent);
}

.topbar {
    color: white;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 24px rgba(36, 44, 41, 0.08);
    position: relative;
    z-index: 10;
}

.nav {
    max-width: 1160px;
    margin: 0 auto;
    min-height: 72px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    color: white;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.95rem;
    font-weight: 700;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.nav-links a:hover {
    color: white;
    transform: translateY(-1px);
}

.nav-links .shop-link {
    color: var(--nav-bg);
    background: white;
    border-radius: 999px;
    padding: 9px 15px;
    box-shadow: 0 8px 18px rgba(16, 38, 32, 0.14);
}

.shop-reference {
    display: none !important;
}

.hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: var(--hero-bg);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 360px;
    height: 360px;
    right: -120px;
    top: -120px;
    background: rgba(255, 255, 255, 0.10);
}

.hero::after {
    width: 220px;
    height: 220px;
    right: 18%;
    bottom: -150px;
    border: 34px solid rgba(255, 255, 255, 0.07);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 72px 24px 62px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 46px;
    align-items: center;
}

.hero h1 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(2.45rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.hero-panel {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 22px 50px rgba(31, 45, 40, 0.16);
    backdrop-filter: blur(12px);
}

.hero-panel strong {
    display: block;
    margin-bottom: 10px;
    font-size: 2.9rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.hero-panel span {
    color: rgba(255, 255, 255, 0.84);
}

.wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 44px 24px;
}

.calculator-grid {
    display: grid;
    grid-template-columns: minmax(290px, 400px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.panel,
.result-block,
.legal-card,
.info-box,
.article-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.panel {
    padding: 26px;
    position: sticky;
    top: 22px;
}

.panel h2,
.result-block h2,
.section h2 {
    margin: 0 0 14px;
    font-size: 1.42rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.form-group {
    margin-bottom: 17px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 850;
}

input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius-sm);
    padding: 12px 13px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:hover {
    border-color: var(--brand-soft);
}

input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--focus-ring);
    transform: translateY(-1px);
}

small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 12px 19px;
    color: white;
    background: var(--button-bg);
    box-shadow: 0 10px 24px var(--button-shadow);
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button {
    width: 100%;
}

button:hover,
.button:hover {
    color: white;
    filter: brightness(0.97) saturate(1.08);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px var(--button-shadow);
}

button:active,
.button:active {
    transform: translateY(0);
}

.error {
    display: none;
    margin-bottom: 16px;
    padding: 13px 14px;
    color: #9f1239;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: var(--radius-sm);
}

.error.is-visible {
    display: block;
}

.result-block {
    margin-bottom: 20px;
    padding: 26px;
}

.highlight {
    position: relative;
    overflow: hidden;
    background: var(--highlight-bg);
    border-color: var(--highlight-line);
}

.highlight::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -65px;
    top: -70px;
    border-radius: 50%;
    background: var(--highlight-orb);
}

.metric {
    margin: 10px 0;
    color: var(--brand-dark);
    font-size: clamp(2.8rem, 8vw, 4.8rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.055em;
}

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

.hidden {
    display: none;
}

.day-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 0;
}

.day-pill {
    padding: 14px;
    background: var(--pill-bg);
    border: 1px solid var(--pill-line);
    border-radius: var(--radius-md);
}

.day-pill strong {
    display: block;
    color: var(--brand-dark);
    font-size: 1.2rem;
}

.chart {
    width: 100%;
    height: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 26px rgba(40, 51, 46, 0.06);
}

.table-container {
    max-height: 430px;
    overflow: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 26px rgba(40, 51, 46, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.92rem;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--table-line);
    text-align: left;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--ink);
    background: var(--table-head);
}

tbody tr {
    transition: background 120ms ease;
}

tbody tr:hover {
    background: var(--row-hover);
}

.level-highest {
    background: var(--level-highest);
}

.level-good {
    background: var(--level-good);
}

.level-low {
    background: var(--level-low);
}

.level-very-low {
    background: var(--level-very-low);
}

.section {
    padding: 42px 0;
    border-top: 1px solid var(--line);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.info-box {
    padding: 22px;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.info-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.info-box h3 {
    margin: 0 0 9px;
    font-size: 1.08rem;
}

.shop-band {
    background: var(--warm);
    border-top: 1px solid var(--warm-line);
    border-bottom: 1px solid var(--warm-line);
}

.shop-band .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

footer {
    color: rgba(255, 255, 255, 0.78);
    background: var(--nav-bg);
}

footer .wrap {
    padding-top: 28px;
    padding-bottom: 28px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

footer a {
    color: white;
}

.legal-page {
    max-width: 860px;
}

.legal-card,
.article-card {
    padding: 30px;
}

.article-page {
    max-width: 920px;
}

.article-card h1 {
    margin: 0 0 16px;
    font-size: clamp(2.1rem, 4.2vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.article-card h2 {
    margin: 38px 0 13px;
    font-size: 1.62rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.article-card h3 {
    margin: 26px 0 9px;
    font-size: 1.15rem;
}

.article-point {
    margin: 12px 0;
    padding: 12px 14px;
    background: var(--article-point);
    border-left: 4px solid var(--brand-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-point strong {
    color: var(--brand-dark);
}

.article-lede {
    color: var(--muted);
    font-size: 1.14rem;
}

.article-meta {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 0.95rem;
}

.callout {
    margin: 24px 0;
    padding: 18px;
    background: var(--highlight-bg);
    border: 1px solid var(--highlight-line);
    border-radius: var(--radius-md);
}

.article-card table {
    margin: 20px 0;
}

.author-box {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    margin: 36px 0 18px;
    padding: 18px;
    background: var(--article-point);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.author-box img {
    width: 96px;
    height: 96px;
    border: 4px solid white;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(33, 47, 41, 0.12);
}

.author-box h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.author-box p {
    margin: 0;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 860px) {
    .hero-inner,
    .calculator-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding-top: 50px;
        padding-bottom: 48px;
    }

    .hero-panel {
        max-width: 500px;
    }

    .panel {
        position: static;
    }

    .day-list {
        grid-template-columns: 1fr;
    }

    .shop-band .wrap {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        flex-wrap: wrap;
    }

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

    .author-box img {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 560px) {
    .nav,
    .wrap,
    .hero-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    .panel,
    .result-block,
    .legal-card,
    .article-card {
        padding: 21px;
    }

    .hero h1 {
        font-size: clamp(2.35rem, 13vw, 3.35rem);
    }

    .nav-links {
        gap: 12px;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.author-details { min-width: 0; } 
.author-role { margin: 0 0 8px; color: var(--brand-dark); font-weight: 800; } 
.author-social-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 14px; color: var(--brand-dark); background: #fff5f8; border: 1px solid #ead6df; border-radius: 999px; font-weight: 800; line-height: 1.2; text-decoration: none; transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; } .author-social-link:hover { color: var(--brand-dark); background: #ffeaf2; border-color: #dbaabd; box-shadow: 0 8px 20px rgba(125, 54, 87, 0.12); transform: translateY(-1px); } 
.author-social-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; } 
.instagram-icon { flex: 0 0 auto; }