@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Unbounded:wght@500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #101312;
  --surface: #171b19;
  --surface-2: #1c211f;
  --line: #2a302d;
  --line-strong: #3a4540;
  --text: #f0f3ef;
  --muted: #99a29d;
  --accent: #9ce5c2;
  --accent-strong: #b7f4d4;
  --accent-ink: #102219;
  --radius: 14px;
  --font-body: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Manrope', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  z-index: -1;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; }
.skip-link:focus { top: 16px; }
.site-header, main, footer { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--accent); font-family: Georgia, serif; font-size: 19px; font-style: italic; }
.brand-dot { color: var(--accent); }
.header-help { color: var(--muted); font-size: 14px; text-underline-offset: 5px; text-decoration-color: var(--line-strong); transition: color .2s ease; }
.header-help:hover { color: var(--text); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { width: 28px; height: 1px; background: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
.catalog { padding: 64px 0 76px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-heading h1 { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.25; letter-spacing: -.04em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 13px; }
.app-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.app-card--active { display: grid; grid-template-columns: 1fr 390px; overflow: hidden; }
.app-summary { display: flex; gap: 22px; min-width: 0; padding: 34px; }
.app-icon { flex: 0 0 auto; display: grid; place-items: center; width: 62px; height: 62px; border: 1px solid var(--line-strong); border-radius: 13px; background: #111513; font-weight: 700; }
.libreoffice-icon svg { width: 34px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-title { min-width: 0; }
.title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.title-row h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.app-title p { max-width: 500px; margin: 0; color: var(--muted); font-size: 14px; }
.status { flex: 0 0 auto; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; text-transform: uppercase; }
.status--ready { border-color: rgba(156,229,194,.35); background: rgba(156,229,194,.08); color: var(--accent); }
.download-panel { padding: 28px; border-left: 1px solid var(--line); background: var(--surface-2); }
.os-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.os-option { position: relative; min-height: 76px; display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font: inherit; text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.os-option > svg { flex: 0 0 auto; width: 20px; fill: currentColor; }
.os-option > span:nth-child(2) { min-width: 0; display: grid; }
.os-option strong { color: var(--text); font-size: 13px; line-height: 1.3; }
.os-option small { margin-top: 3px; font-size: 9px; line-height: 1.3; white-space: nowrap; }
.os-option:hover { border-color: var(--line-strong); }
.os-option.is-selected { border-color: rgba(156,229,194,.6); background: rgba(156,229,194,.06); color: var(--accent); }
.radio-dot { position: absolute; right: 8px; top: 8px; width: 7px; height: 7px; border: 1px solid var(--line-strong); border-radius: 50%; }
.is-selected .radio-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px rgba(156,229,194,.1); }
.architecture-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -4px 0 16px; }
.architecture-picker[hidden] { display: none; }
.architecture-option { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font: 600 11px/1.2 var(--font-body); cursor: pointer; }
.architecture-option small { display: block; margin-top: 3px; color: #727a76; font-size: 9px; font-weight: 500; }
.architecture-option:hover { border-color: var(--line-strong); }
.architecture-option.is-selected { border-color: rgba(156,229,194,.55); background: rgba(156,229,194,.06); color: var(--accent); }
.download-button, .telegram-button { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.download-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.download-button:hover, .telegram-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.instruction-button { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: transparent; color: var(--text); font: 600 13px/1 var(--font-body); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.instruction-button svg { width: 18px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.instruction-button:hover { border-color: rgba(156,229,194,.45); background: rgba(156,229,194,.04); }
.official-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.official-note svg { width: 15px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.coming-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.app-card--coming { display: flex; align-items: center; gap: 18px; padding: 24px; background: transparent; }
.app-card--coming .app-icon { width: 48px; height: 48px; border-style: dashed; color: #727a76; font-family: var(--font-display); font-size: 13px; }
.app-card--coming .app-title { flex: 1; }
.app-card--coming .title-row { justify-content: space-between; }
.app-card--coming h3 { color: #c1c7c3; font-size: 16px; }
.app-card--coming p { font-size: 12px; }
.steps { padding: 0; margin: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 22px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li > span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font: 500 11px/1 var(--font-display); }
.steps h3 { margin-bottom: 6px; font-size: 16px; }
.steps p { max-width: 680px; margin: 0; color: var(--muted); font-size: 14px; }
.help { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; padding: 72px 0; }
.help h2 { margin-bottom: 12px; font-family: var(--font-display); font-size: 32px; letter-spacing: -.04em; }
.help > div > p:last-child { max-width: 560px; margin: 0; color: var(--muted); }
.telegram-button { flex: 0 0 auto; min-width: 230px; padding-inline: 22px; background: transparent; border: 1px solid rgba(156,229,194,.45); color: var(--accent); }
.telegram-button:hover { background: rgba(156,229,194,.07); }
.telegram-button svg { width: 20px; fill: currentColor; }
footer { min-height: 110px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.brand--small { font-size: 14px; }
.brand--small .brand-mark { width: 25px; height: 25px; font-size: 15px; }
footer p { margin: 0; }
.instruction-dialog { width: min(600px, calc(100% - 32px)); max-height: min(760px, calc(100vh - 32px)); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 28px 80px rgba(0,0,0,.5); }
.instruction-dialog::backdrop { background: rgba(5,7,6,.78); }
.dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 28px 22px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dialog-kicker { margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dialog-header h2 { margin: 0; font-family: var(--font-display); font-size: 23px; letter-spacing: -.04em; }
.dialog-close { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.dialog-close:hover { border-color: var(--line-strong); color: var(--text); }
.dialog-close svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.instruction-dialog .steps { padding: 0 28px; }
.dialog-help { margin: 0; padding: 22px 28px 26px; color: var(--muted); font-size: 13px; }
.dialog-help a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 820px) {
  .app-card--active { grid-template-columns: 1fr; }
  .download-panel { border-top: 1px solid var(--line); border-left: 0; }
  .coming-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header, main, footer { width: min(100% - 32px, 1120px); }
  .site-header { height: 72px; }
  .header-help { font-size: 12px; }
  .catalog { padding: 42px 0 56px; }
  .section-heading { align-items: flex-start; margin-bottom: 24px; }
  .section-heading h1 { max-width: 220px; font-size: 23px; }
  .section-heading > p { max-width: 120px; margin-top: 4px; text-align: right; }
  .app-summary { padding: 24px 20px; gap: 15px; }
  .app-icon { width: 50px; height: 50px; }
  .libreoffice-icon svg { width: 28px; }
  .title-row { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .title-row h3 { font-size: 18px; }
  .download-panel { padding: 20px; }
  .os-picker { grid-template-columns: 1fr; }
  .os-option { min-height: 66px; }
  .os-option small { font-size: 10px; }
  .app-card--coming { align-items: flex-start; padding: 20px; }
  .app-card--coming .title-row { flex-wrap: nowrap; }
  .help { display: block; padding: 64px 0; }
  .help h2 { font-size: 26px; }
  .telegram-button { width: 100%; margin-top: 28px; }
  footer { grid-template-columns: 1fr auto; min-height: 124px; gap: 12px; }
  footer > p:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .dialog-header { padding: 22px 20px 18px; }
  .instruction-dialog .steps { padding: 0 20px; }
  .dialog-help { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
