.portal {
  --paper: #f6fafb;
  --surface: #fff;
  --ink: #17283a;
  --muted: #496174;
  --accent: #096d79;
  --line: #cfdde4;
  --dark: #142a3f;
  --wash: #eaf4f5;
  --intro-start: #e6f5f6;
  --intro-end: #f9fcfd;
}

html:not([data-theme="light"]) .portal {
  --paper: #0f1720;
  --surface: #172431;
  --ink: #edf5f7;
  --muted: #acc0cf;
  --accent: #70d4dc;
  --line: #354c5d;
  --dark: #0a131e;
  --wash: #13212d;
  --button-ink: #10282e;
  --intro-start: #0c323d;
  --intro-end: #142332;
}

.portal h1, .portal h2, .traffic h1, .traffic h2 {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 750;
}

.portal-intro { padding-block: clamp(1.25rem, 4vw, 2.4rem) 0; }
.portal-intro-card {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: clamp(1.5rem, 4vw, 2.6rem) clamp(1rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  text-align: center;
  background:
    linear-gradient(120deg, var(--intro-start), transparent 65%),
    var(--intro-end);
}
.portal-intro-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: .25rem;
  background: linear-gradient(90deg, #67934b, #56cbd4 49%, #d49a42);
}
.portal-intro-card .eyebrow { margin: 0; }
.portal-intro-card h1 { max-width: min(100%, 19ch); font-size: clamp(2rem, 5.4vw, 4.6rem); margin: .25em 0; hyphens: auto; overflow-wrap: anywhere; }
.portal-intro-card .lead { max-width: 35rem; margin-bottom: 1.2rem; color: var(--muted); }
.portal-intro-card .actions { justify-content: center; gap: .65rem; }
.portal-outline { border-color: var(--line); background: var(--surface); color: var(--ink); }
.portal-directory { padding-top: clamp(2rem, 4vw, 2.75rem); }
.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.portal-projects .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.directory-card {
  display: flex;
  flex-direction: column;
  padding: clamp(.75rem, 2vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.directory-card:hover { border-color: var(--accent); }
.directory-card h3 { margin: 0 0 .28rem; color: var(--accent); text-decoration: underline; text-underline-offset: .22em; }
.directory-card p { margin: 0; color: var(--muted); }
.directory-featured { box-shadow: inset 0 3px 0 var(--accent); }

.support {
  --paper: #f4f7fa;
  --surface: #fff;
  --ink: #192634;
  --muted: #476072;
  --accent: #285578;
  --line: #cdd8e1;
  --dark: #202f3c;
  --wash: #e8eff5;
  --topic-marker: #65839b;
}

html:not([data-theme="light"]) .support {
  --paper: #151c23;
  --surface: #1c2630;
  --ink: #edf3f8;
  --muted: #b9c8d5;
  --accent: #a3c6e3;
  --line: #3d5061;
  --dark: #101921;
  --wash: #253345;
  --button-ink: #162635;
  --topic-marker: #6d90ac;
}

.support .shell { max-width: 63rem; }
.support .top { border-top: .125rem solid var(--topic-marker); }
.support-guide { padding-block-start: clamp(2.5rem, 6vw, 4.25rem); }
.support-masthead { padding-block-end: clamp(2rem, 4vw, 2.9rem); }
.support-masthead h1 { max-width: 20ch; margin: .1em 0 .3em; font-size: clamp(2.65rem, 6vw, 5.25rem); }
.support-masthead .lead { color: var(--muted); }
.support-contact-link { font-weight: 700; }
.support-offers { padding: clamp(1.2rem, 3.5vw, 2.7rem); background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; }
.support-offers h2 { font-size: clamp(1.85rem, 4vw, 2.8rem); }
.offer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem 1.25rem; padding: 1rem .75rem 1rem 1rem; border-top: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--topic-marker); }
.offer-row:last-child { border-bottom: 1px solid var(--line); }
.offer-row h3, .offer-row p { margin: 0; }
.offer-row h3 a { color: var(--ink); }
.offer-row p { color: var(--muted); }
.offer-row .button { padding: .43rem .78rem; }
.support-offers .partner-note { margin: 1rem 0 0; }
.support .partner-panel { border-left: .25rem solid var(--accent); }

.traffic {
  --paper: #eef3f6;
  --surface: #fff;
  --ink: #122437;
  --muted: #40566b;
  --accent: #814409;
  --line: #bfcdda;
  --dark: #132a41;
  --wash: #e0eaf0;
  --grid-line: rgb(62 99 129 / 15%);
}

html:not([data-theme="light"]) .traffic {
  --paper: #0d1621;
  --surface: #132131;
  --ink: #edf5fa;
  --muted: #b6cadd;
  --accent: #ffc477;
  --line: #38516b;
  --dark: #101e2f;
  --wash: #152639;
  --button-ink: #292117;
  --grid-line: rgb(130 171 212 / 13%);
}

.traffic .top { border-bottom: .18rem solid var(--accent); }
.traffic-intro { text-align: center; padding-block: clamp(2rem, 5vw, 4.2rem) clamp(1.3rem, 4vw, 2.75rem); }
.traffic-intro h1 { margin: .1em 0 .17em; font-family: "Cascadia Mono", Consolas, monospace; letter-spacing: -.075em; font-size: clamp(2.7rem, 8vw, 6.25rem); }
.traffic-intro .lead { margin-inline: auto; color: var(--muted); }
.traffic-product {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(1.2rem, 4vw, 3.5rem);
  padding: clamp(.85rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: .6rem;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 1.6rem 1.6rem,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 1.6rem 1.6rem,
    var(--wash);
}
.traffic-photo { margin: 0 auto; width: min(100%, 26rem); }
.traffic-photo img { width: 100%; height: auto; }
.traffic-photo figcaption { color: var(--muted); text-align: center; }
.traffic-spec-sheet { padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-top: .2rem solid var(--accent); border-radius: .4rem; background: var(--surface); }
.traffic-spec-sheet h2 { font-size: clamp(1.65rem, 3.7vw, 2.5rem); }
.traffic .specs { margin-block: 1rem; }
.traffic .specs dt { color: var(--muted); }
.traffic .specs dd { font-weight: 650; }

@media (max-width: 55rem) {
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 43rem) {
  .traffic-product { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 34rem) {
  .directory-grid { gap: .5rem; }
  .directory-card { padding: .7rem; overflow-wrap: anywhere; }
  .directory-card h3 { font-size: 1rem; }
  .directory-card p { font-size: .925rem; line-height: 1.4; }
  .portal .contact-band > * { min-width: 0; overflow-wrap: anywhere; }
}
