/* Главная webnub.ru, круг 3 — вариант 3 «Коротко» (утверждён 07.11.2026, шаг 7б).
   Образец — proby/sajt_pod_klyuch/webnub-glavnaya/07b_pokaz/V3.html; правила — 07_dizajn.md
   (дизайн-система блога, одобренная 03.11.2026 на холсте курса).
   Стили темы Reboot на главной сняты (glavnaya/funkcii.php), поэтому основа задаётся здесь.
   Один файл, без JavaScript. Классы с приставкой g3-, чтобы не пересекаться с темой и плагинами.
   Точки перестройки: 900 px — колонки первого экрана и сетки; 1100 px — меню и поиск строкой в шапке
   (уже 1100 px они в одну строку не помещаются, там остаются кнопки «Поиск» и «Меню»). */

/* Шрифт Source Sans 3 (400 и 600) — свои файлы, без Google Fonts. Лицензия — fonts/OFL-SourceSans3.txt */
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-cyrillic-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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: "Source Sans 3";
  src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  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;
}

/* Основа */
.g3 *, .g3 *::before, .g3 *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.g3 {
  margin: 0;
  background: #ffffff;
  color: #1d1f23;
  font-family: "Source Sans 3", "PT Sans", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
.g3 img { max-width: 100%; height: auto; }
.g3 a { color: #154cb3; }
.g3 a:hover { color: #0e3580; }
/* Посещённые — только ссылки в тексте (NN/g); кнопку и названия тем не перекрашиваем */
.g3-str a:visited, .g3 a.g3-dalee:visited, .g3 a.g3-vse:visited { color: #5a3d9a; }
.g3-str a:hover, .g3 a.g3-dalee:hover, .g3 a.g3-vse:hover { color: #0e3580; }
.g3 h1, .g3 h2 { color: #1d1f23; font-family: inherit; }
.g3 h1 { font-size: 28px; line-height: 1.2; font-weight: 600; margin: 0 0 14px; }
.g3 h2 { font-size: 23px; line-height: 1.25; font-weight: 600; margin: 0 0 10px; }
.g3 p { margin: 0 0 12px; }
.g3 :focus-visible { outline: 3px solid #154cb3; outline-offset: 2px; border-radius: 4px; }
.g3-shapka :focus-visible, .g3-pod :focus-visible { outline-color: #ffffff; }
.g3-vyp__panel :focus-visible { outline-color: #154cb3; } /* панель меню и поиска белая, хоть и внутри тёмной шапки */
.g3-skryto {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Пропуск к содержанию — виден только с клавиатуры */
.g3-propusk {
  position: absolute; left: 1rem; top: -10rem; z-index: 20;
  padding: 12px 16px; background: #154cb3; color: #ffffff !important; font-weight: 600;
}
.g3-propusk:focus { top: 1rem; }

.g3-w { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.g3-vt { color: #5b6270; font-size: 16px; }
.g3-rz { margin-top: 56px; }

/* Шапка */
.g3-shapka { position: relative; z-index: 10; background: #313132; color: #ffffff; }
.g3-shapka__vnutri { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g3-shapka a.g3-logo, .g3-shapka a.g3-logo:hover { color: #ffffff; text-decoration: none; font-weight: 600; font-size: 16px; line-height: 1.25; }
.g3-logo span { display: none; font-weight: 400; font-size: 14px; color: #c9ccd2; }
.g3-menu, .g3-poisk { display: none; }
.g3-knopki { display: flex; gap: 4px; }
.g3-vyp summary {
  list-style: none; cursor: pointer;
  min-height: 44px; padding: 0 10px; display: flex; align-items: center; gap: 6px;
  color: #ffffff; font-size: 16px; border-radius: 8px;
}
.g3-vyp summary::-webkit-details-marker { display: none; }
.g3-vyp[open] summary { background: rgb(255 255 255 / 14%); }
.g3-vyp__panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #ffffff; color: #1d1f23;
  border-bottom: 1px solid #e8ebf0; box-shadow: 0 8px 16px rgb(0 0 0 / 12%);
  padding: 8px 16px 16px;
}
.g3-menu-tel { list-style: none; margin: 0; padding: 0; }
.g3-menu-tel li { border-top: 1px solid #e8ebf0; }
.g3-menu-tel li:first-child,
.g3-menu-tel .menu-item-home + li { border-top: 0; } /* «Главная» скрыта — у следующего пункта линии сверху нет */
.g3-menu-tel a, .g3-menu-tel .removed-link { display: flex; align-items: center; min-height: 48px; font-size: 18px; }
.g3-menu-tel a { text-decoration: none; }
.g3-shapka .menu-item-home { display: none; }
.g3-poisk-tel label { display: block; font-size: 16px; color: #5b6270; margin: 4px 0 6px; }
.g3-poisk-tel__stroka { display: flex; gap: 8px; }
.g3-poisk-tel input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 12px;
  border: 1px solid #d5dae3; border-radius: 8px; font: inherit; font-size: 18px; color: #1d1f23; background: #ffffff;
}
.g3-poisk-tel button, .g3-poisk button { cursor: pointer; font: inherit; }
.g3-poisk-tel button {
  min-height: 48px; padding: 0 18px; border: 0; border-radius: 8px;
  background: #154cb3; color: #ffffff; font-size: 18px; font-weight: 600;
}

/* Первый экран */
.g3-pervyj { padding-top: 24px; display: grid; gap: 20px; }
.g3-imya { font-weight: 600; margin: 0 0 6px !important; }
.g3 a.g3-knopka {
  display: flex; justify-content: center; align-items: center; text-align: center;
  min-height: 52px; padding: 0 28px; background: #154cb3; color: #ffffff;
  text-decoration: none; border-radius: 10px; font-size: 19px; font-weight: 600; line-height: 1.25;
}
.g3 a.g3-knopka:hover { color: #ffffff; background: #0e3580; }
.g3-rod { margin: 12px 0 0 !important; }
.g3-dalee { display: block; width: max-content; margin-top: 6px; min-height: 44px; line-height: 44px; }
.g3-foto { display: block; }
.g3-foto img {
  display: block; width: 100%; height: auto; aspect-ratio: 5 / 4;
  object-fit: cover; object-position: 50% 30%; border-radius: 12px;
}

/* Темы блога */
.g3-temy { list-style: none; margin: 16px 0 0; padding: 0; }
.g3-temy li { border-top: 1px solid #e8ebf0; padding: 14px 0; }
.g3-temy li:last-child { border-bottom: 1px solid #e8ebf0; }
.g3 a.g3-tn { font-size: 20px; font-weight: 600; text-decoration: none; line-height: 1.3; }
.g3 a.g3-tn:hover { text-decoration: underline; }
.g3-tk { font-size: 16px; color: #5b6270; margin-left: 8px; white-space: nowrap; }
.g3-ts { margin: 4px 0 0 !important; font-size: 17px; }

/* Свежие статьи */
.g3-sv { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 18px; }
.g3-sv a { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; text-decoration: none; color: #1d1f23; }
.g3-sv a:visited { color: #1d1f23; }
.g3-sv a:hover .g3-sz { color: #154cb3; text-decoration: underline; }
.g3-ob { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; background: #f0f2f5; border-radius: 8px; }
.g3-sz { display: block; font-size: 18px; font-weight: 600; line-height: 1.35; }
.g3-sd { display: block; margin-top: 4px; font-size: 16px; color: #5b6270; }
.g3-vse { display: inline-block; margin-top: 16px; min-height: 44px; line-height: 44px; font-size: 18px; }

/* Помощь и подписка */
.g3-str { border-top: 1px solid #e8ebf0; padding-top: 24px; }

/* Подвал */
.g3-pod { background: #313132; color: #ffffff; margin-top: 56px; padding: 28px 0 36px; font-size: 16px; }
.g3-pod a, .g3-pod a:visited, .g3-pod .removed-link { color: #ffffff; }
.g3-pod a:hover { color: #c9ccd2; }
.g3-pod ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.g3-pod li a, .g3-pod .removed-link { display: inline-flex; align-items: center; min-height: 44px; }
.g3-pod .removed-link { font-weight: 400; } /* Clearfy заменяет ссылку текущей страницы на span — вес как у остальных пунктов */
.g3-pod p { color: #c9ccd2; }

@media (min-width: 900px) {
  body.g3 { font-size: 19px; }
  .g3 h1 { font-size: 34px; }
  .g3 h2 { font-size: 26px; }
  .g3-rz { margin-top: 72px; }
  .g3-pervyj { grid-template-columns: 3fr 2fr; gap: 48px; align-items: stretch; padding-top: 48px; }
  .g3 a.g3-knopka { display: inline-flex; }
  .g3-foto img { height: 100%; aspect-ratio: auto; min-height: 360px; }
  .g3-temy { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .g3-temy li:last-child { border-bottom: 0; }
  .g3-sv { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
  .g3-sv a { grid-template-columns: 1fr; gap: 10px; }
  .g3-pod { margin-top: 72px; }
}

@media (min-width: 1100px) {
  .g3-shapka__vnutri { min-height: 64px; }
  .g3-shapka a.g3-logo { font-size: 17px; }
  .g3-logo span { display: block; }
  .g3-knopki { display: none; }
  .g3-menu { display: block; }
  .g3-menu__spisok { display: flex; gap: 4px 20px; list-style: none; margin: 0; padding: 0; font-size: 17px; }
  .g3-menu__spisok a, .g3-menu__spisok a:visited { color: #ffffff; text-decoration: none; }
  .g3-menu__spisok a:hover { color: #ffffff; text-decoration: underline; }
  .g3-poisk { display: flex; gap: 6px; }
  .g3-poisk input {
    width: 200px; min-height: 40px; border: 0; border-radius: 8px; padding: 0 12px;
    font: inherit; font-size: 16px; color: #1d1f23; background: #ffffff;
  }
  .g3-poisk button {
    min-height: 40px; padding: 0 14px; border: 1px solid #8a8d94; border-radius: 8px;
    background: transparent; color: #ffffff; font-size: 16px;
  }
  .g3-poisk button:hover { border-color: #ffffff; }
}

@media (prefers-reduced-motion: reduce) {
  .g3 *, .g3 *::before, .g3 *::after { transition: none !important; animation: none !important; }
}
