/**
 * FaultForge public site â€“ editorial design system.
 * Flat design only; no gradients, shadows, or animations.
 * Border radius: 4px or 6px. Keep in sync with tauri-app design-tokens.
 */

@font-face {
  font-family: "D-DIN";
  src: url("/fonts/D-DIN.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-soft: #eff6ff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  /* Header/footer full-width bars â€“ distinct, editorial */
  --header-bg: #0f172a;
  --header-text: #f1f5f9;
  --header-muted: #94a3b8;
  --footer-bg: #1e293b;
  --footer-text: #e2e8f0;
  --footer-muted: #94a3b8;
  --footer-legal-bg: #0f172a;
  --font-mono: "Consolas", "Monaco", "Courier New", monospace;
  --font-brand: "D-DIN", sans-serif;
}

* { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Docs-style layout with left sidebar */
.docs-layout-outer {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  padding-top: var(--ff-header-height);
}

.docs-layout-outer.ff-shell-container {
  padding-top: var(--ff-header-height);
}

.layout-with-sidebar {
  display: flex;
  min-height: calc(100vh - 120px);
}

.docs-sidebar {
  flex-shrink: 0;
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  align-self: stretch;
}

/* Fill grid column so the border sits on the container edge (no gap) */
.layout-with-sidebar.ff-docs-layout .docs-sidebar {
  width: 100%;
  min-width: 0;
}

.docs-content {
  flex: 1;
  min-width: 0;
}

.docs-sidebar-header {
  display: none;
}

.docs-nav {
  padding: 24px 0;
}

@media (min-width: 701px) {
  .docs-nav {
    position: sticky;
    top: var(--ff-header-height, 68px);
    max-height: calc(100vh - var(--ff-header-height, 68px));
    overflow-y: auto;
  }
}

.docs-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav-section {
  margin: 0;
  padding: 0;
}

.docs-nav-section details {
  margin: 0;
}

.docs-nav-summary {
  padding: 7px 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-nav-summary::-webkit-details-marker {
  display: none;
}

.docs-nav-summary::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 8px;
  border-left: 4px solid var(--muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  vertical-align: middle;
}

.docs-nav-section details[open] .docs-nav-summary::before {
  transform: rotate(90deg);
}

.docs-nav-section ul {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 0;
}

.docs-nav-link {
  display: block;
  padding: 5px 20px 5px 28px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  line-height: 1.5;
}

.docs-nav-link--nested {
  padding-left: 36px;
}

.docs-nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.docs-nav-link--active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}

.docs-nav > .docs-nav-list > li:first-child .docs-nav-link {
  padding-left: 20px;
  margin-left: 0;
  border-left: none;
}

.docs-nav > .docs-nav-list > li:first-child .docs-nav-link--active {
  font-weight: 600;
  color: var(--accent);
}

.docs-nav-popular {
  padding: 4px 0 0;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.docs-nav-popular__title {
  display: block;
  padding: 6px 20px 4px 36px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.docs-nav-popular__list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 0;
}

.docs-nav-popular__item {
  padding-left: 44px;
}

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.layout-with-sidebar .wrap {
  width: min(900px, 100%);
  margin: 0;
  padding: 24px 32px 48px;
}

.wrap.ff-content-wrap--page {
  padding-top: var(--ff-header-height);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 102;
  width: 100%;
  background: var(--header-bg);
  color: var(--header-text);
  padding: 14px 0;
  margin-bottom: 0;
  transition: transform 0.25s ease;
}

.header.header--hidden {
  transform: translateY(-100%);
}

@media (prefers-reduced-motion: reduce) {
  .header {
    transition: none;
  }
}

.header__inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.brand-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.header .brand-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  line-height: 1;
  text-decoration: none;
  font-family: var(--font-brand);
}

.header .brand-logo-link span {
  font-family: var(--font-brand);
}

.brand-title-row .brand-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  display: block;
}

.brand h1,
.brand .brand-title {
  margin: 0;
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-family: var(--font-brand);
}

.header .brand h1 a,
.header .brand .brand-title a {
  color: var(--header-text);
  text-decoration: none;
}

.header .brand h1 a:hover,
.header .brand .brand-title a:hover {
  color: var(--surface);
}

.header .brand small {
  display: none;
}

.brand small {
  display: none;
}

.mobile-menu-trigger {
  display: none;
}

.header-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 200px;
  max-width: 280px;
  min-height: 36px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--header-text);
  cursor: pointer;
  text-align: left;
}

.header .header-search-trigger:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.header-search-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.header .header-search-icon {
  color: var(--header-muted);
}

.header-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.header-search-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-search-placeholder {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--header-muted);
  font-size: 0.9375rem;
}

.header-search-shortcut {
  flex-shrink: 0;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono, "Consolas", "Monaco", "Courier New", monospace);
  color: var(--header-muted);
}

.close-x {
  display: block;
  width: 20px;
  height: 20px;
  position: relative;
}

.close-x::before,
.close-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2px;
  margin: -1px 0 0 -10px;
  background: currentColor;
}

.close-x::before { transform: rotate(45deg); }
.close-x::after { transform: rotate(-45deg); }

.site-nav-overlay {
  display: none;
}

.site-nav {
  margin-left: auto;
}

.site-nav-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 4px;
  background: transparent;
}

.header .site-nav-link {
  color: var(--header-muted);
  position: relative;
}

.header .site-nav-link:hover {
  color: var(--header-text);
  background: transparent;
}

.header .site-nav-link--active,
.header .site-nav-link[aria-current="page"] {
  color: #ffffff;
  font-weight: 500;
}

.header .site-nav-link--active::after,
.header .site-nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
}

.site-nav-link:hover {
  color: var(--accent, var(--text));
  background: transparent;
  text-decoration: none;
}

.site-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.region-switcher {
  position: relative;
  flex-shrink: 0;
}

.header .region-switcher {
  flex: 0 0 auto;
  width: auto;
}

.header .region-switcher-trigger {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  box-sizing: border-box;
  overflow: hidden;
  justify-content: center;
}

.region-switcher-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  line-height: 1;
}

.region-switcher-trigger:hover {
  border-color: var(--line);
  background: var(--surface-alt);
}

.region-switcher-trigger[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--surface-alt);
}

.header .region-switcher-trigger {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--header-text);
}

.header .region-switcher-trigger:hover,
.header .region-switcher-trigger[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.header .region-switcher-label,
.header .region-switcher-caret {
  display: none;
}

.header .region-switcher-trigger {
  padding: 4px 6px;
}

.header .region-flag {
  width: 24px;
  height: 18px;
}

.header .region-switcher-trigger[aria-expanded="true"] .region-switcher-caret {
  border-top-color: var(--header-text);
}

.region-switcher-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.region-flag {
  display: block;
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
}

.region-switcher-label {
  max-width: 180px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.region-switcher-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  margin-left: 0;
}

.region-switcher-trigger[aria-expanded="true"] .region-switcher-caret {
  border-top-color: var(--text);
  transform: rotate(180deg);
}

.region-switcher-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 230px;
  width: max-content;
  max-width: min(320px, 90vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px;
  display: none;
  z-index: 110;
  box-shadow: none;
}

.region-switcher.open .region-switcher-dropdown {
  display: block;
}

.header .region-switcher-dropdown {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  max-width: min(320px, calc(100vw - 48px));
}

.region-switcher-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
}

.region-switcher-item-text {
  white-space: nowrap;
}

.region-switcher-item img {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.region-switcher-item:hover {
  background: var(--brand-soft);
}

.region-switcher-item.current {
  background: var(--brand-soft);
  color: var(--brand);
}

.region-switcher-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.hub-year-picker {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.hub-year-picker label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.hub-year-picker select {
  display: block;
  width: 100%;
  max-width: 200px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
}

.hub-year-picker select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.calendar-years-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.calendar-years-row a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.calendar-years-row a:hover {
  background: var(--surface-alt);
  border-color: var(--line);
  text-decoration: none;
}

.calendar-years-row a.calendar-year-current {
  background: var(--brand-soft);
  border-color: var(--brand);
  font-weight: 700;
  color: var(--brand);
}

.breadcrumbs {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text);
  text-decoration: none;
}

.breadcrumbs span:last-child {
  color: var(--text);
  font-weight: 500;
}

.crumb-sep {
  color: var(--line);
  font-size: 0.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 24px;
  margin-bottom: 12px;
  min-width: 0;
  overflow-x: clip;
  overflow-wrap: break-word;
  word-break: break-word;
}

.card p,
.card li,
.card td,
.card th {
  overflow-wrap: break-word;
  word-break: break-word;
}

.card table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 100%;
}

.card > h2:first-child,
.card > h3:first-child,
.card > h4:first-child {
  margin-top: 0;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--text);
}

.card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--text);
}

.card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--text);
}

/* 404 not-found page */
.not-found-page {
  padding: 24px 0;
  max-width: 640px;
  margin: 0 auto;
}

.not-found-page__card {
  margin-bottom: 24px;
}

.not-found-page__title {
  margin: 0 0 8px;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: 0.02em;
}

.not-found-page__lead {
  margin: 0 0 20px;
  font-size: 1.0625rem;
}

.not-found-page__actions {
  margin-bottom: 24px;
}

.not-found-page__cta {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 16px;
}

.not-found-page__nav {
  margin-top: 12px;
}

.not-found-page__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.not-found-page__links a {
  text-decoration: none;
  color: var(--accent);
}

.not-found-page__links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.not-found-page__related-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}

.not-found-page__related {
  margin: 0;
  padding-left: 1.25rem;
}

.not-found-page__related li {
  margin-bottom: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
}

.grid a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.grid a:hover {
  background: var(--surface-alt);
  border-color: var(--line);
  text-decoration: none;
}

.grid a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.grid a strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.35;
}

.grid a .muted {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.long-weekends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}

.long-weekend-item {
  margin: 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.long-weekend-dates {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.long-weekend-dates time {
  font-weight: 600;
}

.long-weekend-context {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.875rem;
}

.long-weekend-stats {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  font-size: 0.875rem;
}

.long-weekend-stats dt {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}

.long-weekend-stats dd {
  margin: 0;
  font-weight: 600;
}

.card-desc {
  margin: 0 0 12px;
  font-size: 0.875rem;
}

.month-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

.month-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
}

.month-card:hover {
  border-color: var(--line);
  background: var(--surface-alt);
  text-decoration: none;
}

.month-card-current {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.month-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.3;
}

.month-card-stats {
  font-size: 0.875rem;
  color: var(--muted);
}

.month-card-preview {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 6px 6px 0;
}

.muted { color: var(--muted); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 12px;
  line-height: 1.6;
}

pre code {
  font-size: inherit;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}

th {
  color: var(--text);
  background: var(--surface-alt);
  font-weight: 600;
}

.current-year-row td {
  background: var(--brand-soft);
  font-weight: 600;
}

.kpi {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
}

.countdown {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.countdown-cell {
  min-width: 80px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  background: var(--surface);
}

.countdown-cell strong {
  display: block;
  font-size: 1.25rem;
}

.countdown-timezone {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  margin: 0 0 16px 0;
}

.countdown-timezone legend {
  padding: 0 6px;
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.countdown-actions {
  margin-top: 16px;
  margin-bottom: 0;
}

.btn-fullscreen {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-alt);
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text);
}

.btn-fullscreen:hover {
  background: var(--surface);
  border-color: var(--line);
}

.btn-fullscreen:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.countdown-card:fullscreen,
.countdown-card:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: #1a1a1a;
  color: #e8e8e8;
}

.countdown-card:fullscreen .countdown-title,
.countdown-card:-webkit-full-screen .countdown-title {
  color: #fff;
  margin-bottom: 8px;
}

.countdown-card:fullscreen .countdown-intro,
.countdown-card:fullscreen .muted,
.countdown-card:-webkit-full-screen .countdown-intro,
.countdown-card:-webkit-full-screen .muted {
  color: #b0b0b0;
}

.countdown-card:fullscreen .countdown,
.countdown-card:-webkit-full-screen .countdown {
  gap: 16px;
  margin: 16px 0;
}

.countdown-card:fullscreen .countdown-cell,
.countdown-card:-webkit-full-screen .countdown-cell {
  min-width: 110px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.countdown-card:fullscreen .countdown-cell strong,
.countdown-card:-webkit-full-screen .countdown-cell strong {
  font-size: 2rem;
}

.countdown-card:fullscreen .countdown-timezone,
.countdown-card:-webkit-full-screen .countdown-timezone {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.countdown-card:fullscreen .btn-fullscreen,
.countdown-card:-webkit-full-screen .btn-fullscreen {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e8e8e8;
}

.countdown-card:fullscreen .btn-fullscreen:hover,
.countdown-card:-webkit-full-screen .btn-fullscreen:hover {
  background: rgba(255, 255, 255, 0.25);
}

.footer {
  width: 100%;
  margin-top: 32px;
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 32px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer__inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.875rem;
}

.footer-col-brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-brand-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  line-height: 1;
  font-family: var(--font-brand);
}

.footer-brand-logo-link strong {
  font-family: var(--font-brand);
}

.footer .footer-brand-logo-link {
  color: var(--footer-text);
}

.footer .footer-brand-logo-link:hover {
  color: var(--surface);
}

.footer-col-brand .footer-brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.footer-col strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--footer-text);
}

.footer .muted {
  color: var(--footer-muted);
}

.footer a {
  color: var(--brand-soft);
}

.footer a:hover {
  color: var(--surface);
}

.footer-legal {
  width: 100%;
  margin-top: 24px;
  background: var(--footer-legal-bg);
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-legal__inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
}

.footer-legal-copy {
  color: var(--footer-muted);
}

.footer-legal-links a {
  color: var(--footer-text);
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: var(--surface);
}

.footer-legal-sep {
  color: var(--footer-muted);
  margin: 0 4px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
}

.working-days-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
}

.working-days-toolbar button {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
}

.working-days-toolbar button:hover {
  border-color: var(--line);
  background: var(--surface-alt);
}

.working-days-toolbar button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.working-days-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.working-day-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.working-day-item.is-today {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.working-day-item.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.working-day-toggle {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 12px;
}

.working-day-toggle:hover {
  background: var(--surface-alt);
}

.working-day-dow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.working-day-date {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-top: 2px;
}

.working-day-iso {
  display: block;
  font-size: 0.75rem;
  margin-top: 4px;
  color: var(--muted);
}

.working-day-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 4px 8px;
}

.site-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 140;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: min(10vh, 84px) 16px 18px;
}

.site-search-overlay[aria-hidden="false"] {
  display: flex;
}

.site-search-modal {
  width: min(760px, 100%);
  max-height: min(74vh, 620px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.site-search-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.site-search-input-wrap {
  position: relative;
  flex: 1 1 auto;
}

.site-search-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.site-search-input-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-search-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px 0 36px;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
}

.site-search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.site-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.site-search-close:hover {
  border-color: var(--line);
  background: var(--surface-alt);
}

.site-search-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.site-search-hint {
  margin: 8px 12px 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px;
  padding: 0 4px 4px;
  overflow-y: auto;
  max-height: min(56vh, 460px);
}

.site-search-result {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
}

.site-search-result:hover,
.site-search-result.is-active {
  border-color: var(--line);
  background: var(--brand-soft);
}

.site-search-result:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.site-search-result-kind {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.site-search-result-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-search-result-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.site-search-result-url {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-search-empty {
  margin: 8px 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.875rem;
}

body.site-search-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  html, body {
    overflow-x: hidden;
  }

  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 102;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: 16px;
  }

  .docs-layout-outer,
  .docs-layout-outer.ff-shell-container {
    padding-top: 0;
  }

  .wrap {
    width: calc(100% - 24px);
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: calc(var(--ff-header-height) + 16px + env(safe-area-inset-top, 0px));
    overflow-x: clip;
  }

  .card {
    padding: 16px 12px;
  }

  .brand {
    align-items: center;
    gap: 8px;
  }

  .brand-title-row {
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-main {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-title-row h1,
  .brand-title-row .brand-title {
    margin: 0;
    margin-right: auto;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 1.25rem;
    line-height: 1.2;
  }

  .brand-title-row h1 a,
  .brand-title-row .brand-title a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-trigger {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    position: relative;
    z-index: 132;
  }

  .mobile-menu-trigger:hover {
    border-color: var(--line);
    background: var(--surface-alt);
  }

  .mobile-menu-trigger[aria-expanded="true"] {
    border-color: var(--line);
    background: var(--surface-alt);
  }

  .header .mobile-menu-trigger {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: var(--header-text);
  }

  .header .mobile-menu-trigger:hover,
  .header .mobile-menu-trigger[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
  }

  .header .mobile-menu-trigger[aria-expanded="true"] {
    color: var(--header-text);
  }

  .mobile-menu-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }

  .mobile-menu-trigger .hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 20px;
    height: 20px;
  }

  .mobile-menu-trigger .hamburger-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
  }

  .mobile-menu-trigger .close-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
  }

  .mobile-menu-trigger .close-icon .close-x {
    display: block;
    width: 20px;
    height: 20px;
    position: relative;
  }

  .mobile-menu-trigger .close-icon .close-x::before,
  .mobile-menu-trigger .close-icon .close-x::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 2px;
    margin: -1px 0 0 -10px;
    background: currentColor;
  }

  .mobile-menu-trigger .close-icon .close-x::before {
    transform: rotate(45deg);
  }

  .mobile-menu-trigger .close-icon .close-x::after {
    transform: rotate(-45deg);
  }

  .mobile-menu-trigger[aria-expanded="true"] .hamburger-icon {
    display: none;
  }

  .mobile-menu-trigger[aria-expanded="true"] .close-icon {
    display: flex;
  }

  .site-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 130;
    opacity: 0;
    pointer-events: none;
  }

  body.site-nav-open .site-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.site-nav-open {
    overflow: hidden;
  }

  html:has(body.site-nav-open) {
    overflow: hidden;
    touch-action: none;
  }

  .header-search-trigger {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    justify-content: center;
    gap: 0;
  }

  .header-search-placeholder,
  .header-search-shortcut {
    display: none;
  }

  .docs-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 85vw);
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    z-index: 131;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
  }

  .docs-sidebar-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 16px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }

  .docs-sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-brand);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
  }

  .docs-sidebar-brand .docs-sidebar-brand-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .docs-sidebar-brand:hover {
    color: var(--accent);
  }

  .docs-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
  }

  .docs-sidebar-close:hover {
    border-color: var(--line);
    background: var(--surface-alt);
  }

  .docs-sidebar-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }

  .docs-sidebar-close .close-x {
    display: block;
    width: 20px;
    height: 20px;
    position: relative;
  }

  .docs-sidebar-close .close-x::before,
  .docs-sidebar-close .close-x::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 2px;
    margin: -1px 0 0 -10px;
    background: currentColor;
  }

  .docs-sidebar-close .close-x::before {
    transform: rotate(45deg);
  }

  .docs-sidebar-close .close-x::after {
    transform: rotate(-45deg);
  }

  body.site-nav-open .docs-sidebar {
    transform: translateX(0);
  }

  .docs-sidebar .docs-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
  }

  .site-nav {
    display: none;
  }

  .layout-with-sidebar .docs-content {
    margin-left: 0;
  }

  .layout-with-sidebar .wrap {
    width: calc(100% - 24px);
    padding: calc(var(--ff-header-height) + 16px + env(safe-area-inset-top, 0px)) 12px 48px;
  }

  .region-switcher {
    width: auto;
    flex: 0 1 46%;
    min-width: 0;
    max-width: 52%;
  }

  .region-switcher-trigger {
    width: 100%;
    justify-content: space-between;
    min-width: 0;
    padding-right: 8px;
    padding-left: 6px;
  }

  .region-switcher-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .region-switcher-dropdown {
    position: absolute;
    left: 50%;
    right: auto;
    top: 100%;
    transform: translateX(-50%);
    width: max-content;
    min-width: 200px;
    max-width: min(300px, calc(100vw - 48px));
    margin-top: 8px;
    z-index: 110;
  }

  .header .region-switcher-dropdown {
    max-width: min(300px, calc(100vw - 48px));
  }

  .region-control {
    width: 100%;
  }

  .region-control select {
    width: 100%;
  }

  .working-days-grid {
    grid-template-columns: 1fr;
  }

  .site-search-overlay {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .site-search-modal {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
  }

  .site-search-head {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }

  .site-search-hint {
    margin: 8px 12px 6px;
  }

  .site-search-results {
    flex: 1 1 auto;
    max-height: none;
    margin: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

/* Fault resolution steps – professional troubleshooting layout */
.fault-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: fault-step;
}

.fault-step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: fault-step;
}

.fault-step:last-child {
  border-bottom: 0;
}

.fault-step__number {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--brand-soft);
  border-radius: 4px;
  border: 1px solid var(--line);
}

.fault-step__content {
  flex: 1;
  min-width: 0;
}

.fault-step__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
}

.fault-step__body {
  margin: 0 0 12px;
  color: var(--text);
  line-height: 1.55;
}

.fault-step__figure {
  margin: 12px 0 0;
}

.fault-step__image-trigger {
  display: block;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  cursor: pointer;
  overflow: hidden;
}

.fault-step__image-trigger:hover {
  border-color: var(--accent);
}

.fault-step__image {
  display: block;
  max-width: 320px;
  max-height: 200px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.fault-step__caption {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Fault step lightbox */
.fault-step-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fault-step-lightbox[hidden] {
  display: none;
}

.fault-step-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.fault-step-lightbox__panel {
  position: relative;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--line);
  padding: 24px;
}

.fault-step-lightbox__close,
.fault-step-lightbox__fullscreen {
  position: absolute;
  top: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: var(--surface-alt);
  border-radius: 4px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.fault-step-lightbox__close {
  right: 12px;
}

.fault-step-lightbox__fullscreen {
  right: 54px;
  font-size: 1rem;
}

.fault-step-lightbox__close:hover,
.fault-step-lightbox__fullscreen:hover {
  background: var(--line);
}

.fault-step-lightbox__body {
  padding-top: 8px;
}

.fault-step-lightbox__title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
}

.fault-step-lightbox__text {
  margin: 0 0 16px;
  line-height: 1.55;
  color: var(--text);
}

.fault-step-lightbox__image-wrap {
  margin-top: 16px;
}

.fault-step-lightbox__image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.fault-step-lightbox--fullscreen {
  padding: 0;
}

.fault-step-lightbox--fullscreen .fault-step-lightbox__panel {
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

/* Prose — rich text content from hub content_html */
.prose {
  line-height: 1.65;
  color: var(--text);
}

.prose p {
  margin: 0 0 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.prose li:last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 34px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.prose h3 {
  margin: 22px 0 10px;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.prose h4 {
  margin: 16px 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.prose > :first-child:is(h2, h3, h4) {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose strong {
  font-weight: 600;
}

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--accent-hover);
}

.prose blockquote {
  margin: 0 0 14px;
  padding: 8px 14px;
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-style: normal;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.prose .ff-toc {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand-soft), var(--surface));
}

.prose .ff-toc__title {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.prose .ff-toc__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.prose .ff-toc__item {
  margin: 0;
}

.prose .ff-toc__item:last-child {
  margin-bottom: 0;
}

.prose .ff-toc__item--h3 {
  margin-left: 12px;
}

.prose .ff-toc__link {
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
}

.prose .ff-toc__link:hover {
  background: var(--surface-alt);
  color: var(--brand);
}

.prose .ff-toc__item--active > .ff-toc__link,
.prose .ff-toc__link--active,
.prose .ff-toc__link[aria-current="true"] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  border-left: 3px solid var(--brand);
}

.prose .ff-toc-anchor {
  scroll-margin-top: 88px;
}

/* Related entries cards */
.related-entries-intro {
  margin: 0 0 16px;
  font-size: 0.9375rem;
}

.related-entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.related-entry-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.related-entry-link__thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  overflow: hidden;
  min-height: 120px;
}

.related-entry-link__thumb {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.related-entry-link__thumb-wrap--placeholder svg {
  width: 44px;
  height: 44px;
  color: var(--muted);
}

.related-entry-link:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  text-decoration: none;
}

.related-entry-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.related-entry-link__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.related-entry-link__summary {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fault-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fault-hero__title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.fault-hero__summary {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.fault-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fault-hero__badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-alt);
  padding: 4px 10px;
  font-size: 0.74rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--muted);
  font-weight: 600;
}

.fault-hero__badge--severity-low {
  border-color: #10b981;
  color: #0f766e;
}

.fault-hero__badge--severity-medium {
  border-color: #f59e0b;
  color: #b45309;
}

.fault-hero__badge--severity-high {
  border-color: #ef4444;
  color: #b91c1c;
}

.fault-parent-link {
  padding: 10px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.fault-parent-link__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.fault-parent-link__text a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.fault-parent-link__text a:hover {
  text-decoration: underline;
}

.fault-docs-shell {
  overflow: visible;
}

.fault-docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 870px) minmax(220px, 260px);
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}

.fault-docs-main-col {
  min-width: 0;
}

.fault-docs-main {
  min-width: 0;
}

.fault-docs-toc {
  position: sticky;
  top: calc(var(--ff-header-height) + 24px);
}

.fault-docs-toc .ff-toc {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.fault-docs-toc-inline {
  display: none;
}

.fault-docs-toc .ff-toc__title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.fault-docs-toc .ff-toc__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.fault-docs-toc .ff-toc__item {
  margin: 0;
}

.fault-docs-toc .ff-toc__item--h3 {
  margin-left: 10px;
}

.fault-docs-toc .ff-toc__link {
  display: block;
  border-radius: 4px;
  padding: 4px 7px;
  text-decoration: none;
  color: var(--text);
}

.fault-docs-toc .ff-toc__item--active > .ff-toc__link,
.fault-docs-toc .ff-toc__link--active,
.fault-docs-toc .ff-toc__link[aria-current="true"] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  border-left: 3px solid var(--brand);
}

.prose .ff-related-list {
  margin: 0 0 16px;
}

.prose .ff-related-list ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.prose .ff-related-item {
  margin: 0 0 6px;
}

.prose .ff-related-item a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose .ff-link--coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.prose .ff-link__badge {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--muted);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.6875rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.prose .ff-callout {
  border: 1px solid var(--line);
  border-left: 4px solid #cbd5e1;
  border-radius: 6px;
  background: #f6f7f9;
  padding: 12px 14px;
  margin: 0 0 14px;
}

.prose .ff-callout--info { border-left-color: #3b82f6; }
.prose .ff-callout--warning { border-left-color: #f59e0b; }
.prose .ff-callout--error { border-left-color: #ef4444; }
.prose .ff-callout--success { border-left-color: #10b981; }
.prose .ff-callout--tip { border-left-color: #22c55e; }
.prose .ff-callout--note { border-left-color: #6b7280; }
.prose .ff-callout--important { border-left-color: #2563eb; }

.prose .ff-callout__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin: 0 0 6px;
}

.prose .ff-callout__icon {
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  line-height: 1;
  font-weight: 700;
}

.prose .ff-callout__body > :last-child {
  margin-bottom: 0;
}

.prose .ff-codeblock {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  margin: 0 0 14px;
  overflow: hidden;
}

.prose .ff-codeblock__header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.prose .ff-codeblock__lang {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose .ff-codeblock pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 12px 14px;
  white-space: pre;
  word-break: normal;
}

.prose .ff-codeblock pre code {
  font-size: 0.85rem;
  line-height: 1.6;
}

.prose .ff-codeblock__copy {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 2px 8px;
  cursor: pointer;
}

.prose .ff-codeblock__copy:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.prose .ff-syn-comment { color: #6b7280; }
.prose .ff-syn-string { color: #047857; }
.prose .ff-syn-keyword { color: #1d4ed8; font-weight: 600; }
.prose .ff-syn-number { color: #7c3aed; }

.prose .ff-fixgroup,
.prose .ff-faqgroup,
.prose .ff-when {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 12px 14px;
  margin: 0 0 14px;
}

.prose .ff-fixgroup__title,
.prose .ff-faqgroup__title {
  margin: 0 0 10px;
}

.prose .ff-fix {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  padding: 10px 12px;
  margin: 0 0 12px;
}

.prose .ff-fix:last-child {
  margin-bottom: 0;
}

.prose .ff-fix__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}

.prose .ff-fix__title {
  margin: 0;
}

.prose .ff-fix__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.prose .ff-fix__meta-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface);
}

.prose .ff-fix__meta-pill--risk-low {
  border-color: #10b981;
  color: #0f766e;
}

.prose .ff-fix__meta-pill--risk-medium {
  border-color: #f59e0b;
  color: #b45309;
}

.prose .ff-fix__meta-pill--risk-high {
  border-color: #ef4444;
  color: #b91c1c;
}

.prose .ff-fix__steps {
  margin: 0 0 10px;
  padding-left: 20px;
}

.prose .ff-fix__steps--body {
  padding-left: 0;
}

.prose .ff-fix__verify,
.prose .ff-fix__rollback {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.prose .ff-fix__verify h5,
.prose .ff-fix__rollback h5 {
  margin: 0 0 6px;
}

.prose .ff-faqgroup__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prose .ff-faqgroup__item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  overflow: hidden;
}

.prose .ff-faqgroup__question {
  display: block;
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 600;
  list-style: none;
}

.prose .ff-faqgroup__question::-webkit-details-marker {
  display: none;
}

.prose .ff-faqgroup__question::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 700;
}

.prose .ff-faqgroup__item[open] .ff-faqgroup__question::after {
  content: "-";
}

.prose .ff-faqgroup__answer {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
}

.prose .ff-faqgroup__answer > :first-child {
  margin-top: 0;
}

.prose .ff-faqgroup__answer > :last-child {
  margin-bottom: 0;
}

.prose .ff-image-wrap {
  display: block;
  margin: 12px 0;
}

.prose .ff-image-embed {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.prose .ff-image-caption {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .fault-docs-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .fault-docs-toc {
    display: none;
  }

  .fault-docs-toc-inline {
    display: block;
    margin: 16px 0 20px;
  }

  .fault-docs-toc-inline .ff-toc {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-alt);
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .fault-docs-toc-inline .ff-toc__title {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .fault-docs-toc-inline .ff-toc__list {
    margin: 0;
    padding-left: 0;
    list-style: none;
  }

  .fault-docs-toc-inline .ff-toc__item {
    margin: 0;
  }

  .fault-docs-toc-inline .ff-toc__item--h3 {
    margin-left: 8px;
  }

  .fault-docs-toc-inline .ff-toc__link {
    display: block;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--text);
  }

  .fault-docs-toc-inline .ff-toc__item--active > .ff-toc__link,
  .fault-docs-toc-inline .ff-toc__link--active,
  .fault-docs-toc-inline .ff-toc__link[aria-current="true"] {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
    border-left: 3px solid var(--brand);
  }
}

/* ─── Cookie Consent Bar ─────────────────────────────────────────────────── */

.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--footer-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.cookie-bar.is-visible {
  transform: translateY(0);
}

.cookie-bar[hidden] {
  display: none;
}

.cookie-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.cookie-bar__msg {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--footer-muted);
}

.cookie-bar__msg a {
  color: var(--footer-text);
  text-underline-offset: 2px;
  text-decoration: underline;
}

.cookie-bar__msg a:hover {
  color: #ffffff;
}

.cookie-bar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-bar__accept {
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: #ffffff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-bar__accept:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.cookie-bar__decline {
  padding: 8px 4px;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 400;
  color: var(--footer-muted);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-bar__decline:hover {
  color: var(--footer-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 600px) {
  .cookie-bar__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
  }

  .cookie-bar__actions {
    width: 100%;
    justify-content: flex-start;
  }
}
