/* SIP Federation — site styles
   Palette: deep navy, restrained signal blue, generous white space, thin connection lines. */

:root {
  --navy:        #0b1f3a;
  --navy-deep:   #071528;
  --navy-soft:   #16304f;
  --signal:      #2f6fd0;
  --signal-soft: #e8f0fb;
  --ink:         #16202e;
  --ink-muted:   #55647a;
  --line:        #d9e1ec;
  --line-soft:   #eef2f7;
  --paper:       #ffffff;
  --paper-alt:   #f7f9fc;
  --amber:       #b6791f;

  --measure: 68ch;
  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 4px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 0.95rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  color: var(--ink-muted);
  line-height: 1.55;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 1rem;
}

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

small, .fine { font-size: 0.85rem; color: var(--ink-muted); }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: var(--wrap-narrow); }

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line-soft); }
section.tight { padding: 48px 0; }
.section-alt { background: var(--paper-alt); border-top: 1px solid var(--line); }

.section-head { max-width: var(--wrap-narrow); margin-bottom: 40px; }
.section-head p:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 28px; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--sidebar { grid-template-columns: 1.6fr 1fr; gap: 48px; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand svg { display: block; }
.brand span { font-size: 1.02rem; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.93rem;
  white-space: nowrap;
}
.nav a:hover { color: var(--navy); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 11px;
  color: var(--navy);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
  .nav .btn { margin-top: 14px; text-align: center; border-bottom: 0; }
  .site-header .wrap { position: relative; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--primary:hover { background: var(--signal); border-color: var(--signal); color: #fff; }

.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); background: var(--paper-alt); }

.btn--onnavy { background: #fff; color: var(--navy); border-color: #fff; }
.btn--onnavy:hover { background: var(--signal-soft); color: var(--navy-deep); }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.arrow-link {
  display: inline-block;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
}
.arrow-link::after { content: " \2192"; }
.arrow-link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(47, 111, 208, 0.28) 0%, rgba(47, 111, 208, 0) 58%),
    linear-gradient(168deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 88px 0 80px;
  border-bottom: 1px solid var(--navy);
  position: relative;
  overflow: hidden;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { color: #c5d3e6; }
.hero .lede { max-width: 56ch; margin-bottom: 30px; }
.hero .eyebrow { color: #7fb0f2; }
.hero-inner { position: relative; z-index: 2; }
.hero-figure { position: relative; z-index: 2; margin-top: 8px; }
.hero-note { margin-top: 28px; font-size: 0.86rem; color: #93a8c4; max-width: 52ch; }

@media (min-width: 900px) {
  .hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
}

.page-head {
  background: var(--paper-alt);
  border-bottom: 1px solid var(--line);
  padding: 60px 0 52px;
}
.page-head h1 { max-width: 20ch; }
.page-head .lede { margin-bottom: 0; }

/* ---------- Cards ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--paper);
}
.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }
.card--flat { border: 0; padding: 0; background: transparent; }

.card--num { padding-top: 22px; border-top: 2px solid var(--signal); border-radius: 0; }

.rule-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--signal);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 10px;
}

/* ---------- Steps ---------- */

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 30px 54px;
  border-left: 1px solid var(--line);
  margin-left: 15px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -15px;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--signal);
  color: var(--signal);
  font-size: 0.82rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.steps h3 { margin-bottom: 0.35em; }
.steps p { margin-bottom: 0; color: var(--ink-muted); }

/* ---------- Lists ---------- */

.checklist { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.checklist li {
  position: relative;
  padding: 0 0 12px 26px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border: 1px solid var(--signal);
  border-radius: 2px;
}
.checklist--excluded li::before { border-color: var(--ink-muted); background: var(--line); }

.plain-list { margin: 0; padding-left: 1.15em; max-width: var(--measure); }
.plain-list li { margin-bottom: 10px; }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 520px;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 15px 18px 15px 0;
  border-bottom: 1px solid var(--line);
}
th.col-label { width: 24%; }

th {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom-color: var(--navy);
}
td p { margin: 0; }

/* ---------- Callouts ---------- */

.callout {
  border-left: 2px solid var(--signal);
  background: var(--signal-soft);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: var(--measure);
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--navy); }

.callout--note { border-left-color: var(--amber); background: #fdf6e9; }

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid #e3cb9d;
  background: #fdf6e9;
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 18px;
}

/* ---------- Route comparison ---------- */

.routes { display: grid; gap: 20px; }
@media (min-width: 800px) { .routes { grid-template-columns: 1fr 1fr; } }

.route {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--paper);
}
.route--fed { border-color: var(--signal); background: var(--signal-soft); }
.route h3 { font-size: 0.98rem; margin-bottom: 14px; }
.route ol { margin: 0; padding-left: 1.1em; font-size: 0.93rem; color: var(--ink-muted); }
.route li { margin-bottom: 6px; }

.hops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--navy);
  margin-bottom: 16px;
}
.hop {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 5px 8px;
  white-space: nowrap;
}
.hop--fed { border-color: var(--signal); color: var(--signal); font-weight: 600; }
.hop-sep { color: var(--ink-muted); }

/* ---------- Diagram ---------- */

.figure { margin: 0; }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { font-size: 0.85rem; color: var(--ink-muted); margin-top: 14px; max-width: var(--measure); }
.figure--framed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--paper);
}

/* ---------- Forms ---------- */

.form-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--paper);
}

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.field .hint { display: block; font-weight: 400; font-size: 0.82rem; color: var(--ink-muted); margin-top: 2px; }

input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
textarea { min-height: 120px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
  border-color: var(--signal);
}

.field-grid { display: grid; gap: 20px; }
@media (min-width: 620px) { .field-grid { grid-template-columns: 1fr 1fr; } }

.choice-set { border: 0; margin: 0 0 20px; padding: 0; }
.choice-set legend {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  padding: 0;
}
.choice-set legend .hint {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--ink-muted);
}
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.93rem;
  margin-bottom: 8px;
  cursor: pointer;
}
.choice input { margin-top: 5px; flex: none; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-footnote { font-size: 0.83rem; color: var(--ink-muted); margin-top: 18px; }

.form-aside {
  border-top: 2px solid var(--navy);
  padding-top: 20px;
  font-size: 0.93rem;
  color: var(--ink-muted);
}
.form-aside h3 { font-size: 0.95rem; }
.form-aside ul { padding-left: 1.1em; margin: 0 0 20px; }
.form-aside li { margin-bottom: 8px; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--navy);
  color: #fff;
  padding: 64px 0;
  border-top: 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #c5d3e6; max-width: 58ch; }
.cta-band .wrap { max-width: var(--wrap-narrow); }

/* ---------- Announcements (editable region) ---------- */

.updates { list-style: none; margin: 0; padding: 0; }
.updates li {
  display: grid;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 700px) { .updates li { grid-template-columns: 150px 1fr; } }
.updates time { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-muted); padding-top: 3px; }
.updates p { margin: 0; }
.updates h3 { margin: 0 0 2px; font-size: 1rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: #93a8c4;
  padding: 56px 0 40px;
  font-size: 0.9rem;
}
.site-footer a { color: #c5d3e6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h4 {
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-brand { color: #fff; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand svg { display: block; }
.footer-note { max-width: 42ch; margin: 0; color: #7f93b0; font-size: 0.86rem; }
.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  font-size: 0.83rem;
  color: #7f93b0;
}

/* Footer variant used on the 404 page, which has no footer columns above it. */
.footer-bottom--bare { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Utilities ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--navy);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.mb-0 { margin-bottom: 0; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
