/*
 * Стили страницы «Happ для Windows». Подключаются только шаблоном
 * template-happ-windows.php после assets/editorial.css и опираются на его
 * токены (--paper, --ink, --accent и т. д.). Все правила начинаются с .hw,
 * поэтому остальные шаблоны они не затрагивают.
 */
.hw { --hw-card: var(--white, #fffefb); color: var(--ink, #1d3235); }
.hw-fallback-title { padding: 48px 0 0; }
.hw h1, .hw h2, .hw h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; color: var(--ink, #1d3235); }
.hw h2 { margin: 0 0 18px; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -.045em; }
.hw h3 { margin: 0 0 8px; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.2; }
.hw p, .hw ul, .hw ol { margin: 0 0 16px; }
.hw .section { padding: clamp(40px, 6vw, 72px) 0; }
.hw .section + .section { border-top: 1px solid var(--line, #c8cec7); }
.hw-prose { max-width: 70ch; font-size: 17px; line-height: 1.7; }
.hw-prose > :last-child { margin-bottom: 0; }
.hw a { overflow-wrap: anywhere; }
.hw code { padding: 1px 5px; background: var(--paper-deep, #eee9dd); font: 14px/1.4 Consolas, "Courier New", monospace; overflow-wrap: anywhere; }
.hw .button { text-decoration: none; }

/* Первый экран */
.hw .page-hero h1 { font-size: clamp(36px, 5.2vw, 64px); letter-spacing: -.05em; }
.hw-hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.hw-hero .lead { max-width: 640px; margin: 20px 0 26px; color: #354b4d; font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }
.hw-checked { margin: 18px 0 0; color: var(--muted, #596764); font-size: 13px; }
.hw-short { padding: 22px 0 0; border-top: 3px solid var(--accent, #a95037); }
.hw-short h2 { margin: 0 0 10px; font-size: 22px; letter-spacing: -.02em; }
.hw-short ul { padding-left: 20px; margin: 0; font-size: 15px; }
.hw-short li { margin: 0 0 8px; padding-left: 2px; }

/* Загрузки */
.hw-downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 26px 0; padding: 0; list-style: none; }
.hw-card { display: flex; flex-direction: column; margin: 0; padding: 22px; border: 1px solid var(--ink, #1d3235); border-top: 4px solid var(--accent, #a95037); background: var(--hw-card); }
.hw-card h3 { margin-bottom: 6px; }
.hw-card p { color: var(--muted, #596764); font-size: 15px; }
.hw-card .hw-file { margin: 0 0 16px; color: var(--ink, #1d3235); font-size: 14px; }
.hw-card .button { margin-top: auto; }
.hw-note { margin: 22px 0; padding: 16px 18px; border-left: 4px solid var(--accent, #a95037); background: var(--paper-deep, #eee9dd); font-size: 15px; line-height: 1.6; }
.hw-note p:last-child { margin-bottom: 0; }
.hw-note strong { color: var(--ink, #1d3235); }

/* Схема пути (не скриншот) */
.hw-flow { margin: 26px 0 30px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: flow; border: 1px solid var(--ink, #1d3235); background: var(--hw-card); }
.hw-flow li { position: relative; margin: 0; padding: 16px 16px 16px 18px; font-size: 14px; line-height: 1.45; counter-increment: flow; }
.hw-flow li + li { border-left: 1px solid var(--line, #c8cec7); }
.hw-flow li::before { content: counter(flow); display: block; margin-bottom: 6px; color: var(--accent-dark, #833e2a); font: 500 22px/1 Georgia, "Times New Roman", serif; }
.hw-flow li:not(:last-child)::after { content: "→"; position: absolute; top: 14px; right: 14px; color: var(--accent-dark, #833e2a); font-size: 18px; }
.hw-flow strong { display: block; margin-bottom: 2px; font-size: 15px; }
.hw-caption { margin: -14px 0 28px; color: var(--muted, #596764); font-size: 13px; }

/* Шаги */
.hw-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--ink, #1d3235); }
.hw-steps > li { position: relative; margin: 0; padding: 24px 0 22px 62px; border-bottom: 1px solid var(--line, #c8cec7); counter-increment: step; }
.hw-steps > li::before { content: counter(step); position: absolute; top: 20px; left: 0; width: 42px; color: var(--accent-dark, #833e2a); font: 500 34px/1.1 Georgia, "Times New Roman", serif; }
.hw-steps p { max-width: 68ch; font-size: 16px; line-height: 1.65; }
.hw-steps p:last-child { margin-bottom: 0; }
.hw-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 14px 0 12px; }
.hw-option { padding: 16px 18px; border: 1px solid var(--line, #c8cec7); background: var(--hw-card); }
.hw-option p { font-size: 15px; }
.hw-option p:last-child { margin-bottom: 0; }
.hw-option .hw-label { display: block; margin-bottom: 6px; color: var(--accent-dark, #833e2a); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Предложение WorkVPN */
.hw .cta-box { margin: 0; align-items: center; }
.hw .cta-box h2 { color: var(--white, #fffefb); }
.hw .cta-box p { color: #dbe6e1; font-size: 15px; line-height: 1.6; }
.hw .cta-box a:not(.button) { color: #f1d3c6; }
.hw .cta-box .button { white-space: normal; }
.hw .cta-box :focus-visible { outline-color: var(--white, #fffefb); }
.hw-disclosure { margin-top: 12px !important; font-size: 13px !important; color: #c9d8d2 !important; }

/* Проблемы, FAQ, ссылки */
.hw-problems > div, .hw-faq > div { padding: 20px 0; border-bottom: 1px solid var(--line, #c8cec7); }
.hw-problems, .hw-faq { max-width: 74ch; border-top: 1px solid var(--ink, #1d3235); }
.hw-problems p, .hw-faq p { margin: 0; font-size: 16px; line-height: 1.65; }
.hw-problems h3, .hw-faq h3 { font-size: clamp(19px, 2vw, 23px); }
.hw-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 22px 0 0; padding: 0; list-style: none; }
.hw-links li { margin: 0; padding: 16px 0 0; border-top: 1px solid var(--ink, #1d3235); }
.hw-links a { font: 500 20px/1.25 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.hw-links span { display: block; margin-top: 6px; color: var(--muted, #596764); font-size: 14px; line-height: 1.5; }
.hw-sources { max-width: 74ch; padding-left: 22px; font-size: 15px; line-height: 1.6; }
.hw-sources li { margin: 0 0 8px; padding-left: 2px; }
.hw-also { margin-top: 22px; }
.hw .breadcrumbs { overflow-wrap: anywhere; }

@media (max-width: 950px) {
  .hw-hero-grid { grid-template-columns: 1fr; }
  .hw-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-flow li:nth-child(3) { border-left: 0; }
  .hw-flow li:nth-child(n+3) { border-top: 1px solid var(--line, #c8cec7); }
  .hw-flow li:nth-child(2)::after { content: none; }
  .hw-links { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hw-downloads, .hw-options { grid-template-columns: 1fr; }
  .hw-flow { grid-template-columns: 1fr; }
  .hw-flow li + li { border-left: 0; border-top: 1px solid var(--line, #c8cec7); }
  .hw-flow li:not(:last-child)::after, .hw-flow li:nth-child(2)::after { content: "↓"; top: 12px; right: 16px; }
  .hw-steps > li { padding-left: 46px; }
  .hw-steps > li::before { top: 22px; width: 32px; font-size: 28px; }
  .hw-prose { font-size: 16px; }
  .hw .actions .button { width: 100%; }
  .hw-card { padding: 18px; }
}

@media (max-width: 360px) {
  .hw h2 { font-size: 28px; }
  .hw .page-hero h1 { font-size: 33px; }
}
