/* 🦊 platform.haru.by — тот же haru.by: чёрный холст, золото, поля как в терминале.
   Цвета и правила взяты из account.haru.by, чтобы человек не замечал шва между
   аккаунтом и порталом. */

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #0d0c0f;
  --surface-2: #141217;
  --surface-3: #1c1920;
  --line: #2a2630;
  --line-strong: #463f4d;
  --ink: #f3eee7;
  --soft: #9d95a3;
  --primary: #f2c26b;
  --on-primary: #1d1405;
  --tertiary: #c3b0ff;
  --tertiary-container: #241d36;
  --focus: #eadfb2;
  --bad: #ff5d7a;
  --good: #58d68d;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "Fira Code", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans);
       display: flex; flex-direction: column; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: var(--primary); }
.soft { color: var(--soft); }
.mono { font-family: var(--mono); }
.small { font-size: 14px; }
[hidden] { display: none !important; }
::selection { background: var(--primary); color: var(--on-primary); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ——— шапка ——— */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px;
       /* та же колонка, что у первого экрана: иначе шапка живёт в своей сетке */
       padding: 14px max(clamp(16px, 4vw, 48px), calc((100vw - 1240px) / 2 + 48px));
       background: #000000cc; backdrop-filter: blur(12px);
       border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
         font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.brand img { border-radius: 50%; }
.brand span { color: var(--soft); font-weight: 400; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { position: relative; height: 40px; padding: 0 12px; display: inline-flex; align-items: center;
          color: var(--soft); text-decoration: none; font-size: 14px; font-weight: 600; }
.tabs a:hover { color: var(--ink); }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }

/* ——— кнопки: таблетки ——— */
button, .btn { font: 600 15px/1 var(--sans); height: 44px; padding: 0 22px; border-radius: 22px; border: 0;
               display: inline-flex; align-items: center; justify-content: center; gap: 8px;
               background: var(--primary); color: var(--on-primary); cursor: pointer; text-decoration: none;
               transition: filter .15s, transform .1s; }
button:hover, .btn:hover { filter: brightness(1.08); }
button:active, .btn:active { transform: scale(.98); }
button:disabled { cursor: default; filter: none; }
.btn.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.small { height: 34px; padding: 0 16px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); }

/* ——— поля ——— */
.field { position: relative; display: block; border: 1.5px solid var(--line-strong); border-radius: 6px;
         padding: 13px 14px 10px; transition: border-color .15s; }
.field > span { position: absolute; top: -0.75em; left: 10px; padding: 0 6px; background: var(--field-bg, var(--bg));
                font: 13px/1.4 var(--mono); color: var(--soft); }
.field input { all: unset; display: block; width: 100%; font: 15px/1.5 var(--mono); color: var(--ink); }
.field:focus-within { border-color: var(--focus); }
.field:focus-within > span { color: var(--focus); }

/* ——— карточки ——— */
.card { --card-bg: var(--surface-2); --field-bg: var(--surface-2); background: var(--surface-2); border: 1px solid var(--line);
        border-radius: 26px; padding: 24px 24px 24px 28px; display: grid; gap: 18px; }
.card > * { min-width: 0; }
.card h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ——— первый экран ——— */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(20px, 4vw, 56px);
        align-items: center; padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px); max-width: 1240px;
        margin: 0 auto; width: 100%; }
.hero h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 650; }
.hero h1 em { font-style: normal; color: var(--primary); }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--soft); max-width: 46ch; line-height: 1.55; }
.prompt { font: 15px/1.6 var(--mono); color: var(--ink); }
.prompt::before { content: ">"; margin-right: 1ch; color: var(--primary); }
.prompt::after { content: ""; display: inline-block; width: .6em; height: 1.05em; margin-left: .3ch;
                 vertical-align: -.18em; background: var(--primary); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.poster { position: relative; aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden; border: 1px solid var(--line);
          background: radial-gradient(120% 90% at 80% 10%, #241d36, #0d0c0f 60%); }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #000c, transparent 55%); }
.poster figcaption { position: absolute; z-index: 1; left: 22px; bottom: 20px; right: 22px;
                     font-size: 15px; color: #e9e3da; text-shadow: 0 2px 10px #000; }

/* ——— содержимое ——— */
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 64px; }
section { padding: 34px 0 0; }
section > h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 6px; }
section > .sub { color: var(--soft); font-size: 15px; margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
           padding: 12px 14px; background: var(--surface-3); border-radius: 14px; }
.list .item { display: grid; gap: 2px; min-width: 0; }
.list code { font-family: var(--mono); font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
.empty { padding: 26px; border: 1.5px dashed var(--line-strong); border-radius: 18px; color: var(--soft); text-align: center; }

.key { background: #000; border: 1.5px dashed var(--primary); border-radius: 12px; padding: 12px 14px;
       font-family: var(--mono); font-size: 14px; color: var(--primary); overflow-wrap: anywhere; }
pre { margin: 0; background: #000; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
      overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
      font: 13px/1.65 var(--mono); color: #ded7cd; }
pre b { color: var(--primary); font-weight: 600; }
pre i { color: var(--soft); font-style: normal; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 13px var(--mono); padding: 6px 12px; border-radius: 999px; background: var(--surface-3);
        border: 1px solid var(--line); color: var(--ink); }

.toast { position: fixed; z-index: 30; left: 50%; bottom: 26px; translate: -50% 0; padding: 13px 20px;
         border-radius: 14px; background: var(--ink); color: #000; font-weight: 500; box-shadow: 0 8px 30px #000a; }

.foot { padding: 26px clamp(16px, 4vw, 48px) 40px; border-top: 1px solid var(--line); font-size: 13px; }
.loading { min-height: 50vh; display: grid; place-items: center; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .poster { order: -1; aspect-ratio: 16 / 10; }
  .tabs { display: none; }
  .who { margin-left: auto; }
}
