/* l2ai site. Calm palette; colour marks state (status chips, dots) and actions (buttons, links). */
:root {
  --bg: #f5f3ef; --surface: #ffffff; --surface-2: #efece6; --text: #22262b; --muted: #6a7078; --line: #e2ddd4;
  --accent: #8a5a2b; --accent-hover: #74481f; --on-accent: #ffffff; --link: #7a4d22;
  --ok: #2e7d4f; --ok-bg: #e6f2ea; --warn: #9a6400; --warn-bg: #faf0dc; --err: #b3261e; --err-bg: #fbe8e6;
  --info: #2f5f9e; --info-bg: #e7eef8; --dev: #6b5aa6; --dev-bg: #eeebf7; --seg-off: #d9d4ca;
  --radius: 10px; --shadow: 0 1px 2px rgba(30, 25, 15, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141517; --surface: #1c1e21; --surface-2: #24272b; --text: #e6e3de; --muted: #9a9ea5; --line: #2f3236;
    --accent: #c99a62; --accent-hover: #dbb07c; --on-accent: #17130e; --link: #d8ae7b;
    --ok: #6cc28f; --ok-bg: #1b2c22; --warn: #e0a640; --warn-bg: #33291a; --err: #f08a80; --err-bg: #3a2220;
    --info: #86aee6; --info-bg: #1d2735; --dev: #b3a6e6; --dev-bg: #27233a; --seg-off: #34373c;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #141517; --surface: #1c1e21; --surface-2: #24272b; --text: #e6e3de; --muted: #9a9ea5; --line: #2f3236;
  --accent: #c99a62; --accent-hover: #dbb07c; --on-accent: #17130e; --link: #d8ae7b;
  --ok: #6cc28f; --ok-bg: #1b2c22; --warn: #e0a640; --warn-bg: #33291a; --err: #f08a80; --err-bg: #3a2220;
  --info: #86aee6; --info-bg: #1d2735; --dev: #b3a6e6; --dev-bg: #27233a; --seg-off: #34373c; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); }
a:hover { color: var(--accent-hover); }
h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; margin: 28px 0 12px; letter-spacing: -.01em; }
h2 { font-size: 21px; margin: 34px 0 12px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 10px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 18px; color: var(--muted); max-width: 720px; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; flex: 1 1 auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lang { color: var(--muted); font-size: 14px; margin-right: 4px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
       padding: 8px 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent);
       color: var(--on-accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
       transition: background .15s, border-color .15s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn:focus-visible, .nav a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); color: var(--text); }
.btn-small { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* flash */
.flash { padding: 10px 14px; border-radius: 8px; margin: 14px 0; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash-err { background: var(--err-bg); color: var(--err); }

/* hero and home */
.hero { padding: 34px 0 10px; }
.hero h1 { font-size: clamp(30px, 5.4vw, 46px); max-width: 820px; margin-top: 6px; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; margin: 0; }
.status-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 26px 0 6px; }
.strip-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line);
              border-radius: var(--radius); padding: 12px 14px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.strip-item:hover { border-color: var(--muted); color: var(--text); }
.strip-item b { margin-left: auto; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card .more { display: inline-block; margin-top: 6px; font-weight: 600; text-decoration: none; }
.readiness { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 14px; }
.ready-item { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.ready-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ready-group { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line);
               border-radius: var(--radius); padding: 12px 14px; color: var(--text); text-decoration: none; }
.ready-group:hover { border-color: var(--muted); color: var(--text); }
.bar { display: flex; gap: 3px; }
.seg { flex: 1; height: 8px; border-radius: 2px; background: var(--seg-off); }
.seg-live { background: var(--ok); } .seg-test { background: var(--info); } .seg-dev { background: var(--dev); opacity: .55; }
.support { margin: 34px 0 10px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between;
           background: var(--surface-2); border-radius: var(--radius); padding: 16px 18px; }
.support p { margin: 0; }

/* chips and dots */
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
        background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.chip-live { background: var(--ok-bg); color: var(--ok); }
.chip-test { background: var(--info-bg); color: var(--info); }
.chip-dev { background: var(--dev-bg); color: var(--dev); }
.chip-err { background: var(--err-bg); color: var(--err); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; flex: none; }
.dot-up { background: var(--ok); } .dot-down { background: var(--err); }

/* features */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.tabs a { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; }
.tabs a:hover { border-color: var(--muted); }
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.group { scroll-margin-top: 16px; }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.feature-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.feature p { margin: 4px 0 0; color: var(--muted); }
.rules { padding-left: 20px; max-width: 760px; }
.rules li { margin-bottom: 8px; }

/* status */
.realm-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.realm-head h3 { margin: 0; }
.big { font-size: 20px; font-weight: 600; margin: 4px 0 6px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 500; font-size: 13px; background: var(--surface-2); }

/* steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 760px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 16px 62px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 15px; width: 30px; height: 30px; border-radius: 50%;
                    background: var(--surface-2); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
.steps .btn { margin-top: 4px; }

/* forms */
.form-page { max-width: 440px; margin: 0 auto 30px; }
.form { display: grid; gap: 14px; margin: 16px 0; }
.form label { display: grid; gap: 5px; font-weight: 500; font-size: 15px; }
.form small { color: var(--muted); font-weight: 400; font-size: 13px; }
input, textarea { font: inherit; font-size: 16px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
                  background: var(--surface); color: var(--text); width: 100%; }
textarea { resize: vertical; }
.form .btn { justify-self: start; }
.captcha { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.captcha img { border-radius: 8px; border: 1px solid var(--line); max-width: 100%; height: auto; }
@media (max-width: 460px) { .captcha { grid-template-columns: 1fr; } }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* cabinet */
.cab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; }
.realm-title { margin: 18px 0 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 30px; align-items: start; }
.grid2 h2 { margin-top: 0; }
.stack { display: grid; gap: 12px; }
.card-soon { border-style: dashed; }

/* footer */
.foot { margin-top: 50px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .top-row { gap: 10px 14px; }
  .nav { order: 3; flex-basis: 100%; gap: 2px 14px; }
  .top-actions { margin-left: auto; }
  .hero { padding-top: 18px; }
  .lead { font-size: 17px; }
}
