/* Общая оболочка подстраниц hssestandards.ru: шапка, подвал, кнопки, фокус. Цвета и шрифты — из brand.css. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
img, svg { max-width: 100%; }
body { font-family: var(--font-sans); background: var(--black); color: var(--text); line-height: 1.5; }
a { color: var(--accent2); }

.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 200; background: #fff; color: var(--text); border: 1px solid var(--accent2); padding: 10px 14px; text-decoration: none; }
.skip-link:focus { left: 12px; }

.top { background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.top-inner { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.top-logo img { display: block; height: 40px; width: auto; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 8px 0; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--accent2); }
.top nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent2); }
.top nav .top-login { color: var(--text); font-weight: 600; border: 1px solid var(--border); padding: 8px 14px; border-radius: var(--radius-soft); }

.section-tag { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent2); display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-tag::before { content: ''; width: 30px; height: 1px; background: currentColor; }

.page-hero { padding: 72px 60px 48px; background: var(--dark); border-bottom: 1px solid var(--border); }
.page-hero h1, .page-cta h2 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: 0.5px; }
.page-hero p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 680px; margin-top: 16px; }
.page-hero-pg { display: block; width: 56px; height: 56px; margin-bottom: 20px; color: var(--ink); --pictogram-accent: var(--accent-trust); }
.page-section { padding: 64px 60px; }
.page-section + .page-section { border-top: 1px solid var(--border); }
.page-section h2 { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; margin-bottom: 20px; }
.page-inner { max-width: 1200px; margin: 0 auto; }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2px; background: var(--border); border: 1px solid var(--border); }
.fact { background: var(--panel); padding: 24px 22px; }
.fact h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.fact p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.fact-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.fact-lead { font-size: 15px; color: var(--muted); line-height: 1.7; }
.fact-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.fact-list li { font-size: 14px; color: var(--text); padding-left: 22px; position: relative; line-height: 1.55; }
.fact-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent2); font-weight: 700; }

.btn-primary, .btn-secondary { font-family: var(--font-sans); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; padding: 18px 36px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s, color .2s; }
.btn-primary { background: var(--accent); color: #fff; border: none; clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%); }
.btn-primary:hover { background: #9a3412; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent2); color: var(--accent2); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent2); outline-offset: 2px; box-shadow: 0 0 0 2px #fff;
}
/* clip-path clips outline and box-shadow, so the slanted CTA turns rectangular on keyboard focus. */
.btn-primary:focus-visible { clip-path: none; }

.page-cta { padding: 72px 60px; }
.page-cta p { color: var(--muted); font-size: 16px; margin: 16px 0 28px; max-width: 560px; }
.page-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Case and industry pages (templates/case.html, templates/industry.html). */
.case-profile { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; font-size: 14px; color: var(--muted); }
.case-profile dt { display: inline; color: var(--text); font-weight: 600; }
.case-profile dt::after { content: ': '; }
.case-profile dd { display: inline; }
.case-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2px; background: var(--border); border: 1px solid var(--border); }
.case-metrics div { background: var(--panel); padding: 24px 22px; }
.case-metrics dt { font-size: 13px; color: var(--muted); }
.case-metrics dd { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; color: var(--text); margin-top: 6px; }
.case-metrics dd small { display: block; font-family: var(--font-sans); font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 4px; }
.quote { border-left: 3px solid var(--accent2); padding: 4px 0 4px 24px; max-width: 760px; }
.quote p { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; color: var(--text); }
.quote footer { margin-top: 12px; font-size: 14px; color: var(--muted); }
.risk-list { list-style: none; counter-reset: risk; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 32px; }
.risk-list li { counter-increment: risk; padding-left: 40px; position: relative; font-size: 14px; color: var(--muted); line-height: 1.6; }
.risk-list li::before { content: counter(risk, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: var(--font-display); color: var(--accent2); font-weight: 700; }
.risk-list b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

.foot { border-top: 1px solid var(--border); padding: 28px 60px; font-size: 13px; color: var(--muted); }
.foot-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent2); }

.cookie-note { position: fixed; left: 16px; bottom: 16px; z-index: 300; max-width: 440px; display: flex; align-items: center; gap: 16px; background: var(--text); color: #fff; padding: 12px 12px 12px 16px; }
.cookie-note p { flex: 1; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.82); }
.cookie-note a { color: #fff; text-underline-offset: 2px; }
.cookie-note button { flex-shrink: 0; min-height: 40px; padding: 8px 18px; border: 0; border-radius: var(--radius-soft); background: #fff; color: var(--text); font: 600 13px var(--font-sans); cursor: pointer; }

@media (max-width: 768px) {
  .top { position: static; }
  .top-inner { padding: 10px 16px 0; gap: 4px; }
  .top-logo img { height: 32px; }
  .top nav { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px 2px; gap: 18px; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { font-size: 14px; white-space: nowrap; padding: 10px 0; }
  .top nav .top-login { padding: 6px 12px; margin: 4px 0; }
  .page-hero { padding: 48px 20px 36px; }
  .page-section, .page-cta, .foot { padding-left: 20px; padding-right: 20px; }
  .page-section { padding-top: 48px; padding-bottom: 48px; }
  .page-cta-actions a, .page-cta-actions button { width: 100%; }
  .fact-split { grid-template-columns: 1fr; gap: 20px; }
  .cookie-note { left: 0; right: 0; bottom: 0; max-width: none; }
}
