/* Кабинет блогера-партнёра v6 — общее для обеих вёрсток. Цвета — токены, тёмная тема
   по prefers-color-scheme. Шрифты системные (CSP без внешних шрифтов). */
:root {
  --bg: #f5f0e8;
  --bg2: #ece5da;
  --card: #fffdf9;
  --ink: #221d18;
  --ink2: #5d554c;
  --line: #e0d7ca;
  --accent: #6d4a8f;          /* верес — фирменный цвет линейки Veresk */
  --accent-ink: #fff;
  --accent-soft: #ece3f4;
  --ok: #2f7a4f;
  --ok-soft: #e1f0e6;
  --warn: #a5610a;
  --warn-soft: #fbecd6;
  --bad: #b23b2e;
  --bad-soft: #f8e0dc;
  --info: #2b6390;
  --info-soft: #e0ecf6;
  --tier: #c2410c;
  --stage-dark: #1f1b22;
  --stage-light: #ece6dc;
  --shadow: 0 1px 2px rgb(40 30 20 / .06), 0 6px 22px rgb(40 30 20 / .07);
  --r: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110f;
    --bg2: #1d1915;
    --card: #211c18;
    --ink: #f2ece4;
    --ink2: #b3a99d;
    --line: #3a322b;
    --accent: #b89ad6;
    --accent-ink: #1a1320;
    --accent-soft: #2f2639;
    --ok: #7fcf9c;
    --ok-soft: #1d3326;
    --warn: #f0b45c;
    --warn-soft: #3a2a14;
    --bad: #f08a7e;
    --bad-soft: #3c1e1a;
    --info: #8ec0ea;
    --info-soft: #1a2c3c;
    --tier: #fb923c;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; overflow-wrap: anywhere; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.muted { color: var(--ink2); }
.tiny { font-size: .8rem; line-height: 1.4; }
.label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); margin-top: .6rem; }
.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 600; }
.lead { color: var(--ink2); max-width: 62ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--card); padding: .5rem 1rem; border-radius: 10px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fatal { padding: 2rem 1rem; text-align: center; }
.boot { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* шапка: общие элементы */
.brand { font: 700 1.15rem/1 var(--serif); color: var(--ink); text-decoration: none; }
.grow { flex: 1; }
.demo-badge {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: var(--warn-soft); color: var(--warn); padding: .25rem .55rem; border-radius: 999px; white-space: nowrap;
}
.cur { display: inline-flex; background: var(--bg2); border-radius: 999px; padding: 3px; }
.cur button { border: 0; background: none; min-width: 40px; min-height: 36px; border-radius: 999px; font-weight: 700; cursor: pointer; color: var(--ink2); }
.cur button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.lang { display: inline-grid; place-items: center; min-width: 44px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; font-size: .85rem; }

/* кинетический заголовок: слова выезжают из масок (запас под выносы глифов) */
.kin { font-size: clamp(1.7rem, 4.2vw, 3.2rem); }
.kin .w { display: inline-block; clip-path: inset(-0.12em -0.15em -0.2em -0.15em); margin-right: .24em; }
.kin .w > span { display: inline-block; animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms + 80ms); }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }

/* кнопки */
.btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-height: 44px; padding: .55rem 1rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .15s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-veto { background: var(--card); border-color: var(--bad); color: var(--bad); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 36px; padding: .35rem .75rem; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .btn-ok { color: #0d1f14; } }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; padding: .6rem 0 0; cursor: pointer; text-align: left; min-height: 40px; }

/* фишки */
.chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-accent { background: var(--accent-soft); color: var(--accent); }

/* карточка действия */
.act {
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem;
  display: flex; flex-direction: column; gap: .45rem; min-width: 0; position: relative;
  border: 1px solid transparent; transition: border-color .3s;
}
.act.is-done { border-color: var(--ok); }
.act h3 { font-size: 1.15rem; }
.act-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.step { font-size: .78rem; color: var(--ink2); font-variant-numeric: tabular-nums; }
.meta { color: var(--ink2); font-size: .9rem; }
.big { font: 700 2.1rem/1.05 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cd { font-variant-numeric: tabular-nums; font-size: 1.15rem; display: block; }
.resolved { font-weight: 600; color: var(--ok); }
.line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem; }
.line .cd { display: inline; }

.timer { display: flex; gap: .8rem; align-items: center; margin-top: .3rem; }
.timer > div { display: flex; flex-direction: column; min-width: 0; }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--bg2); }
.ring-arc { fill: none; stroke: var(--warn); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring-drop .ring-arc { stroke: var(--accent); }

.bar { height: 12px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); border-radius: inherit; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar-bonus.is-full > i { background: var(--ok); }
.drop-count { display: flex; align-items: baseline; gap: .2rem; }
.pay-amt .big { color: var(--ok); }

/* 3D-окно: только компактная пилюля поверх модели */
.viewer {
  position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3;
  background: radial-gradient(120% 90% at 50% 20%, var(--bg2), var(--bg));
}
.viewer.on-dark { background: radial-gradient(120% 90% at 50% 15%, #3a3240, var(--stage-dark)); }
.viewer.on-light { background: radial-gradient(120% 90% at 50% 15%, #fbf8f3, var(--stage-light)); }
.v3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.v3d:active { cursor: grabbing; }
.pill {
  position: absolute; left: 10px; top: 10px; z-index: 2; max-width: calc(100% - 20px);
  font-size: .75rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px;
  background: rgb(255 255 255 / .86); color: #2b241e; backdrop-filter: blur(6px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.viewer.is-ready .pill::before { content: "● "; color: #2f7a4f; }
.viewer.is-bad .pill { background: #f8e0dc; color: #8a2a20; }
.hint3d {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; font-size: .72rem; padding: .2rem .55rem; border-radius: 999px;
  background: rgb(0 0 0 / .35); color: #fff; opacity: 0; transition: opacity .4s; pointer-events: none;
}
.viewer.is-ready:not(.touched) .hint3d { opacity: 1; }
.viewer.no-3d { display: grid; place-items: center; }
.attr { font-size: .7rem; color: var(--ink2); margin-top: .35rem; overflow-wrap: anywhere; }

/* живые цифры */
.tally { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem; position: relative; overflow: hidden; }
.tally-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tally h2 { font-size: 1.25rem; }
.live-dot { font-size: .75rem; font-weight: 700; color: var(--bad); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.live-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: .35rem; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.tally-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: .7rem 0 .4rem; }
.units-box { display: flex; flex-direction: column; }
.units { font: 700 3.2rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.rate-box { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.rate {
  font: 700 2rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--accent);
  background: var(--accent-soft); padding: .3rem .7rem; border-radius: 12px; margin-top: .2rem; display: inline-block;
}
.tier-on .rate { color: #fff; background: var(--tier); }
.tier-cross .rate { animation: flip .8s cubic-bezier(.2, .8, .2, 1); }
.tier-cross .meter-mark em { animation: pop 1s ease-out; }
.tier-cross::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 3px var(--tier); animation: glow 1.6s ease-out forwards;
}
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes pop { 0% { transform: translateX(-50%) scale(1); } 30% { transform: translateX(-50%) scale(1.25); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes glow { from { opacity: 1; } to { opacity: 0; } }

.meter { position: relative; height: 18px; background: var(--bg2); border-radius: 999px; margin: 1.9rem 0 .5rem; }
.meter-fill, .meter-over { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.meter-fill { background: var(--accent); }
.meter-over { background: var(--tier); width: 0; }
.meter-mark { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px dashed var(--ink); }
.meter-mark em {
  position: absolute; bottom: calc(100% + 4px); left: 0; transform: translateX(-50%); white-space: nowrap;
  font-style: normal; font-size: .74rem; font-weight: 700; color: var(--tier); background: var(--card); padding: 0 .3rem; border-radius: 6px;
}
.tally-status { font-weight: 600; font-size: .92rem; }
.tier-on .tally-status { color: var(--tier); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .9rem 0 0; }
.kv div { background: var(--bg); border-radius: 12px; padding: .6rem .7rem; min-width: 0; }
.kv dt { font-size: .75rem; color: var(--ink2); }
.kv dd { margin: 0; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.feed-h { font-size: .85rem; margin-top: 1rem; color: var(--ink2); font-family: var(--sans); font-weight: 600; }
.feed { list-style: none; margin: .4rem 0 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 1fr auto; gap: 0 .6rem; padding: .4rem 0; border-top: 1px solid var(--line); font-size: .88rem; }
.feed li .muted { grid-column: 1; font-size: .78rem; }
.feed li b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; color: var(--ok); }
.feed li.is-ret b { color: var(--bad); }
.feed li.is-new { animation: newrow 1.4s ease-out; }
@keyframes newrow { from { background: var(--accent-soft); } to { background: transparent; } }

/* журнал */
.journal-box { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem; }
.journal-box h2 { font-size: 1.25rem; }
.journal { list-style: none; margin: .7rem 0 0; padding: 0; }
.journal li { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; padding: .55rem 0 .55rem .8rem; border-left: 2px solid var(--line); position: relative; }
.journal li::before { content: ""; position: absolute; left: -6px; top: .85rem; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.journal .j-blogger::before { background: var(--accent); }
.journal .j-system::before { background: var(--warn); }
.journal .j-rp::before { background: var(--bad); }
.journal .j-factory::before { background: var(--info); }
.journal .j-operator::before { background: var(--ok); }
.j-who { font-size: .75rem; font-weight: 700; color: var(--ink2); }
.journal time { grid-column: 2; grid-row: 1; justify-self: end; font-size: .75rem; color: var(--ink2); }
.j-text { grid-column: 1 / -1; font-size: .9rem; }

/* сегменты (страна, образец, рынок) */
.seg { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.seg-b { border: 1px solid var(--line); background: var(--card); border-radius: 999px; min-height: 36px; min-width: 44px; padding: 0 .75rem; font-weight: 700; font-size: .82rem; cursor: pointer; }
.seg-b[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.disc-text { background: var(--bg); border-radius: 12px; padding: .65rem .8rem; margin-top: .5rem; font-size: .92rem; border-left: 3px solid var(--accent); }

/* модули */
.mod { display: flex; flex-direction: column; gap: 1rem; }
.mod-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: .2rem; }
.mod-head .lead { margin-top: .4rem; }
.panel { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem; min-width: 0; }
.panel h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.mod-grid { display: grid; gap: 1rem; }
.note { margin-top: .8rem; background: var(--ok-soft); color: var(--ink); border-radius: 12px; padding: .7rem .8rem; font-size: .92rem; }

.formula p { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.formula p span { color: var(--ink2); }
.formula .minus b { color: var(--bad); }
.formula .eq { border-bottom: 2px solid var(--ink); font-size: 1.05rem; }
.formula .eq span { color: var(--ink); font-weight: 600; }
.cum { width: 100%; height: auto; display: block; }
.cum .axis { stroke: var(--line); }
.cum-area { fill: var(--accent-soft); }
.cum-line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.tier-line { stroke: var(--tier); stroke-dasharray: 6 5; stroke-width: 1.5; }
.tier-txt { fill: var(--tier); font: 700 12px var(--sans); }
.now-line { stroke: var(--ink2); stroke-dasharray: 2 4; }
.now-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.now-txt, .ax-txt { fill: var(--ink2); font: 11px var(--sans); }

.pays, .orders, .codes, .links, .bars, .flags, .proto, .rules, .cal, .tl { list-style: none; margin: 0; padding: 0; }
.pays li { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: .6rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pays li:first-child { border-top: 0; }
.pay-ref { font-weight: 700; font-size: .85rem; }
.orders li { display: grid; grid-template-columns: auto 1fr auto; gap: 0 .6rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .88rem; font-variant-numeric: tabular-nums; }
.orders .o-id { font-size: .75rem; color: var(--ink2); }
.orders li > .muted { grid-column: 2; font-size: .78rem; }
.orders .o-base { grid-column: 3; grid-row: 1; text-align: right; }
.orders li > b { grid-column: 3; grid-row: 2; text-align: right; font-size: .8rem; color: var(--ok); }
.orders li.is-ret > b, .orders li.is-ret .o-base { color: var(--bad); }
.orders li.is-new { animation: newrow 1.4s ease-out; }

.samples { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
.sample-tab {
  flex: 1 0 200px; display: grid; gap: .15rem; text-align: left; border: 1px solid var(--line); background: var(--card);
  border-radius: 14px; padding: .65rem .8rem; cursor: pointer; min-height: 44px;
}
.sample-tab[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.sample-tab .chip { justify-self: start; }
.sd-grid { display: grid; gap: 1rem; }
.sd-side { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.sd-side h3 { font-size: 1.3rem; }
.sd-side h4 { font-size: .95rem; margin-top: .5rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; margin: 0; }
.facts div { background: var(--bg); border-radius: 10px; padding: .45rem .6rem; min-width: 0; }
.facts dt { font-size: .72rem; color: var(--ink2); }
.facts dd { margin: 0; font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.label-text { border: 1px dashed var(--line); border-radius: 12px; padding: .2rem .8rem .7rem; }
.photo { margin: 0; display: flex; gap: .7rem; align-items: center; }
.thumb { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: var(--stage-dark); flex: none; }
.thumb-none { display: grid; place-items: center; font-size: .7rem; text-align: center; padding: .4rem; color: #ddd; }
.proto li { padding: .35rem 0 .35rem 1.5rem; position: relative; font-size: .9rem; }
.proto li::before { position: absolute; left: 0; font-weight: 700; }
.proto .ok::before { content: "✓"; color: var(--ok); }
.proto .tip::before { content: "i"; color: var(--info); left: .2rem; font-style: italic; font-family: var(--serif); }
.proto .bad::before { content: "✕"; color: var(--bad); }
.decide { margin-top: .4rem; }

.drop-big { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.ring-wrap { position: relative; width: 150px; height: 150px; align-self: center; }
.ring-wrap > p { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tl { display: grid; gap: 0; counter-reset: s; }
.tl li { display: grid; padding: .5rem 0 .5rem 2.2rem; position: relative; }
.tl li::before {
  counter-increment: s; content: counter(s); position: absolute; left: 0; top: .5rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--bg2); color: var(--ink2);
}
.tl li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.tl li.now::before { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.bars li { display: grid; grid-template-columns: 90px 1fr auto; gap: .6rem; align-items: center; padding: .3rem 0; font-size: .88rem; }
.bars i { height: 10px; border-radius: 999px; background: var(--accent); width: var(--w); min-width: 3px; transition: width .7s; }
.bars b { font-variant-numeric: tabular-nums; font-size: .82rem; }

textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .7rem; background: var(--bg); resize: vertical; min-height: 96px; }
.flags li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; align-items: center; padding: .55rem .7rem; border-radius: 12px; margin-top: .5rem; }
.flags li > span:not(.chip) { grid-column: 1; font-size: .86rem; color: var(--ink2); }
.flags li > b { grid-column: 1; }
.flags li > .btn, .flags li > .chip { grid-column: 2; grid-row: 1 / span 2; }
.flags .bad { background: var(--bad-soft); }
.flags .asked { background: var(--warn-soft); }
.flags .ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; display: block; }
.label-card {
  margin-top: .8rem; border-radius: 14px; padding: 1rem; background: #fbf7ef; color: #2a241d; border: 1px solid #dfd4c2;
  font-size: .86rem; display: grid; gap: .45rem; box-shadow: var(--shadow);
}
.label-card .muted { color: #6b6156; }
.lb-brand { font: 700 1.3rem/1 var(--serif); letter-spacing: .04em; }
.lb-name { font-weight: 600; }
.label-card dl { margin: 0; display: grid; gap: .25rem; }
.label-card dl div { display: grid; grid-template-columns: 110px 1fr; gap: .5rem; }
.label-card dt { color: #6b6156; }
.label-card dd { margin: 0; overflow-wrap: anywhere; }
.lb-warn { border-top: 1px solid #dfd4c2; padding-top: .45rem; }
.lb-rp, .lb-attr { font-size: .78rem; color: #4d443a; overflow-wrap: anywhere; }

.codes li { display: grid; grid-template-columns: auto auto 1fr auto; gap: .2rem .7rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.codes li:first-child { border-top: 0; }
.codes .code { font-family: ui-monospace, Consolas, monospace; }
.codes li > span:last-child { grid-column: 4; }
.links li { display: grid; grid-template-columns: 90px 1fr auto; gap: .6rem; align-items: center; padding: .4rem 0; border-top: 1px solid var(--line); }
.links li:first-child { border-top: 0; }
.links code { font-size: .85rem; overflow-wrap: anywhere; }

.cal { position: relative; display: grid; gap: .5rem; }
.cal li { display: grid; grid-template-columns: 70px 1fr auto; gap: .1rem .7rem; align-items: center; padding: .55rem .7rem; border-radius: 12px; background: var(--bg); }
.cal-day { font-size: .78rem; color: var(--ink2); font-variant-numeric: tabular-nums; grid-row: 1 / span 2; }
.cal li > b { grid-column: 2; }
.cal li > .muted { grid-column: 2; font-size: .8rem; }
.cal li > .chip { grid-column: 3; grid-row: 1; justify-self: end; }
.cal li > .btn { grid-column: 3; grid-row: 2; }
.cal-today { box-shadow: 0 0 0 2px var(--accent) inset; }
.cal-done { opacity: .8; }

.bases { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.base { border-radius: 14px; padding: .8rem; display: grid; gap: .2rem; min-width: 0; }
.base b { font: 700 1.7rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.base span { font-size: .8rem; }
.b-you { background: var(--accent-soft); }
.b-both { background: linear-gradient(135deg, var(--accent-soft), var(--info-soft)); }
.b-cg { background: var(--info-soft); }
.rules li { padding: .45rem 0 .45rem 1.4rem; position: relative; font-size: .92rem; }
.rules li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.consent-demo { background: var(--bg); border-radius: 14px; padding: .9rem; display: grid; gap: .5rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; min-height: 40px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--accent); flex: none; }

/* условия договора */
.terms { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.terms li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; font-size: .82rem; }

/* диалоги */
.dlg { border: 0; border-radius: 20px; padding: 0; background: var(--card); color: var(--ink); width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.dlg::backdrop, .sheet::backdrop { background: rgb(20 14 10 / .45); }
.dlg-body { padding: 1.3rem; display: grid; gap: .7rem; }
.dlg-body h2 { font-size: 1.4rem; }
.dlg fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .2rem; }
.dlg legend { font-weight: 600; margin-bottom: .3rem; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 140%); opacity: 0;
  background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 14px; font-weight: 600; font-size: .92rem;
  max-width: calc(100vw - 32px); transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.foot { padding: 1.5rem 0 1rem; display: grid; gap: .4rem; color: var(--ink2); font-size: .88rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .kin .w > span { animation: none; }
}
