/* ==========================================================================
   LMT Ratings Institutional Design System (IDS)
   Specification: Light Corporate Standard (Moodys / S&P Global / Fitch)
   Baseline: 8px Grid Unit | High-Contrast Typography | Zero Invisible Inlines
   ========================================================================== */

:root {
  /* Surfaces - Clean Institutional White & Cool Slate */
  --bg-canvas: #FFFFFF;
  --bg-surface: #F8FAFC;
  --bg-surface-raised: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-header: #001B3A;
  --bg-footer: #001428;

  /* Structural Borders */
  --border-subtle: #E2E8F0;
  --border-muted: #CBD5E1;
  --border-focus: #003366;

  /* Typography Colors - High Contrast Ratios (WCAG AAA) */
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #55657A;
  --text-dim: #5F6E85;

  /* Institutional Semantic Accents */
  --accent-blue: #003366;
  --accent-blue-soft: #EFF6FF;
  --accent-emerald: #047857;
  --accent-emerald-soft: #ECFDF5;
  --accent-amber: #B45309;
  --accent-amber-soft: #FFFBEB;
  --accent-red: #DC2626;
  --accent-red-soft: #FEF2F2;
  --accent-cyan: #0369A1;
  --accent-cyan-soft: #F0F9FF;

  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Fluid Layout Constants (% and vw based) */
  --container-width: 92%;
  --container-max-width: 1600px;
  --header-height: 64px;
  --grid-gap: clamp(16px, 2.2vw, 32px);

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.12s ease;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" on, "zero" on;
}

.container {
  width: var(--container-width);
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 2.5vw, 40px);
  padding-right: clamp(16px, 2.5vw, 40px);
}

.content-focus {
  width: 100%;
  max-width: min(100%, 86%);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1024px) {
  .content-focus {
    max-width: 100%;
  }
}
/* ==========================================================================
   Header (Moodys Navy)
   ========================================================================== */

.site-header {
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0, 27, 58, 0.15);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.8vw, 24px);
}

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

.logo-block img,
.logo-block svg {
  display: block;
  height: 36px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.25vw, 22px);
  flex-shrink: 0;
}

.main-nav a {
  font-size: clamp(0.82rem, 0.9vw, 0.90rem);
  font-weight: 600;
  color: #F1F5F9;
  white-space: nowrap;
  letter-spacing: 0.01em;
  padding: 6px 0;
  position: relative;
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #FFFFFF;
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  height: 3px;
  background: #38BDF8;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.90rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
}

.btn-primary {
  background: var(--accent-blue);
  color: #FFFFFF;
  border-color: #002244;
}
.btn-primary:hover {
  background: #002244;
  border-color: #001B3A;
  box-shadow: var(--shadow-sm);
}

.btn-emerald {
  background: var(--accent-emerald);
  color: #FFFFFF;
  border-color: #047857;
}
.btn-emerald:hover {
  background: #047857;
  border-color: #065F46;
}

.btn-outline {
  background: #FFFFFF;
  color: var(--text-primary);
  border-color: var(--border-muted);
}
.btn-outline:hover {
  background: var(--bg-surface);
  border-color: var(--text-secondary);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.02rem;
}

/* ==========================================================================
   Severity & Status Indicators (Institutional Typographic Standard)
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.80rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 2px;
  line-height: 1.2;
}

.badge-amber {
  background: transparent;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-emerald {
  background: transparent;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.badge-cyan {
  background: transparent;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-red {
  background: transparent;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.badge-muted {
  background: transparent;
  color: #64748b;
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Live Ticker Bar (Institutional Clean Data Feed)
   ========================================================================== */

.ticker-bar {
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-content {
  display: inline-flex;
  gap: 48px;
  animation: tickerScroll 45s linear infinite;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.ticker-item strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Sections & Layout Grids
   ========================================================================== */

.section {
  padding: clamp(48px, 5.5vw, 76px) 0;
}

.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.section-header .badge {
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: clamp(0.92rem, 1.05vw, 1.04rem);
  line-height: 1.6;
  max-width: min(100%, 72ch);
  margin: 0 auto;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}

/* ==========================================================================
   Hero & Page Header (Moodys Asymmetric & Authority Layout)
   ========================================================================== */

.hero {
  padding: clamp(40px, 5vw, 68px) 0;
  background: var(--bg-canvas);
}

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

@media (max-width: 1024px) {
  .hero-split {
    grid-template-columns: 1fr;
  }
}

.hero-badge,

.hero-title {
  font-size: clamp(1.75rem, 3.6vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
  margin-bottom: 18px;
  color: var(--text-primary);
  text-align: left;
  overflow-wrap: break-word;
}

.hero-desc {
  font-size: clamp(1rem, 1.18vw, 1.12rem);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
  text-align: left;
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding: 12px 16px;
  }
  .rating-action-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
  }
  .rating-action-scores {
    align-items: flex-start;
    text-align: left;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ==========================================================================
   Cards (High-Contrast White with Clean 1px Borders)
   ========================================================================== */

.card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: clamp(20px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--border-muted);
  box-shadow: var(--shadow-md);
}

/* Clean card */
/* Clean card */
/* Clean card */
/* Clean card */

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.card-scale-id {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
}

.scale-amber { color: var(--accent-amber); }
.scale-emerald { color: var(--accent-emerald); }
.scale-cyan { color: var(--accent-cyan); }
.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.card-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-feature-list {
  list-style: none;
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.card-feature-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.card-feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-weight: bold;
}

.card-specs {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-specs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-specs-label {
  color: var(--text-secondary);
  white-space: nowrap;
  margin-right: 12px;
}

.card-specs-row > .mono {
  text-align: right;
}

.card-action {
  margin-top: auto;
  width: 100%;
}

.card-action .btn {
  white-space: normal;
  padding: 10px 14px;
  font-size: 0.88rem;
  line-height: 1.35;
  text-align: center;
  box-sizing: border-box;
}

/* ==========================================================================
   Institutional Dossier & Dropzone (Replacing Fake macOS Windows)
   ========================================================================== */

.terminal-box,
.dossier-box {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.terminal-header,

.terminal-body,
.dossier-body {
  padding: clamp(20px, 3vw, 32px);
  background: var(--bg-canvas);
}

/* Dropzone eliminated: text is ingested only via textarea per TZ specification */

/* ==========================================================================
   Live Rating Board (Sidebar Component)
   ========================================================================== */

.rating-board {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.rating-board-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-board-header h2,
.rating-board-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.rating-board-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rating-board-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: background 0.12s ease;
}

.rating-board-item:last-child {
  border-bottom: none;
}

.rating-board-item:hover {
  background: var(--bg-surface);
}
/* ==========================================================================
   Data Tables
   ========================================================================== */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.data-table th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--bg-surface);
}
/* ==========================================================================
   Formula & Algorithm Callout
   ========================================================================== */

.callout-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-emerald);
  border-radius: 6px;
  padding: clamp(20px, 2.5vw, 28px);
  margin-bottom: 48px;
}

.callout-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.callout-text {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.formula-display {
  background: #FFFFFF;
  border: 1px solid var(--border-muted);
  border-radius: 4px;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  overflow-x: auto;
}

/* ==========================================================================
   Tab Case Switcher
   ========================================================================== */

.case-tabs {
  display: inline-flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 4px;
  gap: 4px;
}

.case-tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.case-tab-btn:hover {
  color: var(--text-primary);
  background: #FFFFFF;
}

.case-tab-btn.active {
  background: #FFFFFF;
  color: var(--accent-blue);
  border-color: var(--border-muted);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Footer (Institutional Anchored Navy)
   ========================================================================== */

.site-footer {
  --text-muted: #A3B1C2;
  --text-dim: #94A3B8;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 56px 0 28px;
  background: var(--bg-footer);
  font-size: 0.90rem;
  color: #94A3B8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h2,
.footer-col h4 {
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #94A3B8;
  transition: color 0.12s ease;
}

.footer-col a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

@media print {
  body { background: #FFFFFF !important; color: #000000 !important; }
  .site-header, .site-footer, .ticker-bar, .no-print { display: none !important; }
}

/* ==========================================================================
   Typography Eyebrow / Kicker (Swiss Institutional Standard - No Pill Boxes)
   ========================================================================== */

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent-blue);
  margin-bottom: 12px;
}

.eyebrow-emerald { color: var(--accent-emerald); }
.eyebrow-cyan { color: var(--accent-cyan); }
.eyebrow-muted { color: var(--text-muted); }

/* ==========================================================================
   Hero Trust Badges Bar & Card Accents (Variant 2 Institutional Authority)
   ========================================================================== */

.hero-trust-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 12px;
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.hero-trust-tag {
  font-family: var(--font-mono);
  font-size: 0.80rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag-emerald {
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-cyan {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.tag-blue {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.card-amber {
  border-top: 3px solid var(--accent-amber);
}

.card-emerald {
  border-top: 3px solid var(--accent-emerald);
}

.card-cyan {
  border-top: 3px solid var(--accent-cyan);
}
/* ==========================================================================
   Zero-Knowledge Textarea Verification Module (No File Uploads, RFC-6234)
   ========================================================================== */

.verify-console {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  margin-top: 20px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.verify-console:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.verify-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.verify-tab {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.verify-tab:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.02);
}

.verify-tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  background: #FFFFFF;
  font-weight: 700;
}

.verify-panel {
  padding: 14px 16px;
}

.verify-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.verify-input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: #FFFFFF;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.verify-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.verify-input::placeholder {
  color: var(--text-dim);
}

.verify-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.verify-box:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.verify-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.verify-textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  border: none !important;
  outline: none !important;
  font-family: var(--font-mono) !important;
  font-size: 0.90rem !important;
  line-height: 1.5 !important;
  color: var(--text-primary) !important;
  background: #FFFFFF !important;
  padding: 12px 14px !important;
  resize: vertical !important;
  min-height: 90px !important;
  display: block !important;
}

.verify-textarea::placeholder {
  color: var(--text-dim);
}

.verify-box-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  gap: 12px;
  flex-wrap: wrap;
}

.verify-micro-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
  flex-shrink: 0;
}

/* Institutional Rating Action Item (No Pill Badges Clutter) */
.rating-action-row {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background 0.12s ease;
}

.rating-action-row:last-child {
  border-bottom: none;
}

.rating-action-row:hover {
  background: var(--bg-surface);
}

.rating-action-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.rating-action-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.rating-action-scores {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  flex-shrink: 0;
  gap: 3px;
}

/* ==========================================================================
   Institutional Form Controls (Strict Textarea Ingestion, RFC-6234)
   ========================================================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 11px 15px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 36px;
}

.form-textarea {
  font-family: var(--font-mono) !important;
  font-size: 0.92rem !important;
  line-height: 1.6 !important;
  resize: vertical !important;
  min-height: 240px !important;
}

.form-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   Utility & Component Classes (Elimination of Inline Styles)
   ========================================================================== */

/* Text Colors */
.text-dim { color: var(--text-dim); }
/* Font Weights */
/* Font Sizes */
.fs-xs { font-size: 0.78rem; }
.fs-sm { font-size: 0.84rem; }
/* Line Heights */
.lh-relaxed { line-height: 1.65; }

/* Layout & Width */
.max-w-960 { max-width: 960px; }
.text-right { text-align: right; }
.flex-wrap { flex-wrap: wrap; }
/* Margins */
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-md { margin-bottom: 16px; }
/* Paddings */
/* Borders & Surfaces */
.bg-surface { background: var(--bg-surface); }
.border-b-subtle { border-bottom: 1px solid var(--border-subtle); }
.border-t-subtle { border-top: 1px solid var(--border-subtle); }
/* Specialized Components */

.tariff-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tariff-subtext {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tariff-chip {
  font-size: 0.80rem;
  margin-bottom: 18px;
  padding: 4px 8px;
  background: var(--bg-surface-elevated);
  border-radius: 3px;
  display: inline-block;
}

.calc-slider {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.faq-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.faq-card-text {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

/* =====================================================
   UTILITY CLASSES — Inline Style Replacement v2.8
   ===================================================== */

/* --- Flex Layout --- */
.flex-col-gap-sm { display: flex; flex-direction: column; gap: 20px; }
.flex-col-gap-md { display: flex; flex-direction: column; gap: 24px; }
.flex-items-start { display: flex; align-items: flex-start; gap: 12px; }
.flex-items-center-gap-sm { display: flex; align-items: center; gap: 8px; }
.flex-sb-center { display: flex; justify-content: space-between; align-items: center; }
.flex-sb-center-wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.flex-sb-baseline { display: flex; justify-content: space-between; align-items: baseline; }
.flex-sb-wrap-gap-sm { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.flex-sb-wrap-gap-md { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.flex-end-mt-lg { margin-top: 24px; display: flex; justify-content: flex-end; }
.flex-center-mb-lg { display: flex; justify-content: center; margin-bottom: 28px; }
.flex-check-label { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-secondary); cursor: pointer; }
.flex-shrink-0 { flex-shrink: 0; }
.mt-auto { margin-top: auto; }

/* --- Grid Layouts --- */
.grid-auto-240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2-gap-md { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 14px; }
.grid-align-start { align-items: start; }

/* --- Display --- */
.overflow-x-auto { overflow-x: auto; }

/* --- Font Sizes (numeric scale) --- */
.fs-xs { font-size: 0.75rem; }
.fs-80 { font-size: 0.80rem; }
.fs-82 { font-size: 0.82rem; }
.fs-84 { font-size: 0.84rem; }
.fs-85 { font-size: 0.85rem; }
.fs-86 { font-size: 0.86rem; }
.fs-88 { font-size: 0.88rem; }
.fs-90 { font-size: 0.90rem; }
.fs-92 { font-size: 0.92rem; }
.fs-95 { font-size: 0.95rem; }
.fs-105 { font-size: 1.05rem; }
.fs-110 { font-size: 1.1rem; }
.fs-115 { font-size: 1.15rem; }
.fs-140 { font-size: 1.4rem; }
.fs-160 { font-size: 1.6rem; }
.fs-180 { font-size: 1.8rem; }
.fs-200 { font-size: 2rem; }
.fs-clamp-pub { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }

/* --- Font Weights --- */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* --- Font Colors --- */
.c-primary { color: var(--text-primary); }
.c-secondary { color: var(--text-secondary); }
.c-muted { color: var(--text-muted); }
.c-dim { color: var(--text-dim); }
.c-cyan { color: var(--accent-cyan); }
.c-emerald { color: var(--accent-emerald); }
.c-amber { color: var(--accent-amber); }
.c-red { color: var(--accent-red); }
.c-blue { color: var(--accent-blue); }
/* --- Line Heights --- */
.lh-135 { line-height: 1.35; }
.lh-150 { line-height: 1.5; }
.lh-155 { line-height: 1.55; }
.lh-160 { line-height: 1.6; }
/* --- Letter Spacing --- */
.ls-06 { letter-spacing: 0.06em; }

/* --- Text Transform --- */

/* --- Components by role (inline styles -> classes, 2026-10-09) --- */
.rating-board-header .rating-board-title { font-size: 1.1rem; margin: 0; }
.stat-value { font-size:2.2rem; font-weight:800; }
.stat-value-md { font-size:1.8rem; font-weight:800; line-height:1; }
.stat-value-lg { font-size:2.4rem; font-weight:800; }
.stat-caption { font-size:0.92rem; color:var(--text-muted); margin-bottom:12px; }
.stat-unit { font-size:1rem; color:var(--text-muted); }
.btn-block { width:100%; text-align:center; }
.spec-row { display:flex; justify-content:space-between; border-bottom:1px solid var(--border-subtle); padding-bottom:4px; }
.spec-row-value { font-weight:700; }
.ticker-meta { font-size:0.78rem; color:var(--text-muted); }
.rating-score { font-size:0.90rem; line-height:1.35; }
.rating-score-sm { font-size:0.86rem; }
.rating-score-xs { font-size:0.84rem; }
.defect-row { display:flex; justify-content:space-between; margin-bottom:6px; }
.defect-penalty { color:var(--accent-red); font-weight:600; }
.cost-chip { font-size:0.80rem; margin-bottom:18px; padding:4px 8px; background:var(--bg-surface-elevated); border-radius:3px; display:inline-block; }
.criterion-card { background:#FFFFFF; border:1px solid var(--border-subtle); padding:16px; border-radius:4px; }
.criterion-title { display:block; font-size:0.92rem; margin-bottom:4px; }
.criterion-desc { font-size:0.82rem; color:var(--text-muted); margin:0; }
.law-card-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; }
.law-card-title { font-size:1.18rem; margin-bottom:8px; }
.law-card-text { font-size:0.90rem; color:var(--text-secondary); line-height:1.6; margin-bottom:12px; }
.law-card-note { font-size:0.86rem; color:var(--text-muted); line-height:1.55; }
.score-panel { background:var(--bg-surface); border:1px solid var(--border-subtle); padding:18px; border-radius:4px; }
.faq-title { font-size:1.1rem; font-weight:700; margin-bottom:10px; color:var(--text-primary); }
.faq-text { color:var(--text-secondary); line-height:1.6; margin:0; font-size:0.95rem; }
.alert-card-emerald { background:var(--accent-emerald-soft); border-left:4px solid var(--accent-emerald); padding:16px; border-radius:4px; }
.alert-card-amber { background:var(--accent-amber-soft); border-left:4px solid var(--accent-amber); padding:16px; border-radius:4px; }
.alert-card-label { font-size:0.80rem; font-weight:700; text-transform:uppercase; margin-bottom:6px; }
.highlight-ribbon { position:absolute; top:-12px; right:20px; background:var(--accent-emerald); color:#FFFFFF; font-size:0.75rem; font-weight:700; padding:2px 10px; border-radius:10px; font-family:var(--font-mono); letter-spacing:0.04em; }
.hash-line { font-size:0.86rem; color:var(--accent-cyan); word-break:break-all; margin-bottom:8px; }
.price-note { font-size:0.85rem; color:var(--text-secondary); margin:0; font-style:italic; }
.dossier-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.dossier-header-lg { padding: 16px 24px; flex-wrap: wrap; gap: 12px; }
.surface-note { background:var(--bg-surface); padding:14px 18px; border-radius:4px; border:1px solid var(--border-subtle); margin-bottom:24px; }
.surface-panel { background:var(--bg-surface); border:1px solid var(--border-subtle); padding:20px; border-radius:4px; margin-bottom:24px; }
.spec-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; font-size:0.88rem; margin-bottom:12px; }
.criteria-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:10px; font-size:0.86rem; margin-bottom:16px; }
.pub-link-block { display:block; padding:12px 20px; background:var(--bg-surface); text-align:center; font-family:var(--font-mono); font-size:0.88rem; font-weight:600; color:var(--accent-blue); border-top:1px solid var(--border-subtle); }
.card-label-mono { font-size:0.88rem; text-transform:uppercase; color:var(--text-muted); font-family:var(--font-mono); }
.eyebrow-stat { font-size:0.82rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:6px; }
.ticker-note { border-top:1px solid var(--border-subtle); padding-top:8px; font-size:0.82rem; color:var(--text-dim); }
.ticker-total { display:flex; justify-content:space-between; border-top:1px solid var(--border-subtle); padding-top:8px; font-weight:700; color:var(--text-primary); }
.plain-list { list-style:none; }
/* --- Utilities added with the same pass --- */
.fs-78 { font-size:0.78rem; }
.fs-75 { font-size:0.75rem; }
.fs-96 { font-size:0.96rem; }
.fs-135 { font-size:1.35rem; }
.lh-100 { line-height:1; }
.uppercase { text-transform:uppercase; }
.mb-2 { margin-bottom:2px; }
.mt-3 { margin-top:3px; }
.mt-14 { margin-top:14px; }
.mt-16 { margin-top:16px; }
.pl-16 { padding-left:16px; }
.mt-neg-80 { position:relative; top:-80px; }
.p-clamp-sm { padding:clamp(20px, 3vw, 32px); }
.underline { text-decoration:underline; }
.gap-8 { gap:8px; }
.gap-10 { gap:10px; }
.gap-12 { gap:12px; }
.gap-16 { gap:16px; }
.flex-center-gap-10 { display:flex; align-items:center; gap:10px; }
.fw-400 { font-weight:400; }
.grid-auto-220 { grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); }

/* --- Margin Variants --- */
.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-18 { margin-bottom: 18px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.mb-32 { margin-bottom: 32px; }
.mb-60 { margin-bottom: 60px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-check { margin-top: 3px; }
/* --- Padding Variants --- */
.pt-0 { padding-top: 0; }
.pt-12 { padding-top: 12px; }
.pt-28 { padding-top: 28px; }
.p-24 { padding: 24px; }
.p-clamp { padding: clamp(24px, 3vw, 36px); }
.p-clamp-submit { padding: clamp(18px, 3vw, 32px); }
/* --- Width / Max-Width --- */
.w-full-max-440 { width: 100%; max-width: 440px; }
/* --- Column Widths (table) --- */
.col-70 { width: 70px; }
.col-140 { width: 140px; }
.col-170 { width: 170px; }
.col-180 { width: 180px; }
.col-240 { width: 240px; }

/* --- Border Accents --- */
.border-l-cyan { border-left-color: var(--accent-cyan); }
.border-t-section { border-top: 1px solid var(--border-subtle); padding: 60px 0; }
.shadow-sm { box-shadow: var(--shadow-sm); }
/* --- Text Area / Input Utilities --- */
.textarea-expand { min-height: 260px; font-size: 0.88rem; line-height: 1.55; }
.textarea-verify { width: 100%; box-sizing: border-box; min-height: 120px; padding: 12px 14px; font-family: var(--font-mono); border: none; outline: none; resize: vertical; display: block; }
.input-flex { flex: 1; }
.cursor-pointer { cursor: pointer; }
/* --- Dot Status Indicator --- */
.dot-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

/* --- Breadcrumb Bar --- */
.breadcrumb-bar {
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  font-size: 0.8rem;
}
.breadcrumb-link { color: var(--text-secondary); }

/* --- Page Title Hero (submit) --- */
.page-title-hero { font-size: clamp(1.4rem, 2.5vw, 1.85rem); font-weight: 800; margin: 0; }

/* --- Alert Banner (Zero-Upload style) --- */
.alert-blue-card {
  border-left: 4px solid var(--accent-blue);
  background: var(--bg-surface);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.alert-label-blue { font-size: 0.84rem; font-weight: 700; color: var(--accent-blue); text-transform: uppercase; letter-spacing: 0.04em; }
.alert-text-sm { font-size: 0.88rem; color: var(--text-secondary); margin: 4px 0 0 0; line-height: 1.55; }

/* --- Tariff Upgrade Banner --- */
.tariff-upgrade-banner {
  display: none;
  background: var(--accent-amber-soft);
  border: 1px solid #FDE68A;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.tariff-upgrade-banner.is-visible { display: block; }
.upgrade-banner-text { font-size: 0.88rem; color: #92400E; }

/* --- Char Counter --- */
.char-counter { font-size: 0.82rem; color: var(--text-muted); }

/* --- Hash Preview --- */
.hash-preview { color: var(--accent-blue); font-weight: 600; }

/* --- Verify Panel --- */
.verify-box-header-label { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }
.verify-note-inline { margin: 0; }
.verify-eyebrow { font-size: 0.68rem; color: var(--text-muted); }
.verify-result-mt { margin-top: 20px; }

/* --- Callout Card Variants --- */
.callout-cyan { border-left-color: var(--accent-cyan); margin: 0; }
.callout-title-cyan { color: var(--accent-cyan); font-size: 1.15rem; margin-bottom: 10px; }
.callout-text-base { font-size: 0.92rem; line-height: 1.65; color: var(--text-secondary); margin: 0; }

/* --- Card headings --- */
.card-h2 { font-size: 1.25rem; color: var(--text-primary); margin-bottom: 12px; }
.card-p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.65; margin: 0; }
.card-p-mb14 { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 14px; }
.card-contact { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.card-link-cyan { color: var(--accent-cyan); font-weight: 600; font-family: var(--font-mono); font-size: 0.95rem; }

/* --- Methodology bar (top bar) --- */
.meth-bar {
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  font-size: 0.8rem;
}
.meth-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.meth-bar-left { display: flex; align-items: center; gap: 8px; }

/* --- Score Tier Card --- */
.score-tier-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.score-tier-pts { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.score-tier-pts-cyan { color: var(--accent-cyan); }
.score-tier-pts-emerald { color: var(--accent-emerald); }
.score-tier-pts-amber { color: var(--accent-amber); }
.score-tier-pts-red { color: var(--accent-red); }
.score-badge-sm { font-size: 0.80rem; }
.score-range-label { font-size: 0.82rem; color: var(--text-muted); }

/* --- Table cell utilities --- */
.td-mono-cyan { color: var(--accent-cyan); font-weight: 700; }
.td-key { font-size: 0.78rem; color: var(--text-dim); }
/* --- Depository / Publisher card pieces --- */
.card-surface-raised { padding: 22px; background: var(--bg-surface-raised); }
.card-p-clamp-surface { padding: clamp(24px, 3vw, 36px); background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.card-surface-p20 { background: var(--bg-surface); padding: 20px; border-radius: 6px; border: 1px solid var(--border-subtle); }
.card-border-emerald { background: var(--bg-surface); padding: 20px; border-radius: 6px; border-left: 4px solid var(--accent-emerald); }
.card-border-red { background: var(--bg-surface); padding: 20px; border-radius: 6px; border-left: 4px solid var(--accent-red); }
.card-bg-white-shadow { background: #FFFFFF; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-md); }
.card-highlighted { border-width: 2px; position: relative; }
/* --- Tariff chip color variants --- */
.tariff-chip-cyan { color: var(--accent-cyan); }
.tariff-chip-emerald { color: var(--accent-emerald); }
.tariff-chip-blue { color: var(--accent-blue); }

/* --- Publisher score large --- */
.pub-score-lg { font-size: 1.6rem; font-weight: 800; margin-bottom: 12px; }
.pub-score-lg-cyan { color: var(--accent-cyan); }
.pub-score-lg-emerald { color: var(--accent-emerald); }
.pub-score-lg-amber { color: var(--accent-amber); }

/* --- Publisher sub-stat row --- */
.pub-stat-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.88rem; }
.pub-stat-row-lg { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; }
.pub-stat-row-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  font-weight: 700;
  color: var(--text-primary);
}
.pub-footer-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.45;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: auto;
}
.pub-card-note { font-size: 0.8rem; color: var(--text-dim); margin-top: 4px; }
.pub-section-note { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-dim); margin-top: 4px; }
.pub-card-p { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 2px; }
.pub-card-sb-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 18px; }
.pub-score-label { font-size: 1.45rem; color: var(--text-primary); margin-bottom: 4px; }
.pub-mono-label { font-family: var(--font-mono); font-size: 0.90rem; font-weight: 700; }
/* --- Index-specific --- */
.index-score-lg { font-size: 1.3rem; font-weight: 700; }
.index-score-lg-emerald { color: var(--accent-emerald); }
.index-score-lg-red { color: var(--accent-red); }
.index-card-sb-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.index-mb-mb18-card { margin-bottom: 18px; background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 12px 16px; border-radius: 6px; }
/* Формулы без библиотек: индексы и знак суммы (план: ТОП-3, вариант 1) */
.formula-display { line-height: 1.7; }
.formula-display sub,
.formula-display sup { font-size: 0.72em; line-height: 0; }
.formula-display .op { font-size: 1.35em; line-height: 0; vertical-align: -0.08em; }

/* --- Verify result (rendered by verify.js) --- */
.verify-result-card { border-color: var(--accent-emerald); background: var(--bg-surface-raised); box-shadow: var(--shadow-md); }
.verify-result-card-miss { border-color: var(--border-muted); background: var(--bg-surface-raised); }
.verify-result-card-error { border-color: var(--accent-red); background: var(--bg-surface-raised); }
.verify-hash-box { font-size: 0.86rem; color: var(--text-secondary); background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 10px 14px; border-radius: 4px; margin-bottom: 18px; word-break: break-all; }
.verify-query-box { font-size: 0.86rem; color: var(--text-primary); word-break: break-all; background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 10px 12px; border-radius: 4px; }
.verify-score-tile { background: var(--bg-surface); padding: 14px; border-radius: 6px; border: 1px solid var(--border-subtle); }
.verify-score-value { font-size: 1.55rem; font-weight: 800; }
.verify-meta-row { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--text-secondary); border-top: 1px solid var(--border-subtle); padding-top: 10px; flex-wrap: wrap; gap: 8px; }
.char-counter-over { color: var(--accent-red); font-weight: 700; }

/* ==========================================================================
   Мобильная версия (2026-10-10). Единицы — rem / em / % / vw / clamp, без px:
   масштабируется под любой экран. Точки перелома в em (48em ≈ 768px, 30em ≈ 480px).
   Десктоп не меняется: всё ниже действует только внутри медиазапросов или не
   трогает значения выше 48em.
   ========================================================================== */

/* --- Кнопка меню: на десктопе скрыта --- */
.mobile-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3125rem;
  flex-shrink: 0;
}
.mobile-toggle__bar {
  display: block;
  width: 1.375rem;
  height: 0.125rem;
  background: #F1F5F9;
  border-radius: 0.0625rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.mobile-toggle:focus-visible { outline: 0.125rem solid #38BDF8; outline-offset: 0.125rem; }
.mobile-toggle[aria-expanded="true"] .mobile-toggle__bar:nth-child(1) { transform: translateY(0.4375rem) rotate(45deg); }
.mobile-toggle[aria-expanded="true"] .mobile-toggle__bar:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] .mobile-toggle__bar:nth-child(3) { transform: translateY(-0.4375rem) rotate(-45deg); }

/* --- Таблицы: горизонтальная прокрутка с тенью-подсказкой у краёв --- */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, var(--bg-canvas) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to left, var(--bg-canvas) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to right, rgba(0, 27, 58, 0.14), rgba(0, 27, 58, 0)),
    linear-gradient(to left, rgba(0, 27, 58, 0.14), rgba(0, 27, 58, 0));
  background-repeat: no-repeat;
  background-size: 2.5rem 100%, 2.5rem 100%, 0.875rem 100%, 0.875rem 100%;
  background-position: left, right, left, right;
  background-attachment: local, local, scroll, scroll;
}
.table-scroll > table { min-width: 100%; }

/* --- Сворачиваемые блоки: на десктопе всегда раскрыты, заголовок списка скрыт --- */
.m-collapse > summary,
.faq > summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.m-collapse > summary::-webkit-details-marker,
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after,
.m-collapse > summary::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 0.125rem solid currentColor;
  border-bottom: 0.125rem solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.6;
}
.faq[open] > summary::after,
.m-collapse[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.m-collapse__summary {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}
@media (min-width: 48.0625em) {
  .m-collapse > summary { display: none; }
  .faq > summary::after { display: none; }
  .faq > summary { pointer-events: none; }
}

/* --- Обёртка кнопки отправки: на десктопе невидима для раскладки --- */
.form-sticky { display: contents; }

/* --- Заголовок в двухколоночном hero (главная): одна строка на любом десктопе --- */
@media (min-width: 48.0625em) {
  .hero-split .hero-title { font-size: clamp(1.75rem, 2.7vw, 2.3rem); white-space: nowrap; }
}

/* --- Адаптивные медиа --- */
img, svg, video { max-width: 100%; height: auto; }

/* ==========================================================================
   До 48em (телефоны и узкие планшеты)
   ========================================================================== */
@media (max-width: 48em) {
  /* clip, а не hidden: hidden делает body прокручиваемым контейнером и ломает липкую шапку */
  body { overflow-x: clip; }
  .container { padding-left: 4%; padding-right: 4%; }

  /* 1. Меню на весь экран под шапкой */
  .mobile-toggle { display: inline-flex; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 2% 4% 6%;
    background: var(--bg-header);
    overflow-y: auto;
    z-index: 199;
  }
  .main-nav.open a {
    display: flex;
    align-items: center;
    min-height: 3.25rem;
    padding: 0.5rem 0;
    font-size: 1.1rem;
    white-space: normal;
    border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
  }
  .main-nav a.active::after { display: none; }
  .main-nav.open a.active { color: #38BDF8; }
  body.nav-open { overflow: hidden; }

  /* 2. Ничего не выезжает за экран */
  .card, .callout-box, .rating-board, .verify-console, .dossier-box { min-width: 0; overflow-wrap: anywhere; }
  .mono, code, .hash-preview, .verify-hash-box, .verify-query-box, .hash-line { overflow-wrap: anywhere; word-break: break-word; }
  code.hash-preview { display: block; word-break: break-all; }
  .btn { white-space: normal; text-align: center; }
  .pub-stat-row, .pub-stat-row-lg, .pub-stat-row-total, .spec-row, .defect-row, .ticker-total,
  .flex-sb-center, .flex-between, .flex-between-center, .flex-sb-start, .law-card-head, .score-tier-header, .card-specs-row { flex-wrap: wrap; gap: 0.25rem 0.75rem; }
  .card-specs-row > .mono { text-align: left; }
  .ticker-bar { font-size: 0.78rem; }

  /* 3. Цели для пальца не меньше 2.75rem (44px при базовых 16px) */
  .btn, .btn-sm { min-height: 2.75rem; padding-top: 0.625rem; padding-bottom: 0.625rem; }
  .case-tab-btn, .verify-tab { min-height: 2.75rem; }
  .footer-col a, .card-link-cyan, .pub-link-block, .breadcrumb-link, .rating-board a, .lounge-story-link,
  .card-action a, a.index-link-blue { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .footer-col li { margin-bottom: 0; }
  .btn-block, .card-action .btn, .hero-actions .btn { width: 100%; }

  /* 4. Короче прокрутка: тарифы лентой с прилипанием */
  .tariff-grid:not(.d-none) {
    display: flex;
    gap: 3%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 4%;
    padding: 0.25rem 4% 1rem;
    margin: 0 -4.17%;
    scrollbar-width: none;
  }
  .tariff-grid::-webkit-scrollbar { display: none; }
  .tariff-grid:not(.d-none) > * { flex: 0 0 84%; scroll-snap-align: center; }

  /* 5. Типографика и ритм: плавно от ширины экрана */
  .hero { padding: clamp(1.5rem, 6vw, 2.5rem) 0; }
  /* заголовок страницы в одну строку: размер от ширины экрана, самый длинный — 31 знак */
  .hero-title, main h1 { font-size: clamp(1rem, 5.4vw, 2.2rem); line-height: 1.2; margin-bottom: 0.75rem; white-space: nowrap; }
  .hero-desc { font-size: clamp(0.95rem, 4vw, 1.05rem); margin-bottom: 1.25rem; }
  .section { padding: clamp(2rem, 8vw, 3rem) 0; }
  .section-title { font-size: clamp(1.35rem, 6vw, 1.8rem); }
  .section-header { margin-bottom: clamp(1.25rem, 5vw, 1.75rem); }
  .card { padding: clamp(1rem, 4.5vw, 1.375rem); }
  .callout-box { padding: clamp(1rem, 4.5vw, 1.375rem); }
  .grid-2, .grid-3, .grid-4 { gap: clamp(0.75rem, 3vw, 1.25rem); }
  .stat-value { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .stat-value-lg { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .data-table th, .data-table td { padding: 0.5rem 0.625rem; font-size: 0.82rem; }
  .table-scroll > table { min-width: 42rem; }
  .table-scroll td, .table-scroll th { overflow-wrap: normal; }
  .verify-search-bar { flex-wrap: wrap; }
  .verify-search-bar .btn, .verify-search-bar .input-flex { flex: 1 1 100%; width: 100%; }
  .logo-block { min-height: 2.75rem; }
  a.underline, a.fs-80, .card p a, .state-message a { display: inline-flex; align-items: center; min-height: 2.75rem; }

  /* 6. Формы: поле под палец, 16px-эквивалент против автозума на iOS, кнопка липнет к низу */
  .form-control, .form-select, .verify-input, textarea.form-control { min-height: 3rem; font-size: 1rem; }
  .form-sticky { display: block; width: 100%; position: sticky; bottom: 0.75rem; z-index: 5; padding: 0.5rem 0; background: var(--bg-canvas); }
  .form-sticky .btn { width: 100%; max-width: none; }
  .verify-console .btn { width: 100%; }

  /* 7. Подвал */
  .footer-grid { gap: 1.5rem; margin-bottom: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* --- Совсем узкие экраны (до 30em ≈ 480px) --- */
@media (max-width: 30em) {
  .container { padding-left: 4.5%; padding-right: 4.5%; }
  .tariff-grid:not(.d-none) > * { flex-basis: 88%; }
  .hero-trust-tag { font-size: 0.72rem; }
  .logo-block svg { height: 1.9rem; }
}

/* --- Visibility state (toggled by JS); last on purpose: must beat the display of grid and flex helpers --- */
.d-none { display: none; }
