/* Publixy — базовые стили. Без сборки: один файл, CSS-переменные. */

:root {
  --bg: #07080d;
  --bg-alt: #0b0d15;
  --surface: #101320;
  --surface-2: #151a2b;
  --border: #222941;
  --border-soft: #1a2035;
  --text: #eef1f7;
  --muted: #99a2bd;
  --muted-dim: #6d7793;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  --container: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 650; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 14px; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.icon { width: 22px; height: 22px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; }
.center { text-align: center; }

.skip-link {
  position: absolute; top: 12px; left: 24px; z-index: 100;
  background: var(--surface); padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border);
  clip-path: inset(50%); opacity: 0;
}
.skip-link:focus { clip-path: none; opacity: 1; }

/* --- шапка ---------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 8, 13, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.03em; font-size: 1.16rem; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 20px -8px var(--accent);
  position: relative;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 7px 7px auto 7px; height: 3px; border-radius: 3px;
  background: rgba(7, 8, 13, 0.75);
}
.logo-text { background: linear-gradient(120deg, #fff, #b9c2e2); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 22px; margin-right: auto; color: var(--muted); font-size: 0.94rem; }
.nav-links a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.logout-form { display: inline; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.nav-auth { display: none; }

.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.lang-option { padding: 5px 9px; font-size: 0.78rem; font-weight: 600; color: var(--muted-dim); }
.lang-option.is-active { background: var(--surface-2); color: var(--text); }
.lang-option:hover { color: var(--text); }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; width: 40px; height: 36px; flex-direction: column; gap: 4px; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text); }

/* --- кнопки -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; border: 1px solid transparent;
  font: inherit; font-size: 0.94rem; font-weight: 600; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; filter: none; transform: none; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(120deg, var(--accent), #5b7cfa); color: #fff; box-shadow: 0 14px 34px -18px var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-outline:hover { border-color: var(--muted-dim); }
.btn-ghost { color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface); }

/* --- flash / ошибки ------------------------------------------------------ */

.flash-stack { margin-top: 18px; display: grid; gap: 10px; }
.flash { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-size: 0.94rem; }
.flash-success { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.flash-error { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
.form-error { padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.1); color: #ffd7d7; font-size: 0.9rem; margin-bottom: 16px; }

/* --- герой --------------------------------------------------------------- */

.hero { position: relative; padding: 84px 0 40px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -220px 0 auto 50%; transform: translateX(-50%);
  width: 1100px; height: 700px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(124, 92, 255, 0.28), transparent 70%),
              radial-gradient(40% 40% at 70% 40%, rgba(34, 211, 238, 0.16), transparent 70%);
  filter: blur(8px);
}
.hero-inner { position: relative; text-align: center; }
.hero h1 { max-width: 900px; margin: 18px auto 16px; }
.lead { font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 680px; margin: 0 auto 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { color: var(--muted-dim); font-size: 0.86rem; margin-top: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--accent-soft); color: #cfd3ff; font-size: 0.84rem; font-weight: 550; margin: 0;
}
.badge-soft { background: var(--surface-2); color: var(--muted); border-color: var(--border-soft); }

.hero-highlights {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  max-width: 860px; margin: 46px auto 0; text-align: left;
}
.hero-highlights li {
  padding: 18px 20px; border: 1px solid var(--border-soft); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), rgba(16, 19, 32, 0.4));
}
.hero-highlights strong { display: block; font-size: 1.24rem; letter-spacing: -0.02em; }
.hero-highlights span { color: var(--muted); font-size: 0.86rem; }

.hero-mock {
  margin: 56px auto 0; max-width: 900px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  text-align: left;
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); background: var(--bg-alt); }
.mock-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #2a3149; }
.mock-title { margin-left: 10px; color: var(--muted-dim); font-size: 0.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mock-body { padding: 8px 0; }
.mock-row { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.mock-row:last-child { border-bottom: 0; }
.mock-store { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.94rem; }
.mock-status { font-size: 0.82rem; padding: 4px 10px; border-radius: 999px; justify-self: start; border: 1px solid var(--border); color: var(--muted); }
.status-review { color: var(--warning); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.status-live { color: var(--success); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.status-done { color: var(--accent-2); border-color: rgba(34, 211, 238, 0.3); background: rgba(34, 211, 238, 0.08); }
.mock-bar-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mock-bar-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* --- секции -------------------------------------------------------------- */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem; font-weight: 700; color: var(--accent-2); margin: 0 0 10px; }
.section-title { max-width: 720px; }
.section-sub { color: var(--muted); max-width: 640px; margin-bottom: 42px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.card {
  padding: 26px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), rgba(16, 19, 32, 0.35));
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.card:hover { border-color: var(--border); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: 0.94rem; margin: 0; }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 16px;
  background: var(--accent-soft); color: #c3b8ff; border: 1px solid rgba(124, 92, 255, 0.28);
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 34px; }
.steps li { padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); background: var(--surface); }
.step-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; color: var(--accent-2); display: block; margin-bottom: 12px; }
.steps p { color: var(--muted); font-size: 0.92rem; margin: 0; }

.integrations { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.integration { padding: 22px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); }
.integration header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.integration h3 { margin: 0; font-size: 1rem; }
.integration p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.integration.is-soon { opacity: 0.72; }
.integration.is-ready { border-color: rgba(124, 92, 255, 0.28); }
.pill { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted-dim); text-transform: lowercase; }
.pill-accent { color: #cfc6ff; border-color: rgba(124, 92, 255, 0.45); background: var(--accent-soft); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: start; }
.plan { position: relative; padding: 30px 26px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.plan.is-popular { border-color: rgba(124, 92, 255, 0.5); box-shadow: 0 30px 70px -40px var(--accent); }
.plan-flag { position: absolute; top: -12px; left: 26px; font-size: 0.74rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: linear-gradient(120deg, var(--accent), #5b7cfa); color: #fff; }
.plan-price { font-size: 2.1rem; font-weight: 680; letter-spacing: -0.03em; margin: 6px 0 2px; }
.plan-price span { font-size: 0.9rem; font-weight: 500; color: var(--muted-dim); margin-left: 4px; }
.plan-note { color: var(--muted-dim); font-size: 0.86rem; }
.plan-features { display: grid; gap: 10px; margin: 18px 0 24px; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 0.92rem; }
.plan-features .icon { color: var(--success); margin-top: 3px; }
.plan .btn { margin-top: auto; }

.faq { display: grid; gap: 12px; margin-top: 30px; }
.faq details { border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); padding: 4px 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-2); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); font-size: 0.94rem; padding-bottom: 8px; margin: 0; }

.cta-band { padding: 66px 0; background: linear-gradient(120deg, rgba(124, 92, 255, 0.16), rgba(34, 211, 238, 0.1)); border-top: 1px solid var(--border-soft); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.cta-inner h2 { margin-bottom: 6px; }
.cta-inner p { color: var(--muted); margin: 0; }

/* --- футер --------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-alt); padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.footer-brand p { color: var(--muted-dim); font-size: 0.9rem; max-width: 280px; margin-top: 12px; }
.footer-col h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-dim); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); font-size: 0.92rem; padding: 4px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-soft); color: var(--muted-dim); font-size: 0.84rem; flex-wrap: wrap; }

/* --- авторизация --------------------------------------------------------- */

.page-auth { background: radial-gradient(70% 50% at 50% 0%, rgba(124, 92, 255, 0.18), transparent 70%), var(--bg); }
.auth-wrap { min-height: calc(100vh - 68px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 440px; padding: 34px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 0.94rem; margin-bottom: 24px; }
.auth-alt { margin: 20px 0 0; color: var(--muted); font-size: 0.9rem; text-align: center; }
.auth-alt a { color: #b9aaff; font-weight: 600; }
.auth-back { color: var(--muted-dim); font-size: 0.88rem; }
.auth-back:hover { color: var(--text); }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit;
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--text);
}
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field small { display: block; color: var(--muted-dim); font-size: 0.78rem; margin-top: 6px; }

/* --- кабинет и админка --------------------------------------------------- */

.page-console { background: var(--bg); }
.console { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; max-width: var(--container); margin: 0 auto; padding: 34px 24px 70px; }
.console-nav { display: flex; flex-direction: column; gap: 4px; align-self: start; position: sticky; top: 96px; }
.console-nav a, .console-nav .nav-disabled { padding: 10px 14px; border-radius: 11px; font-size: 0.93rem; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.console-nav a:hover { background: var(--surface); color: var(--text); }
.console-nav a.is-active { background: var(--accent-soft); color: #d6d0ff; border: 1px solid rgba(124, 92, 255, 0.3); }
.console-nav .nav-disabled { color: var(--muted-dim); cursor: default; }
.console-nav em { font-style: normal; font-size: 0.7rem; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border-soft); }

.console-main { min-width: 0; display: grid; gap: 20px; }
.console-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.console-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 12px 0 0; }
.console-sub { color: var(--muted); font-size: 0.94rem; margin: 8px 0 0; max-width: 560px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 650; font-size: 0.94rem; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b0d15; flex: 0 0 auto; }
.avatar-sm { width: 26px; height: 26px; border-radius: 9px; font-size: 0.7rem; display: inline-grid; vertical-align: middle; margin-right: 10px; }

.panel { min-width: 0; padding: 26px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--surface); }
.panel h2 { font-size: 1.1rem; margin-bottom: 14px; }
.panel-stub { background: linear-gradient(140deg, rgba(124, 92, 255, 0.14), rgba(16, 19, 32, 0.6)); border-color: rgba(124, 92, 255, 0.28); }
.panel-stub p { color: var(--muted); margin: 0; max-width: 620px; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

.roadmap { display: grid; gap: 11px; }
.roadmap li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 0.93rem; }
.roadmap .icon { color: var(--accent-2); margin-top: 3px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 0; font-size: 0.93rem; }
.kv dt { color: var(--muted-dim); }
.kv dd { margin: 0; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat { padding: 20px 22px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); }
.stat strong { display: block; font-size: 1.9rem; letter-spacing: -0.03em; }
.stat span { color: var(--muted-dim); font-size: 0.85rem; }

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.91rem; min-width: 620px; }
.table th { text-align: left; color: var(--muted-dim); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0 14px 12px 0; }
.table td { padding: 13px 14px 13px 0; border-top: 1px solid var(--border-soft); color: var(--muted); }
.table th, .table td { white-space: nowrap; }
.table td:first-child { color: var(--text); }

.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.panel-link { color: #b9aaff; font-size: 0.88rem; font-weight: 600; }
.panel-success { border-color: rgba(52, 211, 153, 0.4); background: linear-gradient(140deg, rgba(52, 211, 153, 0.1), rgba(16, 19, 32, 0.6)); }
.panel-note { color: var(--muted); font-size: 0.92rem; max-width: 640px; }
.credentials { margin: 16px 0 18px; }
.credentials code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92rem; padding: 3px 8px; border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--border); word-break: break-all; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; align-items: start; }
.form-actions { grid-column: 1 / -1; }
.field select {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; line-height: 1.6;
  -webkit-appearance: none; appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2399a2bd' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  background-color: var(--bg-alt); border: 1px solid var(--border); color: var(--text);
}
.field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.btn-small { padding: 6px 12px; font-size: 0.82rem; border-radius: 9px; }
.btn-danger { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.4); color: #ffc9c9; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.18); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.status-dot.is-on { background: var(--success); }
.status-dot.is-off { background: var(--muted-dim); }
.table tr.is-disabled td { opacity: 0.55; }
.table tr.is-disabled td.cell-actions { opacity: 1; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions form { display: inline; }
.muted { color: var(--muted-dim); font-size: 0.85rem; }

/* --- обёртка: статусы, выбор SDK, артефакты --------------------------- */

.pill-queued { color: var(--muted); border-color: var(--border); }
.pill-running { color: var(--warning); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); }
.pill-success { color: var(--success); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.1); }
.pill-failed, .pill-error { color: var(--danger); border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.1); }

.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.sdk-set { border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px 20px; margin: 10px 0 20px; }
.sdk-set legend { padding: 0 8px; font-size: 0.85rem; color: var(--muted); }
.sdk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 10px; }
.sdk-option { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border-soft); border-radius: 11px; background: var(--bg-alt); cursor: pointer; font-size: 0.93rem; }
.sdk-option:hover { border-color: var(--border); }
.sdk-option input { width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; }
.sdk-option:has(input:checked) { border-color: rgba(124, 92, 255, 0.5); background: var(--accent-soft); }
.sdk-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border-soft); }

.inline-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; min-width: 260px; }

.secret-list { display: grid; gap: 4px; margin-bottom: 20px; }
.secret-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--rule, var(--border-soft)); }
.secret-row:first-child { border-top: 0; }
.secret-row .field { margin: 0; }
.secret-row .field > span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; letter-spacing: 0.02em; }
.secret-state { display: flex; flex-direction: column; gap: 8px; padding-top: 26px; }
.secret-clear { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--muted-dim); cursor: pointer; }
.secret-clear input { width: 15px; height: 15px; accent-color: var(--danger); }
@media (max-width: 760px) { .secret-row { grid-template-columns: minmax(0, 1fr); } .secret-state { padding-top: 0; flex-direction: row; } }

.artifact-list { display: grid; gap: 10px; }
.artifact-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--bg-alt); }
.artifact-list strong { font-size: 0.94rem; }
.artifact-list .muted { margin-left: 10px; }

/* --- задания и план ------------------------------------------------- */

.field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; line-height: 1.55;
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); resize: vertical;
  min-height: 180px; font-family: var(--font);
}
.field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.panel-warning { border-color: rgba(251, 191, 36, 0.4); background: linear-gradient(140deg, rgba(251, 191, 36, 0.08), rgba(16, 19, 32, 0.6)); }
.panel-danger { border-color: rgba(248, 113, 113, 0.4); background: linear-gradient(140deg, rgba(248, 113, 113, 0.08), rgba(16, 19, 32, 0.6)); }
.panel-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.panel-action h2 { margin-bottom: 4px; }
.panel-action .panel-note { margin: 0; }

.pill-parsing { color: var(--warning); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); }
.pill-planned { color: var(--accent-2); border-color: rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.1); }
.pill-approved { color: var(--success); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.1); }
.pill-failed { color: var(--danger); border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.1); }

.progress { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 16px; }
.progress i { display: block; height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

.plan-heading { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-dim); margin: 26px 0 12px; }
.screens { display: grid; gap: 14px; }
.screens > li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 12px; padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--bg-alt); }
.screen-n { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; color: var(--accent-2); }
.screens > li > div { min-width: 0; }
.screens strong { font-size: 0.98rem; }
.screens p { color: var(--muted); font-size: 0.9rem; margin: 4px 0 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { flex: 0 0 auto; max-width: 100%; font-size: 0.78rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.chips-accent li { display: inline-flex; align-items: center; gap: 6px; color: #cfc6ff; border-color: rgba(124, 92, 255, 0.4); background: var(--accent-soft); font-size: 0.84rem; padding: 5px 11px; }
.chips-accent .icon { color: var(--success); }

.plain-list { display: grid; gap: 8px; }
.plain-list li { position: relative; padding-left: 16px; color: var(--muted); font-size: 0.93rem; }
.plain-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted-dim); }
.plain-list.warn li::before { background: var(--warning); }

.row-link { color: var(--text); font-weight: 600; }
.row-link:hover { color: #c9bcff; }
.empty-note { color: var(--muted); margin: 0; }
.table td.wrap { white-space: normal; }

.source-panel summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; list-style: none; }
.source-panel summary::-webkit-details-marker { display: none; }
.source-panel summary::before { content: "+ "; color: var(--accent-2); }
.source-panel[open] summary::before { content: "– "; }
.source-text, .error-text {
  white-space: pre-wrap; word-break: break-word; margin: 14px 0 0; padding: 14px;
  background: var(--bg-alt); border: 1px solid var(--border-soft); border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.84rem; color: var(--muted);
  max-height: 420px; overflow: auto;
}
.error-text { color: #ffc9c9; border-color: rgba(248, 113, 113, 0.3); }

.prose h1 { margin-bottom: 18px; }
.prose p { color: var(--muted); }

/* --- адаптив ------------------------------------------------------------- */

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .console { grid-template-columns: minmax(0, 1fr); }
  .console-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .mock-row { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 24px 18px;
    background: rgba(7, 8, 13, 0.97); border-bottom: 1px solid var(--border-soft);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .nav-links .nav-auth { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; }
  .nav-auth a:last-child { border-bottom: 0; }
  .nav-auth .btn { margin-top: 8px; }
  .nav-auth form { padding: 12px 0; }
  /* на лендинге ссылки авторизации живут в бургер-меню, на страницах входа они лишние */
  .page-landing .header-actions .btn,
  .page-landing .header-actions .logout-form,
  .page-auth .header-actions .btn { display: none; }
  .container { padding: 0 16px; }
  .header-inner { gap: 12px; }
  .page-console .header-actions { gap: 6px; }
  .page-console .header-actions .btn { padding: 7px 9px; font-size: 0.8rem; }
  /* бургер нужен только там, где есть меню лендинга */
  .page-auth .nav-toggle, .page-console .nav-toggle { display: none; }
  .logo-text { font-size: 1.05rem; }
  .hero { padding-top: 56px; }
  .hero-highlights { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

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