/* =========================================================================
   Sential Innovations Stylesheet
   One source of truth. Warm surfaces, editorial serif, no gradients,
   no pulsing, no emoji. Hairlines and whitespace do the structural work.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Ink: warm near-blacks for text */
  --ink: #1C1612;
  --ink-soft: #4A3D31;
  --ink-faint: #8A7A68;

  /* Hazelnut: primary brown */
  --hazelnut: #7A5C3E;
  --hazelnut-deep: #5C4329;

  /* Cream: secondary surfaces */
  --cream: #F4E8DA;
  --cream-light: #FBF5EC;
  --cream-card: #FFFFFF;

  /* Paper */
  --paper: #FFFFFF;

  /* Rules: hairline borders */
  --rule: #E0D2BD;
  --rule-soft: #ECE0CE;

  /* Sea: the slight accent (links, focus, small marks) */
  --sea: #4A7C82;
  --sea-deep: #385F64;

  /* Type */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono",
    Consolas, monospace;

  /* Scale */
  --maxw: 1200px;
  --maxw-prose: 720px;
  --maxw-wide: 1040px;

  /* Spacing rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Radii: small, restrained */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  /* Motion */
  --t-fast: 120ms ease;
  --t-base: 220ms ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream-light);
  font-feature-settings: "kern" 1, "liga" 1;
}

img, svg, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--sea-deep);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
a:hover { color: var(--sea); text-decoration-color: var(--sea); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.4rem, 5vw + 1rem, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.7rem, 2vw + 1rem, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

small, .small { font-size: 0.85rem; }

strong { font-weight: 600; color: var(--ink); }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--cream);
  padding: 0.1em 0.4em;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-soft);
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-prose { max-width: var(--maxw-prose); }
.container-wide { max-width: var(--maxw-wide); }

.section {
  padding-block: var(--space-9);
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: none; }
.section-tight { padding-block: var(--space-7); }
.section-flush { padding-block: var(--space-8) 0; }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--space-3);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--ink);
  color: var(--cream);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-sm);
  z-index: 1000;
  text-decoration: none;
  transition: top var(--t-base);
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream-light);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}
.site-header.scrolled {
  border-bottom-color: var(--rule);
  background: rgba(251, 245, 236, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-name .sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
  padding: 0;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: var(--space-2) 0;
  position: relative;
  transition: color var(--t-fast);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--sea-deep);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--sea);
}

/* CTA in nav */
.nav-cta {
  font-size: 0.9rem;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.5rem 1rem;
  border-radius: var(--r-md);
  text-decoration: none;
  background: transparent;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-cta:hover {
  background: var(--ink);
  color: var(--cream-light);
  text-decoration: none;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 820px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--cream-light);
    border-bottom: 1px solid var(--rule);
    padding: var(--space-4) var(--space-6) var(--space-6);
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a {
    display: block;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 1.05rem;
  }
  .nav-links.open a[aria-current="page"]::after { display: none; }
  .nav-links.open a[aria-current="page"] { color: var(--sea-deep); font-weight: 600; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--space-9) var(--space-8);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-8);
  align-items: center;
}
.hero h1 {
  margin-bottom: var(--space-5);
  font-size: clamp(1.8rem, 3.5vw + 0.5rem, 3rem);
}
.hero .lede { max-width: 30ch; margin-bottom: var(--space-6); }
.hero-figure {
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

/* Wide hero figure (for source art with a wide aspect ratio, e.g. 8:3) */
.hero-figure--wide {
  aspect-ratio: 8 / 3;
  grid-column: 1 / -1;
  margin-top: var(--space-7);
}
.hero-figure--wide img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-5); }

/* Transparent hero art: no box, no border, no background.
   For wide transparent PNGs (e.g. the Hikaru card). Sits on the right
   of the hero copy and keeps its natural aspect ratio. */
.hero-art-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hero-art-intro {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 var(--space-3);
}

.hero-figure--art {
  border: none;
  background: transparent;
  border-radius: 0;
  aspect-ratio: auto;
  align-self: center;
  position: relative;
}
.hero-figure--art img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-7); }
  .hero-figure { aspect-ratio: 16 / 10; order: 2; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.7rem 1.25rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast),
    border-color var(--t-fast);
}
.btn-primary {
  background: var(--ink);
  color: var(--cream-light);
}
.btn-primary:hover {
  background: var(--hazelnut-deep);
  color: var(--cream-light);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink-soft);
  text-decoration: none;
  color: var(--ink);
}
.btn .arrow {
  font-family: var(--font-mono);
  transition: transform var(--t-fast);
}
.btn:hover .arrow { transform: translateX(2px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Status (plain words, no pills) ---------- */
.status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: var(--ink-faint);
}
.status--dev { color: var(--hazelnut-deep); }
.status--soon { color: var(--sea-deep); }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--space-6);
  transition: border-color var(--t-base), transform var(--t-base);
  height: 100%;
}
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.card-link:hover { text-decoration: none; color: inherit; }
.card-link:hover .card {
  border-color: var(--ink-faint);
}
.card-link:hover .card .arrow-more {
  color: var(--sea-deep);
  transform: translateX(3px);
}

.card h3 { margin-bottom: var(--space-3); }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
}
.card p { color: var(--ink-soft); font-size: 0.96rem; }

.arrow-more {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--ink-faint);
  margin-top: var(--space-4);
  transition: color var(--t-fast), transform var(--t-fast);
}

/* Card grids */
.grid {
  display: grid;
  gap: var(--space-5);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 880px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (min-width: 881px) and (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Section header ---------- */
.section-head {
  margin-bottom: var(--space-7);
  max-width: 60ch;
}
.section-head h2 { margin-bottom: var(--space-3); }
.section-head .lede { color: var(--ink-soft); }

/* ---------- Prose block (research/about) ---------- */
.prose { max-width: var(--maxw-prose); }
.prose h2 { margin-top: var(--space-7); margin-bottom: var(--space-4); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-6); margin-bottom: var(--space-3); }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 var(--space-4) var(--space-5); color: var(--ink-soft); }
.prose li { margin-bottom: var(--space-2); }
.prose li::marker { color: var(--ink-faint); }

/* ---------- Status list / model spec ---------- */
.spec-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  border-top: 1px solid var(--rule);
}
.spec-list li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.95rem;
}
.spec-list .k {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}
.spec-list .v { color: var(--ink); }
@media (max-width: 540px) {
  .spec-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Model lineup ---------- */
.model-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--rule);
}
.model-row:first-of-type { border-top: 1px solid var(--rule); }
.model-row h3 { margin-bottom: var(--space-2); }
.model-row .lede { margin-bottom: var(--space-3); }
.model-id {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-faint);
}
@media (max-width: 760px) {
  .model-row { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ---------- Series page: detailed model cards ---------- */
.model-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--space-7);
}
.model-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}
.model-card-head h3 {
  font-size: 1.5rem;
  margin: 0;
}
.model-card-head .model-id {
  margin: 4px 0 0;
}
.model-card .lede { color: var(--ink-soft); margin-bottom: var(--space-4); }
.model-note {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule-soft);
  color: var(--ink-faint);
  line-height: 1.5;
}

/* ---------- Org chart ---------- */
.org {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6) 0;
}
.org-tier {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  justify-content: center;
}
.org-node {
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: var(--r-md);
  padding: var(--space-4) var(--space-5);
  text-align: center;
  min-width: 180px;
}
.org-node.parent {
  background: var(--ink);
  color: var(--cream-light);
  border-color: var(--ink);
}
.org-node.parent .org-label { color: var(--cream); }
.org-node .org-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}
.org-node.this .org-title { color: var(--hazelnut-deep); }
.org-node .org-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 4px;
}
.org-connector {
  width: 1px;
  height: 24px;
  background: var(--rule);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--cream);
  padding-block: var(--space-8) var(--space-6);
  margin-top: var(--space-9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}
.footer-brand .brand-name { font-size: 1.1rem; }
.footer-brand p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  max-width: 32ch;
  margin-top: var(--space-3);
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--space-4);
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}
.footer-col a:hover { color: var(--sea-deep); text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.footer-bottom a {
  color: var(--ink-faint);
  text-decoration: none;
}
.footer-bottom a:hover { color: var(--sea-deep); }

.social-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  margin: 0;
}
.social-links li { margin: 0; }
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  transition: color var(--t-fast), border-color var(--t-fast),
    background var(--t-fast);
}
.social-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.social-icon:hover {
  color: var(--sea-deep);
  border-color: var(--sea-deep);
  background: rgba(74, 124, 130, 0.06);
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- News list ---------- */
.news-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: var(--space-5);
  align-items: baseline;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background var(--t-fast);
}
.news-item:hover { text-decoration: none; color: inherit; }
.news-item:hover .news-title { color: var(--sea-deep); }
.news-item:first-child { border-top: none; }
.news-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}
.news-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.25;
  transition: color var(--t-fast);
}
.news-title + .news-excerpt { color: var(--ink-soft); font-size: 0.92rem; margin-top: var(--space-2); }
.news-cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 640px) {
  .news-item { grid-template-columns: 1fr; gap: var(--space-2); }
  .news-item .news-arrow { display: none; }
}

/* ---------- Placeholder figure ---------- */
.fig-ph {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--cream);
  overflow: hidden;
}
.fig-ph svg { width: 100%; height: auto; display: block; }
.ph-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  padding: var(--space-3);
  border-top: 1px solid var(--rule-soft);
  background: var(--cream-light);
}

/* ---------- Hero / page intro ---------- */
.page-intro {
  padding-block: var(--space-9) var(--space-7);
  max-width: 60ch;
}
.page-intro h1 { margin-bottom: var(--space-5); }
.page-intro .lede { color: var(--ink-soft); }

/* ---------- 404 ---------- */
.notfound {
  padding-block: var(--space-10) var(--space-9);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(74, 124, 130, 0.04), transparent 60%);
}
.notfound-inner {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.notfound .notfound-mark {
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-5);
  opacity: 0.95;
}
.notfound .code {
  font-family: var(--font-serif);
  font-size: clamp(4.5rem, 14vw, 8rem);
  line-height: 1;
  color: var(--hazelnut);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}
.notfound h1 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}
.notfound .lede {
  margin-bottom: var(--space-6);
  color: var(--ink-soft);
}
.notfound .btn-row {
  justify-content: center;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.muted { color: var(--ink-faint); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }
.divider { height: 1px; background: var(--rule); border: none; margin: var(--space-6) 0; }
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Visually hidden (accessible label trick) ---------- */
.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;
}

/* ---------- Contact ---------- */

.contact-info {
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.contact-info h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  color: var(--ink);
}
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { margin-bottom: var(--space-3); }
.contact-info a { color: var(--sea-deep); text-decoration: none; border-bottom: 1px solid transparent; }
.contact-info a:hover { border-bottom-color: var(--sea-deep); }
.contact-email-inline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: -0.25rem !important;
}
.contact-email-inline span { color: var(--ink); }

/* =========================================================================
   Status page
   Hand-updated. Each element's state is set with a single .is-* class,
   which drives both the dot colour and the label colour through --st.
   ========================================================================= */
:root {
  --st-ok:      #2F6E5F;            /* operational, monitoring — teal-green */
  --st-caution: #8A6410;            /* degraded, investigating — amber */
  --st-warn:    #B4531B;            /* identified, partial outage — orange */
  --st-major:   #99241A;            /* major outage / down — red */
  --st-muted:   var(--ink-faint);   /* resolved history */
}

/* State classes: each state gets its own colour (worse = warmer, then red).
   Sets the --st colour used by the dots and labels below. */
.is-operational,
.is-monitoring    { --st: var(--st-ok); }
.is-degraded,
.is-investigating { --st: var(--st-caution); }
.is-identified,
.is-partial       { --st: var(--st-warn); }
.is-major         { --st: var(--st-major); }
.is-resolved      { --st: var(--st-muted); }

/* Shared dot + label vocabulary */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--st, var(--ink-faint));
  flex-shrink: 0;
}
.status-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st, var(--ink-faint));
  white-space: nowrap;
}

/* Overall banner — clean hairline card; status is shown by the title colour */
.status-banner {
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-7);
}
.status-banner-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--st, var(--ink));
  margin: 0;
}
.status-banner-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: var(--space-2) 0 0;
}

/* Systems list */
.status-systems {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.system-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.system-name { color: var(--ink); font-size: 1rem; }
.system-name .sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* Incidents */
.incident {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--st, var(--rule));
  border-radius: var(--r-md);
  background: var(--paper);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-5);
}
.incident:last-child { margin-bottom: 0; }
.incident-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.incident-head h3 { font-size: 1.2rem; margin: 0; }
.incident-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  white-space: nowrap;
}
.incident > p { color: var(--ink-soft); font-size: 0.96rem; }
.incident-updates {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  border-top: 1px solid var(--rule-soft);
}
.incident-update {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.95rem;
}
.incident-update:last-child { border-bottom: none; }
.incident-update .when {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}
.incident-update .what { color: var(--ink-soft); }
.incident.is-resolved { opacity: 0.9; }
@media (max-width: 600px) {
  .incident-update { grid-template-columns: 1fr; gap: 2px; }
}

/* Empty state + legend */
.status-empty {
  color: var(--ink-faint);
  font-size: 1rem;
  padding: var(--space-4) 0;
}
.status-legend {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3) var(--space-6);
}
.status-legend li {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.status-legend .status-label { min-width: 116px; }
