/* ВремяМетр — спокойный интерфейс на токенах Arc UI (foundation.css): мягкие поверхности, скругления, один акцент — лазурит.
   Эзотерика только намёками: круг, многоугольники, гексаграмма, тонкие орбиты. */
:root {
  color-scheme: light;
  /* поверхности и текст (Arc: --background/--surface/--surface-muted, лёгкий холодный оттенок) */
  --bg: oklch(97.4% .003 260);
  --surface: oklch(100% 0 0);
  --surface-raised: oklch(100% 0 0);
  --surface-muted: oklch(95.6% .004 260);
  --fg: oklch(19% .012 265);
  --text-2: oklch(42% .012 265);
  --text-muted: oklch(54% .01 265);
  --border: oklch(91.8% .004 265);
  --border-subtle: oklch(94.8% .003 265);
  --border-strong: oklch(84% .006 265);
  --accent: oklch(47% .14 264);
  --accent-strong: oklch(38% .14 264);
  --accent-subtle: oklch(47% .14 264 / .09);
  --danger: oklch(54% .19 27);
  /* элементы Калачакры */
  --e-red: #C9533D; --e-yellow: #DCA628; --e-white: #FFFFFF; --e-black: #202227; --e-blue: #2F63C2;
  --n-red: #C9533D; --n-orange: #DE812E; --n-yellow: #D5A321; --n-green: #3D8F55; --n-cyan: #3AA2CD; --n-blue: #2F57BE; --n-violet: #6B4DAA;
  --tint: 14%;
  --wheel-base: oklch(95.2% .004 260);
  --wheel-plate: oklch(98.6% .002 260);
  /* тени Arc */
  --shadow-resting: 0 1px 2px oklch(0% 0 0 / .04);
  --shadow-raised: 0 6px 18px oklch(0% 0 0 / .06), 0 1px 3px oklch(0% 0 0 / .035);
  --shadow-floating: 0 20px 48px oklch(0% 0 0 / .1), 0 3px 10px oklch(0% 0 0 / .045);
  /* радиусы и размеры Arc */
  --r-control: 14px; --r-panel: 22px; --r-surface: 30px; --r-pill: 999px;
  --h-sm: 36px; --h-md: 44px;
  /* шрифты */
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  /* движение Arc: motion-tokens.ts */
  --ease-enter: cubic-bezier(.16,1,.3,1);
  --ease-standard: cubic-bezier(.22,1,.36,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --ease-spring: linear(0, 0.0258, 0.09, 0.1763, 0.2732, 0.3724, 0.4683, 0.5573, 0.6376, 0.7082, 0.7689, 0.8202, 0.8628, 0.8976, 0.9256, 0.9476, 0.9648, 0.9778, 0.9875, 0.9945, 0.9994, 1.0026, 1.0047, 1.0058, 1.0062, 1.0062, 1.0059, 1.0055, 1.0049, 1.0043, 1.0036, 1.0031, 1.0025, 1.002, 1.0016, 1.0013, 1);
  --d-instant: 120ms; --d-fast: 160ms; --d-standard: 240ms; --d-considered: 480ms; --d-spring: 580ms;
  /* старые имена, на которые опирается разметка из app.js */
  --ink: var(--fg); --ink-2: var(--text-2); --muted: var(--text-muted); --rule: var(--border-strong); --rule-2: var(--border); --paper: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: oklch(16.8% .006 265); --surface: oklch(20.3% .007 265); --surface-raised: oklch(23% .008 265); --surface-muted: oklch(24.2% .008 265);
    --fg: oklch(95% .004 260); --text-2: oklch(79% .006 260); --text-muted: oklch(65% .008 262);
    --border: oklch(28.5% .008 265); --border-subtle: oklch(25% .007 265); --border-strong: oklch(37% .01 265);
    --accent: oklch(78% .095 264); --accent-strong: oklch(87% .07 264); --accent-subtle: oklch(70% .12 264 / .16); --danger: oklch(74% .16 27);
    --e-red: #DC6650; --e-yellow: #E3B33E; --e-white: #F3F2EE; --e-black: #0C0D10; --e-blue: #4C82DE;
    --n-red: #DC6650; --n-orange: #E8924A; --n-yellow: #E0B23A; --n-green: #58AE71; --n-cyan: #58B9E0; --n-blue: #5B83E0; --n-violet: #9A80D8;
    --tint: 15%; --black-mix: 62%; --wheel-plate: oklch(18.6% .007 265); --wheel-base: oklch(21% .007 265);
    --shadow-resting: 0 1px 2px oklch(0% 0 0 / .2); --shadow-raised: 0 8px 22px oklch(0% 0 0 / .24); --shadow-floating: 0 22px 55px oklch(0% 0 0 / .36);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(16.8% .006 265); --surface: oklch(20.3% .007 265); --surface-raised: oklch(23% .008 265); --surface-muted: oklch(24.2% .008 265);
  --fg: oklch(95% .004 260); --text-2: oklch(79% .006 260); --text-muted: oklch(65% .008 262);
  --border: oklch(28.5% .008 265); --border-subtle: oklch(25% .007 265); --border-strong: oklch(37% .01 265);
  --accent: oklch(78% .095 264); --accent-strong: oklch(87% .07 264); --accent-subtle: oklch(70% .12 264 / .16); --danger: oklch(74% .16 27);
  --e-red: #DC6650; --e-yellow: #E3B33E; --e-white: #F3F2EE; --e-black: #0C0D10; --e-blue: #4C82DE;
  --n-red: #DC6650; --n-orange: #E8924A; --n-yellow: #E0B23A; --n-green: #58AE71; --n-cyan: #58B9E0; --n-blue: #5B83E0; --n-violet: #9A80D8;
  --tint: 15%; --black-mix: 62%; --wheel-plate: oklch(18.6% .007 265); --wheel-base: oklch(21% .007 265);
  --shadow-resting: 0 1px 2px oklch(0% 0 0 / .2); --shadow-raised: 0 8px 22px oklch(0% 0 0 / .24); --shadow-floating: 0 22px 55px oklch(0% 0 0 / .36);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--font); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; }
::selection { background: var(--accent-subtle); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.grain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .035; z-index: 50; mix-blend-mode: multiply; }
:root[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: .03; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grain { mix-blend-mode: screen; opacity: .03; } }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* ================= шапка ================= */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent); }
.bar-in { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; min-height: 44px; border-radius: var(--r-control); }
.logo svg { width: 30px; height: 30px; fill: none; stroke: var(--fg); stroke-width: 1.4; stroke-linejoin: round; overflow: visible; }
.logo .lo-orbit { stroke: var(--border-strong); }
.logo .lo-dot { fill: var(--accent); stroke: none; transform-origin: 20px 20px; }
.logo span { font-size: 19px; font-weight: 600; letter-spacing: -.03em; }

/* сегментированная навигация (Arc: segmented-control.module.css) */
.seg { display: flex; min-width: 0; flex: 0 1 auto; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-muted); }
.seg-track { --fs: 0px; --fe: 0px; position: relative; isolation: isolate; display: flex; gap: 2px; min-width: 0; padding: 3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: inherit;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fs), #000 calc(100% - var(--fe)), transparent); mask-image: linear-gradient(to right, transparent, #000 var(--fs), #000 calc(100% - var(--fe)), transparent); }
.seg-track::-webkit-scrollbar { display: none; }
.seg-track[data-fade-start] { --fs: 24px; }
.seg-track[data-fade-end] { --fe: 24px; }
.seg a { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; min-height: var(--h-sm); padding: 0 13px; border-radius: calc(var(--r-control) - 4px); color: var(--text-muted); font-size: 14.5px; font-weight: 500; text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: color var(--d-fast) var(--ease-standard); }
@media (hover: hover) and (pointer: fine) { .seg a:hover { color: var(--fg); } }
.seg a[aria-current="page"] { color: var(--fg); }
.seg-sel { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: 0; opacity: 0; border: 1px solid var(--border); border-radius: calc(var(--r-control) - 4px); background: var(--surface); box-shadow: var(--shadow-resting); pointer-events: none; }
.seg-sel.on { opacity: 1; }

/* переключатель темы (Arc: theme-switch, иконка поворачивается при смене) */
.theme { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface); color: var(--fg); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--d-fast) var(--ease-standard), border-color var(--d-fast) var(--ease-standard); }
@media (hover: hover) and (pointer: fine) { .theme:hover { background: var(--surface-muted); border-color: var(--border-strong); } }
.ti { position: relative; width: 20px; height: 20px; display: grid; }
.ti svg { grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: opacity var(--d-fast) var(--ease-enter), transform var(--d-spring) var(--ease-spring), filter var(--d-fast) var(--ease-enter); }
.ti .i-sun { opacity: 0; transform: rotate(-30deg) scale(.7); filter: blur(2px); }
:root[data-theme="dark"] .ti .i-sun { opacity: 1; transform: none; filter: none; }
:root[data-theme="dark"] .ti .i-moon { opacity: 0; transform: rotate(30deg) scale(.7); filter: blur(2px); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ti .i-sun { opacity: 1; transform: none; filter: none; }
  :root:not([data-theme="light"]) .ti .i-moon { opacity: 0; transform: rotate(30deg) scale(.7); filter: blur(2px); }
}
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (max-width: 899px) {
  .bar-in { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .logo { order: 1; }
  .theme { order: 2; margin-left: auto; }
  .seg { order: 3; flex: 1 1 100%; margin: 8px 0 0; }
  .seg a { min-height: 40px; }
}
@media (pointer: coarse) { .seg a { min-height: 44px; } }

main.wrap { padding-top: 24px; padding-bottom: 24px; }
@media (min-width: 720px) { main.wrap { padding-top: 40px; } }
.view[hidden] { display: none !important; }

/* ================= базовые элементы (Arc: button, input, select, checkbox, badge) ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h-md); padding: 0 18px; border: 1px solid var(--fg); border-radius: var(--r-control); background: var(--fg); color: var(--bg); font-size: 14.5px; font-weight: 500; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: opacity var(--d-fast) var(--ease-standard), background-color var(--d-fast) var(--ease-standard), border-color var(--d-fast) var(--ease-standard), box-shadow var(--d-fast) var(--ease-standard), transform var(--d-instant) var(--ease-standard); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: var(--h-md); padding: 0 14px; }
@media (hover: hover) and (pointer: fine) {
  .btn:not(.ghost):hover { opacity: .9; box-shadow: var(--shadow-resting); }
  .btn.ghost:hover { background: var(--surface-muted); box-shadow: var(--shadow-resting); }
  .btn.danger:hover { border-color: color-mix(in oklab, var(--danger) 60%, var(--border)); }
}
.link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; margin: 0 -10px; border: 0; border-radius: var(--r-pill); background: none; color: var(--accent); font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color var(--d-fast) var(--ease-standard); }
@media (hover: hover) and (pointer: fine) { .link:hover { background: var(--accent-subtle); } }
@media (pointer: coarse) { .link { min-height: 44px; } }

.ib { width: var(--h-md); height: var(--h-md); flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface); color: var(--fg); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--d-fast) var(--ease-standard), border-color var(--d-fast) var(--ease-standard), transform var(--d-instant) var(--ease-standard); }
.ib:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .ib:hover { background: var(--surface-muted); border-color: var(--border-strong); } }
.ib svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0 0 18px; }
.form label { position: relative; display: grid; gap: 6px; min-width: 0; color: var(--text-2); font-size: 13px; font-weight: 500; }
.form .grow { flex: 1 1 220px; }
.form input:not([type=checkbox]), .form select, textarea { width: 100%; min-width: 0; height: var(--h-md); padding: 0 13px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface); color: var(--fg); font-size: 15px; font-weight: 400; font-variant-numeric: tabular-nums; outline: none; transition: border-color var(--d-fast) var(--ease-standard), background-color var(--d-fast) var(--ease-standard); }
.form input::placeholder, textarea::placeholder { color: var(--text-muted); }
@media (hover: hover) and (pointer: fine) { .form input:not([type=checkbox]):hover, .form select:hover, textarea:hover { border-color: var(--border-strong); } }
.form input:not([type=checkbox]):focus-visible, .form select:focus-visible, textarea:focus-visible { border-color: var(--fg); outline: none; }
.form input[type=date], .form input[type=time] { min-width: 150px; }
.form input[type=number] { min-width: 96px; }
input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; border-radius: 6px; }
.form select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.form label:has(select)::after { content: ""; position: absolute; right: 14px; bottom: 16px; width: 12px; height: 12px; background: var(--text-muted); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
textarea { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.form .chk { display: flex; align-items: center; gap: 10px; min-height: var(--h-md); color: var(--fg); font-size: 14.5px; cursor: pointer; }
.form input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); cursor: pointer; display: grid; place-items: center; transition: background-color var(--d-fast) var(--ease-standard), border-color var(--d-fast) var(--ease-standard), transform var(--d-spring) var(--ease-spring); }
.form input[type=checkbox]::after { content: ""; width: 11px; height: 11px; background: var(--bg); transform: scale(0); transition: transform var(--d-spring) var(--ease-spring);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.2 6.3 2.4 2.4 5.2-5.4' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.2 6.3 2.4 2.4 5.2-5.4' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.form input[type=checkbox]:checked { background: var(--fg); border-color: var(--fg); }
.form input[type=checkbox]:checked::after { transform: scale(1); }
.form input[type=checkbox]:active { transform: scale(.94); }
.form label[hidden] { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hint { color: var(--text-muted); font-size: 14px; }
.hint b { color: var(--fg); font-weight: 500; }
code { font: 13px var(--mono); background: var(--surface-muted); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }

/* поверхность-карточка (Arc: card.module.css) */
.panel, .eph, .fig, .calc, .ev-col, .tbl-wrap, .dist figure, .cal > div, .wis, .rays, .more, .pair > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }

/* заголовки разделов */
.vh { margin-bottom: 24px; max-width: 72ch; }
.vh h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: clamp(30px, 5.4vw, 42px); font-weight: 600; line-height: 1.08; letter-spacing: -.035em; }
.vh p { margin: 0; color: var(--text-2); text-wrap: pretty; }
.glyph { flex: none; display: inline-grid; width: 34px; height: 34px; }
.glyph svg { width: 100%; height: 100%; overflow: visible; }
h3 { margin: 32px 0 12px; font-size: 19px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
h4 { letter-spacing: -.015em; }

/* ================= ДЕНЬ ================= */
.day { display: grid; gap: 22px; }
@media (min-width: 980px) { .day { grid-template-columns: minmax(420px, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; } .day .wheel { position: sticky; top: 90px; } }

.wheel { position: relative; margin: 0; width: 100%; max-width: 580px; justify-self: center; padding: clamp(12px, 3vw, 28px) clamp(10px, 3vw, 28px) 18px; border: 1px solid var(--border); border-radius: var(--r-surface); background:
  radial-gradient(circle at 50% 46%, transparent 0 57%, color-mix(in oklab, var(--border) 55%, transparent) 57.1% 57.25%, transparent 57.4% 100%),
  radial-gradient(circle at 50% 46%, var(--wheel-plate), var(--surface) 72%); overflow: hidden; }
.wheel svg { display: block; width: 100%; height: auto; aspect-ratio: 1; overflow: visible; touch-action: manipulation; }
.wheel .cell { fill: color-mix(in oklab, var(--c) var(--tint), var(--wheel-base)); stroke: color-mix(in oklab, var(--c) 62%, var(--border-strong)); stroke-width: 1; stroke-linejoin: round; cursor: default; transition: fill var(--d-considered) var(--ease-standard), stroke var(--d-considered) var(--ease-standard); }
.wheel .cell[data-c="white"] { stroke: var(--border-strong); }
.wheel .cell[data-c="black"] { stroke: color-mix(in oklab, var(--fg) 34%, var(--wheel-base)); }
@media (hover: hover) and (pointer: fine) { .wheel .cell:hover { fill: color-mix(in oklab, var(--c) 50%, var(--wheel-base)); } }
.wheel .cell.hit { fill: var(--c); stroke: var(--c); }
.wheel .hl { fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linejoin: round; pointer-events: none; }
.wheel .lab { font: 500 11px var(--font); fill: var(--text-muted); text-anchor: middle; dominant-baseline: middle; letter-spacing: -.01em; transition: fill var(--d-fast) var(--ease-standard); }
.wheel .lab.on { fill: var(--fg); }
.wheel .orbit { fill: none; stroke: var(--border-strong); stroke-width: .8; }
.wheel .ticks { fill: none; stroke: var(--text-muted); stroke-width: .8; stroke-linecap: round; opacity: .55; }
.wheel .core { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.wheel .hex { fill: none; stroke: var(--border-strong); stroke-width: .9; stroke-linejoin: round; }
.wheel .num { font: 500 40px var(--font); letter-spacing: -.04em; fill: var(--fg); text-anchor: middle; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.wheel .num.peek { fill: var(--accent); }
.wheel .wd { font: 400 9.5px var(--mono); fill: var(--text-muted); text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.wheel .yr { transition: transform 900ms var(--ease-in-out); }
.wheel .yr-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.wheel .tag { font: 600 9px var(--font); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.wheel .tag-bg { fill: var(--c); stroke: var(--fg); stroke-width: 1.1; }
.wheel .tagg { cursor: default; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 6px; color: var(--text-muted); font: 12px var(--mono); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--fg); font: 600 9.5px var(--font); font-style: normal; }
.legend .lg-yr b { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

.sheet { min-width: 0; }
/* на телефоне сначала дата и переключатель, потом круг, потом подробности */
@media (max-width: 979px) {
  .day { gap: 0; grid-template-columns: minmax(0, 1fr); }
  .sheet { display: contents; }
  .sheet > * { order: 4; }
  .dateline { order: 1; }
  .sub { order: 2; }
  .day .wheel { order: 3; margin-bottom: 20px; }
}
@media (max-width: 600px) {
  .wheel .lab { font-size: 13.5px; }
  .wheel .wd { font-size: 11px; }
  .wheel .num { font-size: 44px; }
  .dnav { width: 100%; min-width: 0; }
  .dateline { min-width: 0; }
  .dnav .pick { flex: 1 1 auto; min-width: 0; }
  .dnav .pick input { width: 100%; min-width: 0; }
}
.dateline { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 20px; }
.date { margin: 0; font-size: clamp(38px, 6.4vw, 58px); font-weight: 600; line-height: 1; letter-spacing: -.045em; }
.date span { color: var(--text-muted); font-weight: 500; }
.sub { margin: 10px 0 20px; color: var(--text-2); }
.dnav { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--border); border-radius: calc(var(--r-control) + 4px); background: var(--surface-muted); }
.dnav .ib, .dnav .btn { border-color: transparent; background: transparent; }
@media (hover: hover) and (pointer: fine) { .dnav .ib:hover, .dnav .btn.ghost:hover { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-resting); } }
.pick input { height: var(--h-md); padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface); color: var(--fg); font-variant-numeric: tabular-nums; outline: none; }
.pick input:focus-visible { border-color: var(--fg); }

/* уровни: список-карточка с мягкими строками */
.eph { list-style: none; margin: 0; padding: 6px; }
.eph li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "img lv per" "img nm per"; column-gap: 14px; align-items: center; padding: 9px 10px; border-radius: calc(var(--r-panel) - 8px); transition: background-color var(--d-fast) var(--ease-standard); }
.eph li, .ev li { position: relative; }
.eph li + li::before, .ev li + li::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--border-subtle); transition: opacity var(--d-fast) var(--ease-standard); }
@media (hover: hover) and (pointer: fine) { .eph li:hover { background: var(--surface-muted); } .eph li:hover::before, .eph li:hover + li::before { opacity: 0; } }
.eph .lv { grid-area: lv; align-self: end; color: var(--text-muted); font: 12px/1.3 var(--mono); }
.eph li > span:empty { display: none; }
.eph img { grid-area: img; width: 48px; height: 48px; border-radius: 14px; background: #fff; border: 1px solid var(--border); padding: 3px; object-fit: contain; }
.eph .nm { grid-area: nm; align-self: start; display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 18px; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.eph .per { grid-area: per; color: var(--text-muted); font: 13px var(--mono); text-align: right; white-space: nowrap; }
.no, .eph .no { display: inline-grid; place-items: center; flex: none; min-width: 28px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent-subtle); color: var(--accent-strong); font: 500 12px var(--mono); letter-spacing: 0; transform: translateY(-1px); }
.eph-tight li { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 7px 10px; }
.eph-tight img { width: 40px; height: 40px; border-radius: 12px; }
.eph-tight .nm { font-size: 16.5px; }
@media (max-width: 480px) { .eph li { grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; } .eph img { width: 44px; height: 44px; } .eph .nm { font-size: 17px; } .eph .per { font-size: 12px; } }

.pair { display: grid; gap: 10px; margin-top: 10px; }
@media (min-width: 560px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair > div { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.pair img { width: 44px; height: 44px; flex: none; border-radius: 13px; background: #fff; border: 1px solid var(--border); padding: 4px; }
.pair .nm { font-size: 16.5px; font-weight: 500; letter-spacing: -.015em; line-height: 1.25; }
.pair .meta { margin-top: 2px; color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.hint.old { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-control); background: color-mix(in oklab, var(--n-orange) 10%, var(--surface)); color: var(--text-2); }

/* цитата дня: без рамки, тонированная плашка, книжный курсив */
.epi { position: relative; margin: 22px 0 0; padding: 22px 22px 16px 58px; border-radius: var(--r-panel); background: var(--surface-muted); }
.epi::before { content: ""; position: absolute; left: 20px; top: 25px; width: 22px; height: 22px; background: var(--accent); opacity: .85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cpath d='M0-10.5 9.1 5.25H-9.1Z M0 10.5-9.1-5.25H9.1Z' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cpath d='M0-10.5 9.1 5.25H-9.1Z M0 10.5-9.1-5.25H9.1Z' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.epi p { margin: 0 0 10px; font: italic 400 20px/1.5 var(--serif); letter-spacing: -.005em; max-width: 52ch; text-wrap: pretty; }
.epi footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; color: var(--text-muted); font-size: 13px; }
.epi:empty { display: none; }
@media (max-width: 480px) { .epi { padding: 50px 18px 12px; } .epi::before { left: 18px; top: 18px; } .epi p { font-size: 18.5px; } }

.today-ev h3 { margin: 26px 0 10px; }

/* ================= списки событий ================= */
.ev { list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
.ev li { display: grid; grid-template-columns: minmax(84px, auto) 1fr auto; gap: 12px; align-items: center; min-height: 44px; padding: 8px 10px; border-radius: calc(var(--r-panel) - 8px); }
.ev li > span:empty { display: none; }
.ev li:has(> span:first-child:empty) { grid-template-columns: 1fr; grid-template-areas: none; justify-items: center; padding: 14px 10px; color: var(--text-muted); }
.ev li:has(> span:first-child:empty) > .ttl { grid-area: auto; }
.ev .when { color: var(--text-muted); font: 12.5px var(--mono); white-space: nowrap; }
.ev .when b { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent-subtle); color: var(--accent-strong); font-weight: 500; }
.ev .ttl { font-size: 15px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.ev .age { color: var(--text-muted); font: 12.5px var(--mono); white-space: nowrap; text-align: right; }
.ev button { width: 36px; height: 36px; border: 0; border-radius: var(--r-pill); background: none; color: var(--text-muted); cursor: pointer; font-size: 19px; line-height: 1; transition: background-color var(--d-fast) var(--ease-standard), color var(--d-fast) var(--ease-standard); }
@media (hover: hover) and (pointer: fine) { .ev button:hover { background: var(--surface-muted); color: var(--danger); } }
@media (pointer: coarse) { .ev button { width: 44px; height: 44px; } }
@media (max-width: 480px) { .ev li { grid-template-columns: 1fr auto; grid-template-areas: "when age" "ttl ttl"; row-gap: 2px; } .ev .when { grid-area: when; } .ev .ttl { grid-area: ttl; } .ev .age, .ev button { grid-area: age; justify-self: end; } }

/* ================= таблицы ================= */
.tbl-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; white-space: nowrap; vertical-align: middle; border-bottom: 1px solid var(--border-subtle); }
.tbl th:first-child, .tbl td:first-child { padding-left: 18px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 18px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl thead th { position: sticky; top: 0; background: var(--surface); color: var(--text-muted); font-weight: 500; font-size: 12.5px; border-bottom-color: var(--border); }
@media (hover: hover) and (pointer: fine) { .tbl tbody tr:hover td { background: var(--surface-muted); } }
.tbl tr.now td { background: var(--accent-subtle); }
.tbl tr.now td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tbl tr.sel td { background: var(--accent-subtle); }
.tbl td.x { text-align: right; width: 1%; }
.tbl button.del { width: 36px; height: 36px; border: 0; border-radius: var(--r-pill); background: none; color: var(--text-muted); cursor: pointer; font-size: 19px; line-height: 1; transition: background-color var(--d-fast), color var(--d-fast); }
@media (hover: hover) and (pointer: fine) { .tbl button.del:hover { background: var(--surface); color: var(--danger); } }
@media (pointer: coarse) { .tbl button.del { width: 44px; height: 44px; } }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fg) 30%, transparent); }
.pn { white-space: nowrap; }
.pn b { margin-right: 6px; color: var(--accent); font: 500 12.5px var(--mono); }

/* календарь года: клетка тонируется цветом принципа дня (Arc: calendar.module.css — круглые ячейки, тихий заголовок) */
.cal { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.cal > div { padding: 14px 14px 12px; }
.cal h4 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.cal > div > .hint { font-size: 12.5px; }
.cal table { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font-size: 12px; margin: 0 -3px; width: calc(100% + 6px); }
.cal th { padding: 2px 0 4px; color: var(--text-muted); font: 500 11px var(--mono); }
.cal td { padding: 0; text-align: center; }
.cal td span { position: relative; display: grid; place-content: center; aspect-ratio: 1; border-radius: 10px; background: color-mix(in oklab, var(--c, transparent) 15%, var(--surface)); line-height: 1.05; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: default; transition: background-color var(--d-fast) var(--ease-standard); }
@media (hover: hover) and (pointer: fine) { .cal td span:hover { background: color-mix(in oklab, var(--c, transparent) 38%, var(--surface)); } }
.cal td span small { display: block; margin-top: 1px; color: var(--text-muted); font: 400 9px var(--mono); }
.cal td span i { display: none; }
.cal td span[data-c="black"] { background: color-mix(in oklab, var(--c) var(--black-mix, 16%), var(--surface)); }
.cal td span[data-c="white"] { box-shadow: inset 0 0 0 1px var(--border); }
.cal td span.today { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-subtle); }

/* ================= ХАРАКТЕРИСТИКА ================= */
.char-grid { display: grid; gap: 22px; }
@media (min-width: 980px) { .char-grid { grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; } }
.figs { display: grid; gap: 12px; grid-template-columns: 1fr; min-width: 0; }
@media (min-width: 1500px) { .figs { grid-template-columns: 1fr 1fr; } }
.figs > .hint { margin: 0 0 4px; }
.fig { min-width: 0; padding: 14px 16px 10px; }
.fig h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.fig h4 svg { width: 30px; height: 30px; flex: none; overflow: visible; }
.fig table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; table-layout: auto; }
.fig td, .fig th { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--border-subtle); text-align: left; white-space: normal; vertical-align: middle; }
.fig tbody tr:last-child td { border-bottom: 0; }
.fig th { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.fig td:first-child { color: var(--text-muted); font: 12px var(--mono); width: 2.2em; }
.fig td:nth-child(2) { font: 12.5px var(--mono); color: var(--text-2); white-space: nowrap; }
.fig td .pn { white-space: normal; }
.fig td.diff { color: var(--danger); }
.fig td.diff .pn b { color: var(--danger); }
.fig .note { color: var(--text-muted); font-size: 12.5px; margin: 8px 0 4px; }
.rays { margin-top: 22px; padding: 18px 18px 20px; }
.rays h3 { margin: 0 0 14px; }
.rays .form { margin-bottom: 8px; }
.ray-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 860px) { .ray-grid { grid-template-columns: 340px minmax(0, 1fr); gap: 28px; } }
.ray-svg { width: 100%; max-width: 340px; justify-self: center; overflow: visible; }
.ray-svg .base { fill: none; stroke: var(--border-strong); stroke-width: .8; }
.ray-svg .poly { fill: none; stroke-width: 1.5; stroke-linejoin: round; }
.ray-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); font-size: 14px; }
.ray-list > div { padding: 12px 14px; border-radius: calc(var(--r-panel) - 6px); background: var(--surface-muted); }
.ray-list > div > div { padding: 2px 0; }
.ray-list h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.ray-list h4 i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }

/* ================= СПИСОК ================= */
details.more { margin: 0 0 18px; padding: 0 16px; }
details.more summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; list-style: none; cursor: pointer; color: var(--fg); font-weight: 500; font-size: 15px; -webkit-tap-highlight-color: transparent; }
details.more summary::-webkit-details-marker { display: none; }
details.more .chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--d-spring) var(--ease-spring); }
details.more[open] .chev { transform: rotate(180deg); }
details.more[open] { padding-bottom: 16px; }
details.more > p { margin: 0 0 10px; }
.dist { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 16px; }
.dist figure { margin: 0; padding: 14px 16px 16px; }
.dist figcaption { margin-bottom: 6px; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.dist svg { width: 100%; max-width: 300px; display: block; margin: 0 auto; overflow: visible; }
.dist .ax { fill: none; stroke: var(--border-strong); stroke-width: .8; }
.dist .bar { stroke: color-mix(in oklab, var(--fg) 30%, transparent); stroke-width: .6; }
.dist text { font: 9.5px var(--mono); fill: var(--text-muted); text-anchor: middle; dominant-baseline: middle; }
.empty { grid-column: 1 / -1; margin: 0; padding: 28px 20px; border: 1px dashed var(--border-strong); border-radius: var(--r-panel); color: var(--text-muted); text-align: center; }
.tbl:empty { display: none; }
#v-list .tbl-wrap:has(.tbl:empty) { display: none; }

/* ================= СОБЫТИЯ ================= */
.ev-grid { display: grid; gap: 28px; }
@media (min-width: 980px) { .ev-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.ev-grid h3 { margin-top: 0; }
.period { margin: -4px 0 14px; color: var(--text-2); font-size: 14.5px; }

/* ================= ДАТЫ ================= */
.calc-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.calc { padding: 18px; }
.calc h3 { margin: 0 0 14px; }
.calc .form { margin-bottom: 14px; }
.calc .form label { flex: 1 1 140px; }
.res { margin: 4px 0 10px; font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.res small { display: block; margin-top: 6px; color: var(--text-2); font-size: 14px; font-weight: 400; line-height: 1.5; letter-spacing: -.006em; }
.calc .eph { padding: 4px; background: var(--surface-muted); border: 0; border-radius: calc(var(--r-panel) - 6px); }
.calc .eph li + li::before { background: var(--border); }

/* ================= ВЫСКАЗЫВАНИЯ ================= */
.wis { list-style: none; margin: 0; padding: 4px 22px; columns: 1; column-gap: 44px; column-rule: 1px solid var(--border-subtle); }
@media (min-width: 900px) { .wis { columns: 2; } }
.wis li { break-inside: avoid; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.wis p { margin: 0 0 6px; font-size: 16.5px; line-height: 1.55; text-wrap: pretty; }
.wis span { color: var(--text-muted); font: 12.5px var(--mono); }
.wis mark { background: color-mix(in oklab, var(--n-yellow) 32%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.wis:empty { display: none; }

.foot { margin-top: 48px; padding-top: 22px; padding-bottom: 40px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }

/* ================= движение (Arc: motion-tokens — вход ease-enter, мягкий blur, пружина у указателей) ================= */
@media (prefers-reduced-motion: no-preference) {
  .seg-sel.ready { transition: transform var(--d-spring) var(--ease-spring), width var(--d-spring) var(--ease-spring), opacity var(--d-fast) linear; }
  .view:not([hidden]) { animation: viewIn var(--d-considered) var(--ease-enter) both; }
  .logo .lo-dot { animation: orbit 60s linear infinite; }
  .wheel .cell { animation: cellIn .7s var(--ease-enter) both; animation-delay: var(--dl, 0s); }
  .wheel .orbit, .wheel .hex { stroke-dasharray: var(--len, 2000); animation: draw 1.6s var(--ease-in-out) both; animation-delay: var(--dl, .1s); }
  .wheel .ticks, .wheel .lab, .legend { animation: fadeIn .9s var(--ease-enter) both .35s; }
  .wheel .hl { stroke-dasharray: var(--len, 200); animation: draw .9s var(--ease-in-out) both .15s; }
  .wheel .cell.hit { animation: none; }
  .wheel .tagg { transition: transform var(--d-spring) var(--ease-spring); }
  .wheel .tag-bg { transition: fill var(--d-considered) var(--ease-standard); }
  .wheel .num.roll { animation: numIn var(--d-considered) var(--ease-enter) both; }
  .wheel .yr { animation: fadeIn .9s var(--ease-enter) both .6s; }
  .eph li { animation: rise .5s var(--ease-enter) both; animation-delay: var(--dl, 0s); }
  .ray-svg .poly { stroke-dasharray: 1200; animation: draw 1.1s var(--ease-in-out) both; animation-delay: var(--dl, 0s); }
  .fig h4 svg path, .glyph svg path { stroke-dasharray: 220; animation: draw 1.2s var(--ease-in-out) both .1s; }
  .btn, .ib, .theme { will-change: auto; }
  details.more::details-content { block-size: 0; overflow: clip; transition: block-size var(--d-standard) var(--ease-standard), content-visibility var(--d-standard) allow-discrete; }
  details.more[open]::details-content { block-size: auto; }
  :root { interpolate-size: allow-keywords; }
}
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes cellIn { from { opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: var(--len, 1200); } }
@keyframes numIn { from { opacity: 0; transform: translateY(7px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
