/* BioClock — one stylesheet, no external fonts, images or imports. */

:root {
    --bg: #f6f1e7;
    --bg-2: #efe7d8;
    --surface: #fffdf8;
    --surface-2: #faf5ec;
    --ink: #141a26;
    --muted: #5c6273;
    --faint: #8a8f9e;
    --line: #e3dccb;
    --line-2: #d6cdb8;
    --accent: #b95c11;
    --accent-2: #e59a37;
    --accent-soft: #f7e6cd;
    --sky: #2a6f97;
    --sleep: #4a5aa0;
    --seek: #d0821b;
    --avoid: #39456b;
    --btn-bg: var(--ink);
    --btn-ink: var(--bg);
    --night: #223257;
    --night-deep: #0b1226;
    --shadow: 0 1px 2px rgba(28, 24, 16, .05), 0 12px 32px -18px rgba(28, 24, 16, .28);
    --radius: 20px;
    --radius-s: 12px;
    --max: 1120px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", "Noto Sans JP",
        "Microsoft JhengHei", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
    --bg: #070c18;
    --bg-2: #0a1122;
    --surface: #0e1526;
    --surface-2: #111a2e;
    --ink: #edf1fb;
    --muted: #98a3bb;
    --faint: #6d7891;
    --line: #1e2942;
    --line-2: #2a3856;
    --accent: #ffb877;
    --accent-2: #ffd9a8;
    --accent-soft: #2a2033;
    --sky: #7cc7ff;
    --sleep: #6b7bd0;
    --seek: #ffc164;
    --avoid: #7d8cc4;
    --btn-bg: #ffc178;
    --btn-ink: #1b1206;
    --night: #a9c4ff;
    --night-deep: #0a1024;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -24px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
* { min-width: 0; }

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

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    font-size: 16.5px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px 520px at 82% -8%, rgba(229, 154, 55, .16), transparent 70%),
        radial-gradient(760px 460px at -6% 12%, rgba(42, 111, 151, .10), transparent 72%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    pointer-events: none;
}

[data-theme="dark"] body::before {
    background:
        radial-gradient(900px 560px at 82% -10%, rgba(255, 184, 119, .12), transparent 70%),
        radial-gradient(760px 520px at -8% 8%, rgba(124, 199, 255, .08), transparent 72%),
        linear-gradient(180deg, #070c18 0%, #0a1122 100%);
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.015em; font-family: var(--font); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); text-wrap: balance; }
h3 { font-size: 1.12rem; }
p { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

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

.skip {
    position: absolute; left: 12px; top: -60px; z-index: 50;
    background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
    transition: top .15s;
}
.skip:focus { top: 12px; }

html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ko"] h3,
html[lang="ko"] .lede, html[lang="ko"] .sec-sub, html[lang="ko"] .answer-t,
html[lang="ko"] .night-times, html[lang="ko"] p { word-break: keep-all; }
html[lang="ja"] h1 { font-size: clamp(1.85rem, 4.1vw, 3rem); }
html[lang="zh-Hant"] h1 { font-size: clamp(1.95rem, 4.3vw, 3.2rem); }

html:not([lang="en"]) .stat-k,
html:not([lang="en"]) .field label,
html:not([lang="en"]) .field .label { text-transform: none; letter-spacing: .05em; }

/* ------------------------------------------------------------------ header */
.site-head {
    position: sticky; top: 0; z-index: 40;
    backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 14px; min-height: 62px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 650; }
.brand .mark { display: inline-flex; color: var(--accent); }
.brand-name { font-size: 1.08rem; letter-spacing: -.02em; }
.brand-name b { font-weight: 760; }
.brand-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding-left: 4px; }
.langs { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.langs a {
    color: var(--muted); text-decoration: none; font-size: .82rem; padding: 5px 8px;
    border-radius: 8px; white-space: nowrap;
}
.langs a:hover { background: var(--surface-2); color: var(--ink); }
.langs a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-2); }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: none; }

/* ------------------------------------------------------------------ hero */
.hero {
    display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px;
    align-items: center; padding-top: 56px; padding-bottom: 22px;
}
.eyebrow, .sec-eyebrow {
    font-size: .74rem; text-transform: uppercase; letter-spacing: .16em;
    color: var(--accent); font-weight: 650; margin-bottom: 12px;
}
.hero h1 { margin-bottom: 18px; }
.lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 40ch; text-wrap: pretty; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.chip {
    font-size: .78rem; color: var(--muted); background: var(--surface);
    border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px;
}
.hero-art { display: flex; justify-content: center; }
.dial { width: min(300px, 100%); height: auto; }
.dial-track { fill: none; stroke: var(--line); stroke-width: 14; }
.dial-night { fill: none; stroke: var(--night); stroke-width: 14; opacity: .75; stroke-linecap: butt; }
.dial-day { fill: none; stroke: url(#dawn); stroke-width: 14; stroke-linecap: butt; }
.dial-ticks line { stroke: var(--line-2); stroke-width: 1.4; }
.dial-face { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.dial-big { fill: var(--ink); font-size: 42px; font-weight: 700; font-family: var(--font); }
.dial-small { fill: var(--muted); font-size: 14px; font-family: var(--font); letter-spacing: .1em; }
.dial-tick { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.dial-dot { fill: var(--accent); }

/* ------------------------------------------------------------------ answer */
.answer-wrap { padding-top: 8px; padding-bottom: 8px; }
.answer {
    display: grid; grid-template-columns: 118px 1fr; gap: 18px;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
    box-shadow: var(--shadow);
}
.answer-k { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 650; display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.answer-t { color: var(--ink); font-size: 1.02rem; max-width: 78ch; }

/* ------------------------------------------------------------------ console */
.console { padding-top: 34px; padding-bottom: 20px; }
.tabs {
    display: flex; gap: 6px; flex-wrap: wrap;
    background: var(--surface-2); border: 1px solid var(--line);
    padding: 6px; border-radius: 999px; width: fit-content; max-width: 100%;
}
.tab {
    border: 0; background: transparent; color: var(--muted);
    font: inherit; font-size: .9rem; font-weight: 550; padding: 9px 16px; border-radius: 999px;
    cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 26, 38, .12), inset 0 0 0 1px var(--line); }
.panel {
    margin-top: 18px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
    animation: rise .25s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .panel { animation: none; }
    html { scroll-behavior: auto; }
}
.panel-head { max-width: 74ch; margin-bottom: 22px; }
.panel-head h2 { margin: 2px 0 8px; }
.sec-sub { color: var(--muted); font-size: .97rem; }

/* ------------------------------------------------------------------ forms */
.tool-form {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 14px 16px; align-items: end;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s);
    padding: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.small { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label {
    font-size: .76rem; text-transform: uppercase; letter-spacing: .1em;
    color: var(--muted); font-weight: 620;
}
.field .unit { text-transform: none; letter-spacing: 0; }
.field output { text-transform: none; letter-spacing: 0; color: var(--ink); font-family: var(--mono); font-size: .9rem; }
input[type="text"], input[type="number"], input[type="time"], input[type="date"], select {
    font: inherit; font-size: .95rem; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
    padding: 9px 11px; width: 100%; min-width: 0; appearance: none;
}
select {
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
    padding-right: 34px;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, pre:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}
input[type="range"] {
    width: 100%; accent-color: var(--accent); margin: 8px 0 2px; height: 22px;
}
input[type="date"], input[type="time"] { min-height: 40px; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.offset-line { font-size: .82rem; color: var(--muted); font-family: var(--mono); margin-right: auto; overflow-wrap: anywhere; }
.btn {
    font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
    background: var(--btn-bg); color: var(--btn-ink); border: 1px solid var(--btn-bg);
    padding: 10px 18px; border-radius: 999px; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { opacity: .9; }
.btn.small { padding: 7px 14px; font-size: .85rem; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.hint { color: var(--muted); font-size: .84rem; margin-top: 12px; max-width: 82ch; }
.note-warn { color: var(--accent); font-size: .85rem; margin-top: 10px; }

/* ------------------------------------------------------------------ stats */
.stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 12px; margin-top: 18px;
}
.stat {
    border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 15px;
    background: var(--surface);
}
.stat-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 620; }
.stat-v { font-size: 1.18rem; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; overflow-wrap: anywhere; }
.stat-n { font-size: .78rem; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ nights */
.plan-head { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.plan-head h3 { font-size: 1.2rem; }
.plan-head p { color: var(--muted); font-size: .85rem; max-width: 62ch; }
.legend { list-style: none; display: flex; gap: 12px; flex-wrap: wrap; padding: 0; margin: 4px 0 0 auto; font-size: .78rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sw-sleep { background: var(--sleep); }
.sw-seek { background: var(--seek); }
.sw-avoid { background: repeating-linear-gradient(135deg, var(--avoid) 0 2px, transparent 2px 5px); }
.sw-curve { background: var(--accent); border-radius: 999px; height: 3px; width: 18px; }
.sw-line { background: repeating-linear-gradient(90deg, var(--faint) 0 3px, transparent 3px 6px); border-radius: 0; height: 2px; width: 18px; }
.nights { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 14px; margin-top: 14px; }
.night {
    border: 1px solid var(--line); border-radius: var(--radius-s);
    padding: 14px 15px 12px; background: var(--surface);
}
.night-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.night-no { font-weight: 700; font-size: .95rem; }
.night-date { color: var(--muted); font-size: .82rem; }
.night-shift { margin-left: auto; font-size: .72rem; color: var(--accent); font-family: var(--mono); }
.rhythm { margin: 12px 0 8px; }
.track {
    position: relative; height: 22px; border-radius: 7px; overflow: hidden;
    background: linear-gradient(90deg, var(--surface-2), var(--surface-2));
    box-shadow: inset 0 0 0 1px var(--line);
}
.track::before {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%);
    opacity: .7; pointer-events: none;
}
.seg { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; }
.seg-sleep { background: var(--sleep); }
.seg-seek { background: var(--seek); }
.seg-avoid { background: repeating-linear-gradient(135deg, var(--avoid) 0 3px, transparent 3px 7px); }
.seg-mel { background: var(--accent); box-shadow: 0 0 0 1.5px var(--surface); }
.scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .64rem; color: var(--faint); margin-top: 4px; }
.night-times { display: grid; gap: 3px; margin: 8px 0 0; }
.night-times > div { display: flex; justify-content: space-between; gap: 12px; font-size: .82rem; }
.night-times dt { color: var(--muted); }
.night-times dd { margin: 0; font-family: var(--mono); font-size: .8rem; text-align: right; }

.ics-row { margin-top: 20px; display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ics-row .btn { flex: 0 0 auto; }
.ics-note { color: var(--muted); font-size: .82rem; max-width: 60ch; flex: 1 1 280px; }

.explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 26px; }
.explain.single { grid-template-columns: 1fr; }
.explain article {
    border-left: 2px solid var(--accent); padding-left: 16px;
}
.explain h3 { margin-bottom: 7px; }
.explain p { color: var(--muted); font-size: .9rem; }
.formula { font-family: var(--mono); color: var(--ink) !important; margin-top: 8px; font-size: .9rem; }

/* ------------------------------------------------------------------ caffeine */
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset {
    font: inherit; font-size: .85rem; cursor: pointer; color: var(--muted);
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
    padding: 7px 13px; white-space: nowrap;
}
.preset:hover { color: var(--ink); }
.preset.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chart-card { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px; background: var(--surface); }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 6px; }
.chart-head h3 { font-size: 1.02rem; }
.chart-key { margin-left: auto; font-size: .74rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chart-scroll { overflow-x: auto; overflow-y: hidden; }
.cf-chart { display: block; width: 100%; height: auto; overflow: visible; min-width: 0; }
@media (max-width: 760px) {
    .cf-chart { min-width: 620px; }
    .chart-scroll { padding-bottom: 4px; }
}
.cf-grid { stroke: var(--line); stroke-width: 1; }
.cf-grid-v { stroke-dasharray: 2 6; opacity: .7; }
.cf-axis { fill: var(--faint); font-family: var(--mono); font-size: 10px; }
.cf-curve { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.cf-thr { stroke: var(--sky); stroke-width: 1.2; stroke-dasharray: 5 5; opacity: .85; }
.cf-thr-t { fill: var(--sky); font-family: var(--mono); font-size: 10px; }
.cf-bed { stroke: var(--sleep); stroke-width: 1.2; stroke-dasharray: 2 4; }
.cf-bed-t { fill: var(--sleep); font-family: var(--mono); font-size: 10px; }

/* ------------------------------------------------------------------ sleep */
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; width: fit-content; max-width: 100%; }
.segmented button {
    font: inherit; font-size: .86rem; border: 0; background: transparent; color: var(--muted);
    padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.segmented button.is-active { background: var(--ink); color: var(--bg); }
.cycle-title { margin-top: 22px; font-size: 1.05rem; }
.cycles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.cycle {
    border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px;
    background: var(--surface); border-top: 3px solid var(--sleep);
}
.cycle.q-ok { border-top-color: var(--accent); }
.cycle.q-long { border-top-color: var(--sky); }
.cycle-n { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 620; }
.cycle-time { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.cycle-sub { font-size: .82rem; color: var(--muted); }
.cycle-q { font-size: .74rem; color: var(--accent); margin-top: 8px; text-transform: uppercase; letter-spacing: .08em; }

/* ------------------------------------------------------------------ sections */
.sec { padding-top: 54px; padding-bottom: 8px; }
.sec-head { max-width: 70ch; margin-bottom: 22px; }
.sec-head h2 { margin-bottom: 8px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.step {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
}
.step-no { font-family: var(--mono); font-size: .76rem; color: var(--accent); }
.step h3 { margin: 8px 0 6px; }
.step p { color: var(--muted); font-size: .9rem; }
.sci-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 16px; }
.sci { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.sci h3 { margin-bottom: 8px; }
.sci p { color: var(--muted); font-size: .9rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .88rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface-2); font-weight: 620; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }
.tbl-note { color: var(--muted); font-size: .82rem; margin-top: 10px; max-width: 80ch; }

.faq { display: grid; gap: 8px; }
.faq details, .policy-faq details {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
    padding: 14px 16px;
}
.faq summary, .policy-faq summary {
    cursor: pointer; font-weight: 600; font-size: .95rem; list-style: none;
    display: flex; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker, .policy-faq summary::-webkit-details-marker { display: none; }
.faq summary::after, .policy-faq summary::after { content: "+"; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after, .policy-faq details[open] summary::after { content: "–"; }
.faq details p, .policy-faq details p { color: var(--muted); font-size: .9rem; margin-top: 9px; }

.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.limit { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px; background: var(--surface); }
.limit h3 { font-size: .98rem; margin-bottom: 6px; }
.limit p { color: var(--muted); font-size: .88rem; }
.sources { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.sources h3 { font-size: .9rem; margin-bottom: 8px; }
.sources ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: .82rem; }
.sources li { margin-bottom: 4px; }
.disclaimer {
    margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-s);
    background: var(--accent-soft); color: var(--ink); font-size: .84rem; border: 1px solid var(--line);
}

/* ------------------------------------------------------------------ footer */
.site-foot { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface-2); padding: 34px 0 26px; }
.foot-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; }
.foot-brand { font-weight: 700; font-size: 1.05rem; }
.foot-brand span { color: var(--accent); }
.foot-note { color: var(--muted); font-size: .85rem; margin-top: 6px; max-width: 46ch; }
.operated { font-size: .78rem; color: var(--faint); margin-top: 10px; letter-spacing: .04em; }
.foot-right { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foot-links { font-size: .88rem; }
.foot-langs { font-size: .8rem; color: var(--muted); }
.foot-langs span { color: var(--faint); margin-right: 6px; }
.foot-legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: .76rem; max-width: 100ch; }

/* ------------------------------------------------------------------ policy pages */
.page-wrap { max-width: 780px; padding-top: 48px; }
.page-wrap h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 10px; }
.updated { color: var(--faint); font-size: .8rem; margin-bottom: 20px; font-family: var(--mono); }
.page-wrap h2 { font-size: 1.18rem; margin: 28px 0 8px; }
.page-wrap p { color: var(--muted); margin-bottom: 10px; }
.policy-faq { margin-top: 28px; display: grid; gap: 8px; }
.policy-faq h2 { margin: 0 0 4px; }
.contact-card { margin-top: 26px; }
.back { display: inline-block; margin-top: 26px; font-size: .9rem; }
.not-found { padding-top: 70px; }
.nf-code { font-family: var(--mono); color: var(--accent); font-size: .9rem; letter-spacing: .2em; }
.nf-langs { list-style: none; padding: 0; display: grid; gap: 6px; margin: 18px 0 24px; }
.nf-langs li a { font-size: .95rem; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 34px; }
    .hero-art { order: -1; justify-content: flex-start; }
    .dial { width: 168px; }
    .answer { grid-template-columns: 1fr; gap: 8px; }
    .foot-grid { grid-template-columns: 1fr; }
    .legend { margin-left: 0; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .head-inner { flex-wrap: nowrap; gap: 8px; min-height: 54px; }
    .brand-name { font-size: .98rem; }
    .langs { gap: 0; }
    .langs a { padding: 5px 5px; font-size: .74rem; }
    .icon-btn { width: 32px; height: 32px; flex: 0 0 auto; }
    .wrap { padding: 0 16px; }
    .panel { padding: 18px 14px; border-radius: 16px; }
    .tool-form { padding: 13px; gap: 12px; }
    .tabs { width: 100%; }
    .tab { flex: 1 1 auto; text-align: center; padding: 9px 10px; font-size: .84rem; }
    h1 { letter-spacing: -.03em; }
    .night { padding: 12px; }
    .cycle-time { font-size: 1.6rem; }
    .chart-head { gap: 4px; }
    .chart-key { margin-left: 0; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat-v { font-size: 1.05rem; }
    .limit, .sci, .step { padding: 15px; }
    .sources ol { padding-left: 16px; }
    .sec { padding-top: 40px; }
    .site-foot { margin-top: 44px; }
}

@media (max-width: 420px) {
    .stats { grid-template-columns: 1fr; }
    .brand-sub { display: none; }
}

@media print {
    .site-head, .tabs, .ics-row .btn, .icon-btn, .skip, .hero-art { display: none; }
    body::before { display: none; }
    body { background: #fff; color: #000; }
    .panel { box-shadow: none; }
}
