/* Streets Research — shared styles for the library index and the papers.
 *
 * The landing page is deliberately a single file; these are not. Eight pages
 * that share one long article layout should share one cacheable stylesheet
 * rather than inline the same 400 lines eight times.
 *
 * The palette is index.html's, copied rather than imported so the two files
 * stay independently servable. The Word originals came in a teal that belongs
 * to no part of the brand — the ask on the Sept 10 sync was to bring the
 * papers onto the site's own colors, and this is where that happens.
 */

:root{
  color-scheme: light only;
  --map: #F7F9FB;
  --map-line: #DFE5EC;
  --grid: #EDF1F6;
  --grid-strong: #E2E9F1;
  --ink: #22303F;
  --ink-soft: #33465C;
  --paper-text: #2C3A49;
  --muted: #5B6B7C;
  --route: #1D6FE0;
  --route-hover: #1A5FC4;
  --go: #0C6B46;
  --go-tint: rgba(15,122,80,.12);
  --card: #FFFFFF;
  --soft: #EFF3F8;
  --band: #EAF1FB;
  --line-blue:   #1D6FE0;
  --line-green:  #00863C;
  --line-red:    #D2352C;
  --line-purple: #B933AD;
  --line-amber:  #FFC61E;
  --radius: 14px;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--map)}
body{
  font-family:'Public Sans',sans-serif;
  color:var(--paper-text);
  background-color:var(--map);
  background-image:
    linear-gradient(var(--grid-strong) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid-strong) 1.5px, transparent 1.5px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--map), var(--map));
  background-size: 288px 288px, 288px 288px, 72px 72px, 72px 72px, 100% 100%;
  line-height:1.55;
}
::selection{background:var(--route);color:#fff}
a{color:inherit}
img{max-width:100%}
[hidden]{display:none!important}
.wrap{max-width:1120px;margin:0 auto;padding:0 24px}
.mono{font-family:'IBM Plex Mono',monospace}

.skip{
  position:absolute;left:-9999px;top:0;z-index:100;
  background:var(--ink);color:#fff;padding:12px 18px;border-radius:0 0 10px 0;
  font-size:14px;font-weight:600;text-decoration:none;
}
.skip:focus{left:0}

/* ---------- chrome, matched to the landing page ---------- */
nav{
  position:sticky;top:0;z-index:50;
  background:rgba(247,249,251,.9);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--map-line);
}
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:64px}
.logo{
  font-family:'Archivo',sans-serif;font-weight:900;font-stretch:110%;font-size:22px;
  letter-spacing:-.02em;color:var(--ink);text-decoration:none;
  display:flex;align-items:center;gap:8px;
}
.nav-links{display:flex;gap:26px;align-items:center}
.nav-links a:not(.btn){text-decoration:none;font-size:14px;font-weight:500;color:var(--muted)}
.nav-links a:not(.btn):hover{color:var(--ink)}
.nav-links a[aria-current="page"]{color:var(--ink);font-weight:600}
.btn{
  display:inline-block;border:none;cursor:pointer;text-decoration:none;
  font-family:'Public Sans',sans-serif;font-weight:600;font-size:15px;
  padding:12px 22px;border-radius:999px;transition:transform .12s ease, background .12s ease;
}
.btn:focus-visible{outline:3px solid var(--route);outline-offset:2px}
.btn-dark{background:var(--ink);color:#fff}
.btn-dark:hover{background:var(--ink-soft);transform:translateY(-1px)}
.btn-ghost{background:transparent;color:var(--ink);border:1.5px solid var(--ink)}
.btn-ghost:hover{background:rgba(19,26,43,.06)}
.btn-go{background:var(--route);color:#fff}
.btn-go:hover{background:var(--route-hover);transform:translateY(-1px)}
.nav-cta{padding:9px 18px;font-size:14px}

.bullet{
  width:26px;height:26px;border-radius:50%;flex:none;
  display:inline-flex;align-items:center;justify-content:center;
  font-family:'Archivo',sans-serif;font-weight:900;font-size:14px;color:#fff;
}
.bullet-blue{background:var(--line-blue)}
.bullet-green{background:var(--line-green)}
.bullet-red{background:var(--line-red)}
.bullet-purple{background:var(--line-purple)}
.bullet-amber{background:var(--line-amber);color:var(--ink)}
.logo .bullet{width:28px;height:28px;font-size:16px}
.sec-eyebrow{
  display:inline-flex;align-items:center;gap:10px;
  background-image:linear-gradient(var(--ink), var(--ink));
  color:#fff;padding:7px 16px 7px 9px;border-radius:9px;
  font-family:'IBM Plex Mono',monospace;font-size:12px;letter-spacing:.12em;
  text-transform:uppercase;font-weight:500;margin-bottom:20px;
  box-shadow:0 6px 16px -10px rgba(19,26,43,.5);
}
.sec-eyebrow .bullet{box-shadow:0 0 0 2px #fff}

footer{border-top:1px solid var(--map-line);padding:38px 0;font-size:14px;color:var(--muted)}
.foot-inner{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;align-items:center}
.foot-line{font-family:'IBM Plex Mono',monospace;font-size:12.5px}
.crosswalk{
  height:14px;opacity:.18;
  background:repeating-linear-gradient(90deg, var(--ink) 0 28px, transparent 28px 60px);
}

/* ---------- the library index ---------- */
.lib{padding:72px 0 84px}
.lib h1{
  font-family:'Archivo',sans-serif;font-weight:900;font-stretch:105%;
  font-size:clamp(32px,4.2vw,48px);line-height:1.08;letter-spacing:-.025em;
  color:var(--ink);margin-bottom:18px;max-width:20ch;
}
.lede{font-size:17px;color:var(--muted);max-width:64ch;margin-bottom:14px}
.lede a{color:var(--route)}
.lede-by{font-size:15px;margin-bottom:40px}

.wp-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.wp{
  display:flex;flex-direction:column;
  background:var(--card);border:1px solid var(--map-line);border-radius:var(--radius);
  padding:26px 28px;box-shadow:0 10px 28px -20px rgba(19,26,43,.25);
}
.wp-meta{font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:12px}
.wp-title{
  font-family:'Archivo',sans-serif;font-weight:800;font-size:23px;line-height:1.16;
  letter-spacing:-.015em;color:var(--ink);margin-bottom:9px;
}
.wp-title a{text-decoration:none}
.wp-title a:hover{color:var(--route)}
.wp-dek{font-size:15px;color:var(--muted);margin-bottom:16px}
.wp-brief{
  background:var(--band);border-left:3px solid var(--route);border-radius:0 10px 10px 0;
  padding:14px 16px;margin-bottom:18px;
}
.wp-brief-label{
  display:block;font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--route);font-weight:500;margin-bottom:6px;
}
.wp-brief p{
  font-size:14px;color:var(--ink-soft);line-height:1.55;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden;
}
.wp-more{
  margin-top:auto;align-self:flex-start;
  font-family:'IBM Plex Mono',monospace;font-size:12.5px;letter-spacing:.04em;
  color:var(--route);font-weight:500;text-decoration:none;
}
.wp-more:hover{text-decoration:underline}

/* ---------- a paper ---------- */
.paper{padding:48px 0 20px}
.paper-wrap{max-width:760px}
.back{
  display:inline-block;margin-bottom:26px;text-decoration:none;
  font-family:'IBM Plex Mono',monospace;font-size:12.5px;letter-spacing:.06em;
  color:var(--muted);
}
.back:hover{color:var(--route)}
.paper h1{
  font-family:'Archivo',sans-serif;font-weight:900;font-stretch:104%;
  font-size:clamp(30px,4vw,43px);line-height:1.1;letter-spacing:-.025em;
  color:var(--ink);margin-bottom:14px;
}
.dek{font-size:18.5px;line-height:1.5;color:var(--muted);margin-bottom:22px}
.byline{
  display:flex;justify-content:space-between;align-items:baseline;gap:16px;flex-wrap:wrap;
  padding:14px 0;border-top:1px solid var(--map-line);border-bottom:1px solid var(--map-line);
  margin-bottom:32px;
}
.by-name{font-size:15px;font-weight:600;color:var(--ink)}
.by-name a{color:var(--route);text-decoration:none}
.by-name a:hover{text-decoration:underline}
.by-meta{font-size:12px;color:var(--muted);letter-spacing:.04em}

.brief{
  background:var(--band);border-left:4px solid var(--route);
  border-radius:0 12px 12px 0;padding:22px 26px;margin-bottom:38px;
}
.brief-label{
  font-size:11px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--route);font-weight:500;margin-bottom:10px;
}
.brief p{font-size:16.5px;line-height:1.6;color:var(--ink-soft)}
.brief p + p{margin-top:12px}

.prose{font-size:17px;line-height:1.72;color:var(--paper-text)}
.prose > * + *{margin-top:22px}
.prose h2{
  font-family:'Archivo',sans-serif;font-weight:800;font-stretch:103%;
  font-size:26px;line-height:1.22;letter-spacing:-.018em;color:var(--ink);
  margin-top:44px;
}
.prose h3{
  font-family:'Archivo',sans-serif;font-weight:700;font-size:20px;
  letter-spacing:-.01em;color:var(--ink);margin-top:40px;
}
.prose strong{color:var(--ink);font-weight:600}
.prose ul{list-style:none;padding:0}
.prose li{position:relative;padding-left:24px;margin-bottom:11px}
.prose li:last-child{margin-bottom:0}
.prose li::before{
  content:"";position:absolute;left:2px;top:11px;
  width:8px;height:8px;border-radius:50%;background:var(--route);
}
/* Sources are references, not reading — smaller, and they wrap long titles. */
.prose h3[id="sources"] + ul li{font-size:14.5px;line-height:1.6;color:var(--muted)}
.prose h3[id="sources"] + ul li::before{background:var(--map-line);top:9px}

.tbl-wrap{overflow-x:auto;border:1px solid var(--map-line);border-radius:12px;background:var(--card)}
.prose table{border-collapse:collapse;width:100%;font-size:14.5px;line-height:1.5}
.prose thead th{
  text-align:left;font-family:'IBM Plex Mono',monospace;font-size:11px;
  letter-spacing:.08em;text-transform:uppercase;font-weight:500;color:var(--muted);
  background:var(--soft);padding:11px 16px;border-bottom:1px solid var(--map-line);
  white-space:nowrap;
}
.prose tbody th{
  text-align:left;font-weight:600;color:var(--ink);
  padding:12px 16px;vertical-align:top;
}
.prose tbody td{padding:12px 16px;vertical-align:top;color:var(--muted)}
.prose tbody tr + tr th,.prose tbody tr + tr td{border-top:1px solid var(--map-line)}
.prose tbody td span{display:block}
.prose tbody td span + span{margin-top:6px}
/* A blank worksheet grid: give the empty cells a floor so they read as
   somewhere to write rather than as a rendering failure. The row labels get a
   floor too — eight columns of cells squeezed the label column until
   "Primary category" broke over three lines. */
[data-worksheet] tbody td{min-width:104px;height:44px;background:
  linear-gradient(var(--card),var(--card)) padding-box}
[data-worksheet] tbody th{min-width:152px}

.paper-cta{
  margin-top:56px;background:var(--card);border:1px solid var(--map-line);
  border-radius:var(--radius);padding:30px 32px;
  box-shadow:0 14px 38px -26px rgba(34,48,63,.32);
}
.paper-cta h2{
  font-family:'Archivo',sans-serif;font-weight:800;font-size:26px;line-height:1.18;
  letter-spacing:-.018em;color:var(--ink);margin-bottom:12px;max-width:22ch;
}
.paper-cta p{font-size:15.5px;color:var(--muted);max-width:60ch;margin-bottom:22px}
.cta-row{display:flex;gap:12px;flex-wrap:wrap}

.more{margin:44px 0 10px;border-top:1px solid var(--map-line);padding-top:22px}
.more-label{
  font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted);margin-bottom:8px;
}
.more-row{
  display:flex;justify-content:space-between;align-items:baseline;gap:18px;
  padding:13px 0;border-bottom:1px solid var(--map-line);text-decoration:none;
}
.more-row:last-child{border-bottom:none}
.more-title{font-weight:600;color:var(--ink);font-size:15.5px}
.more-row:hover .more-title{color:var(--route)}
.more-date{font-size:11.5px;color:var(--muted);white-space:nowrap}

@media (max-width:880px){
  .wp-grid{grid-template-columns:1fr}
  .nav-links a:not(.btn){display:none}
  .paper{padding:32px 0 10px}
  .prose{font-size:16.5px}
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{transition:none!important;animation:none!important}
  html{scroll-behavior:auto}
}

/* Printing a paper is a real thing an owner does with the 90-day plan.
   Drop the chrome, keep the brand color on the rules that carry meaning. */
@media print{
  html,body{background:#fff}
  nav,footer,.crosswalk,.paper-cta,.more,.back,.skip{display:none!important}
  .paper-wrap{max-width:none}
  .prose{font-size:11pt;line-height:1.5}
  .prose h2{margin-top:20pt;page-break-after:avoid}
  .prose h3{page-break-after:avoid}
  .tbl-wrap,.brief{page-break-inside:avoid}
  .tbl-wrap{overflow:visible}
  a[href^="http"]::after{content:" (" attr(href) ")";font-size:8pt;color:#5B6B7C}
}
