/* s3://alimzhanov — variant D */
:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --ink: #17191a;
  --ink-2: #3d413e;
  --muted: #5b605c;
  --line: #d6d9d3;
  --line-strong: #17191a;
  --accent: #9c4600;
  --accent-fill: #ff8a1f;
  --accent-soft: #fff1e3;
  --ok: #2c6a2c;
  --sel-bg: #17191a;
  --sel-ink: #f4f5f2;
  --code-bg: #17191a;
  --code-ink: #e9ece8;
  --code-key: #ffb46b;
  --code-str: #b8e08a;
  --code-punc: #9aa19c;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121413;
    --surface: #1a1d1c;
    --ink: #e9ece8;
    --ink-2: #c6cbc6;
    --muted: #9ba29d;
    --line: #2c302e;
    --line-strong: #e9ece8;
    --accent: #ffa75a;
    --accent-fill: #ff8a1f;
    --accent-soft: #2a2119;
    --ok: #8fd18f;
    --sel-bg: #e9ece8;
    --sel-ink: #121413;
    --code-bg: #0c0d0d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 16px; height: 16px; flex-shrink: 0; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--ink); color: var(--bg); padding: 10px 14px; font-family: var(--mono); font-size: 13px; text-decoration: none; }
.skip:focus { top: 12px; }

.shell { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* top bar */
.top { display: flex; align-items: center; gap: 24px; min-height: 64px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--mono); font-weight: 600; font-size: 14px; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; background: #17191a; color: #cdf45b; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; }
.brand-mark svg { width: 15px; height: 15px; }
.crumbs { flex: 1 1 auto; min-width: 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 13px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.crumbs li { display: flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: '/'; margin: 0 6px; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--ink-2); padding: 4px 2px; }
.crumbs a:hover { color: var(--accent); }
.crumbs li:last-child a { color: var(--ink); font-weight: 600; }
.crumbs li:last-child::after { content: ''; display: inline-block; width: 7px; height: 14px; margin-left: 4px; background: var(--accent-fill); animation: blink 1.1s steps(2, start) infinite; }
.top-links { display: flex; gap: 4px; font-family: var(--mono); font-size: 13px; }
.top-links a { text-decoration: none; padding: 10px 12px; color: var(--ink-2); }
.top-links a:hover, .top-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: end; padding: 36px 0 28px; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.eyebrow .sep { color: var(--line-strong); opacity: .4; }
h1 { margin: 0; font-size: clamp(32px, 3.7vw, 54px); line-height: 1.04; font-weight: 500; letter-spacing: -0.032em; max-width: 21ch; }
.h1-sub { color: var(--muted); }
.now { display: flex; gap: 10px; align-items: baseline; margin: 22px 0 0; font-size: 15px; color: var(--ink-2); max-width: 62ch; }
.now strong { color: var(--ink); font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.dot-live { background: var(--accent-fill); box-shadow: 0 0 0 0 rgba(255, 138, 31, .5); animation: pulse 1.8s ease-out infinite; transform: translateY(-1px); }

.search label { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.search-box { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px 0 14px; background: var(--surface); border: 1px solid var(--line-strong); }
.search-box:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 15px; }
.search-box input::placeholder { color: var(--muted); }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.kbd { font-size: 12px; border: 1px solid var(--line); padding: 1px 7px; color: var(--muted); }
.search-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.chip-btn { border: 1px solid var(--line); background: transparent; padding: 6px 10px; min-height: 32px; font-family: var(--mono); font-size: 12px; cursor: pointer; color: var(--ink-2); }
.chip-btn:hover { border-color: var(--line-strong); color: var(--ink); }

/* console: tree | listing | preview */
.console { display: grid; grid-template-columns: 220px minmax(0, 1fr) 400px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); min-height: 600px; }
.pane-label { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.tree { border-right: 1px solid var(--line); padding: 20px 14px 20px 0; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul ul { padding-left: 16px; }
.tr { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; font-family: var(--mono); font-size: 13px; text-decoration: none; color: var(--ink-2); border-left: 2px solid transparent; }
.tr:hover { background: var(--accent-soft); color: var(--ink); }
.tr.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--accent-fill); background: var(--accent-soft); }
.tr-bucket { font-weight: 600; color: var(--ink); }

.listing { padding: 18px 24px 22px; min-width: 0; display: flex; flex-direction: column; }
.listing:focus { outline: none; }
.listing-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.listing-head .pane-label { margin: 0; }
.cols, .row-link { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, .95fr); gap: 14px; align-items: center; }
.cols { margin-top: 14px; padding: 9px 10px; border-top: 1px solid var(--line-strong); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.row-link { padding: 11px 10px; border-top: 1px solid var(--line); text-decoration: none; font-family: var(--mono); font-size: 13px; color: var(--ink-2); transition: background-color .15s ease, color .15s ease; }
.row-link:hover { background: var(--accent-soft); color: var(--ink); }
.row.is-selected .row-link { background: var(--sel-bg); color: var(--sel-ink); }
.row.is-selected .c-status, .row.is-selected .k-name { color: var(--sel-ink); }
.c-key { display: flex; align-items: center; gap: 10px; min-width: 0; }
.k-name { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-name mark { background: var(--accent-fill); color: #17191a; padding: 0 1px; }
.c-period, .c-class { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-status { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tone-running { color: var(--accent); }
.tone-running .dot { background: var(--accent-fill); animation: pulse 1.8s ease-out infinite; }
.tone-ok { color: var(--ok); }
.tone-muted { color: var(--muted); }
.row-folder .k-name { font-weight: 600; }
.empty { margin: 18px 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); }

html.js .row.anim { animation: rowIn .32s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 28ms); }

.cli { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--code-bg); color: var(--code-ink); padding: 12px 14px; font-size: 13px; }
.listing .cli { margin-top: 28px; }
.cli-prompt { color: var(--code-punc); font-family: var(--mono); }
.cli-cmd { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-family: var(--mono); font-size: 13px; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 12px; }
.btn-inv { border-color: var(--code-ink); color: var(--code-ink); }
.btn-inv:hover { background: var(--code-ink); color: var(--code-bg); }

/* preview */
.preview { border-left: 1px solid var(--line); background: var(--surface); padding: 20px 24px 28px; min-width: 0; }
html.js .preview { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
.pv { padding: 4px 0 26px; }
.pv + .pv { border-top: 1px solid var(--line); padding-top: 22px; }
html.js .pv { display: none; }
html.js .pv.is-active { display: block; animation: pvIn .28s ease both; border-top: 0; padding-top: 4px; }
.pv:focus { outline: none; }
.pv-head { display: flex; flex-direction: column; gap: 4px; }
.pv-type { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.pv-key { margin: 0; font-family: var(--mono); font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.pv-title { margin: 4px 0 0; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; }
.pv-status { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; }
.pv-meta { margin: 18px 0 0; border-top: 1px solid var(--line-strong); }
.pv-meta div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pv-meta dt { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.pv-meta dd { margin: 0; font-size: 14px; }
.pv-body { margin-top: 16px; font-size: 15px; color: var(--ink-2); }
.pv-body p { margin: 0 0 12px; }
.pv-lead { color: var(--ink); font-size: 16px; }
.pv-note { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.pv-points { margin: 0; padding: 0; list-style: none; }
.pv-points li { position: relative; padding: 0 0 10px 18px; }
.pv-points li::before { content: ''; position: absolute; left: 0; top: .62em; width: 8px; height: 1px; background: var(--ink); }
.pv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pv-actions .btn { overflow-wrap: anywhere; }
.chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { border: 1px solid var(--line); padding: 3px 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.pv-uri { margin-top: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pv-uri code { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.pv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pv-table th { text-align: left; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent); border-bottom: 1px solid var(--line-strong); padding: 8px 0; }
.pv-table td { border-bottom: 1px solid var(--line); padding: 9px 0; }
.code { margin: 0; background: var(--code-bg); color: var(--code-ink); padding: 16px; font-size: 13px; line-height: 1.7; overflow-x: auto; }
.code a { text-decoration: none; }
.code a:hover { text-decoration: underline; }
.t-key { color: var(--code-key); }
.t-str { color: var(--code-str); }
.t-punc { color: var(--code-punc); }

.lineage { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin-bottom: 16px; font-family: var(--mono); font-size: 12px; }
.ln-node { border: 1px solid var(--line-strong); padding: 5px 8px; color: var(--ink); background: var(--surface); }
.ln-dag { border-color: var(--accent-fill); color: var(--accent); }
.ln-out { background: var(--ink); color: var(--bg); }
.ln-edge { width: 26px; height: 2px; background-image: linear-gradient(90deg, var(--accent-fill) 50%, transparent 50%); background-size: 8px 2px; animation: flow .8s linear infinite; }

/* footer, toast */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 36px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 13px; padding: 10px 16px; transition: opacity .2s ease, transform .2s ease; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* simple document pages (privacy, 404) */
.doc { max-width: 760px; padding: 56px 0 72px; }
.doc h1 { max-width: none; }
.doc h2 { margin: 36px 0 10px; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.doc p { color: var(--ink-2); font-size: 16px; max-width: 64ch; }
.err { margin: 28px 0; background: var(--code-bg); color: var(--code-ink); padding: 20px; font-size: 14px; line-height: 1.8; overflow-x: auto; }
.doc .pv-actions { margin-top: 24px; }

@keyframes blink { to { visibility: hidden; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 138, 31, .55); } 70% { box-shadow: 0 0 0 7px rgba(255, 138, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 138, 31, 0); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pvIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes flow { to { background-position: 8px 0; } }

/* responsive */
@media (max-width: 1180px) {
  .console { grid-template-columns: 200px minmax(0, 1fr); }
  .preview { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line-strong); }
  html.js .preview { position: static; max-height: none; overflow: visible; }
  .hero { grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; }
}
@media (max-width: 860px) {
  .shell { padding: 0 16px; }
  .top { flex-wrap: wrap; gap: 8px 16px; padding: 10px 0; }
  .crumbs { order: 3; flex-basis: 100%; }
  .top-links { margin-left: auto; }
  .top-links a { padding: 10px 8px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 28px 0 22px; }
  .console { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .tree { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 0; }
  .tree .pane-label { display: none; }
  .tree-root, .tree ul ul { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 4px; scrollbar-width: thin; }
  .tree-root > li { display: contents; }
  .tree ul ul { display: contents; }
  .tree ul ul li { display: contents; }
  .tr { flex-shrink: 0; border: 1px solid var(--line); border-left-width: 1px; white-space: nowrap; }
  .tr.is-active { border-color: var(--accent-fill); }
  .listing { padding: 14px 0 18px; }
  .cols { display: none; }
  .row-link { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "key key" "period status" "class class"; gap: 4px 12px; padding: 12px 8px; }
  .c-key { grid-area: key; }
  .c-period { grid-area: period; font-size: 12px; color: var(--muted); }
  .c-status { grid-area: status; font-size: 12px; justify-self: end; }
  .c-class { display: none; }
  .row.is-selected .c-period { color: var(--sel-ink); }
  .preview { padding: 18px 16px 24px; margin: 0 -16px; }
  .top-links a:nth-child(3) { display: none; }
}
@media (max-width: 380px) {
  .brand-text { font-size: 13px; }
  .top-links a:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .top-links, .search, .tree, .cli, .pv-uri, .toast, .skip, .listing { display: none !important; }
  .console { display: block; border: 0; }
  html.js .pv { display: block !important; }
  .preview { border: 0; position: static !important; max-height: none !important; overflow: visible !important; }
}

/* /variants/ index */
.variant-list .row-link { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, .8fr) auto; }
