/* soft.gomako.ru — стили сайта. Без внешних шрифтов, скриптов и аналитики. */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a202c;
  --muted: #5a6677;
  --border: #dde2ea;
  --blue: #2b6cb0;
  --blue-hover: #235a94;
  --green: #2f855a;
  --code-bg: #eef1f6;
  --warn-bg: #fff6e0;
  --warn-border: #e6c875;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 6px 18px rgba(20, 30, 50, .06);
  --radius: 12px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #1a2029;
    --text: #e8ecf2;
    --muted: #9aa6b8;
    --border: #2c3542;
    --blue: #63a4e8;
    --blue-hover: #82b7ef;
    --green: #5dc08d;
    --code-bg: #232b37;
    --warn-bg: #2f2812;
    --warn-border: #6d5a1f;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-hover); }

img { max-width: 100%; height: auto; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* шапка */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); line-height: 1.2; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; padding: 7px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--code-bg); }

/* заголовок страницы */
.hero { padding: 56px 0 36px; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -.01em; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 680px; margin: 0; }

.program-hero { display: flex; gap: 28px; align-items: center; }
.program-hero img.icon { width: 112px; height: 112px; border-radius: 24px; flex: none; box-shadow: var(--shadow); }
@media (max-width: 640px) { .program-hero { flex-direction: column; align-items: flex-start; } .program-hero img.icon { width: 88px; height: 88px; } }

/* кнопки */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 8px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-hover); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { border-color: var(--blue); color: var(--text); }
.btn small { display: block; font-weight: 400; font-size: 12.5px; opacity: .85; }
.meta { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li { background: var(--code-bg); border-radius: 999px; padding: 4px 12px; font-size: 13.5px; color: var(--muted); }

/* разделы */
section { padding: 30px 0; }
section h2 { font-size: 26px; line-height: 1.25; margin: 0 0 16px; letter-spacing: -.005em; }
section h3 { font-size: 19px; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin: 4px 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card.soon { background: transparent; border-style: dashed; box-shadow: none; }
.card .card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.card .card-head img { width: 52px; height: 52px; border-radius: 12px; }
.card .card-head h3 { margin: 0; }
.tag { display: inline-block; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--code-bg); color: var(--muted); }

/* пример превращения */
.examples { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.examples th, .examples td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.examples tr:last-child td { border-bottom: 0; }
.examples th { background: var(--code-bg); font-size: 13.5px; color: var(--muted); font-weight: 600; }
code, kbd, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 5px; font-size: .92em; overflow-wrap: anywhere; }
.examples td code { background: transparent; padding: 0; font-size: 1em; }
.arrow { color: var(--muted); }

/* таблица данных */
.data { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15.5px; }
.data th, .data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data th { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* скриншоты */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: start; }
figure { margin: 0; }
figure img { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.shots .wide { grid-column: 1 / -1; }

/* заметки */
.note { background: var(--code-bg); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; }
.note.warn { background: var(--warn-bg); border: 1px solid var(--warn-border); }
.note p:last-child { margin-bottom: 0; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px 16px; margin: 0 0 10px; }
details summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
details[open] summary { margin-bottom: 4px; }

pre { background: var(--code-bg); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
pre code { background: transparent; padding: 0; }

.hash { font-size: 13px; word-break: break-all; }

/* подвал */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* текст описания, собранный из Markdown */
.prose { padding: 10px 0; }
.prose > h2 { font-size: 26px; line-height: 1.25; margin: 36px 0 16px; }
.prose > h3 { font-size: 19px; margin: 24px 0 8px; }
.prose > h4 { font-size: 16px; margin: 18px 0 6px; }
.prose img { border: 1px solid var(--border); border-radius: 10px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

/* полоса предпросмотра в админке */
.preview-bar { background: var(--warn-bg); border-bottom: 1px solid var(--warn-border); color: var(--text); text-align: center; padding: 8px 16px; font-size: 14px; }
