/* ==========================================================================
   diagdebug-base.v3.css
   Canonical network stylesheet for the DiagDebug community network.
   v3 is the light theme with the practitioner, terminal-adjacent texture:
   JetBrains Mono accents, soft shadows on white cards, icon chips, and a
   richer component set (status pill, numbered rules, do/not ledger, agenda).
   v1 (dark) and v2 (flat light) remain frozen; sites opt in to v3 by changing
   one <link> line, so no cached visitor is stranded.
   Changes ship as v4. Self-contained and page-agnostic; page styling goes in
   site.css. No em dashes anywhere in this file.
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------- */

:root {
  color-scheme: light;

  --dd-red: #CC0000;
  --dd-red-hover: #A30000;
  --dd-red-tint: #FDF2F2;
  --dd-red-glow: rgba(204, 0, 0, 0.12);

  --dd-green: #1F7A4C;
  --dd-green-tint: #F1F8F4;

  --dd-bg: #FFFFFF;
  --dd-bg-soft: #F7F8FA;
  --dd-bg-inset: #F1F3F6;
  --dd-surface: #FFFFFF;
  --dd-border: #E2E5EA;
  --dd-border-soft: #EDEFF3;

  --dd-text: #0F1419;
  --dd-text-body: #4A5563;
  --dd-muted: #7C8794;

  --dd-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --dd-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --dd-radius: 8px;
  --dd-radius-sm: 5px;
  --dd-maxwidth: 1080px;

  --dd-shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.04), 0 1px 3px rgba(15, 20, 25, 0.06);
  --dd-shadow-md: 0 4px 12px rgba(15, 20, 25, 0.06), 0 2px 4px rgba(15, 20, 25, 0.04);
  --dd-shadow-lg: 0 12px 32px rgba(15, 20, 25, 0.08), 0 2px 6px rgba(15, 20, 25, 0.04);

  --dd-space-1: 4px;
  --dd-space-2: 8px;
  --dd-space-3: 12px;
  --dd-space-4: 16px;
  --dd-space-5: 24px;
  --dd-space-6: 32px;
  --dd-space-7: 48px;
  --dd-space-8: 64px;
}

/* --- Fonts ---------------------------------------------------------------- */
/* Self-hosted, subset to latin. Inter for text, JetBrains Mono for the
   terminal-adjacent accents (eyebrows, times, badges, tags). Files are dropped
   in manually under /assets/fonts/; until they exist the stacks fall back to
   system fonts. See /assets/fonts/README.md for the exact filenames. */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/inter-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/inter-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/inter-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/inter-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-500.woff2") format("woff2");
}

/* --- Reset and base ------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--dd-font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--dd-text);
  background: var(--dd-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 var(--dd-space-4);
  color: var(--dd-text);
}

h1 { font-size: clamp(42px, 6.4vw, 68px); letter-spacing: -0.035em; line-height: 1.06; }
h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 var(--dd-space-4); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--dd-red-hover); }

::selection { background: var(--dd-red); color: #fff; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--dd-red);
  outline-offset: 3px;
  border-radius: 2px;
}

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

code, pre { font-family: var(--dd-mono); }

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

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

.dd-container {
  width: 100%;
  max-width: var(--dd-maxwidth);
  margin-inline: auto;
  padding-inline: 28px;
}

.dd-section { padding-block: var(--dd-space-8); border-top: 1px solid var(--dd-border-soft); }
.dd-section--tight { padding-block: var(--dd-space-6); }
.dd-section--alt { background: var(--dd-bg-soft); border-top: 1px solid var(--dd-border); }

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

.dd-skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--dd-red); color: #fff;
  padding: var(--dd-space-2) var(--dd-space-4); z-index: 100;
  border-radius: 0 0 var(--dd-radius) 0;
}
.dd-skip-link:focus { left: 0; color: #fff; }

/* --- Eyebrow (mono, red dash) --------------------------------------------- */

.dd-eyebrow {
  font-family: var(--dd-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dd-red);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dd-eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--dd-red);
  flex: none;
}

.dd-lead {
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.55;
  color: var(--dd-text-body);
  max-width: 58ch;
}
.dd-lead strong { color: var(--dd-text); font-weight: 600; }

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

.dd-mono { font-family: var(--dd-mono); }

/* --- Nav bar -------------------------------------------------------------- */

.dd-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid var(--dd-border);
}

.dd-nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 68px;
}

.dd-nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  color: var(--dd-text); white-space: nowrap;
}
.dd-nav__brand:hover { color: var(--dd-text); }
.dd-nav__brand-diag { color: var(--dd-text); }
.dd-nav__brand-debug { color: var(--dd-red); }

/* Optional red glyph mark before the wordmark. */
.dd-glyph {
  width: 26px; height: 26px; border-radius: var(--dd-radius-sm);
  background: var(--dd-red); color: #fff;
  font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}

.dd-nav__links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
  font-size: 14.5px; font-weight: 500;
}
.dd-nav__links a { color: var(--dd-text-body); }
.dd-nav__links a:hover,
.dd-nav__links a[aria-current="page"] { color: var(--dd-red); }

@media (max-width: 860px) {
  .dd-nav__inner { flex-wrap: wrap; height: auto; padding-block: var(--dd-space-3); }
  .dd-nav__links { gap: var(--dd-space-4); flex-wrap: wrap; }
}

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

.dd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 600; font-size: 15.5px; line-height: 1;
  padding: 14px 28px; border-radius: var(--dd-radius-sm);
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.dd-btn:active { transform: translateY(1px); }

.dd-btn__arrow { transition: transform 0.15s ease; }
.dd-btn:hover .dd-btn__arrow { transform: translateX(3px); }

.dd-btn--primary {
  background: var(--dd-red); color: #fff; border-color: var(--dd-red);
  box-shadow: var(--dd-shadow-md);
}
.dd-btn--primary:hover {
  background: var(--dd-red-hover); border-color: var(--dd-red-hover);
  color: #fff; box-shadow: var(--dd-shadow-lg);
}

.dd-btn--secondary {
  background: #fff; color: var(--dd-text); border-color: var(--dd-border);
  box-shadow: var(--dd-shadow-sm);
}
.dd-btn--secondary:hover {
  color: var(--dd-red); border-color: var(--dd-red); box-shadow: var(--dd-shadow-md);
}

.dd-btn--block { width: 100%; }

/* --- Cards (generic) ------------------------------------------------------ */

.dd-card {
  background: #fff; border: 1px solid var(--dd-border); border-radius: var(--dd-radius);
  padding: 30px 28px; box-shadow: var(--dd-shadow-sm);
}

.dd-card--hover {
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.dd-card--hover:hover {
  box-shadow: var(--dd-shadow-lg); transform: translateY(-2px); border-color: #D5D9E0;
}

.dd-grid { display: grid; gap: 22px; }
.dd-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.dd-grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* --- Icon chip ------------------------------------------------------------ */

.dd-icon {
  width: 40px; height: 40px; border-radius: var(--dd-radius);
  background: var(--dd-red-tint); border: 1px solid rgba(204, 0, 0, 0.14);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; flex: none;
}
.dd-icon svg { width: 19px; height: 19px; stroke: var(--dd-red); fill: none; }
.dd-icon--sm { width: 36px; height: 36px; margin-bottom: 0; }
.dd-icon--sm svg { width: 17px; height: 17px; }

/* --- Status pill (with pulsing dot) --------------------------------------- */

.dd-status {
  display: inline-flex; align-items: stretch; overflow: hidden;
  font-family: var(--dd-mono); background: #fff;
  border: 1px solid rgba(204, 0, 0, 0.25); box-shadow: var(--dd-shadow-md);
  border-radius: 999px; margin-bottom: 30px; max-width: 100%;
}
.dd-status__flag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--dd-red); color: #fff;
  font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 9px 16px 9px 14px; flex: none;
}
.dd-status__when {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--dd-text);
  padding: 9px 20px 9px 16px;
}
.dd-status__when .dd-status__sep { color: #D2D7DE; font-weight: 400; }
.dd-status__dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fff; flex: none;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: dd-pulse 2.4s ease-out infinite;
}
@keyframes dd-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
@media (max-width: 560px) {
  .dd-status { flex-direction: column; border-radius: 12px; }
  .dd-status__flag { justify-content: center; }
}

/* --- Chapter card --------------------------------------------------------- */

.dd-chapter-card {
  background: #fff; border: 1px solid var(--dd-border); border-radius: var(--dd-radius);
  padding: 28px 26px; box-shadow: var(--dd-shadow-sm);
  display: flex; flex-direction: column; gap: var(--dd-space-3);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.dd-chapter-card:hover {
  box-shadow: var(--dd-shadow-lg); transform: translateY(-2px); border-color: #D5D9E0;
}
.dd-chapter-card__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--dd-space-3);
}
.dd-chapter-card__name { font-size: 18.5px; font-weight: 600; margin: 0; letter-spacing: -0.012em; }
.dd-chapter-card__region { color: var(--dd-muted); font-size: 14px; margin: 2px 0 0; }
.dd-chapter-card__meta { margin: 0; font-size: 14.5px; color: var(--dd-text-body); }
.dd-chapter-card__meta strong { color: var(--dd-text); font-weight: 600; }
.dd-chapter-card__links {
  display: flex; flex-wrap: wrap; gap: var(--dd-space-4);
  margin-top: auto; padding-top: var(--dd-space-2);
}
.dd-chapter-card__links a {
  color: var(--dd-red); font-weight: 500; font-size: 14.5px;
  border-bottom: 1px solid rgba(204, 0, 0, 0.3);
}
.dd-chapter-card__links a:hover { border-bottom-color: var(--dd-red); }
.dd-chapter-card__flagship {
  display: inline-block; font-family: var(--dd-mono);
  font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--dd-red-hover);
}

/* --- Event card ----------------------------------------------------------- */

.dd-event-card {
  background: #fff; border: 1px solid var(--dd-border); border-radius: var(--dd-radius);
  padding: 28px 26px; box-shadow: var(--dd-shadow-sm);
  display: flex; flex-direction: column; gap: var(--dd-space-3);
}
.dd-event-card__date {
  font-family: var(--dd-mono); font-size: 11px; font-weight: 500;
  color: var(--dd-red-hover); text-transform: uppercase; letter-spacing: 0.12em;
}
.dd-event-card__title { font-size: 1.15rem; font-weight: 600; margin: 0; letter-spacing: -0.012em; }
.dd-event-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--dd-space-3);
  margin-top: auto;
}

/* --- Badges (mono) -------------------------------------------------------- */

.dd-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--dd-mono);
  font-size: 10.5px; font-weight: 500; line-height: 1;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 4px; border: 1px solid var(--dd-border);
  white-space: nowrap;
}
.dd-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.dd-badge--forming { color: #8A5A00; border-color: rgba(180, 130, 20, 0.4); background: rgba(242, 201, 76, 0.16); }
.dd-badge--probationary,
.dd-badge--virtual { color: #0B6699; border-color: rgba(11, 102, 153, 0.35); background: rgba(56, 158, 224, 0.1); }
.dd-badge--active,
.dd-badge--in-person { color: var(--dd-green); border-color: rgba(31, 122, 76, 0.35); background: var(--dd-green-tint); }
.dd-badge--inactive { color: var(--dd-muted); border-color: var(--dd-border); background: var(--dd-bg-inset); }
.dd-badge--archived { color: var(--dd-muted); border-color: var(--dd-border); background: transparent; opacity: 0.75; }

/* --- Trust rules callout -------------------------------------------------- */

.dd-trust {
  background: #fff; border: 1px solid var(--dd-border); border-left: 3px solid var(--dd-red);
  border-radius: var(--dd-radius); padding: 28px 32px; box-shadow: var(--dd-shadow-sm);
}
.dd-trust__title { margin-top: 0; font-size: 1.2rem; }
.dd-trust__list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--dd-space-3); }
.dd-trust__list li { position: relative; padding-left: var(--dd-space-5); color: var(--dd-text-body); }
.dd-trust__list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--dd-red);
}

/* --- Numbered rule (governance / how meetings work) ----------------------- */

.dd-rule { display: flex; gap: 26px; padding: 34px 0; border-bottom: 1px solid var(--dd-border-soft); }
.dd-rule:last-of-type { border-bottom: 0; }
.dd-rule__num {
  flex: none; width: 44px; height: 44px; border-radius: 10px;
  background: var(--dd-red-tint); border: 1px solid rgba(204, 0, 0, 0.16);
  color: var(--dd-red); font-family: var(--dd-mono); font-size: 15px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.dd-rule__body { flex: 1; min-width: 0; }
.dd-rule__body h3 { font-size: 21px; margin: 6px 0 10px; letter-spacing: -0.018em; }
.dd-rule__body p { margin: 0 0 14px; color: var(--dd-text-body); }
.dd-rule__body p:last-child { margin-bottom: 0; }
.dd-rule__body strong { color: var(--dd-text); font-weight: 600; }
@media (max-width: 640px) { .dd-rule { flex-direction: column; gap: 14px; padding: 28px 0; } }

.dd-pull {
  margin: 16px 0 0; padding: 16px 20px;
  background: var(--dd-bg-inset); border-left: 2px solid var(--dd-red);
  border-radius: 0 6px 6px 0; font-size: 15px; line-height: 1.6;
}
.dd-pull__lbl {
  font-family: var(--dd-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dd-red); display: block; margin-bottom: 5px;
}

/* --- Do / not ledger ------------------------------------------------------ */

.dd-ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .dd-ledger { grid-template-columns: 1fr; } }
.dd-ledger__col {
  background: #fff; border: 1px solid var(--dd-border); border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow-sm); padding: 26px 24px;
}
.dd-ledger__col--yes { border-top: 3px solid var(--dd-green); }
.dd-ledger__col--no  { border-top: 3px solid var(--dd-red); }
.dd-ledger__col h3 {
  font-size: 16px; margin: 0 0 16px; display: flex; align-items: center; gap: 9px;
}
.dd-ledger__col--yes h3 { color: var(--dd-green); }
.dd-ledger__col--no  h3 { color: var(--dd-red); }
.dd-ledger__col ul { list-style: none; margin: 0; padding: 0; }
.dd-ledger__col li {
  position: relative; padding-left: 20px; margin-bottom: 11px;
  font-size: 15px; line-height: 1.55; color: var(--dd-text-body);
}
.dd-ledger__col li:last-child { margin-bottom: 0; }
.dd-ledger__col li::before { position: absolute; left: 0; top: 0; font-family: var(--dd-mono); font-size: 13px; }
.dd-ledger__col--yes li::before { content: "+"; color: var(--dd-green); }
.dd-ledger__col--no  li::before { content: "\2212"; color: var(--dd-red); }

/* --- Agenda timeline ------------------------------------------------------ */

.dd-agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dd-agenda li {
  display: flex; gap: 20px; align-items: baseline;
  padding: 15px 20px; background: #fff; border: 1px solid var(--dd-border);
  border-radius: var(--dd-radius); box-shadow: var(--dd-shadow-sm);
}
.dd-agenda__t { font-family: var(--dd-mono); font-size: 13px; font-weight: 500; color: var(--dd-red); flex: none; width: 84px; }
.dd-agenda__a strong { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.dd-agenda__a span { font-size: 14.5px; color: var(--dd-text-body); line-height: 1.55; }

/* --- Who it's for (persona checklist) ------------------------------------- */

.dd-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start; }
@media (max-width: 900px) { .dd-split { grid-template-columns: 1fr; gap: 34px; } }

.dd-who { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dd-who li {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--dd-border); border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow-sm); padding: 18px 20px;
}
.dd-who__check {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--dd-red-tint); border: 1px solid rgba(204, 0, 0, 0.18);
  display: flex; align-items: center; justify-content: center; margin-top: 3px;
}
.dd-who__check svg { width: 11px; height: 11px; stroke: var(--dd-red); fill: none; }
.dd-who strong { font-weight: 600; font-size: 16px; display: block; line-height: 1.4; }
.dd-who__desc { color: var(--dd-text-body); font-size: 14.5px; line-height: 1.55; }

/* --- Disclosure banner ---------------------------------------------------- */

.dd-disclosure {
  border: 1px dashed #CFD5DD; border-radius: var(--dd-radius);
  padding: var(--dd-space-4) var(--dd-space-5);
  color: var(--dd-text-body); font-size: 14.5px; line-height: 1.6;
  background: var(--dd-bg-inset);
}
.dd-disclosure strong { color: var(--dd-text); }

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

.dd-band {
  background: var(--dd-bg-soft); border-top: 1px solid var(--dd-border);
  padding: 72px 0; text-align: center;
}
.dd-band h2 { margin-bottom: 14px; }
.dd-band p { color: var(--dd-text-body); font-size: 16.5px; max-width: 52ch; margin: 0 auto 28px; }

/* --- Network footer ------------------------------------------------------- */

.dd-footer { border-top: 1px solid var(--dd-border); background: var(--dd-bg-soft); }
.dd-footer__inner { display: grid; gap: var(--dd-space-5); padding-block: 46px 56px; }
.dd-footer__top {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: var(--dd-space-5); padding-bottom: 26px; border-bottom: 1px solid var(--dd-border);
}
.dd-footer__brand { font-weight: 700; font-size: 16px; }
.dd-footer__brand .dd-nav__brand-debug { color: var(--dd-red); }
.dd-footer__tagline { color: var(--dd-muted); margin: var(--dd-space-2) 0 0; max-width: 40ch; font-size: 14.5px; }
.dd-footer__links { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 14.5px; font-weight: 500; }
.dd-footer__links a { color: var(--dd-text-body); }
.dd-footer__links a:hover { color: var(--dd-red); }
.dd-footer__disclosure { color: var(--dd-muted); font-size: 13px; line-height: 1.6; max-width: 90ch; }

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

.dd-form { display: grid; gap: var(--dd-space-5); }
.dd-field { display: grid; gap: var(--dd-space-2); }
.dd-field__label { font-weight: 600; font-size: 14.5px; }
.dd-field__req { color: var(--dd-red); font-weight: 700; }
.dd-field__hint { color: var(--dd-muted); font-size: 13px; }

.dd-input, .dd-select, .dd-textarea {
  font-family: inherit; font-size: 16px; color: var(--dd-text);
  background: #fff; border: 1px solid var(--dd-border); border-radius: var(--dd-radius-sm);
  padding: var(--dd-space-3) var(--dd-space-4); width: 100%; box-shadow: var(--dd-shadow-sm);
}
.dd-input:focus, .dd-select:focus, .dd-textarea:focus { border-color: var(--dd-red); outline: none; }
.dd-textarea { min-height: 110px; resize: vertical; }

.dd-checkbox { display: flex; align-items: flex-start; gap: var(--dd-space-3); }
.dd-checkbox input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--dd-red); flex: 0 0 auto; }

.dd-fieldset { border: 1px solid var(--dd-border); border-radius: var(--dd-radius); padding: var(--dd-space-5); margin: 0; box-shadow: var(--dd-shadow-sm); }
.dd-fieldset legend {
  font-family: var(--dd-mono); font-weight: 500; padding-inline: var(--dd-space-2);
  color: var(--dd-red); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
}
.dd-field-grid { display: grid; gap: var(--dd-space-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* --- Inline notices ------------------------------------------------------- */

.dd-notice {
  border: 1px solid var(--dd-border); border-left: 3px solid var(--dd-red);
  border-radius: var(--dd-radius); padding: var(--dd-space-4) var(--dd-space-5);
  background: #fff; color: var(--dd-text-body); box-shadow: var(--dd-shadow-sm);
}
.dd-notice a { color: var(--dd-red); font-weight: 600; }
.dd-notice a:hover { text-decoration: underline; }

/* --- Legend --------------------------------------------------------------- */

.dd-legend { display: flex; flex-wrap: wrap; gap: var(--dd-space-4); align-items: center; }
.dd-legend__item { display: inline-flex; align-items: center; gap: var(--dd-space-2); font-size: 14px; color: var(--dd-text-body); }

/* --- Inline link ---------------------------------------------------------- */

.dd-inline-link {
  color: var(--dd-red); font-weight: 500;
  border-bottom: 1px solid rgba(204, 0, 0, 0.3);
}
.dd-inline-link:hover { border-bottom-color: var(--dd-red); color: var(--dd-red); }

/* --- Component reference (resources/components.html) ---------------------- */

.dd-component-demo {
  display: grid; gap: var(--dd-space-4); padding: var(--dd-space-5);
  border: 1px solid var(--dd-border); border-radius: var(--dd-radius); background: var(--dd-bg-soft);
}
.dd-code {
  background: #0F1419; border: 1px solid var(--dd-border); border-radius: var(--dd-radius);
  padding: var(--dd-space-4); overflow-x: auto; font-size: 13px; line-height: 1.6;
  color: #E6EDF3; margin: 0;
}
