/* Real World Needs — shared public shell for directory, service, source and policy pages. */

:root {
  --page-blue: #07538d;
  --page-blue-dark: #073a63;
  --page-blue-deep: #061b2a;
  --page-green: #218a3d;
  --page-green-dark: #17692d;
  --page-green-soft: #edf7ef;
  --page-ink: #14262e;
  --page-ink-strong: #081a22;
  --page-muted: #5f7077;
  --page-muted-light: #76858a;
  --page-line: #d8e0dd;
  --page-line-strong: #c5d0cc;
  --page-paper: #f6f8f7;
  --page-white: #ffffff;
  --page-max: 1120px;
  --page-wide: 1480px;
}

html { background: var(--page-white); scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--page-white);
  color: var(--page-ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(a,button,input,select,summary,[tabindex]):focus-visible {
  outline: 3px solid rgba(7,83,141,.27);
  outline-offset: 3px;
}

/* Shared identity and navigation */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: .7rem max(1rem, calc((100vw - var(--page-wide)) / 2));
  border-bottom: 1px solid var(--page-line);
  background: rgba(255,255,255,.98);
  box-shadow: 0 1px 0 rgba(8,26,34,.02);
}
.legal-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: .7rem;
  color: inherit;
  text-decoration: none;
}
.legal-brand__mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 0;
  background: transparent url("/brand/rwn-logo-192.png") center / contain no-repeat !important;
  color: transparent;
  font-size: 0;
  box-shadow: none;
  object-fit: contain;
}
img.legal-brand__mark { background: transparent !important; object-fit: contain; }
.legal-brand > span:last-child { display: grid; gap: .08rem; }
.legal-brand strong { display:block; color:var(--page-ink-strong); font-size:.94rem; font-weight:760; line-height:1.14; letter-spacing:-.022em; }
.legal-brand small { display:block; margin:0; color:var(--page-muted); font-size:.64rem; font-weight:560; line-height:1.2; }
.legal-brand strong::after,
.legal-brand small::after { content:none; }

.legal-header nav { display:flex; align-items:center; gap:clamp(.9rem,1.8vw,1.75rem); font-size:.76rem; font-weight:650; }
.legal-header nav a { color:#405158; text-decoration:none; }
.legal-header nav a::after { display:none; }
.legal-header nav a:hover,
.legal-header nav a:focus-visible,
.legal-header nav a[aria-current="page"] { color:var(--page-blue); }

/* Page introduction: concise, not a marketing hero. */
.legal-hero,
#directory > .legal-hero,
#service > .legal-hero {
  padding: clamp(2.5rem,4.5vw,4.2rem) max(1rem, calc((100vw - var(--page-max)) / 2)) clamp(2.15rem,3.8vw,3.4rem);
  border-bottom: 1px solid var(--page-line);
  background: linear-gradient(180deg,#fff 0%,#fafbfb 100%);
  color:var(--page-ink);
}
.legal-hero__inner,
#directory > .legal-hero .legal-hero__inner,
#service > .legal-hero .legal-hero__inner { width:100%; max-width:var(--page-max); margin:0 auto; }
.eyebrow { margin:0; color:var(--page-green-dark); font-size:.67rem; font-weight:720; letter-spacing:.005em; text-transform:none; }
.legal-hero h1,
#directory > .legal-hero h1,
#service > .legal-hero h1 {
  max-width: 22ch;
  margin: .48rem 0 0;
  color: var(--page-ink-strong);
  font-size: clamp(2.35rem,4.3vw,3.8rem);
  font-weight: 660;
  line-height: 1.01;
  letter-spacing: -.048em;
}
#directory > .legal-hero h1 { max-width:18ch; }
#service > .legal-hero h1 { max-width:24ch; font-size:clamp(2.2rem,4vw,3.55rem); }
.legal-hero__lede,
#directory > .legal-hero .legal-hero__lede,
#service > .legal-hero .legal-hero__lede { max-width:48rem; margin:.8rem 0 0; color:var(--page-muted); font-size:clamp(.94rem,1.2vw,1.04rem); line-height:1.62; }
.legal-meta,
#directory > .legal-hero .legal-meta,
#service > .legal-hero .legal-meta { display:flex; flex-wrap:wrap; gap:.35rem 1rem; margin-top:.95rem; color:#77868b; font-size:.66rem; }
.legal-meta span::before { width:.28rem; height:.28rem; background:#6ca681; }

/* Policy / transparency reading layout */
.legal-layout {
  display:grid;
  grid-template-columns:minmax(10.5rem,.25fr) minmax(0,1fr);
  gap:clamp(2.4rem,5vw,5rem);
  width:min(calc(100% - 2rem),var(--page-max));
  margin:0 auto;
  padding:clamp(2.8rem,5vw,4.8rem) 0 clamp(4rem,7vw,6.5rem);
}
.legal-toc { position:sticky; top:6rem; align-self:start; padding:.15rem 0; }
.legal-toc strong { display:block; margin-bottom:.6rem; color:var(--page-ink-strong); font-size:.65rem; font-weight:720; text-transform:none; }
.legal-toc a { display:block; padding:.38rem 0; color:#697a80; font-size:.77rem; line-height:1.35; text-decoration:none; }
.legal-toc a:hover,
.legal-toc a:focus-visible { color:var(--page-blue); }
.legal-content { min-width:0; max-width:50rem; }
.legal-content section { scroll-margin-top:6rem; }
.legal-content section + section { margin-top:3rem; padding-top:3rem; border-top:1px solid var(--page-line); }
.legal-content h2 { margin:0 0 1rem; color:var(--page-ink-strong); font-size:clamp(1.55rem,2.7vw,2.12rem); font-weight:670; line-height:1.16; letter-spacing:-.032em; }
.legal-content h3 { color:var(--page-ink-strong); font-size:1rem; font-weight:700; }
.legal-content p,
.legal-content li { color:#344a52; }
.legal-content a { color:var(--page-blue); text-underline-offset:3px; }
.legal-content code { border-radius:4px; background:#eef2f0; color:#304850; }
.policy-note { margin:0 0 1.8rem; padding:1rem 1.1rem; border:1px solid #cfe0d7; border-left:3px solid var(--page-green); border-radius:0 7px 7px 0; background:#f4f9f6; }
.policy-note p { margin:0; }
.warning-note { border-color:#e8d5ae; border-left-color:#b97817; background:#fff9ee; }
.legal-table { overflow:hidden; border:1px solid var(--page-line); border-radius:7px; box-shadow:none; }
.legal-table th { background:var(--page-paper); color:var(--page-ink-strong); font-size:.68rem; }
.legal-table td { border-color:var(--page-line); color:#40545b; font-size:.78rem; }
.transparency-metrics { border:1px solid var(--page-line); border-radius:8px; background:#fff; box-shadow:none; }
.transparency-metrics strong { color:var(--page-blue); font-size:1.6rem; }

/* Shared action style */
.open-data-actions a,
.directory-downloads a,
.directory-links a {
  display:inline-flex;
  min-height:42px;
  align-items:center;
  justify-content:center;
  padding:.52rem .72rem;
  border:1px solid var(--page-line-strong);
  border-radius:7px;
  background:#fff;
  color:var(--page-blue-dark);
  font-size:.71rem;
  font-weight:690;
  line-height:1.2;
  text-decoration:none;
  box-shadow:none;
  transform:none;
}
.open-data-actions a:hover,
.directory-downloads a:hover,
.directory-links a:hover { border-color:#92ad9f; background:var(--page-green-soft); color:var(--page-green-dark); transform:none; }
.open-data-actions a:first-child { border-color:var(--page-blue); background:var(--page-blue); color:#fff; }

/* Directory */
.directory-shell { width:min(calc(100% - 2rem),var(--page-max)); margin:0 auto; padding:clamp(1.8rem,3.5vw,3.2rem) 0 clamp(4rem,6vw,6rem); }
.directory-shell > .directory-downloads[aria-label="Breadcrumb"] { gap:.4rem .7rem; margin-bottom:1rem; padding:0 0 .8rem; border-bottom:1px solid var(--page-line); }
.directory-shell > .directory-downloads[aria-label="Breadcrumb"] a,
.directory-shell > .directory-downloads[aria-label="Breadcrumb"] span { min-height:auto; padding:0; border:0; background:transparent; color:#6d7d82; font-size:.7rem; font-weight:620; }
.directory-shell > .directory-downloads[aria-label="Breadcrumb"] a:hover { background:transparent; color:var(--page-blue); }

.directory-search-tools { margin:0 0 1.35rem; padding:.9rem; border:1px solid var(--page-line); border-radius:9px; background:var(--page-paper); box-shadow:none; }
.directory-search-tools__top { gap:.55rem; }
.directory-search-field { min-height:54px; border:1px solid #c4d0cc; border-radius:7px; background:#fff; box-shadow:none; }
.directory-search-field:focus-within { border-color:#769b89; box-shadow:0 0 0 4px rgba(33,138,61,.08); }
.directory-search-field > span { color:var(--page-blue); }
.directory-search-field input { color:var(--page-ink-strong); font-size:.9rem; }
.directory-search-tools__clear { min-height:54px; border:1px solid #c4d0cc; border-radius:7px; background:#fff; color:var(--page-blue); font-size:.72rem; font-weight:700; }
.directory-search-tools__meta { color:#728187; font-size:.65rem; }
.directory-category-chips { display:flex; flex-wrap:wrap; gap:.28rem .3rem; }
.directory-category-chips button { min-height:40px; padding:.45rem .55rem; border:1px solid transparent; border-radius:5px; background:transparent; color:#5f7076; font-size:.69rem; font-weight:670; }
.directory-category-chips button:hover,
.directory-category-chips button:focus-visible { border-color:#d5ddda; background:#fff; color:var(--page-blue); }
.directory-category-chips button[aria-pressed="true"] { border-color:#9dbaa9; background:var(--page-green-soft); color:var(--page-green-dark); }

.directory-downloads { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; margin-bottom:1.25rem; }
.directory-downloads > strong { margin-right:.2rem; color:var(--page-ink-strong); font-size:.71rem; }
.directory-local-links { margin:0 0 1.35rem; padding:.85rem 0; border-top:1px solid var(--page-line); border-bottom:1px solid var(--page-line); background:transparent; }
.directory-local-links a { border:0; border-bottom:1px solid #e5eae8; border-radius:0; background:transparent; }
.directory-local-links a:hover { background:var(--page-paper); }

.directory-records { display:grid; gap:0; border-top:1px solid var(--page-line-strong); }
.directory-record { padding:clamp(1.2rem,2.2vw,1.65rem) 0; border:0; border-bottom:1px solid var(--page-line); border-radius:0; background:#fff; box-shadow:none; }
.directory-record > header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.directory-record header p { margin:0; color:var(--page-green-dark); font-size:.62rem; font-weight:720; letter-spacing:0; text-transform:none; }
.directory-record h2 { margin:.18rem 0 .12rem; color:var(--page-ink-strong); font-size:clamp(1.18rem,2.2vw,1.5rem); font-weight:670; line-height:1.18; letter-spacing:-.028em; }
.directory-record h2 a { color:inherit; text-decoration:none; }
.directory-record h2 a:hover { color:var(--page-blue); }
.directory-record header span,
.directory-record time { color:#738288; font-size:.65rem; }
.directory-record > p { max-width:52rem; color:#41565d; font-size:.82rem; line-height:1.6; }
.directory-aid { display:flex; flex-wrap:wrap; gap:.25rem .5rem; }
.directory-aid li { padding:0; border:0; border-radius:0; background:transparent; color:#50675f; font-size:.65rem; font-weight:670; }
.directory-aid li + li::before { margin-right:.5rem; color:#aab6b1; content:"·"; }
.directory-record dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:.9rem; border-top:1px solid var(--page-line); }
.directory-record dl div { padding:.72rem .8rem .72rem 0; border-bottom:1px solid var(--page-line); }
.directory-record dt { color:#748389; font-size:.63rem; font-weight:700; letter-spacing:0; text-transform:none; }
.directory-record dd { margin:.2rem 0 0; color:var(--page-ink); font-size:.78rem; }
.directory-record .directory-caution { padding:.72rem .8rem; border-left:2px solid #b97817; border-radius:0 6px 6px 0; background:#fff9ee; color:#604d2d; }
.directory-links { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.8rem; }

/* Individual service handoff */
#service .directory-shell { max-width:1000px; }
.service-next-steps { display:grid; grid-template-columns:minmax(11rem,.36fr) minmax(0,1fr); gap:1rem 1.5rem; align-items:start; margin:0 0 1.5rem; padding:1rem; border:1px solid #ccdcd4; border-radius:9px; background:#f6faf7; box-shadow:none; }
.service-next-steps > div:first-child > span { color:var(--page-green-dark); font-size:.62rem; font-weight:700; text-transform:none; }
.service-next-steps > div:first-child > strong { display:block; margin-top:.2rem; color:var(--page-ink-strong); font-size:.96rem; font-weight:700; }
.service-next-steps__context { display:block; max-width:27rem; margin-top:.38rem; color:#607177; font-size:.7rem; line-height:1.45; }
.service-next-steps > div:last-child { display:grid; grid-template-columns:repeat(auto-fit,minmax(9.5rem,1fr)); gap:.45rem; }
.service-next-steps a { display:grid; min-height:60px; align-content:center; padding:.62rem .68rem; border:1px solid #c5d1cd; border-radius:7px; background:#fff; color:var(--page-ink); text-decoration:none; }
.service-next-steps a:hover,
.service-next-steps a:focus-visible { border-color:#8eae9d; }
.service-next-steps a.is-primary { border-color:var(--page-blue); background:var(--page-blue); color:#fff; }
.service-next-steps a strong { font-size:.72rem; font-weight:720; }
.service-next-steps a span { margin-top:.1rem; color:#6f7f84; font-size:.62rem; }
.service-next-steps a.is-primary span { color:#dce9ef; }
.service-accessibility { margin:1.1rem 0; padding:.85rem .95rem; border:1px solid #d8e1dd; border-radius:7px; background:var(--page-paper); }
.service-accessibility strong { color:var(--page-ink-strong); font-size:.71rem; }
.service-accessibility p { margin:.3rem 0 0; color:#53676d; font-size:.78rem; }
.related-services { margin-top:2.7rem; padding-top:2rem; border-top:1px solid var(--page-line); }
.related-services__heading h2 { color:var(--page-ink-strong); font-size:1.35rem; font-weight:670; letter-spacing:-.024em; }

/* Footer */
.legal-footer { display:grid; grid-template-columns:minmax(14rem,1fr) auto; align-items:start; gap:2rem; padding:clamp(2.4rem,4vw,3.4rem) max(1rem,calc((100vw - var(--page-max))/2)); border-top:1px solid #173a49; background:var(--page-blue-deep); color:#aebfc3; }
.legal-footer > p { margin:0; color:#d5dfe0; font-size:.7rem; }
.legal-footer nav { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.5rem 1rem; }
.legal-footer a { color:#b8c8cb; font-size:.68rem; text-decoration:none; }
.legal-footer a:hover,
.legal-footer a:focus-visible { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.professional-need-links { grid-column:1/-1; display:flex; flex-wrap:wrap; justify-content:flex-start !important; gap:.45rem .9rem !important; padding-top:1rem; border-top:1px solid rgba(255,255,255,.1); }
.professional-need-links strong { width:100%; color:#eef3f2; font-size:.65rem; }
.professional-need-links a { color:#aebfc3; }

@media (max-width:900px) {
  .legal-header { gap:1rem; }
  .legal-header nav { max-width:65%; overflow:auto; white-space:nowrap; scrollbar-width:none; }
  .legal-header nav::-webkit-scrollbar { display:none; }
  .legal-layout { grid-template-columns:1fr; gap:1.5rem; }
  .legal-toc { position:static; display:flex; flex-wrap:wrap; gap:.25rem .8rem; padding:0 0 1rem; border-bottom:1px solid var(--page-line); }
  .legal-toc strong { width:100%; }
  .legal-toc a { padding:.25rem 0; }
}

@media (max-width:650px) {
  .legal-header { min-height:66px; padding:.55rem .8rem; }
  .legal-brand__mark { width:38px; height:38px; flex-basis:38px; }
  .legal-brand strong { font-size:.86rem; }
  .legal-brand small { font-size:.59rem; }
  .legal-header nav { max-width:48%; gap:.8rem; font-size:.69rem; }
  .legal-header nav a:not(.home-link):nth-of-type(n+3) { display:none; }

  .legal-hero,
  #directory > .legal-hero,
  #service > .legal-hero { padding:1.8rem .9rem 1.6rem; }
  .legal-hero h1,
  #directory > .legal-hero h1,
  #service > .legal-hero h1 { margin-top:.38rem; font-size:clamp(2rem,10vw,2.7rem); line-height:1.02; letter-spacing:-.043em; }
  .legal-hero__lede,
  #directory > .legal-hero .legal-hero__lede,
  #service > .legal-hero .legal-hero__lede { margin-top:.62rem; font-size:.91rem; line-height:1.53; }
  #directory > .legal-hero .legal-meta { display:none; }

  .directory-shell { width:calc(100% - 1.6rem); padding-top:1.15rem; }
  .directory-search-tools { margin-bottom:1rem; padding:.7rem; }
  .directory-search-tools__top { display:grid; grid-template-columns:1fr auto; }
  .directory-category-chips { margin-top:.45rem; }
  .directory-record > header { display:grid; }
  .directory-record dl { grid-template-columns:1fr; }
  .directory-record dl div { padding-right:0; }
  .directory-links a { flex:1 1 9rem; }

  .service-next-steps { grid-template-columns:1fr; padding:.85rem; }
  .service-next-steps > div:last-child { grid-template-columns:1fr 1fr; }

  .legal-layout { width:calc(100% - 1.6rem); padding:2.2rem 0 4rem; }
  .legal-content section + section { margin-top:2.4rem; padding-top:2.4rem; }
  .legal-content h2 { font-size:1.55rem; }
  .legal-table { display:block; overflow-x:auto; }

  .legal-footer { grid-template-columns:1fr; gap:1.2rem; padding:2.4rem 1rem; }
  .legal-footer nav { justify-content:flex-start; }
}

@media (max-width:430px) {
  .legal-header nav { max-width:42%; }
  .legal-brand small { display:none; }
  .service-next-steps > div:last-child { grid-template-columns:1fr; }
  .directory-downloads a { flex:1 1 auto; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition-duration:.001ms !important; animation-duration:.001ms !important; }
}

@media print {
  .legal-header,.legal-footer,.legal-toc,.directory-search-tools,.professional-need-links { display:none !important; }
  .legal-hero,#directory>.legal-hero,#service>.legal-hero { padding:0 0 1rem; }
  .directory-shell,.legal-layout { width:100%; padding:0; }
  .directory-record { break-inside:avoid; }
}

.directory-results-jump{display:flex;align-items:center;justify-content:space-between;gap:.8rem;margin:.85rem 0;padding:.72rem .82rem;border:1px solid #b8cbc2;border-left:3px solid #218a3d;border-radius:5px;background:#f8fbf9;color:#24434f;text-decoration:none}.directory-results-jump strong,.directory-results-jump small{display:block}.directory-results-jump strong{font-size:.76rem}.directory-results-jump small{margin-top:.12rem;color:#61757c;font-size:.65rem}.directory-results-jump>span:last-child{color:#17692d;font-size:1rem}.directory-results-jump:hover,.directory-results-jump:focus-visible{border-color:#218a3d;background:#f0f8f3}.directory-results-anchor{display:block;scroll-margin-top:1rem}
