/* Franklin Frontline — Neighborhood Guide components
   Extends monocle.css. Monochrome, rule-driven. Badges (.chip-fill,
   .chip-outline, .chip-highlight) are global in monocle.css; the block at
   the foot of this file colours the guide-only components the same way.
   Every guide page loads this after /styles/monocle.css. */

/* ---------- Draft ribbon (template preview only; delete on publish) ---------- */
.draft-ribbon {
  background: var(--newsprint-cream);
  border-bottom: 1px solid var(--gallery-border);
  font: 400 12px/1.5 var(--sans);
  color: var(--ink-charcoal);
  text-align: center;
  padding: 8px 16px;
}
.draft-ribbon strong { font-weight: 700; }

/* ---------- Breadcrumb ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  font: 400 12px var(--sans);
  color: var(--dispatch-grey);
}
.crumbs a { color: var(--dispatch-grey); text-decoration: none; }
.crumbs a:hover { color: var(--press-black); }
.crumb-trail { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumbs span[aria-hidden] { color: var(--gallery-border); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 12px var(--sans);
  color: var(--press-black) !important;
  border: 1px solid var(--press-black);
  border-radius: var(--radius-buttons);
  padding: 8px 16px;
  transition: background var(--t-default), color var(--t-default);
}
.back-link:hover { background: var(--press-black); color: var(--editorial-white) !important; }

/* ---------- Guide header ---------- */
.guide-head { padding-top: 16px; }
.guide-head .kicker { text-transform: none; letter-spacing: .02em; font-size: 12px; }
.guide-head .page-meta { flex-wrap: wrap; row-gap: 8px; }
.guide-head .page-meta .meta { text-transform: none; letter-spacing: .02em; font-size: 12px; }

/* ---------- Neighborhood video ---------- */
.guide-video { padding-top: 32px; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink-charcoal);
  border-radius: var(--radius-cards);
  overflow: hidden;
}
.video-frame video,
.video-frame iframe,
.video-frame .placeholder {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  border: 0;
}
.video-frame .placeholder { color: var(--text-inverse-soft); background: var(--ink-charcoal); border-radius: 0; }
.video-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-top: 12px;
}
.video-foot .caption { max-width: 640px; }

/* ---------- Quick facts ---------- */
.facts {
  margin-top: 32px;
  border-top: 1px solid var(--press-black);
  border-bottom: 1px solid var(--gallery-border);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.fact {
  padding: 18px 20px 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.fact + .fact { border-left: 1px solid var(--gallery-border); padding-left: 20px; }
.fact svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px; }
.fact .stat-num { font-size: 22px; }
.fact .stat-label { margin-top: 3px; }
.fact .stat-note { font: 400 11px/1.4 var(--sans); color: var(--dispatch-grey); margin-top: 4px; }
.suits { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.suits .meta { margin-right: 6px; }
.suits .chip-outline { margin-top: 0; }

/* ---------- Sticky section nav ---------- */
.guide-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--editorial-white);
  border-bottom: 1px solid var(--gallery-border);
  margin-top: 40px;
}
.guide-nav-inner {
  display: flex;
  gap: 6px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.guide-nav-inner::-webkit-scrollbar { display: none; }
.guide-nav a {
  flex: 0 0 auto;
  font: 700 11px var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dispatch-grey);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-buttons);
  transition: color var(--t-default), background var(--t-default);
}
.guide-nav a:hover { color: var(--blue-slate); }
/* Active section: Signal Yellow, black text. The one "you are here" fill. */
.guide-nav a.is-active { color: var(--press-black); background: var(--signal-yellow); }

/* ---------- Guide sections ---------- */
.guide-section { padding-top: 56px; scroll-margin-top: 64px; }
.guide-section > .section-title { max-width: 720px; text-wrap: pretty; }
.guide-section > .dek { margin-top: 12px; max-width: 640px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head .text-link { white-space: nowrap; }

/* Prose column + aside */
.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; margin-top: 28px; }
.prose p + p { margin-top: 16px; }
.prose p { font-size: 17px; line-height: 1.6; color: var(--ink-charcoal); text-wrap: pretty; }
.prose h3 { font: 700 20px/1.2 var(--serif); margin-top: 28px; }
.prose ul { margin: 12px 0 0; padding-left: 20px; }
.prose li { margin-top: 6px; color: var(--ink-charcoal); }
.aside-card {
  align-self: start;
  position: sticky;
  top: 64px;
  background: var(--newsprint-cream);
  border: 1px solid var(--gallery-border);
  border-radius: var(--radius-cards);
  padding: 22px 24px 24px;
}
.aside-card .kicker { margin-bottom: 8px; }
.aside-card blockquote { margin: 0; font: 400 20px/1.35 var(--serif); font-style: italic; text-wrap: pretty; }
.aside-card cite { display: block; font: 400 11px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--dispatch-grey); margin-top: 12px; font-style: normal; }

/* Photo gallery */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-top: 32px; }
.gallery figure { margin: 0; }
.gallery img, .gallery .placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-cards); display: block; }
.gallery figure:first-child img, .gallery figure:first-child .placeholder { aspect-ratio: 16 / 10; }
.gallery figure:first-child { grid-row: span 2; }
.gallery figcaption { font: 400 11px/1.5 var(--sans); color: var(--dispatch-grey); margin-top: 6px; }

/* ---------- Tabs ---------- */
.tabs { margin-top: 28px; border-top: 1px solid var(--press-black); }
.tablist { display: flex; gap: 6px; padding: 10px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--gallery-border); }
.tablist::-webkit-scrollbar { display: none; }
.tablist button {
  appearance: none;
  background: none;
  border: 0;
  border-radius: var(--radius-buttons);
  padding: 8px 14px;
  font: 700 12px var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dispatch-grey);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--t-default), background var(--t-default);
}
.tablist button svg { width: 14px; height: 14px; }
.tablist button:hover { color: var(--blue-slate); }
.tablist button[aria-selected="true"] { color: var(--press-black); background: var(--signal-yellow); }
.tablist button[aria-selected="true"] svg { color: var(--press-black); }
.tabpanel { padding-top: 24px; }
.tabpanel[hidden] { display: none; }

/* ---------- Data tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font: 400 14px/1.45 var(--sans); }
.data-table th {
  text-align: left;
  font: 700 10px var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dispatch-grey);
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--press-black);
}
.data-table td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--gallery-border); vertical-align: top; color: var(--ink-charcoal); }
.data-table td:first-child { font: 700 15px/1.4 var(--serif); color: var(--press-black); }
.data-table td.num, .data-table th.num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.data-table .sub { display: block; font: 400 12px/1.4 var(--sans); color: var(--dispatch-grey); margin-top: 2px; }
.table-scroll { overflow-x: auto; }

/* ---------- Stat grid (market snapshot) ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--gallery-border); }
.stat-grid .stat { padding: 18px 20px 20px 0; border-bottom: 1px solid var(--gallery-border); }
.stat-grid .stat + .stat { border-left: 1px solid var(--gallery-border); padding-left: 20px; }
.stat-grid .stat:nth-child(4n+1) { border-left: 0; padding-left: 0; }
.stat-grid .stat-num { font-size: 28px; }
.stat-grid .stat-note { font: 400 11px/1.4 var(--sans); color: var(--dispatch-grey); margin-top: 6px; }
.stat-source { margin-top: 12px; }

/* ---------- Icon list (home styles, amenities, places) ---------- */
.icon-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--gallery-border); }
.icon-list li { display: flex; gap: 14px; padding: 16px 24px 18px 0; border-bottom: 1px solid var(--gallery-border); }
.icon-list li:nth-child(2n) { border-left: 1px solid var(--gallery-border); padding-left: 24px; }
.icon-list svg { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
.icon-list strong { display: block; font: 700 16px/1.25 var(--serif); }
.icon-list span { display: block; font-size: 14px; line-height: 1.5; color: var(--ink-charcoal); margin-top: 4px; }
.icon-list .meta { display: block; margin-top: 6px; }
.icon-list.three { grid-template-columns: repeat(3, 1fr); }
.icon-list.three li:nth-child(2n) { border-left: 0; padding-left: 0; }
.icon-list.three li:nth-child(3n+2), .icon-list.three li:nth-child(3n) { border-left: 1px solid var(--gallery-border); padding-left: 24px; }

/* ---------- Commute ---------- */
.commute { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; margin-top: 28px; }
.commute-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--gallery-border); }
.commute-list { border-top: 1px solid var(--press-black); }
.commute-row svg { width: 20px; height: 20px; flex: 0 0 20px; }
.commute-row .dest { flex: 1; font: 700 16px/1.25 var(--serif); }
.commute-row .dest .sub { display: block; font: 400 12px var(--sans); color: var(--dispatch-grey); margin-top: 2px; }
.commute-row .time { font: 700 20px/1 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.commute-row .time small { font: 400 10px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--dispatch-grey); margin-left: 4px; }
.score { margin-top: 18px; }
.score + .score { margin-top: 14px; }
.score-head { display: flex; justify-content: space-between; align-items: baseline; font: 700 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.score-head span:last-child { font: 700 16px/1 var(--serif); }
.score-bar { height: 6px; background: var(--paper-grey); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--press-black); }
.score .caption { margin-top: 6px; }

/* ---------- Annual calendar ---------- */
.calendar { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--press-black); }
.calendar li { display: grid; grid-template-columns: 96px 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--gallery-border); }
.calendar .month { font: 700 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--dispatch-grey); padding-top: 4px; }
.calendar strong { font: 700 17px/1.25 var(--serif); display: block; }
.calendar span { display: block; font-size: 14px; line-height: 1.5; color: var(--ink-charcoal); margin-top: 3px; }

/* ---------- Trade-offs ---------- */
.tradeoffs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 28px; border-top: 1px solid var(--press-black); }
.tradeoffs > div { padding: 24px 32px 28px 0; }
.tradeoffs > div + div { border-left: 1px solid var(--gallery-border); padding-left: 32px; }
.tradeoffs h3 { font: 700 20px/1.2 var(--serif); display: flex; align-items: center; gap: 10px; }
.tradeoffs h3 svg { width: 18px; height: 18px; }
.tradeoffs ul { list-style: none; margin: 16px 0 0; padding: 0; }
.tradeoffs li { padding: 12px 0; border-top: 1px solid var(--gallery-border); font-size: 15px; line-height: 1.5; color: var(--ink-charcoal); }
.tradeoffs li strong { color: var(--press-black); }
.verdict { margin-top: 32px; background: var(--ink-charcoal); color: var(--editorial-white); border-radius: var(--radius-cards); padding: 28px 32px; }
.verdict .kicker { color: var(--text-inverse-faint); }
.verdict p { font: 400 20px/1.4 var(--serif); margin-top: 8px; max-width: 760px; text-wrap: pretty; }

/* ---------- Map ---------- */
.map-frame { margin-top: 28px; aspect-ratio: 21 / 9; border-radius: var(--radius-cards); overflow: hidden; border: 1px solid var(--gallery-border); background: var(--paper-grey); filter: grayscale(1); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-legend { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 14px; }
.map-legend span { font: 400 12px var(--sans); color: var(--ink-charcoal); display: inline-flex; align-items: center; gap: 8px; }
.map-legend svg { width: 16px; height: 16px; }

/* ---------- FAQ ---------- */
.faq { margin-top: 24px; border-top: 1px solid var(--press-black); }
.faq details { border-bottom: 1px solid var(--gallery-border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 0; font: 700 18px/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 22px/1 var(--sans); color: var(--dispatch-grey); transition: transform 200ms ease-in-out; flex: 0 0 auto; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 20px; max-width: 720px; font-size: 16px; line-height: 1.55; color: var(--ink-charcoal); }
.faq .answer p + p { margin-top: 10px; }

/* ---------- Compare nearby ---------- */
.compare .chapter .meta { display: block; }

/* ---------- Sources ---------- */
.sources { margin-top: 56px; padding-top: 20px; padding-bottom: 8px; border-top: 1px solid var(--gallery-border); }
.sources ul { list-style: none; margin: 10px 0 0; padding: 0; columns: 2; column-gap: 48px; }
.sources li { font: 400 12px/1.6 var(--sans); color: var(--dispatch-grey); break-inside: avoid; }
.sources a { color: var(--dispatch-grey); }

/* ---------- Guide capture ---------- */
.guide-capture { margin-top: 56px; }
.guide-capture .capture-card { max-width: 560px; }

/* ---------- Index page: neighborhood directory ---------- */
.region { padding-top: 48px; }
.region-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; border-bottom: 1px solid var(--press-black); padding-bottom: 12px; }
.region-head h2 { font: 700 28px/1.125 var(--serif); letter-spacing: -.01em; }
.region-head .meta { white-space: nowrap; }
@media (max-width: 640px) {
  .region-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .region-head .meta { white-space: normal; }
}
.hood-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--gallery-border); margin-top: 20px; }
.hood {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 20px 24px 24px 0;
  border-bottom: 1px solid var(--gallery-border);
  text-decoration: none; color: var(--press-black);
}
.hood:nth-child(3n+2), .hood:nth-child(3n) { border-left: 1px solid var(--gallery-border); padding-left: 24px; }
.hood img, .hood .placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-cards); display: block; }
.hood .meta { display: block; margin-top: 14px; }
.hood h3 { font: 700 20px/1.2 var(--serif); margin-top: 6px; text-wrap: pretty; }
.hood .dek { font-size: 14px; line-height: 1.5; margin-top: 6px; }
.hood .hood-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font: 400 11px var(--sans); letter-spacing: .03em; color: var(--dispatch-grey); }
.hood .hood-facts span::before { content: '·'; margin-right: 8px; color: var(--gallery-border); }
.hood .hood-facts span:first-child::before { content: none; }
a.hood:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hood-status { display: flex; gap: 8px; margin-top: 14px; }
.region > .hood-featured { border-left: 0; padding-left: 0; }
.hood-featured { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; padding: 24px 0 28px; border-bottom: 1px solid var(--gallery-border); }
.hood-featured .placeholder, .hood-featured img { aspect-ratio: 4 / 3; }
.hood-featured .meta { margin-top: 4px; }
.hood-featured h3 { font: 700 32px/1.125 var(--serif); letter-spacing: -.01em; margin-top: 8px; }
.hood-featured .dek { font-size: 16px; max-width: 640px; }
.hood-status .chip-outline, .hood-status .chip-fill { margin-top: 0; }

/* ---------- Color in the guides ----------
   Same rule as the rest of the site (DESIGN.md → Accent rule): fills stop
   at badge size, text on a fill is black or white, one hue does one job.
     Mint Leaf      → the "what you gain" icon. A positive signal.
     Blue Slate     → outlines, underlines, bars, and icons. Structure.
   Badges themselves are the global .chip-* classes. */

/* Outlines and lines */
.back-link:hover { background: transparent; color: var(--blue-slate) !important; border-color: var(--blue-slate); }
.crumbs a:hover { color: var(--blue-slate); }
.data-table th { border-bottom-color: var(--blue-slate); }
.aside-card { border-left: 3px solid var(--blue-slate); }
.score-bar i { background: var(--blue-slate); }
a.hood:hover h3 { text-decoration-color: var(--blue-slate); }

/* Icons */
.fact svg, .commute-row svg, .icon-list svg, .tablist button svg { color: var(--blue-slate); }
.tradeoffs > div:first-child h3 svg { color: var(--mint-leaf); }
.tradeoffs > div + div h3 svg { color: var(--blue-slate); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .fact:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .fact:nth-child(-n+3) { border-bottom: 1px solid var(--gallery-border); }
}
@media (max-width: 900px) {
  .two-col, .commute, .hood-featured { grid-template-columns: 1fr; gap: 32px; }
  .hood-featured { gap: 20px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:first-child { grid-column: span 2; grid-row: auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid .stat:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .hood-grid { grid-template-columns: 1fr 1fr; }
  .hood:nth-child(n) { border-left: 0; padding-left: 0; }
  .hood:nth-child(2n) { border-left: 1px solid var(--gallery-border); padding-left: 24px; }
  .icon-list.three { grid-template-columns: repeat(2, 1fr); }
  .icon-list.three li:nth-child(n) { border-left: 0; padding-left: 0; }
  .icon-list.three li:nth-child(2n) { border-left: 1px solid var(--gallery-border); padding-left: 24px; }
  .sources ul { columns: 1; }
}
@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(n) { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--gallery-border); }
  .fact:nth-child(2n) { border-left: 1px solid var(--gallery-border); padding-left: 16px; }
  .fact:nth-last-child(-n+2) { border-bottom: 0; }
  .guide-section { padding-top: 44px; }
  .tradeoffs { grid-template-columns: 1fr; }
  .tradeoffs > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--gallery-border); }
  .icon-list, .hood-grid { grid-template-columns: 1fr; }
  .icon-list li:nth-child(n), .hood:nth-child(n) { border-left: 0; padding-left: 0; }
  .calendar li { grid-template-columns: 72px 1fr; gap: 16px; }
  .map-frame { aspect-ratio: 4 / 3; }
  .video-foot { flex-direction: column; gap: 6px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .crumbs { justify-content: flex-start; }
  .section-head .text-link { white-space: normal; }
  .verdict { padding: 22px 20px; }
  .verdict p { font-size: 18px; }
}

/* ---------- Phone layouts: nothing scrolls sideways ----------
   Section nav wraps, tab strips wrap, three-up icon lists stack,
   and data tables become stacked cards labelled from their headers. */
@media (max-width: 640px) {
  .guide-nav { position: static; margin-top: 32px; }
  .guide-nav-inner { flex-wrap: wrap; gap: 0 20px; overflow: visible; }
  .guide-nav a { padding: 12px 0 10px; }

  .tablist { flex-wrap: wrap; gap: 0 22px; overflow: visible; }
  .tablist button { padding: 12px 0 10px; }

  .icon-list.three { grid-template-columns: 1fr; }
  .icon-list.three li:nth-child(n) { border-left: 0; padding-left: 0; }

  .table-scroll { overflow: visible; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table thead { display: none; }
  .data-table tr { padding: 16px 0 18px; border-bottom: 1px solid var(--gallery-border); }
  .data-table tr:last-child { border-bottom: 0; }
  .data-table td { padding: 0; border: 0; }
  .data-table td:first-child { font-size: 17px; margin-bottom: 8px; }
  .data-table td.num { text-align: left; }
  .data-table td[data-label] { margin-top: 8px; font-size: 14px; }
  .data-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font: 700 10px/1.4 var(--sans);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dispatch-grey);
  }
  .data-table td.num[data-label] { font: 700 15px/1.4 var(--serif); color: var(--press-black); }
}
