:root {
  --paper: #f4f0e6;
  --paper-2: #fffdf8;
  --ink: #1c1914;
  --muted: #6a6256;
  --line: #e3d9c6;
  --green: #1b4332;
  --green-2: #2f6a4e;
  --gold: #b8862f;
  --good: #1f7a4d;
  --bad: #9d3b32;
  --wait: #9a6b12;
  --shadow: 0 18px 50px rgba(48, 36, 16, 0.08);
  --serif: Newsreader, Georgia, serif;
  --sans: Outfit, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); }
a { color: var(--green); }
button, input, textarea { font: inherit; color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.mark { width: 42px; height: 42px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; }
.mark circle { fill: var(--gold); stroke: none; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px 96px; background:
  radial-gradient(900px 420px at 10% -10%, rgba(226, 182, 87, 0.28), transparent 60%),
  radial-gradient(700px 380px at 110% 10%, rgba(27, 67, 50, 0.12), transparent 55%),
  var(--paper); }
.gate-card { width: min(440px, 100%); background: var(--paper-2); border: 1px solid var(--line); border-radius: 28px; padding: 36px 32px; box-shadow: var(--shadow); }
.gate-card.is-ok { box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.35), var(--shadow); }
.eyebrow { margin: 14px 0 0; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; color: var(--gold); font-weight: 600; }
.lede { color: var(--muted); line-height: 1.55; }
.stack, .split { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 500; }
input, textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; }
input:focus, textarea:focus { outline: 2px solid rgba(27, 67, 50, 0.25); border-color: var(--green-2); }
textarea { resize: vertical; }
.btn, button.btn { border: 0; background: var(--green); color: #f7f3ea; border-radius: 999px; padding: 12px 18px; cursor: pointer; font-weight: 600; }
.btn.ghost { background: transparent; color: var(--green); border: 1px solid var(--line); }
.btn.good { background: var(--good); }
.btn.danger { background: var(--bad); }
.thumb { min-height: 46px; }
.job { padding: 14px 0; border-top: 1px solid var(--line); }
.job:first-of-type { border-top: 0; }
.sources { margin: 8px 0 0; padding-left: 18px; }
.sources a { word-break: break-all; }
.btn.is-ok { background: var(--good); }
.btn.is-bad { background: var(--bad); }
.btn:disabled { opacity: 0.7; cursor: wait; }
.gate-msg { min-height: 1.2em; color: var(--bad); margin: 0; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.side { background: #14382c; color: #f4f0e6; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.35rem; }
.brand small { color: #e2b657; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.68rem; }
.side .mark { stroke: #e2b657; }
.nav { display: grid; gap: 4px; }
.nav a { color: #e7efe9; text-decoration: none; padding: 10px 12px; border-radius: 12px; }
.nav a.is-on, .nav a:hover { background: rgba(255, 255, 255, 0.08); }
.side-foot { margin-top: auto; color: #c9d7ce; font-size: 0.85rem; }
.main { padding: 22px 28px 80px; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.top-user { display: flex; gap: 10px; align-items: center; }
.top-user a { text-decoration: none; }
.verified { background: #e5f6ec; color: var(--good); border-radius: 999px; padding: 6px 10px; font-size: 0.82rem; font-weight: 600; }
.burger { display: none; }
.content { display: grid; gap: 16px; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.card-head, .tools, .row-actions, .inline { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats article { background: var(--paper-2); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; }
.stats span, .stats small { color: var(--muted); display: block; }
.stats strong { font-family: var(--serif); font-size: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.steps { margin: 12px 0; padding-left: 18px; line-height: 1.55; }
.banner { border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; }
.banner.ok { background: #e5f6ec; color: #145c38; }
.banner.bad { background: #fdeceb; color: #8a2e28; }
.banner.wait { background: #fff4df; color: #7a5410; }
.pill { background: #f3e7cf; color: #6d5014; border-radius: 999px; padding: 6px 10px; font-size: 0.82rem; }
.split { grid-template-columns: repeat(2, 1fr); }
.split-actions { align-self: end; }
.check, .tiny { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; background: #fff; }
th { text-align: left; background: var(--green); color: #f6f3ea; padding: 12px 14px; font-size: 0.82rem; font-weight: 600; }
td { padding: 12px 14px; border-bottom: 1px solid #f0e8d8; vertical-align: top; font-size: 0.92rem; }
td a { word-break: break-all; }
.actions, td form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.icon { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 10px; cursor: pointer; }
.icon.danger { background: var(--bad); color: white; border: 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #b7ad9d; margin-right: 4px; }
.dot.good { background: var(--good); }
.dot.bad { background: var(--bad); }
.dot.wait { background: var(--wait); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 180px; margin-top: 16px; }
.bars div { display: grid; align-items: end; justify-items: center; height: 100%; gap: 4px; }
.bars span { display: block; width: 100%; max-width: 36px; background: linear-gradient(#e2b657, var(--green)); border-radius: 8px 8px 4px 4px; min-height: 6px; }
.bars small, .bars b { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.bar { height: 8px; background: #efe6d4; border-radius: 99px; overflow: hidden; min-width: 90px; }
.bar span { display: block; height: 100%; background: var(--good); }
.grow small { color: var(--muted); }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pager a { text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; }
.pager a.is-on { background: var(--green); color: #fff; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.tabs a { text-decoration: none; padding: 6px 10px; border-radius: 999px; background: #f6f1e6; }
.tabs a.is-on { background: var(--green); color: #fff; }
.remain { border-radius: 999px; padding: 4px 8px; background: #f6f1e6; }
.remain.hot { background: #fdeceb; color: var(--bad); }
.remain.calm { background: #e5f6ec; color: var(--good); }
.switch { width: 46px; height: 26px; border-radius: 99px; border: 0; background: #ddd4c4; position: relative; cursor: pointer; }
.switch::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: left 0.15s ease; }
.switch.on { background: var(--good); }
.switch.on::after { left: 23px; }
.anchor-preview { display: flex; gap: 6px; flex-wrap: wrap; }
.anchor-preview span, .sol-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 0.82rem; }
.preview { background: #fff; border-radius: 16px; padding: 14px; border: 1px dashed var(--line); }
.preview h3 { margin: 0 0 8px; font-family: var(--serif); }
.log { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.log li { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.log .ok span { color: var(--good); }
.log .bad span { color: var(--bad); }
.checks { list-style: none; padding: 0; display: grid; gap: 8px; }
.code { white-space: pre-wrap; background: #17382c; color: #f4f0e6; border-radius: 14px; padding: 12px; overflow: auto; }
.file input { padding: 8px; }

.sol { position: fixed; right: 18px; bottom: 18px; z-index: 30; }
.sol-open { display: flex; align-items: center; gap: 8px; border: 0; background: var(--green); color: #fff; border-radius: 999px; padding: 12px 16px; cursor: pointer; box-shadow: var(--shadow); }
.sol-dot { width: 8px; height: 8px; border-radius: 50%; background: #7dffa8; box-shadow: 0 0 0 4px rgba(125, 255, 168, 0.18); }
.sol-panel { width: min(360px, calc(100vw - 24px)); background: #fffdf8; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.sol-head, .sol-form { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 12px; }
.sol-head { background: #14382c; color: #fff; }
.sol-head span, .sol-head strong { display: block; }
.sol-head span { color: #d5e4da; font-size: 0.8rem; }
.sol-x { background: transparent; color: #fff; border: 0; cursor: pointer; }
.sol-log { max-height: 280px; overflow: auto; padding: 12px; display: grid; gap: 8px; }
.sol-msg { margin: 0; background: #f6f1e6; border-radius: 14px; padding: 10px 12px; line-height: 1.45; }
.sol-msg.mine { background: #e5f6ec; }
.sol-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 12px; }
.sol-chips button { cursor: pointer; }
.sol-form input { flex: 1; }
.sol-form button { border: 0; background: var(--gold); color: #1c1914; border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600; }
.typing { color: var(--muted); font-style: italic; }

@media (max-width: 980px) {
  .stats, .grid-2, .split { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-105%); transition: transform 0.2s ease; z-index: 25; }
  .nav-toggle:checked ~ .shell .side { transform: none; }
  .burger { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
  .main { padding: 16px 14px 120px; }
  .sol { left: 18px; right: auto; }
  .stats, .grid-2, .split, .log li { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .side, .switch::after { transition: none; }
}
