
/* ARCOO Heritage — шрифты.
   ВНИМАНИЕ: оригинальные лицензионные шрифты не предоставлены.
   Подобраны ближайшие аналоги с полной поддержкой кириллицы (Google Fonts).

   Файлы лежат рядом (design/fonts/), а не тянутся с fonts.googleapis.com:
   раньше это была цепочка из четырёх запросов подряд — стили, потом их
   импорт, потом чужой css, и только потом сами шрифты. Первый текст
   появлялся через 2,3 секунды. Подмножества только латиница и кириллица.
   Обновление: design/fonts/_grab.py. */

@font-face{
  font-family:'EB Garamond';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('fonts/eb-garamond-400-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'EB Garamond';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('fonts/eb-garamond-400-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'EB Garamond';
  font-style:normal;
  font-weight:500;
  font-display:swap;
  src:url('fonts/eb-garamond-500-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'EB Garamond';
  font-style:normal;
  font-weight:500;
  font-display:swap;
  src:url('fonts/eb-garamond-500-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'EB Garamond';
  font-style:normal;
  font-weight:600;
  font-display:swap;
  src:url('fonts/eb-garamond-600-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'EB Garamond';
  font-style:normal;
  font-weight:600;
  font-display:swap;
  src:url('fonts/eb-garamond-600-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'JetBrains Mono';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('fonts/jetbrains-mono-400-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'JetBrains Mono';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('fonts/jetbrains-mono-400-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'JetBrains Mono';
  font-style:normal;
  font-weight:500;
  font-display:swap;
  src:url('fonts/jetbrains-mono-500-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'JetBrains Mono';
  font-style:normal;
  font-weight:500;
  font-display:swap;
  src:url('fonts/jetbrains-mono-500-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:300;
  font-display:swap;
  src:url('fonts/manrope-300-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:300;
  font-display:swap;
  src:url('fonts/manrope-300-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('fonts/manrope-400-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('fonts/manrope-400-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:500;
  font-display:swap;
  src:url('fonts/manrope-500-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:500;
  font-display:swap;
  src:url('fonts/manrope-500-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:600;
  font-display:swap;
  src:url('fonts/manrope-600-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:600;
  font-display:swap;
  src:url('fonts/manrope-600-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:700;
  font-display:swap;
  src:url('fonts/manrope-700-cyrillic.woff2') format('woff2');
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'Manrope';
  font-style:normal;
  font-weight:700;
  font-display:swap;
  src:url('fonts/manrope-700-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{
  --font-display:"EB Garamond","Times New Roman",serif;
  --font-text:"Manrope","Helvetica Neue",Arial,sans-serif;
  --font-mono:"JetBrains Mono","SF Mono",ui-monospace,monospace;
}

:root{
  /* Base — тёмно-синий (капитал, надёжность) */
  --navy-900:#060F1F;
  --navy-800:#0B1B33;
  --navy-700:#102A4C;
  --navy-600:#1A3A63;
  --navy-500:#2B5288;
  --navy-300:#7B93B4;
  --navy-100:#C9D5E5;

  /* Base — золото (наследие) */
  --gold-700:#8A6A15;
  --gold-600:#A9821C;
  --gold-500:#C9A227;
  --gold-400:#DDBB55;
  --gold-300:#E9D18C;
  --gold-100:#F5EBCF;

  /* Base — холст / бумага (чертёж Леонардо) */
  --canvas-000:#FDFBF7;
  --canvas-100:#F7F2E9;
  --canvas-200:#EFE7D9;
  --canvas-300:#E2D7C4;
  --canvas-400:#C9BBA3;

  /* Base — графит (карандаш) */
  --graphite-900:#1A1A18;
  --graphite-700:#43423E;
  --graphite-500:#6E6C65;
  --graphite-300:#A7A49B;

  /* Semantic — статусы объекта */
  --status-positive:#2E6B52;
  --status-positive-bg:#E4EFE9;
  --status-caution:#9A6B12;
  --status-caution-bg:#F7EEDA;
  --status-restricted:#8C2F26;
  --status-restricted-bg:#F6E5E2;
  --status-neutral:#3F5876;
  --status-neutral-bg:#E7ECF3;

  /* Текстуры — лист Леонардо (тонированная бумага, не «клетка») */
  --paper-tint:#F1E8D8;
  --paper-fiber:rgba(201,187,163,.10);
  --paper-stain:rgba(150,118,70,.11);

  /* Semantic — поверхности */
  --surface-page:var(--canvas-100);
  --surface-card:var(--canvas-000);
  --surface-raised:#FFFFFF;
  --surface-inverse:var(--navy-800);
  --surface-inverse-alt:var(--navy-700);
  --surface-muted:var(--canvas-200);
  --surface-overlay:rgba(6,15,31,.62);

  /* Semantic — текст */
  --text-strong:var(--navy-900);
  --text-body:var(--graphite-700);
  --text-muted:var(--graphite-500);
  --text-on-inverse:var(--canvas-100);
  --text-on-inverse-muted:var(--navy-300);
  --text-accent:var(--gold-600);
  --text-link:var(--navy-600);
  --text-link-hover:var(--gold-600);

  /* Semantic — границы и линии чертежа */
  --border-hairline:rgba(26,26,24,.12);
  --border-strong:rgba(11,27,51,.28);
  --border-gold:rgba(201,162,39,.55);
  --border-inverse:rgba(233,209,140,.24);
  --blueprint-line:rgba(43,82,136,.18);
  --pencil-line:rgba(67,66,62,.45);
}

:root{
  /* Размеры — модульная шкала 1.25 на базе 16px */
  --text-2xs:11px;
  --text-xs:12px;
  --text-sm:14px;
  --text-md:16px;
  --text-lg:18px;
  --text-xl:22px;
  --text-2xl:28px;
  --text-3xl:36px;
  --text-4xl:48px;
  --text-5xl:64px;
  --text-6xl:88px;
  --text-7xl:120px;

  --leading-tight:1.04;
  --leading-snug:1.18;
  --leading-normal:1.5;
  --leading-relaxed:1.65;

  --weight-light:300;
  --weight-regular:400;
  --weight-medium:500;
  --weight-semibold:600;
  --weight-bold:700;

  --tracking-display:-0.02em;
  --tracking-tight:-0.01em;
  --tracking-normal:0;
  --tracking-wide:0.04em;
  --tracking-caps:0.16em;

  /* Роли */
  --type-display:var(--weight-regular) var(--text-6xl)/var(--leading-tight) var(--font-display);
  --type-h1:var(--weight-regular) var(--text-4xl)/var(--leading-snug) var(--font-display);
  --type-h2:var(--weight-regular) var(--text-3xl)/var(--leading-snug) var(--font-display);
  --type-h3:var(--weight-medium) var(--text-xl)/1.3 var(--font-text);
  --type-body:var(--weight-400,400) var(--text-md)/var(--leading-relaxed) var(--font-text);
  --type-body-sm:var(--weight-regular) var(--text-sm)/var(--leading-normal) var(--font-text);
  --type-label:var(--weight-semibold) var(--text-2xs)/1.2 var(--font-text);
  --type-figure:var(--weight-medium) var(--text-2xl)/1.1 var(--font-mono);
  --type-figure-sm:var(--weight-medium) var(--text-md)/1.2 var(--font-mono);
}

:root{
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:24px;
  --space-6:32px;
  --space-7:48px;
  --space-8:64px;
  --space-9:96px;
  --space-10:128px;
  --space-11:180px;

  --gutter:24px;
  --page-margin:clamp(20px,5vw,88px);
  --max-content:1320px;
  --max-prose:64ch;
  --grid-columns:12; /* @kind other */
  --header-height:76px;
}

:root{
  --radius-none:0px;
  --radius-xs:2px;
  --radius-sm:4px;
  --radius-md:6px;
  --radius-lg:10px;
  --radius-pill:999px;
  /* Арка — главный мотив бренда */
  --radius-arch:999px 999px 0 0;
  --radius-arch-soft:220px 220px 0 0;
}

:root{
  --shadow-none:none;
  --shadow-hairline:0 0 0 1px var(--border-hairline);
  --shadow-card:0 1px 2px rgba(6,15,31,.05),0 8px 24px -16px rgba(6,15,31,.28);
  --shadow-raised:0 2px 4px rgba(6,15,31,.06),0 18px 40px -22px rgba(6,15,31,.34);
  --shadow-overlay:0 32px 80px -32px rgba(6,15,31,.5);
  --shadow-inset-top:inset 0 1px 0 rgba(255,255,255,.6);
  --focus-ring:0 0 0 2px var(--canvas-000),0 0 0 4px var(--gold-500);
  --scrim-bottom:linear-gradient(to top,rgba(6,15,31,.78),rgba(6,15,31,0) 62%); /* @kind other */
  --scrim-top:linear-gradient(to bottom,rgba(6,15,31,.55),rgba(6,15,31,0) 70%); /* @kind other */
}

:root{
  --dur-instant:90ms; /* @kind other */
  --dur-fast:180ms; /* @kind other */
  --dur-base:320ms; /* @kind other */
  --dur-slow:640ms; /* @kind other */
  --dur-reveal:1100ms; /* @kind other */
  --dur-draw:2400ms; /* @kind other */

  --ease-standard:cubic-bezier(.22,.61,.36,1); /* @kind other */
  --ease-entrance:cubic-bezier(.16,1,.3,1); /* @kind other */
  --ease-exit:cubic-bezier(.4,0,1,1); /* @kind other */
  --ease-arch:cubic-bezier(.65,0,.35,1); /* @kind other */

  --transition-control:color var(--dur-fast) var(--ease-standard),background-color var(--dur-fast) var(--ease-standard),border-color var(--dur-fast) var(--ease-standard),box-shadow var(--dur-fast) var(--ease-standard);
}
@media (prefers-reduced-motion:reduce){
  :root{--dur-base:1ms; /* @kind other */--dur-slow:1ms; /* @kind other */--dur-reveal:1ms; /* @kind other */--dur-draw:1ms; /* @kind other */}
}

*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--surface-page);color:var(--text-body);font:var(--type-body);-webkit-font-smoothing:antialiased;text-wrap:pretty}
h1,h2,h3,h4{margin:0;color:var(--text-strong)}
h1{font:var(--type-h1);letter-spacing:var(--tracking-display)}
h2{font:var(--type-h2);letter-spacing:var(--tracking-tight)}
h3{font:var(--type-h3)}
p{margin:0 0 var(--space-4)}
a{color:var(--text-link);text-decoration:none;border-bottom:1px solid var(--border-gold);transition:var(--transition-control)}
a:hover{color:var(--text-link-hover);border-bottom-color:var(--gold-500)}
:focus-visible{outline:none;box-shadow:var(--focus-ring)}
::selection{background:var(--gold-300);color:var(--navy-900)}
.arcoo-eyebrow{font:var(--type-label);letter-spacing:var(--tracking-caps);text-transform:uppercase;color:var(--text-muted)}
.arcoo-figure{font:var(--type-figure);color:var(--text-strong);font-variant-numeric:tabular-nums}

/* ARCOO Heritage — вёрстка приложения поверх токенов дизайн-системы. */

.wrap{ max-width: var(--max-content); margin: 0 auto; padding: 0 var(--page-margin); }
.stack{ display: flex; flex-direction: column; }
.row{ display: flex; align-items: center; }
.gap-2{ gap: var(--space-2) } .gap-3{ gap: var(--space-3) } .gap-4{ gap: var(--space-4) }
.gap-5{ gap: var(--space-5) } .gap-6{ gap: var(--space-6) } .gap-7{ gap: var(--space-7) }
.grow{ flex: 1 } .muted{ color: var(--text-muted) } .nowrap{ white-space: nowrap }
.mono{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── Шапка ─────────────────────────────────────────────────────────── */
.site-header{
  display: flex; align-items: center; gap: var(--space-7);
  height: var(--header-height); padding: 0 var(--page-margin);
  background: var(--surface-card); border-bottom: 1px solid var(--border-hairline);
  position: sticky; top: 0; z-index: 50;
}
.wm{ font-family: var(--font-display); font-size: 19px; letter-spacing: .22em;
     text-transform: uppercase; color: var(--navy-800); text-decoration: none; border: 0; }
/* Нижняя граница нужна: на телефоне знак уменьшается до 14px, и доля .38
   давала 5,3 пикселя — слово в марке переставало читаться совсем. */
.wm i{ font-family: var(--font-text); font-style: normal; font-weight: 600;
       font-size: max(9px, .38em); letter-spacing: .3em; color: var(--gold-600);
       margin-left: .34em; }
.site-nav{ display: flex; gap: var(--space-6); flex: 1; }
.site-nav a{ font: var(--type-body-sm); color: var(--navy-800); text-decoration: none;
             border-bottom: 1px solid transparent; padding: 4px 0; }
.site-nav a:hover, .site-nav a.active{ border-bottom-color: var(--gold-500); }

/* Кнопка «Меню» в шапке — только на узком экране */
.site-nav-toggle{ display: none; }
@media (max-width: 900px){
  .site-header{ gap: var(--space-4); position: relative; }
  .wm{ font-size: 16px; letter-spacing: .16em; white-space: nowrap; }
}
/* На телефоне в строку помещаются только знак и кнопка меню: с третьим
   элементом шапка требовала 400px и растягивала всю страницу */
@media (max-width: 620px){
  .site-header > .btn{ display: none; }
  .wm{ font-size: 14px; }
  .wm i{ letter-spacing: .18em; }
}
@media (max-width: 900px){
  .site-nav-toggle{
    display: inline-flex; align-items: center; gap: 9px; margin-left: auto;
    padding: 0; background: none; border: 0; color: var(--navy-800); cursor: pointer;
    font-family: var(--font-text); font-size: 11px; font-weight: 800;
    letter-spacing: .18em; text-transform: uppercase;
  }
  .site-nav-toggle .bars{ width: 20px; height: 12px; position: relative;
    border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .site-nav-toggle .bars::after{ content: ""; position: absolute; left: 0; right: 0; top: 5px;
    height: 2px; background: currentColor; }
  /* Разделы падают панелью под шапку: в строку они не помещались и были
     просто скрыты — на телефоне до каталога и новостей было не добраться */
  .site-header .site-nav{ display: none; position: absolute; left: 0; right: 0;
    top: 100%; flex-direction: column; gap: 0; padding: var(--space-3) var(--page-margin);
    background: var(--surface-card); border-bottom: 1px solid var(--border-hairline);
    box-shadow: 0 18px 40px rgba(6,15,31,.10); }
  .site-header.open .site-nav{ display: flex; }
  .site-header .site-nav a{ padding: 11px 0; border-bottom: 1px solid var(--border-hairline); }
  .site-header .site-nav a:last-child{ border-bottom: 0; }
}

/* ── Кнопки ────────────────────────────────────────────────────────── */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 46px; padding: 0 var(--space-5); border-radius: var(--radius-sm);
  font: var(--type-body-sm); font-weight: var(--weight-semibold); letter-spacing: .02em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: var(--transition-control);
}
.btn-primary{ background: var(--navy-800); color: var(--canvas-100); border-color: var(--navy-800); }
.btn-primary:hover{ background: var(--navy-700); color: var(--canvas-100); }
.btn-gold{ background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
.btn-gold:hover{ background: var(--gold-400); color: var(--navy-900); }
.btn-secondary{ background: transparent; color: var(--navy-800); border-color: var(--border-strong); }
.btn-secondary:hover{ background: rgba(11,27,51,.04); color: var(--navy-800); }
.btn-ghost{ background: transparent; color: var(--text-body); border-color: transparent; }
.btn-sm{ height: 36px; padding: 0 var(--space-4); font-size: var(--text-xs); }
.btn-danger{ color: var(--status-restricted); border-color: rgba(140,47,38,.35); background: transparent; }
.btn:focus-visible{ box-shadow: var(--focus-ring); }

/* ── Формы ─────────────────────────────────────────────────────────── */
.field{ display: flex; flex-direction: column; gap: var(--space-2); }
.field > label, .field-label{
  font: var(--type-label); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--text-muted);
}
.field input[type=text], .field input[type=number], .field input[type=tel],
.field input[type=email], .field input[type=date], .field select, .field textarea{
  width: 100%; padding: 0 var(--space-4); height: 46px;
  background: var(--surface-raised); color: var(--text-strong);
  border: 1px solid var(--border-hairline); border-radius: var(--radius-sm);
  font: var(--type-body-sm);
}
.field textarea{ height: auto; min-height: 96px; padding: var(--space-3) var(--space-4);
                 line-height: var(--leading-normal); resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus{
  outline: none; border-color: var(--navy-600); box-shadow: var(--focus-ring);
}
.field .hint{ font: var(--type-body-sm); font-size: var(--text-xs); color: var(--text-muted); }
.field.required > label::after{ content: " *"; color: var(--gold-600); }
.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.form-grid.three{ grid-template-columns: repeat(3, 1fr); }
.form-section{ margin: var(--space-7) 0 var(--space-5); }

/* ── Карточки ──────────────────────────────────────────────────────── */
.card{
  background: var(--surface-card); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
}
.card-pad{ padding: var(--space-6); }
.obj-card{ overflow: hidden; display: flex; flex-direction: column; text-decoration: none;
           border: 1px solid var(--border-hairline); border-radius: var(--radius-md);
           background: var(--surface-card); box-shadow: var(--shadow-card);
           transition: transform var(--dur-base) var(--ease-standard),
                       box-shadow var(--dur-base) var(--ease-standard),
                       border-color var(--dur-fast) var(--ease-standard); }
.obj-card:hover{ transform: translateY(-2px); box-shadow: var(--shadow-raised); border-color: var(--border-gold); }
.obj-card .thumb{ height: 200px; background: var(--canvas-200); background-size: cover;
                  background-position: center; position: relative; }
.obj-card .thumb.empty{
  background-image: repeating-linear-gradient(128deg,rgba(67,66,62,.10) 0 1px,transparent 1px 12px),
    linear-gradient(105deg,rgba(201,187,163,.10) 0 1px,transparent 1px 7px),
    linear-gradient(180deg,#F6EFE2,#EDE3D1);
  display: flex; align-items: flex-end; padding: var(--space-4);
}
.obj-card .body{ padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.obj-card h3{ font-family: var(--font-display); font-size: var(--text-xl); font-weight: 400;
              color: var(--text-strong); }
.obj-card .addr{ font: var(--type-body-sm); color: var(--text-muted); }
.obj-card .facts{ display: flex; gap: var(--space-5); padding-top: var(--space-3);
                  border-top: 1px solid var(--border-hairline); margin-top: auto; }
.obj-card .facts div{ display: flex; flex-direction: column; gap: 4px; }
.obj-card .facts b{ font-family: var(--font-mono); font-size: var(--text-md); font-weight: 500;
                    color: var(--text-strong); font-variant-numeric: tabular-nums; }
.obj-card .facts span{ font: var(--type-label); letter-spacing: var(--tracking-caps);
                       text-transform: uppercase; color: var(--text-muted); }
.grid-3{ display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-5); }
.grid-2{ display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-5); }

/* ── Теги и статусы ────────────────────────────────────────────────── */
.tag{ display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-3);
      font: var(--type-label); letter-spacing: var(--tracking-wide); text-transform: uppercase;
      border-radius: var(--radius-xs); }
.tag-neutral{ color: var(--status-neutral); background: var(--status-neutral-bg); }
.tag-positive{ color: var(--status-positive); background: var(--status-positive-bg); }
.tag-caution{ color: var(--status-caution); background: var(--status-caution-bg); }
.tag-restricted{ color: var(--status-restricted); background: var(--status-restricted-bg); }
.tag-gold{ color: var(--gold-700); background: var(--gold-100); }
.tag-outline{ color: var(--text-body); box-shadow: inset 0 0 0 1px var(--border-hairline); }

.verdict-line{ display: flex; gap: var(--space-2); font: var(--type-body-sm); align-items: flex-start; }
.v-ok{ color: var(--status-positive); } .v-cond{ color: var(--status-caution); }
.v-no{ color: var(--status-restricted); } .v-unknown{ color: var(--text-muted); }

/* ── Паспорт ограничений ───────────────────────────────────────────── */
.passport{ width: 100%; border-collapse: collapse; }
.passport th{ text-align: left; font: var(--type-label); letter-spacing: var(--tracking-caps);
              text-transform: uppercase; color: var(--text-muted); padding: var(--space-3) 0;
              border-bottom: 1px solid var(--border-hairline); }
.passport td{ padding: var(--space-3) 0; border-bottom: 1px solid var(--border-hairline);
              font: var(--type-body-sm); vertical-align: top; }
.passport td.code{ font-family: var(--font-mono); color: var(--text-muted); width: 52px; }
.passport td.verdict{ width: 190px; }

/* На телефоне таблица разворачивается в список: четыре колонки требуют
   почти 400px и раздвигают страницу, из-за чего сайт открывался мельче. */
@media (max-width: 700px){
  .passport, .passport tbody, .passport tr, .passport td{ display: block; width: auto; }
  .passport thead{ display: none; }
  .passport tr{ padding: var(--space-4) 0; border-bottom: 1px solid var(--border-hairline); }
  .passport tr:first-child{ border-top: 1px solid var(--border-hairline); }
  .passport td{ border: 0; padding: 2px 0; }
  .passport td.code{ width: auto; font-family: var(--font-mono); font-size: var(--text-xs); }
  .passport td.verdict{ width: auto; margin: 6px 0; }
}

.usage-list{ list-style: none; margin: 0; padding: 0; }
.usage-list li{ display: flex; align-items: flex-start; gap: var(--space-4);
                padding: var(--space-4) 0; border-top: 1px solid var(--border-hairline); }
.usage-list li:first-child{ border-top: 0; }
.usage-list .name{ flex: 1; font: var(--type-body-sm); font-weight: 500; color: var(--text-strong); }
.usage-list .why{ font: var(--type-body-sm); font-size: var(--text-xs); color: var(--text-muted);
                  max-width: 54%; text-align: right; }

.divider{ display: flex; align-items: center; gap: var(--space-4); margin: var(--space-7) 0 var(--space-5); }
.divider span{ font: var(--type-label); letter-spacing: var(--tracking-caps);
               text-transform: uppercase; color: var(--text-muted); }
.divider i{ flex: 1; height: 1px; background: var(--border-hairline); display: block; }

.expert-note{ padding: var(--space-6); background: var(--canvas-100);
              border-left: 2px solid var(--gold-500); }
.expert-note p{ font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.4;
                color: var(--text-strong); margin: 0 0 var(--space-4); }

.notice{ padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm);
         font: var(--type-body-sm); border: 1px solid; }
.notice-info{ background: var(--status-neutral-bg); border-color: rgba(63,88,118,.2); color: var(--status-neutral); }
.notice-warn{ background: var(--status-caution-bg); border-color: rgba(154,107,18,.25); color: var(--status-caution); }
.notice-ok{ background: var(--status-positive-bg); border-color: rgba(46,107,82,.2); color: var(--status-positive); }

.disclaimer{ font: var(--type-body-sm); font-size: var(--text-xs); color: var(--text-muted);
             padding-top: var(--space-5); border-top: 1px solid var(--border-hairline); }

/* ── Фильтры каталога ──────────────────────────────────────────────── */
.filters{ display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end;
          padding: var(--space-5) 0; border-bottom: 1px solid var(--border-hairline); }
.filters .field{ min-width: 190px; }
.filters .field select, .filters .field input{ height: 40px; }

/* ── Новости, анонсы, статьи ──────────────────────────────────────────
   Карточка как у объектов: снимок, вид записи с датой, заголовок и
   подводка. Три последние показываются на главной.                    */
.news-grid{ display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-6); }
.news-card{ display: flex; flex-direction: column; gap: var(--space-3);
            text-decoration: none; border: 0; color: inherit; }
.news-card .ph{ aspect-ratio: 2/3; overflow: hidden; border-radius: var(--radius-md);
                background: var(--canvas-200); display: block;
                transition: box-shadow var(--dur-base) var(--ease-standard),
                            transform var(--dur-base) var(--ease-standard); }
.news-card .ph img{ width: 100%; height: 100%; object-fit: cover; display: block;
                    transition: transform 1.1s cubic-bezier(.65,0,.35,1); }
.news-card:hover .ph{ box-shadow: var(--shadow-raised); transform: translateY(-3px); }
.news-card:hover .ph img{ transform: scale(1.05); }
.news-card .ph.empty{ background-image:
  repeating-linear-gradient(128deg,rgba(67,66,62,.10) 0 1px,transparent 1px 12px),
  linear-gradient(180deg,#F6EFE2,#EDE3D1); }
.news-card .meta{ font: var(--type-label); letter-spacing: var(--tracking-caps);
                  text-transform: uppercase; color: var(--gold-700); }
.news-card b{ font-family: var(--font-display); font-weight: 400;
              font-size: var(--text-xl); line-height: 1.2; color: var(--text-strong); }
.news-card .lead-line{ font-size: var(--text-sm); line-height: 1.55; color: var(--text-muted);
                       display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
                       overflow: hidden; }

/* Лента на главной: карточки крупные, листаются вбок пальцем, колесом
   или кнопками. Так помещается больше записей, чем в три ячейки. */
.news-band{ overflow: hidden; }
.news-rail{
  display: flex; gap: var(--space-5); margin-top: clamp(32px,5vh,60px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  /* лента идёт от поля страницы до правого края экрана и уходит за него */
  margin-right: calc(var(--page-margin) * -1);
  padding-right: var(--page-margin);
}
.news-rail::-webkit-scrollbar{ display: none; }
.news-card.big{ flex: 0 0 clamp(260px, 30vw, 440px); scroll-snap-align: start; }
.news-card.big .ph{ position: relative; }
.news-card .ph .kind{
  position: absolute; left: 0; top: 0; padding: 7px 14px;
  background: rgba(6,15,31,.62); color: var(--canvas-100);
  font: var(--type-label); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; border-radius: 0 0 8px 0;
}
.news-card .more{
  margin-top: auto; padding-top: var(--space-3);
  font: var(--type-label); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--gold-700);
}
.news-card:hover .more{ color: var(--navy-800); }

.news-tools{ display: flex; align-items: center; gap: var(--space-3); }
.news-arrow{
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--navy-800); font-size: 17px; line-height: 1;
  transition: background .3s ease, opacity .3s ease, border-color .3s ease;
}
.news-arrow:hover{ background: rgba(11,27,51,.06); }
.news-arrow:disabled{ opacity: .3; cursor: default; }

/* Последняя карточка ведёт в раздел целиком */
.news-card.news-all .ph.all{
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-800); color: var(--canvas-100);
}
.news-card.news-all .sign{ font-size: 40px; line-height: 1; }

@media (max-width: 900px){
  .news-card.big{ flex: 0 0 78vw; }
  .news-arrow{ display: none; }
}

.news-cover{ width: 100%; height: auto; display: block; border-radius: var(--radius-md);
             margin: clamp(28px,4vh,48px) 0; }
.news-body{ max-width: 68ch; }
.news-body p{ margin: 0 0 var(--space-5); font-size: clamp(16px,1.15vw,18px);
              line-height: 1.7; color: var(--text-body); }

.admin-news-thumb{ width: 132px; height: 74px; flex: 0 0 auto; border-radius: var(--radius-sm);
                   background: var(--canvas-200) center/cover no-repeat; display: block; }
.admin-news-thumb.big{ width: min(420px,100%); height: auto; aspect-ratio: 16/9; }
.admin-news-thumb.empty{ background-image:
  repeating-linear-gradient(128deg,rgba(67,66,62,.10) 0 1px,transparent 1px 12px),
  linear-gradient(180deg,#F6EFE2,#EDE3D1); }

@media (max-width: 900px){
  .news-grid{ grid-template-columns: 1fr; gap: var(--space-7); }
}

/* ── Связь ────────────────────────────────────────────────────────────
   Контакты и короткая форма перед подвалом: до этого связаться с
   платформой было неоткуда, кроме карточки объекта.                  */
.contact-band{ background: var(--canvas-200); position: relative; z-index: 2;
               padding: clamp(64px,9vh,120px) var(--page-margin); }
.contact-grid{ display: grid; grid-template-columns: 1.1fr .9fr;
               gap: clamp(32px,5vw,88px); align-items: start;
               max-width: var(--max-content); margin: 0 auto; }
.contact-band .display{ font-size: clamp(30px,4.4vw,64px); max-width: 15ch;
                        text-wrap: balance; }
.contact-list{ display: flex; flex-wrap: wrap; gap: var(--space-6);
               margin-top: clamp(28px,4vh,48px); }
.contact-list a{ display: flex; flex-direction: column; gap: 4px;
                 text-decoration: none; border: 0; color: inherit; }
.contact-list span{ font: var(--type-label); letter-spacing: var(--tracking-caps);
                    text-transform: uppercase; color: var(--text-muted); }
.contact-list b{ font-family: var(--font-display); font-weight: 400;
                 font-size: clamp(18px,1.7vw,26px); color: var(--text-strong); }
.contact-list a:hover b{ color: var(--gold-700); }
.contact-form{ background: var(--surface-card); }
.contact-form .btn{ width: 100%; }

/* Карточка с входом в кабинет вместо открытой формы */
.contact-card{ display: flex; flex-direction: column; gap: var(--space-3);
               background: var(--surface-card); }
.contact-card .ask-eyebrow{ font: var(--type-label); letter-spacing: var(--tracking-caps);
                            text-transform: uppercase; color: var(--gold-700); }
.contact-card .ask-title{ font-family: var(--font-display); font-weight: 400;
                          font-size: clamp(24px,2.4vw,36px); line-height: 1.1;
                          color: var(--text-strong); }
.contact-card .ask-note{ margin: 0; font-size: var(--text-sm); line-height: 1.6;
                         color: var(--text-muted); }
.contact-card .btn{ align-self: flex-start; margin-top: var(--space-2); }
.contact-card .hint{ font-size: var(--text-xs); color: var(--text-muted); }
.contact-card .hint a{ color: var(--navy-800); border-bottom: 1px solid var(--border-gold); }

@media (max-width: 900px){
  .contact-grid{ grid-template-columns: 1fr; }
  .contact-list{ gap: var(--space-5); }
  /* На узкой колонке ограничение по числу знаков рвало заголовок по словам */
  .contact-band .display{ max-width: none; }
}

/* ── Подвал ────────────────────────────────────────────────────────── */
/* ── Футер: последний экран, а не подвал ─────────────────────────────
   Приём era-residence: тёмный разворот во всю высоту, контакт крупно
   по центру, служебные строки прижаты к нижним углам.                */
.site-footer{ background: var(--surface-inverse); color: var(--text-on-inverse);
              min-height: 100vh; display: flex; flex-direction: column;
              justify-content: space-between; position: relative;
              padding: var(--space-8) var(--page-margin) var(--space-6);
              overflow: hidden; }
.site-footer a{ color: inherit; border: 0; }

/* Кнопка «наверх» вертикально по левому краю, как у образца */
.footer-top{ position: absolute; left: var(--page-margin); bottom: var(--space-8);
             display: flex; flex-direction: column; align-items: center;
             gap: var(--space-4); text-decoration: none; }
.footer-top .line{ width: 1px; height: 70px; background: var(--border-inverse);
                   position: relative; }
.footer-top .line::after{ content: ""; position: absolute; left: -3px; top: 0;
                          border: 4px solid transparent; border-bottom-color: var(--gold-400); }
.footer-top .word{ font: var(--type-label); letter-spacing: var(--tracking-caps);
                   text-transform: uppercase; writing-mode: vertical-rl;
                   color: var(--text-on-inverse-muted); }
.footer-top:hover .word{ color: var(--gold-300); }

.footer-middle{ flex: 1; display: flex; flex-direction: column; align-items: center;
                justify-content: center; gap: var(--space-5); text-align: center; }
.footer-middle .mark{ width: clamp(64px, 7vw, 96px); color: var(--gold-400);
                      display: block; }
.footer-middle .mark svg{ width: 100%; height: auto; display: block; }

/* Контакт — главный элемент экрана */
.footer-call{ font-family: var(--font-display); font-weight: 400;
              font-size: clamp(34px, 7vw, 96px); line-height: 1;
              letter-spacing: .01em; color: var(--canvas-100);
              transition: color .3s ease; }
.footer-call:hover{ color: var(--gold-300); }

.footer-where{ display: flex; flex-direction: column; gap: 4px;
               font-size: var(--text-xs); letter-spacing: .1em;
               text-transform: uppercase; color: var(--text-on-inverse-muted); }
.footer-where b{ color: var(--canvas-100); font-weight: 600; }

.footer-contacts{ display: flex; flex-wrap: wrap; justify-content: center;
                  gap: var(--space-5); margin-top: var(--space-4);
                  font-size: var(--text-sm); }
.footer-contacts a{ color: var(--canvas-100); border-bottom: 1px solid rgba(255,255,255,.25);
                    padding-bottom: 2px; transition: color .3s ease; }
.footer-contacts a:hover{ color: var(--gold-300); }

.footer-links{ display: flex; flex-wrap: wrap; justify-content: center;
               gap: var(--space-5); margin-top: var(--space-4);
               font: var(--type-label); letter-spacing: var(--tracking-caps);
               text-transform: uppercase; }
.footer-links a{ color: var(--text-on-inverse-muted); transition: color .3s ease; }
.footer-links a:hover{ color: var(--gold-300); }

.footer-bottom{ display: flex; justify-content: space-between; align-items: flex-end;
                gap: var(--space-6); font-size: var(--text-xs); line-height: 1.5;
                color: var(--text-on-inverse-muted);
                padding-left: 64px; }
.footer-bottom .right{ text-align: right; }

@media (max-width: 767px){
  .site-footer{ padding: var(--space-7) var(--page-margin) var(--space-5); }
  .footer-top{ display: none; }
  .footer-bottom{ flex-direction: column; align-items: center; text-align: center;
                  gap: var(--space-4); padding-left: 0; }
  .footer-bottom .right{ text-align: center; }
}

/* ── Админка ───────────────────────────────────────────────────────── */
/* Тонкая полоса на публичных страницах: напоминает, что вы вошли как редактор */
.admin-bar{ background: var(--navy-800); color: var(--canvas-100);
            padding: 7px var(--page-margin); display: flex; align-items: center;
            gap: var(--space-4); font-size: var(--text-xs); }
.admin-bar a{ color: var(--gold-300); text-decoration: none; border: 0; }
.admin-bar a:hover{ text-decoration: underline; }
.admin-bar .brand{ opacity: .65; letter-spacing: .04em; }

/* Боковое меню: разделы слева, работа справа — привычная раскладка панели */
.admin-body{ display: flex; align-items: stretch; min-height: 100vh; background: var(--canvas-100); }
.admin-side{ flex: 0 0 232px; width: 232px; background: var(--navy-800); color: var(--canvas-100);
             display: flex; flex-direction: column; padding: var(--space-5) 0;
             position: sticky; top: 0; height: 100vh; z-index: 60; }
.admin-brand{ display: block; padding: 0 var(--space-5) var(--space-5);
              font-family: var(--font-display); letter-spacing: .2em; text-transform: uppercase;
              color: var(--canvas-100); text-decoration: none; border: 0; font-size: var(--text-sm); }
.admin-brand span{ display: block; letter-spacing: .12em; font-size: var(--text-xs);
                   color: var(--gold-300); margin-top: 3px; }
.admin-nav{ display: flex; flex-direction: column; }
.admin-nav a{ display: flex; align-items: center; gap: 6px;
              padding: 9px var(--space-5); color: var(--canvas-100); opacity: .78;
              font: var(--type-body-sm); text-decoration: none; border: 0;
              border-left: 2px solid transparent; }
.admin-nav a:hover{ opacity: 1; background: rgba(255,255,255,.05); }
.admin-nav a.on{ opacity: 1; color: var(--gold-300); background: rgba(255,255,255,.07);
                 border-left-color: var(--gold-300); }
.admin-nav .group{ padding: var(--space-5) var(--space-5) 6px; font: var(--type-label);
                   letter-spacing: var(--tracking-caps); text-transform: uppercase;
                   color: rgba(255,255,255,.4); font-size: 10px; }
.admin-nav .badge{ font-style: normal; font-family: var(--font-mono); font-size: 11px;
                   background: var(--gold-300); color: var(--navy-800);
                   border-radius: 999px; padding: 1px 7px; margin-left: auto; }
.admin-side-foot{ margin-top: auto; padding: var(--space-5) var(--space-5) 0;
                  display: flex; flex-direction: column; gap: 6px;
                  border-top: 1px solid rgba(255,255,255,.1); }
.admin-side-foot a{ color: var(--canvas-100); opacity: .7; font-size: var(--text-xs);
                    text-decoration: none; border: 0; }
.admin-side-foot a:hover{ opacity: 1; color: var(--gold-300); }
.admin-side-foot .who{ font-size: var(--text-xs); color: rgba(255,255,255,.5);
                       margin-bottom: 4px; }
.admin-main{ flex: 1; min-width: 0; padding: var(--space-6) var(--space-7) var(--space-9); }
.admin-main > .wrap, .admin-main .wrap{ padding-left: 0; padding-right: 0; max-width: 1180px; }
.admin-head{ display: flex; align-items: flex-end; gap: var(--space-5); flex-wrap: wrap;
             margin-bottom: var(--space-6); }
.admin-head h1{ margin: 0; }
.admin-head .lead{ font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-2);
                   max-width: 68ch; }

/* Плитки сводки */
.tiles{ display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: var(--space-4); }
.tile{ background: var(--surface-raised); border: 1px solid var(--border-hairline);
       border-radius: var(--radius-sm); padding: var(--space-4) var(--space-5);
       display: flex; flex-direction: column; gap: 4px; text-decoration: none; border-bottom-width: 1px; }
a.tile:hover{ border-color: var(--gold-300); }
.tile b{ font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 500;
         color: var(--text-strong); font-variant-numeric: tabular-nums; }
.tile span{ font: var(--type-label); letter-spacing: var(--tracking-caps);
            text-transform: uppercase; color: var(--text-muted); }
.tile.warn b{ color: var(--status-caution); }

/* Ячейки главной страницы */
.slots{ display: grid; gap: var(--space-4); }
.slots.three{ grid-template-columns: repeat(3, 1fr); }
.slots.six{ grid-template-columns: repeat(3, 1fr); }
.slot{ background: var(--surface-raised); border: 1px solid var(--border-hairline);
       border-radius: var(--radius-sm); padding: var(--space-4); display: flex;
       flex-direction: column; gap: var(--space-3); }
.slot .num{ font: var(--type-label); letter-spacing: var(--tracking-caps);
            text-transform: uppercase; color: var(--text-muted); display: flex;
            justify-content: space-between; align-items: center; }
.slot .shot{ aspect-ratio: 16/9; border-radius: var(--radius-xs); background: var(--canvas-200)
             center/cover no-repeat; display: flex; align-items: center; justify-content: center;
             font-size: var(--text-xs); color: var(--text-muted); }
.slot select{ width: 100%; }
.slot .who{ font-size: var(--text-xs); color: var(--text-muted); min-height: 1.2em; }

/* Схема: где на сайте стоит рекламное место */
.spot-map{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
           width: min(380px, 100%); }
.spot-map i{ aspect-ratio: 16/10; border-radius: var(--radius-xs); background: var(--canvas-200);
             border: 1px solid var(--border-hairline); }
.spot-map i.ad{ grid-row: span 2; aspect-ratio: auto; background: var(--status-caution-bg);
                border-color: rgba(154,107,18,.35); display: flex; align-items: center;
                justify-content: center; font-style: normal; font-size: 10px;
                text-align: center; color: var(--status-caution); padding: 4px; }

.stat-row{ display: flex; gap: var(--space-7); flex-wrap: wrap; margin: var(--space-6) 0; }
.stat{ display: flex; flex-direction: column; gap: 4px; }
.stat b{ font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 500;
         color: var(--text-strong); font-variant-numeric: tabular-nums; }
.stat span{ font: var(--type-label); letter-spacing: var(--tracking-caps);
            text-transform: uppercase; color: var(--text-muted); }

.table{ width: 100%; border-collapse: collapse; }
.table th{ text-align: left; font: var(--type-label); letter-spacing: var(--tracking-caps);
           text-transform: uppercase; color: var(--text-muted); padding: var(--space-3);
           border-bottom: 1px solid var(--border-hairline); }
.table td{ padding: var(--space-3); border-bottom: 1px solid var(--border-hairline);
           font: var(--type-body-sm); vertical-align: middle; }
.table tr:hover td{ background: rgba(11,27,51,.02); }
.table .thumb-xs{ width: 56px; height: 40px; border-radius: var(--radius-xs); object-fit: cover;
                  background: var(--canvas-200); display: block; }

.req-row{ display: grid; grid-template-columns: 54px 1fr 300px; gap: var(--space-4);
          align-items: start; padding: var(--space-4) 0; border-bottom: 1px solid var(--border-hairline); }
/* Строка «что охраняется»: название, переключатель, примечание. Ширина
   колонки стояла в разметке и не сворачивалась на телефоне. */
.req-row.prot-row{ grid-template-columns: 1fr 320px 1fr; }
@media (max-width: 900px){ .req-row.prot-row{ grid-template-columns: 1fr; } }
.req-row .code{ font-family: var(--font-mono); color: var(--text-muted); padding-top: 10px; }
.req-row .why{ font-size: var(--text-xs); color: var(--text-muted); margin-top: 4px; }
.req-row.key{ background: rgba(201,162,39,.05); margin: 0 calc(var(--space-3) * -1);
              padding: var(--space-4) var(--space-3); }
.seg{ display: flex; gap: 0; }
/* На телефоне три кнопки в ряд требуют 370px и распирают страницу */
@media (max-width: 900px){ .seg{ flex-wrap: wrap; } .seg label{ flex: 1 0 33%; } }
.seg label{ flex: 1; text-align: center; padding: 9px 6px; font-size: var(--text-xs);
            border: 1px solid var(--border-hairline); cursor: pointer; background: var(--surface-raised);
            color: var(--text-muted); user-select: none; }
.seg label:first-of-type{ border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.seg label:last-of-type{ border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.seg input{ display: none; }
.seg input:checked + span{ font-weight: 600; }
.seg label:has(input[value=allowed]:checked){ background: var(--status-positive-bg);
  color: var(--status-positive); border-color: rgba(46,107,82,.35); }
.seg label:has(input[value=with_approval]:checked){ background: var(--status-caution-bg);
  color: var(--status-caution); border-color: rgba(154,107,18,.35); }
.seg label:has(input[value=forbidden]:checked){ background: var(--status-restricted-bg);
  color: var(--status-restricted); border-color: rgba(140,47,38,.35); }
.seg label:has(input[value=protected]:checked){ background: var(--status-neutral-bg);
  color: var(--status-neutral); border-color: rgba(63,88,118,.35); }
.seg label:has(input[value=not_protected]:checked){ background: var(--canvas-200); color: var(--text-body); }

.sticky-side{ position: sticky; top: 90px; }

/* ── Страница с боковой колонкой ──────────────────────────────────────
   Содержимое и панель рядом. На узком экране колонки складываются одна
   под другую. Раньше ширина колонки стояла прямо в разметке, и на
   телефоне страница не помещалась: браузер расширял её и показывал сайт
   вдвое мельче — та самая «половина экрана».                          */
.split{ display: grid; grid-template-columns: minmax(0,1fr) 360px;
        gap: var(--space-8); align-items: start; }
@media (max-width: 1000px){
  .split{ grid-template-columns: minmax(0,1fr); gap: var(--space-7); }
  .sticky-side{ position: static; }
}

@media (max-width: 900px){
  .grid-3, .grid-2, .form-grid, .form-grid.three{ grid-template-columns: 1fr; }
  .req-row{ grid-template-columns: 1fr; }
  .site-nav{ display: none; }
  .admin-body{ display: block; }
  .admin-side{ width: auto; height: auto; position: static; flex-direction: row;
               flex-wrap: wrap; align-items: center; gap: var(--space-3);
               padding: var(--space-3) var(--page-margin); }
  .admin-brand{ padding: 0; }
  .admin-nav{ flex-direction: row; flex-wrap: wrap; }
  .admin-nav a{ padding: 6px 10px; border-left: 0; border-radius: var(--radius-xs); }
  .admin-nav .group{ display: none; }
  .admin-side-foot{ margin: 0 0 0 auto; flex-direction: row; gap: var(--space-4);
                    border: 0; padding: 0; }
  .admin-side-foot .who{ display: none; }
  .admin-main{ padding: var(--space-5) var(--page-margin) var(--space-8); }
  .slots.three, .slots.six{ grid-template-columns: 1fr 1fr; }

  /* Админка на телефоне. Таблицы прокручиваются внутри себя, строки с
     кнопками переносятся: иначе они растягивали страницу и телефон
     показывал редактор уменьшенным. */
  .admin-main .table{ display: block; overflow-x: auto; }
  .admin-main .row{ flex-wrap: wrap; }
  /* Иначе широкий блок внутри строки не даёт себя сжать */
  .admin-main .row > *{ min-width: 0; }
  .admin-main .card-pad{ padding: var(--space-5); }
}
@media (max-width: 620px){
  .slots.three, .slots.six{ grid-template-columns: 1fr; }
  .admin-news-thumb{ width: 88px; height: 50px; }
  .admin-main .btn{ padding: 0 var(--space-4); }
  /* Длинный заголовок («Администраторы») в одно слово не переносится и
     требовал 341px — на узком экране он мельче */
  .admin-main h1{ font-size: clamp(21px, 6.4vw, 32px); }
}

/* ── Переключатель направлений марки ────────────────────────────────────
   Одна плашка на всех страницах: ARCOO и три направления рядом. Стоит
   по центру верхнего края — между печатью слева и меню справа. Своя
   матовая подложка, поэтому читается и на светлом холсте, и на тёмном
   зале антиквариата, и поверх видео на первом экране Наследия.        */
.dir-switch{
  position: fixed; top: clamp(14px, 2.4vw, 34px); left: 50%;
  transform: translateX(-50%); z-index: 61;
  border-radius: var(--radius-md);
  display: flex; align-items: stretch; gap: clamp(2px, .6vw, 10px);
  padding: 7px 8px;
  background: var(--switch-bg, rgba(247,242,233,.74));
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  box-shadow: 0 8px 30px rgba(6,15,31,.10);
  max-width: calc(100vw - 24px);
}
.dir-switch .brand{
  display: flex; align-items: center; padding: 0 clamp(8px,1vw,14px) 0 clamp(6px,.8vw,10px);
  margin-right: clamp(2px,.5vw,8px); border-right: 1px solid var(--switch-line, rgba(11,27,51,.18));
  font-family: var(--font-display); font-size: clamp(11px,1vw,14px);
  letter-spacing: .3em; text-transform: uppercase; color: var(--gold-600);
  text-decoration: none; border-bottom: 0; white-space: nowrap;
}
.dir-switch a.item{
  display: flex; align-items: center; justify-content: center;
  padding: 6px clamp(8px,1.1vw,16px); text-decoration: none; border-bottom: 0;
  color: var(--switch-ink, var(--navy-800)); transition: background .3s ease, color .3s ease;
}
.dir-switch a.item b{
  font-family: var(--font-text); font-size: clamp(10.5px,.78vw,11px); font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase; line-height: 1.2; white-space: nowrap;
}
/* Пояснение выведено из потока и подписывается под всей плашкой: иначе
   длинные подписи распирают её по ширине даже когда они скрыты */
.dir-switch a.item span{
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px;
  width: fit-content; margin-inline: auto; padding: 4px 10px;
  text-align: center; pointer-events: none; white-space: nowrap;
  background: var(--switch-bg, rgba(247,242,233,.74));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 10px; line-height: 1.2; color: var(--switch-muted, var(--text-muted));
  opacity: 0; transform: translateY(-4px);
  transition: opacity .3s ease, transform .3s ease;
}
.dir-switch a.item:hover span{ opacity: 1; transform: none }
.dir-switch a.item:hover{ background: var(--switch-hover, rgba(11,27,51,.06)) }
.dir-switch a.item.on{ color: var(--switch-on, var(--navy-900)) }
.dir-switch a.item.on b{ border-bottom: 2px solid var(--gold-500); padding-bottom: 3px }

/* Пункт-обёртка: у «Наследия» под ним раскрывается меню разделов */
.dir-switch .dir-item{ position: relative; display: flex; align-items: stretch }
/* У пункта с подменю пояснение не показываем — его заменяет само меню */
.dir-item.has-sub > a.item span{ display: none }
.dir-sub{
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 210px; padding: 8px; display: flex; flex-direction: column; gap: 2px;
  background: var(--switch-bg, rgba(247,242,233,.96));
  backdrop-filter: blur(16px) saturate(1.35); -webkit-backdrop-filter: blur(16px) saturate(1.35);
  box-shadow: 0 14px 40px rgba(6,15,31,.18);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s ease; z-index: 6;
}
.dir-item.has-sub:hover .dir-sub,
.dir-item.has-sub:focus-within .dir-sub,
.dir-item.has-sub.open .dir-sub{ opacity: 1; visibility: visible; pointer-events: auto }
.dir-sub a{
  padding: 9px 14px; text-decoration: none; border-bottom: 0; white-space: nowrap;
  font-family: var(--font-text); font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--switch-ink, var(--navy-800));
  transition: background .2s ease, color .2s ease;
}
.dir-sub a:hover{ background: var(--switch-hover, rgba(11,27,51,.06)); color: var(--switch-on, var(--navy-900)) }
/* На телефоне переключатель стоит внизу экрана — меню раскрываем вверх,
   растягиваем по ширине и поднимаем над баннером cookie */
@media (max-width: 767px){
  .dir-sub{ position: fixed; left: 12px; right: 12px; bottom: 74px;
    top: auto; transform: none; min-width: 0; z-index: 140 }
  .dir-sub a{ text-align: center }
}

body.dir-art{
  --switch-bg: rgba(251,250,248,.80); --switch-line: rgba(20,20,18,.16);
  --switch-ink: #4B4945; --switch-on: #141412; --switch-muted: #8B8880;
  --switch-hover: rgba(20,20,18,.05);
}
body.dir-art .dir-switch .brand{ color: #141412 }
body.dir-art .dir-switch a.item.on b{ border-bottom-color: #C4452D }

body.dir-antique{
  --switch-bg: rgba(22,19,15,.78); --switch-line: rgba(241,234,221,.20);
  --switch-ink: #BEB4A3; --switch-on: #F1EADD; --switch-muted: #8B8272;
  --switch-hover: rgba(241,234,221,.07);
}
body.dir-antique .dir-switch .brand{ color: #C0904E }
body.dir-antique .dir-switch a.item.on b{ border-bottom-color: #C0904E }

/* Три направления в футере — второй, спокойный вход в ту же развилку */
.footer-dirs{
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6);
  padding-top: var(--space-6); margin-top: var(--space-6);
  border-top: 1px solid var(--border-inverse);
}
.footer-dirs a{
  display: flex; flex-direction: column; gap: 4px; text-align: center;
  color: var(--text-on-inverse-muted); text-decoration: none;
}
.footer-dirs a b{
  font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg);
  letter-spacing: .04em; color: var(--canvas-100); transition: color .3s ease;
}
.footer-dirs a:hover b{ color: var(--gold-300) }
.footer-dirs a span{ font-size: var(--text-xs) }
.footer-dirs a.on b{ color: var(--gold-400) }

@media (max-width: 900px){
  .dir-switch{ top: auto; bottom: 10px; padding: 5px 6px;
    transition: transform .4s cubic-bezier(.16,1,.3,1), opacity .3s ease }
  /* Уезжает вниз, пока читают дальше: иначе закрывает последнюю строку */
  .dir-switch.down{ transform: translate(-50%, 160%); opacity: 0 }
  .dir-switch .brand{ display: none }
  .dir-switch a.item{ padding: 5px 10px }
  .dir-switch a.item:hover span{ opacity: 0 }
  .footer-dirs{ gap: var(--space-5) }
}

/* ── Переключатель на страницах с шапкой ──────────────────────────────
   Плавающая плашка нужна там, где своей шапки нет: главная и страницы
   направлений. На остальных страницах она висела ровно поверх логотипа
   и меню — одно меню на другом. Здесь она становится обычной лентой
   над шапкой и ничего не закрывает.                                   */
body:not(.no-header) .dir-switch{
  position: relative; left: 0; top: 0; transform: none; max-width: none;
  justify-content: center; gap: clamp(2px,.6vw,10px);
  padding: 5px var(--page-margin);
  background: var(--surface-card); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--border-hairline);
}
/* Всплывающее пояснение в ленте не нужно: оно ложится на шапку под ней */
body:not(.no-header) .dir-switch a.item span{ display: none }
@media (max-width: 900px){
  /* Бренд в ленте оставляем: на узком экране это единственная подпись марки */
  body:not(.no-header) .dir-switch .brand{ display: flex }
  /* Лента прокручивается вбок внутри себя. Без max-width она распирала
     страницу, и телефон показывал сайт уменьшенным. */
  body:not(.no-header) .dir-switch{ padding: 5px 10px; justify-content: flex-start;
    max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  body:not(.no-header) .dir-switch::-webkit-scrollbar{ display: none }
}
/* На узком экране слово ARCOO в ленте съедает место, и «Антиквариат»
   уезжает за край — оставляем только три направления */
@media (max-width: 520px){
  body:not(.no-header) .dir-switch .brand{ display: none }
  body:not(.no-header) .dir-switch{ justify-content: space-between; padding: 5px 8px }
  body:not(.no-header) .dir-switch a.item{ padding: 6px 6px }
}

/* ── Знак марки ───────────────────────────────────────────────────────
   Арка из двух дуг и надпись тем же шрифтом, что заголовок внутри арки
   на первом экране. Один знак на все страницы и на футер — отличается
   только направление в подписи.                                       */
.mark-lock{ display: inline-flex; flex-direction: column; align-items: center;
            gap: 6px; text-decoration: none; border: 0; color: inherit;
            transition: opacity .4s ease, transform .4s ease; }
.mark-lock .mark-arch{ width: clamp(38px, 3.4vw, 54px); display: block;
                       color: var(--gold-600); }
.mark-lock .mark-arch svg{ width: 100%; height: auto; display: block; }
.mark-lock .mark-name{ font-family: var(--font-display); font-weight: 400;
                       font-size: clamp(15px, 1.35vw, 21px); line-height: 1;
                       letter-spacing: .06em; text-transform: uppercase;
                       white-space: nowrap; }
.mark-lock .mark-sub{ font-family: var(--font-text); font-size: 9.5px;
                      font-weight: 600; letter-spacing: .3em;
                      text-transform: uppercase; opacity: .7; }
.mark-lock:hover{ opacity: .78; }

/* В углу страницы знак стоит поверх содержимого */
.mark-lock.corner{ position: fixed; top: 34px; left: 34px; z-index: 60;
                   color: var(--navy-800); }
.mark-lock.corner.on-dark{ color: var(--canvas-100); }
/* На страницах направлений цвет берётся из их палитры: у Антиквариата
   тёмный зал, у Искусства — светлая галерея */
body.dir .mark-lock.corner{ color: var(--d-ink); }
body.dir .mark-lock.corner .mark-arch{ color: var(--d-accent); }
.mark-lock.corner.on-dark .mark-arch{ color: var(--gold-400); }
/* Уезжает за левый край там же, где раньше укатывалась печать */
.mark-lock.corner.rolled{ opacity: 0; transform: translateX(-160%);
                          pointer-events: none; }

/* В футере знак крупнее и по центру */
.footer-middle .mark-lock{ gap: 10px; color: var(--canvas-100); }
.footer-middle .mark-lock .mark-arch{ width: clamp(56px, 6vw, 84px);
                                      color: var(--gold-400); }
.footer-middle .mark-lock .mark-name{ font-size: clamp(20px, 2.2vw, 32px); }
.footer-middle .mark-lock .mark-sub{ font-size: 11px; opacity: .8; }

@media (max-width: 767px){
  .mark-lock.corner{ top: 24px; left: 18px; }
  .mark-lock .mark-name{ font-size: 15px; }
  .mark-lock .mark-sub{ font-size: 10px; letter-spacing: .2em; }
}

/* ── Наследие: фон как у Искусства ────────────────────────────────────
   Взята галерейная белизна с Искусства (--d-page #F1F0EC): холоднее
   и нейтральнее прежней бумаги, объекты на ней читаются как в зале.  */
body.dir-heritage{
  --canvas-100: #F1F0EC;
  --canvas-200: #E7E5E0;
  --surface-card: #FBFAF8;
  --surface-raised: #FBFAF8;
  background: var(--canvas-100);
}

/* Юридические документы: одна колонка, спокойная типографика */
.legal-doc{ max-width:780px; margin:0 auto; padding:clamp(28px,6vw,72px) var(--space-5) clamp(60px,10vh,120px) }
.legal-back{ display:inline-block; margin-bottom:var(--space-5); color:var(--text-muted);
  font-size:var(--text-sm); text-decoration:none }
.legal-back:hover{ color:var(--text-strong) }
.legal-doc h1{ font-family:var(--font-display); font-weight:400; text-transform:uppercase;
  font-size:clamp(26px,4vw,40px); line-height:1.12; color:var(--text-strong); margin:0 0 8px }
.legal-upd{ color:var(--text-muted); font-size:var(--text-sm); margin:0 0 var(--space-6) }
.legal-doc h2{ font-family:var(--font-display); font-weight:400; font-size:clamp(19px,2.4vw,25px);
  color:var(--text-strong); margin:var(--space-6) 0 var(--space-3) }
.legal-doc p, .legal-doc li{ font-size:var(--text-md); line-height:1.72; color:var(--ink-700, var(--text-strong)) }
.legal-doc p{ margin:0 0 var(--space-3) }
.legal-doc ul{ margin:0 0 var(--space-3) var(--space-4); display:grid; gap:6px }
.legal-doc .legal-req{ background:var(--canvas-200); border:1px solid var(--border-hairline);
  border-radius:var(--radius-md); padding:var(--space-4) var(--space-5); margin:0 0 var(--space-5) }
.legal-doc .legal-req p{ margin:0 0 4px }
.legal-nav{ display:flex; flex-wrap:wrap; gap:14px; margin-top:var(--space-7);
  padding-top:var(--space-5); border-top:1px solid var(--border-hairline) }
.legal-nav a{ font-size:var(--text-sm); color:var(--navy-800); text-decoration:none }
.legal-nav a.on{ color:var(--text-muted); pointer-events:none; text-decoration:underline }

/* ── Дайджест: календарь и колесо карточек ────────────────────────────
   Слева месяц с загорающимися датами и кнопка в раздел, справа карточки
   на «колесе»: передняя развёрнута к зрителю, соседние стоят за ней по
   бокам — меньше, в тени и чуть повёрнуты. Листание выводит следующую
   вперёд, а ушедшая отступает назад. Колесо идёт по кругу: слева от
   первой карточки стоят последние.                                    */
.feed{ display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--space-7);
       align-items: center; margin-top: var(--space-7); }
.feed-side{ display: flex; flex-direction: column; gap: var(--space-3); }
.feed-all{ width: 100%; box-sizing: border-box; }

.cal{ border: 1px solid var(--border-hairline); border-radius: var(--radius-md);
      padding: var(--space-4); background: var(--canvas-100); }
.cal-head{ display: flex; align-items: center; justify-content: space-between;
           gap: var(--space-3); }
.cal-head b{ font-family: var(--font-display); font-weight: 400;
             font-size: var(--text-lg); color: var(--text-strong); }
.cal-nav{ width: 32px; height: 32px; border: 1px solid var(--border-hairline);
          border-radius: var(--radius-sm); background: none; cursor: pointer;
          color: var(--text-strong); font-size: 16px; line-height: 1; }
.cal-nav:hover{ background: var(--canvas-200); }
.cal-week{ display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
           margin-top: var(--space-4); }
.cal-week i{ font-style: normal; text-align: center; font-size: var(--text-xs);
             color: var(--text-muted); text-transform: uppercase;
             letter-spacing: var(--tracking-caps); }
.cal-grid{ display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
           margin-top: var(--space-2); }
.cal-day{ aspect-ratio: 1; border: 0; background: none; border-radius: var(--radius-sm);
          font-family: var(--font-mono); font-size: 12px; color: var(--text-body);
          cursor: default; display: flex; align-items: center; justify-content: center; }
.cal-day.empty{ visibility: hidden; }
.cal-day.today{ outline: 1px solid var(--border-strong); }
.cal-day.has{ cursor: pointer; font-weight: 600; }
/* Синим — мероприятия, куда ещё можно попасть; бежевым — записи и прошедшее */
.cal-day.has.next{ background: var(--navy-800); color: var(--canvas-100); }
.cal-day.has.done{ background: #E4DCCB; color: var(--text-body); }
.cal-day.has:hover{ filter: brightness(1.12); }
/* Подпись к цветам — в одну строку, чтобы календарь не рос вниз */
.cal-legend{ display: flex; flex-wrap: wrap; gap: 6px 14px;
             margin-top: var(--space-4); font-size: var(--text-xs);
             color: var(--text-muted); }
.cal-legend span{ display: inline-flex; align-items: center; gap: 7px; }
.cal-legend .dot{ width: 10px; height: 10px; border-radius: 2px; display: block; flex: none; }
.cal-legend .dot.next{ background: var(--navy-800); }
.cal-legend .dot.done{ background: #E4DCCB; }

/* Фильтры выборки — под календарём, они про то, что лежит на колесе */
.deck-filters{ display: flex; flex-wrap: wrap; gap: 6px;
               margin-top: var(--space-4); padding-top: var(--space-4);
               border-top: 1px solid var(--border-hairline); }
.deck-filters button{ height: 30px; padding: 0 10px; cursor: pointer;
  border: 1px solid var(--border-hairline); border-radius: 999px;
  background: transparent; color: var(--text-muted);
  font-family: var(--font-text); font-size: 12px;
  transition: background .25s ease, color .25s ease, border-color .25s ease; }
.deck-filters button:hover{ color: var(--text-strong); }
.deck-filters button.on{ background: var(--navy-800); border-color: var(--navy-800);
                         color: var(--canvas-100); }

/* ── Колесо ──────────────────────────────────────────────────────────
   Положение карточки задают две переменные, их ставит скрипт:
   --off — на сколько шагов она от передней (со знаком),
   --away — то же по модулю. Из них считаются сдвиг, уменьшение,
   поворот, глубина и затемнение. Сами величины шага — переменные
   сцены: на узком экране они другие.                                  */
.deck{ position: relative; min-width: 0; }
.deck-scene{ position: relative; overflow: hidden; touch-action: pan-y;
             perspective: 1600px; perspective-origin: 50% 45%;
             padding: 10px 0 30px;
             --dx: 58%; --dshrink: .16; --dr: 22deg;
             /* высота снимка к ширине карточки и плашка текста — из них
                скрипт считает общую высоту карточек (--card-h) */
             --ph-ratio: .5625; --plate: 172px;
             /* Края сцены растворяются: соседи уходят в дымку, а не режутся */
             -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
             mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
/* Высоту сцене задаёт скрипт по передней карточке. До него сцена
   держит примерную высоту, чтобы страница не прыгала. */
.deck-scene:not(.fit){ min-height: 380px; }
.deck-card{ position: absolute; left: 50%; top: 10px; width: min(64%, 700px);
            --off: 0; --away: 0;
            transform: translateX(-50%) translateX(calc(var(--dx) * var(--off)))
                       rotateY(calc(var(--dr) * var(--off)))
                       scale(calc(1 - var(--dshrink) * var(--away)));
            z-index: calc(40 - var(--away));
            border: 0; text-decoration: none; color: inherit;
            user-select: none; -webkit-user-drag: none;
            transition: transform .85s cubic-bezier(.2, .75, .2, 1), opacity .5s ease,
                        visibility 0s linear 0s; }
.deck-card[hidden]{ display: none; }
/* Дальше третьей карточки не видно: она ждёт своей очереди за краем.
   visibility прячет её от читалок и проверки вёрстки, но только после того,
   как она растворилась */
.deck-card.far{ opacity: 0; pointer-events: none; visibility: hidden;
                transition: transform .85s cubic-bezier(.2, .75, .2, 1), opacity .5s ease,
                            visibility 0s linear .5s; }
/* Перескок через всё колесо — без анимации (ставит скрипт на один кадр) */
.deck-card.jump{ transition: none; }

.deck-card .page{ position: relative; display: flex; flex-direction: column;
  height: var(--card-h, auto);
  overflow: hidden; border-radius: 10px; background: var(--canvas-100);
  box-shadow: 0 22px 54px -22px rgba(6,15,31,.5), 0 2px 6px rgba(6,15,31,.08);
  transition: box-shadow .5s ease; }
/* Соседние карточки в тени — тем гуще, чем дальше стоят */
.deck-card .page::after{ content: ""; position: absolute; inset: 0; z-index: 5;
  background: var(--navy-900); opacity: calc(var(--away) * .26);
  pointer-events: none; transition: opacity .6s ease; }
.deck-card .ph{ position: relative; display: block; aspect-ratio: 16/9; overflow: hidden;
                background: var(--canvas-200); }
.deck-card .ph img{ width: 100%; height: 100%; object-fit: cover; display: block;
                    transition: transform .9s cubic-bezier(.22,1,.36,1); }
/* Размытая копия снимка нужна только телефону, где кадр вертикальный */
.deck-card .ph img.bg{ display: none; }
.deck-card.front:hover .ph img:not(.bg){ transform: scale(1.04); }
.deck-card .ph.empty{ background-image:
  repeating-linear-gradient(128deg, rgba(67,66,62,.10) 0 1px, transparent 1px 12px),
  linear-gradient(180deg, #F6EFE2, #EDE3D1); }

.deck-card .day{ position: absolute; left: 14px; top: 14px; z-index: 4;
                 display: flex; flex-direction: column; align-items: center;
                 min-width: 48px; padding: 7px 9px 6px; border-radius: var(--radius-sm);
                 background: rgba(247,242,233,.95); color: var(--navy-900); }
.deck-card .day b{ font-family: var(--font-display); font-weight: 500;
                   font-size: 22px; line-height: 1; }
.deck-card .day i{ font-style: normal; font-size: 9px; text-transform: uppercase;
                   letter-spacing: .12em; color: var(--text-muted); margin-top: 3px; }
.deck-card .label{ position: absolute; right: 14px; top: 14px; z-index: 4;
                   max-width: 64%; overflow: hidden; white-space: normal; text-align: center;
                   line-height: 1.25;
                   padding: 6px 11px; border-radius: 999px; font-size: 10px;
                   text-transform: uppercase; letter-spacing: var(--tracking-caps);
                   background: rgba(247,242,233,.95); color: var(--navy-900); }
.deck-card.event:not(.done) .label{ background: var(--navy-800); color: var(--canvas-100); }

/* Текст на бумаге под снимком, как на странице настольного календаря.
   У плашки постоянная высота, а «Подробнее» прижато к низу — так все
   страницы одной высоты и колесо не дёргается при листании. */
.deck-card .body{ display: flex; flex-direction: column; gap: 6px; flex: 1;
                  min-height: 172px; box-sizing: border-box;
                  padding: 14px 20px 16px; color: var(--text-body); }
.deck-card .body .when{ font-family: var(--font-text); font-size: 12px;
                        font-weight: 600; letter-spacing: .05em; line-height: 1.35;
                        color: var(--gold-700); min-height: 2.7em;
                        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
                        overflow: hidden; }
.deck-card .body b{ font-family: var(--font-display); font-weight: 400;
                    font-size: clamp(18px, 1.55vw, 23px); line-height: 1.15;
                    color: var(--text-strong);
                    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
                    overflow: hidden; }
.deck-card .body .lead-line{ font-size: 13px; line-height: 1.45; color: var(--text-muted);
                             display: -webkit-box; -webkit-line-clamp: 3;
                             -webkit-box-orient: vertical; overflow: hidden; }
.deck-card .body .more{ font-size: var(--text-xs); color: var(--navy-800); margin-top: auto;
                        padding-top: 4px; }
.deck-card.lit .page{ box-shadow: 0 0 0 2px var(--gold-500), 0 22px 54px -22px rgba(6,15,31,.5); }

/* Стрелки по краям сцены — поверх отступивших соседей */
.deck-arrow{ position: absolute; top: 50%; z-index: 60; width: 46px; height: 46px;
             margin-top: -32px; border: 1px solid var(--border-hairline); border-radius: 999px;
             background: rgba(247,242,233,.94); color: var(--navy-900);
             font-size: 24px; line-height: 1; cursor: pointer;
             box-shadow: 0 10px 26px -12px rgba(6,15,31,.45);
             transition: background .25s ease, color .25s ease, opacity .25s ease; }
.deck-arrow.prev{ left: 10px; }
.deck-arrow.next{ right: 10px; }
.deck-arrow:hover{ background: var(--navy-800); color: var(--canvas-100); }
.deck-arrow[disabled]{ opacity: .3; cursor: default; }
.deck-arrow[disabled]:hover{ background: rgba(247,242,233,.94); color: var(--navy-900); }
.deck-count{ text-align: center; font-family: var(--font-mono); font-size: 12px;
             color: var(--text-muted); }
.deck-empty{ padding: var(--space-7) var(--space-4); text-align: center;
             font-size: var(--text-sm); color: var(--text-muted);
             border: 1px dashed var(--border-hairline); border-radius: var(--radius-md); }
.deck-scene[hidden], .deck-arrow[hidden], .deck-empty[hidden]{ display: none; }

/* Вертикальная обложка (афиша) на компьютере стоит слева во всю высоту
   карточки, текст — справа. Высота у всех карточек одна: её считает
   скрипт (--card-h) по горизонтальному кадру и плашке. */
@media (min-width: 901px){
  .deck-card.vert .page{ flex-direction: row; }
  .deck-card.vert .ph{ aspect-ratio: 2 / 3; height: 100%; width: auto; flex: none; }
  .deck-card.vert .body{ min-height: 0; padding: 18px 20px 16px; }
  /* Рядом с афишей места много: заголовок и подводка идут целиком,
     иначе половина карточки остаётся пустой */
  .deck-card.vert .body b{ -webkit-line-clamp: 3; }
  .deck-card.vert .body .lead-line{ -webkit-line-clamp: 9; }
}
@media (prefers-reduced-motion: reduce){
  .deck-card{ transition: opacity .3s ease; }
  .deck-card .page::after{ transition: none; }
}
/* На среднем экране сцена уже: карточка берёт больше её ширины,
   иначе рядом с календарём она выглядела мелкой */
@media (max-width: 1200px){
  .deck-card{ width: 72%; }
  .deck-scene{ --dx: 64%; }
}

/* Страница мероприятия */
.event-facts{ display: flex; flex-wrap: wrap; gap: var(--space-6);
              margin-top: var(--space-6); padding-top: var(--space-5);
              border-top: 1px solid var(--border-hairline); }
.event-facts div{ display: flex; flex-direction: column; gap: 4px; }
.event-facts span{ font-size: var(--text-xs); text-transform: uppercase;
                   letter-spacing: var(--tracking-caps); }
.event-facts b{ font-family: var(--font-display); font-weight: 400;
                font-size: var(--text-lg); color: var(--text-strong); }
.event-cover{ width: 100%; margin-top: var(--space-6); border-radius: var(--radius-md);
              display: block; }

/* ── Лента времени и состав зала на странице мероприятия ─────────────
   Оба блока пишутся прямо в теле мероприятия строками «слева | справа»
   после метки [расписание] или [аудитория]; разбирает post_blocks. */
.ev-sched{ margin: var(--space-7) 0; }
.ev-sched h2, .ev-bars h2{ font-family: var(--font-display); font-weight: 400;
                           font-size: var(--text-xl); color: var(--text-strong);
                           margin: 0 0 var(--space-5); }
.ev-sched ol{ list-style: none; margin: 0; padding: 0;
              border-left: 1px solid var(--border-hairline); }
.ev-sched li{ position: relative; display: grid; gap: 2px var(--space-5);
              grid-template-columns: 132px minmax(0, 1fr);
              padding: 0 0 var(--space-6) var(--space-6); }
.ev-sched li:last-child{ padding-bottom: 0; }
/* Точка на линии времени: кружок с бумажной обводкой, чтобы линия не просвечивала */
.ev-sched li::before{ content: ""; position: absolute; left: -5px; top: 7px;
                      width: 9px; height: 9px; border-radius: 50%;
                      background: var(--gold-500); box-shadow: 0 0 0 4px var(--canvas-000); }
.ev-sched .t{ font-family: var(--font-text); font-size: var(--text-sm); font-weight: 600;
              letter-spacing: .04em; color: var(--gold-700); white-space: nowrap; }
.ev-sched .d{ color: var(--text-body); }

.ev-bars{ margin: var(--space-7) 0; }
.ev-bar{ display: grid; align-items: center; gap: var(--space-4);
         grid-template-columns: minmax(0, 260px) minmax(0, 1fr) auto;
         padding: var(--space-3) 0; border-top: 1px solid var(--border-hairline); }
.ev-bar:last-child{ border-bottom: 1px solid var(--border-hairline); }
.ev-bar .l{ color: var(--text-body); }
.ev-bar .track{ display: block; height: 10px; border-radius: 999px;
                background: var(--canvas-200); overflow: hidden; }
.ev-bar .track i{ display: block; height: 100%; width: var(--w); border-radius: inherit;
                  background: linear-gradient(90deg, var(--navy-700), var(--gold-500));
                  animation: evbar 1s cubic-bezier(.2,.75,.2,1) both; }
.ev-bar .n{ font-family: var(--font-display); font-size: var(--text-lg);
            color: var(--text-strong); white-space: nowrap; }
@keyframes evbar{ from{ width: 0 } to{ width: var(--w) } }
@media (prefers-reduced-motion: reduce){
  .ev-bar .track i{ animation: none; }
}
@media (max-width: 700px){
  .ev-sched li{ grid-template-columns: 1fr; padding-left: var(--space-5); }
  .ev-bar{ grid-template-columns: minmax(0, 1fr) auto; gap: 6px var(--space-4); }
  .ev-bar .l{ grid-column: 1; }
  .ev-bar .n{ grid-column: 2; grid-row: 1; }
  .ev-bar .track{ grid-column: 1 / -1; }
}

@media (max-width: 900px){
  /* На узком экране сначала карточки, потом календарь: содержание
     важнее навигации по датам. Колесо теснее: соседи выглядывают
     полоской по краям, стрелки мельче. */
  .feed{ grid-template-columns: 1fr; gap: var(--space-6); align-items: stretch; }
  .deck{ order: 1; }
  .feed-side{ order: 2; }
  .cal, .feed-all{ max-width: 420px; }
  /* Плашка выше, чем кадр требует: в неё помещаются две строки места
     и двухстрочный заголовок, иначе заголовок обрезало по половине буквы */
  .deck-scene{ --dx: 88%; --dshrink: .1; --dr: 14deg; padding: 10px 0 24px;
               --ph-ratio: 1.5; --plate: 152px; }
  .deck-card{ width: 74%; }
  /* На телефоне все карточки вертикальные: афиша занимает кадр 9:16 целиком,
     горизонтальный снимок стоит в нём на размытой копии себя */
  .deck-card .ph{ aspect-ratio: 2 / 3; }
  .deck-card:not(.vert) .ph img.bg{ display: block; position: absolute; inset: -20px;
    width: calc(100% + 40px); height: calc(100% + 40px);
    object-fit: cover; filter: blur(16px) brightness(.72); }
  .deck-card:not(.vert) .ph img:not(.bg){ position: relative; z-index: 1; object-fit: contain; }
  .deck-card .body{ min-height: 0; padding: 10px 14px 12px; gap: 4px; }
  .deck-card .body .lead-line{ display: none; }
  .deck-card .body b{ font-size: 17px; line-height: 1.2; }
  /* Длинный адрес на узкой карточке занимает три строки */
  .deck-card .body .when{ font-size: 11px; -webkit-line-clamp: 3; min-height: 0; }
  .deck-arrow{ width: 40px; height: 40px; margin-top: -28px; font-size: 20px; }
  .deck-arrow.prev{ left: 4px; }
  .deck-arrow.next{ right: 4px; }
}
@media (max-width: 620px){
  .cal, .feed-all{ max-width: none; }
  .deck-card{ width: 74%; }
  .deck-card .day{ left: 10px; top: 10px; min-width: 44px; }
  .deck-card .day b{ font-size: 20px; }
  .deck-card .label{ right: 10px; top: 10px; }
}

/* ── Галерея объекта: лента снимков ───────────────────────────────────
   Один большой кадр во всю ширину, следующий выглядывает справа. Лента
   идёт по кругу; положение кадра задаёт переменная --off (ставит скрипт
   gallery.js), сдвиг из неё считает CSS. На телефоне первый снимок стоит
   аркой над лентой, а лента начинается со второго.                     */
.gal{ position: relative; margin-bottom: var(--space-8); }
.gal-arch{ display: none; }
.gal-stage{ position: relative; overflow: hidden; aspect-ratio: 160 / 81; outline: none;
            border-radius: var(--radius-md); --gal-gap: 16px; touch-action: pan-y; }
.gal-stage:focus-visible{ box-shadow: 0 0 0 2px var(--gold-500); }
.gal-slide{ position: absolute; left: 0; top: 0; width: 90%; height: 100%; --off: 0;
            border-radius: var(--radius-md); overflow: hidden; background: var(--canvas-200);
            border: 1px solid var(--border-hairline); box-sizing: border-box;
            transform: translateX(calc((100% + var(--gal-gap)) * var(--off)));
            transition: transform .7s cubic-bezier(.2, .75, .2, 1), opacity .4s ease; }
.gal-slide img{ width: 100%; height: 100%; object-fit: cover; display: block; }
/* Сосед приглушён, чтобы взгляд держался на переднем кадре */
.gal-slide::after{ content: ""; position: absolute; inset: 0; background: rgba(6,15,31,.24);
                   transition: opacity .5s ease; pointer-events: none; }
.gal-slide.on::after{ opacity: 0; }
.gal-slide:not(.on){ cursor: pointer; }
.gal-slide.far{ opacity: 0; pointer-events: none; }
.gal-slide.jump{ transition: none; }
.gal-slide[hidden]{ display: none; }
.gal-cap{ position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
          padding: var(--space-5) var(--space-4) var(--space-3);
          font-size: var(--text-xs); color: var(--canvas-100); background: var(--scrim-bottom); }
/* Один снимок — без выглядывающего соседа, во всю ширину */
.gal.single .gal-stage{ aspect-ratio: 16 / 9; }
.gal.single .gal-slide{ width: 100%; }
.gal.empty .gal-stage{ display: none; }
.gal-arrow{ position: absolute; top: 50%; z-index: 5; width: 46px; height: 46px; margin-top: -23px;
            border: 1px solid var(--border-hairline); border-radius: 999px;
            background: rgba(247,242,233,.94); color: var(--navy-900); font-size: 24px; line-height: 1;
            cursor: pointer; box-shadow: 0 10px 26px -12px rgba(6,15,31,.45);
            transition: background .25s ease, color .25s ease; }
.gal-arrow.prev{ left: 14px; }
.gal-arrow.next{ right: 14px; }
.gal-arrow:hover{ background: var(--navy-800); color: var(--canvas-100); }
.gal-arrow[hidden]{ display: none; }
/* Счётчик в верхнем углу переднего кадра: внизу подпись, сбоку сосед */
.gal-count{ position: absolute; right: calc(10% + 14px); top: 14px; z-index: 5; padding: 5px 10px;
            border-radius: 999px; background: rgba(247,242,233,.92); color: var(--navy-900);
            font-family: var(--font-mono); font-size: 12px; }
.gal-count[hidden]{ display: none; }
.gal.single .gal-count{ right: 14px; }
/* Заключение эксперта: портрет рядом с именем */
.expert-who{ display: flex; align-items: center; gap: var(--space-3); }
.expert-ava{ width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none;
             border: 1px solid var(--border-hairline); }
@media (prefers-reduced-motion: reduce){
  .gal-slide{ transition: opacity .3s ease; }
}
@media (max-width: 900px){
  /* Первый снимок — аркой, как визитка объекта; лента идёт со второго */
  .gal-arch{ display: block; aspect-ratio: 1 / 1; max-height: 420px; overflow: hidden;
             margin-bottom: var(--space-4);
             border-radius: 220px 220px var(--radius-md) var(--radius-md);
             border: 1px solid var(--border-hairline); background: var(--canvas-200); }
  .gal-arch img{ width: 100%; height: 100%; object-fit: cover; display: block; }
  .gal-slide.first{ display: none; }
  .gal-arrow{ width: 40px; height: 40px; margin-top: -20px; font-size: 20px; }
  .gal-arrow.prev{ left: 8px; }
  .gal-arrow.next{ right: 8px; }
}

/* ── Галерея записи: большой кадр и миниатюры ─────────────────────────
   Кадры лежат в одной сцене и сменяются проявлением; высоту сцены под
   пропорции текущего снимка ставит post-gallery.js. Что не вписалось —
   на размытой копии снимка. Стрелки те же, что у ленты объекта.       */
.pg{ margin: clamp(28px,4vh,48px) 0; overflow-x: clip; }
/* Ширина задана явно: с одной aspect-ratio и высотой от скрипта блок брал
   бы ширину от высоты и вылезал за экран */
.pg-main{ position: relative; overflow: hidden; border-radius: var(--radius-md); outline: none;
          width: 100%; background: var(--navy-900); aspect-ratio: 16 / 9; touch-action: pan-y;
          transition: height .45s cubic-bezier(.2, .75, .2, 1); }
.pg-main:focus-visible{ box-shadow: 0 0 0 2px var(--gold-500); }
.pg-shot{ position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.pg-shot.on{ opacity: 1; pointer-events: auto; }
.pg-shot img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
/* Подложка больше кадра на величину размытия, но без transform: в Safari
   трансформированный снимок раздвигал документ, хоть и был обрезан */
.pg-shot img.bg{ object-fit: cover; filter: blur(22px) brightness(.6);
                 inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); }
.pg-cap{ position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
         padding: var(--space-5) var(--space-4) var(--space-3);
         font-size: var(--text-xs); color: var(--canvas-100); background: var(--scrim-bottom); }
.pg.single .gal-arrow, .pg.single .pg-thumbs{ display: none; }
.pg-thumbs{ display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px;
            scrollbar-width: thin; }
.pg-thumb{ flex: none; width: 76px; height: 76px; padding: 0; cursor: pointer;
           border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden;
           background: var(--canvas-200); opacity: .72;
           transition: opacity .25s ease, border-color .25s ease; }
.pg-thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-thumb:hover{ opacity: 1; }
.pg-thumb.on{ opacity: 1; border-color: var(--gold-500); }
@media (max-width: 620px){
  .pg-thumb{ width: 60px; height: 60px; }
  /* Вертикальный первый снимок: сцена сразу кадром 9:16, без скачка высоты */
  .pg.vfirst .pg-main{ aspect-ratio: 2 / 3; }
}

/* Админка: вертикальная обложка и снимки к записи */
.admin-news-thumb.big.vert{ aspect-ratio: 2 / 3; width: min(280px, 100%); }
.admin-photos{ display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
               gap: var(--space-4); margin-top: var(--space-5); }
.admin-photo{ border: 1px solid var(--border-hairline); border-radius: var(--radius-sm);
              overflow: hidden; background: var(--canvas-100); }
.admin-photo img{ width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
                  background: var(--canvas-200); }
.admin-photo.vert img{ object-fit: contain; }
