/* =========================================================
FCBSB Shared Styles
Used by: Home, Resources, Calendar, Performance, Affordability
========================================================= */

:root{
  --maxw: 800px;
  --header-maxw: calc(var(--maxw) + 60px);
  --rule: #d9d9d9;
  --rule-soft: #ededed;
  --text: #111;
  --muted: #5a5a5a;
  /* Alias used by some pages for borders */
  --border: var(--rule);
}

/* Prevent horizontal layout shift between pages (scrollbar appearing/disappearing) */
html{
  /* Modern browsers: reserve scrollbar gutter space consistently */
  scrollbar-gutter: stable;
  /* Broad fallback: always show vertical scrollbar */
  overflow-y: scroll;
}

/* Base layout */
body{
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  color: var(--text);
  background: #fff;
}

.container{
  max-width: var(--maxw);
  width: 100%;
  text-align: left;
  margin: 0 auto;
}

/* Header */
.site-header{
  width: 100%;
  margin: 0 auto 16px;
}

.site-header-inner{
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* Keep header content aligned to the same max width as page content */
  max-width: var(--header-maxw);
  width: 100%;
  margin: 0 auto;
}

.site-brand{
  display: flex;
  justify-content: center;
  align-items: center;

  /* Banner background behind the logo */
  background: #f6ecd8;
  padding: 14px 0;

  margin: 0 auto;
  max-width: var(--header-maxw);
  width: 100%;

  text-decoration: none;
  color: inherit;
}

.site-logo{
  /* Keep the original logo pixels; just scale it down in the header */
  max-height: 150px;
  width: auto;
  max-width: 100%;

  height: auto;
  display: block;
}

.site-title{
  display: none;
}

.site-nav{
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 10px 0 4px;
  border-bottom: 1px solid #e6e6e6;

  /* Constrain nav to the same width as the header/logo and page content */
  max-width: var(--header-maxw);
  width: 100%;
  margin: 0 auto;
}

.nav-link{
  text-decoration: none;
  color: inherit;
  padding: 6px 2px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.nav-link:hover{
  border-bottom-color: #bbb;
}

.nav-link.is-active{
  font-weight: 700;
  border-bottom-color: #000;
}

/* Headings & text */
h1{
  font-size: 22px;
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Calendar page: keep the main title consistent with other pages */
.calendar-page h1{
  font-size: 22px;
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Fallback: Calendar pages also set data-nav="calendar" */
body[data-nav="calendar"] h1{
  font-size: 22px;
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Keep base h2 styling consistent across site pages */
h2{
  font-size: 1.4rem;
  margin: 1.75em 0 0.75em 0;
  padding-bottom: 0.25em;
  line-height: 1.2;
}

/* Subtle section divider under each h2 (preferred over border-bottom for flexibility) */
h2::after{
  content: "";
  display: block;
  height: 1px;
  background: var(--rule);
  margin-top: 0.45em;
}

/* Reduce top margin for the first section heading inside the main container */
.container h2:first-of-type{ margin-top: 0.75em; }

p{ margin: 0.4em 0 0.7em 0; line-height: 1.4; }
p + ul{ margin-top: 0.2em; }

.inline-label{
  font-weight: bold;
  margin-right: 0.35em;
  white-space: nowrap;
}

/* Home page details: align wrapped lines under the value, not the label */
.details-block p{
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.details-block .inline-label{
  flex: 0 0 90px;
}

@media (max-width: 520px){
  .details-block p{
    display: block;
  }
  .details-block .inline-label{
    display: inline-block;
    margin-right: 0.35em;
  }
}

ul{ margin: 0.1em 0 0.1em 0; padding-left: 20px; }
ul li{ margin-top: 0.3em; line-height: 1.4; }

mark a{ color: inherit; text-decoration: none; }
mark a:hover{ text-decoration: underline; }

.muted{ color: #666; }

/* Buttons */
.expand-button{
  margin-top: 0.5em;
  padding: 0.35em 0.8em;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Emails list */
#recent-newsletters{ max-width: 700px; padding-left: 20px; }
#recent-newsletters li.newsletter-item{
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  list-style-type: disc;
}
#recent-newsletters li.newsletter-item .fade-text{
  display: inline-block;
  max-width: 100%;
}
#recent-newsletters li.newsletter-item::after{
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 100%;
  pointer-events: none;
  background: linear-gradient(to right, rgba(255,255,255,0), #ffffff);
}

/* Events */
.events{ margin: 24px 0; }
.events-links{ margin: 6px 0 14px; }
.events-links .sep{ margin: 0 6px; color: #888; }
.events-list{ display: grid; gap: 12px; }

.event-row{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #e6e6e6;
}
.event-row:first-child{ border-top: none; padding-top: 0; }

.event-date{ font-weight: 750; white-space: nowrap; }
.event-line{ margin: 2px 0; }
.label{ font-weight: 700; }

.events-toggle{
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* =========================================================
Calendar: compact-by-default rows (details/summary)
Used by: /calendar/
========================================================= */

/* Compact session cells in the calendar table */
.session{ margin: 0; }
.session-summary{
  display: flex;
  gap: 10px;
  align-items: baseline;
  cursor: pointer;
  list-style: none;
}
.session-summary::-webkit-details-marker{ display:none; }
.session-summary::marker{ content: ""; }

.session-link{
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.session-toggle{
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  user-select: none;
  white-space: nowrap;
}

.session-body{ margin-top: 8px; }

/* Divider used between the FC BS+B calendar and other events */
.section-rule{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

/* Other events list (non-FC BS+B) */
.other-events{ margin-top: 8px; }

.event{ border-top: 1px solid var(--border); padding: 10px 0; }
.event:last-child{ border-bottom: 1px solid var(--border); }

.event-summary{
  display: flex;
  gap: 10px;
  align-items: baseline;
  cursor: pointer;
  list-style: none;
}
.event-summary::-webkit-details-marker{ display:none; }
.event-summary::marker{ content: ""; }

.event-when{ white-space: nowrap; font-weight: 750; }
.event-title{ font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }

.event-toggle{
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  user-select: none;
  white-space: nowrap;
}

.event-body{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.event-links a{ text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 700px){
  body{ padding: 16px; }
  .event-row{ grid-template-columns: 1fr; gap: 6px; }
  .event-date{ white-space: normal; }

  /* Mobile: make top nav horizontally scrollable instead of overflowing */
  .site-nav{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 16px;
  }
  .site-nav::-webkit-scrollbar{ display: none; }
  .nav-link{ flex: 0 0 auto; }

  /* Calendar: allow compact rows to wrap cleanly on small screens */
  .session-summary, .event-summary{ flex-wrap: wrap; }
  .session-toggle, .event-toggle{ margin-left: 0; }
}

/* =========================================================
Series styling (extracted from your embedded <style>)
Apply by using: <body class="series-page performance"> etc.
========================================================= */

body.series-page{
  --rule:#d9d9d9;
  --rule-soft:#ededed;
  --text:#111;
  --muted:#5a5a5a;
  --bg:#fff;
  --maxw-series: var(--maxw);

  margin: 22px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;

  /* override the base flex centering so series pages behave normally */
  display: block;
  justify-content: initial;
  padding: 0;
}

.series-page a{ color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.series-page a:hover{ text-decoration-thickness: 2px; }

.series-page .wrap{ max-width: var(--maxw-series); width: 100%; margin: 0 auto; }

.series-page .topbar{
  display:flex; flex-wrap: wrap;
  align-items:center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.series-page .crumbs{ color: var(--muted); }
.series-page .crumbs,
.series-page .crumbs a,
.series-page .crumbs strong{
  font-size: inherit;
  line-height: inherit;
}
.series-page .sep{ margin: 0 6px; color: #aaa; }
.series-page .navlinks{ display:flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* Match sibling navigation size to breadcrumb size */

.series-page .navlinks a{
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
}

/* Current page marker inside series navigation */
.series-page .navlinks .current{
  font-size: inherit;
  line-height: inherit;
  font-weight: 650;
  color: var(--text);
  cursor: default;
}

.series-page .hero{ margin: 6px 0 14px; }
.series-page .kicker{ font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.series-page h1{
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.series-page .sub{ margin: 6px 0 0; color: var(--muted); max-width: 78ch; }

.series-page .card{ border:none; padding:0; margin:18px 0; }
/* Series pages: keep dividers consistent with main pages (underline below headings only) */
.series-page .section-rule{
  display: none;
}

.series-page .card h2{ font-size: 17px; margin: 0 0 10px; font-weight: 750; border: 0; padding: 0; }
.series-page .card p{ margin: 8px 0; color: #222; }

.series-page ul,
.series-page ol{ margin: 8px 0 0 20px; padding: 0; }
.series-page li{ margin: 6px 0; }
.series-page ul ul{ margin-top: 6px; }

/* Agenda box: border only */
.series-page .agenda-box{
  border: 1px solid var(--rule);
  padding: 10px 12px;
  margin: 10px 0 0;
  background: transparent;
}

.series-page .agenda-box h2{ margin: 0 0 6px; }

/* Callouts (reusable across session pages) */
.series-page .callout{
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--rule-soft);
  border-left: 4px solid var(--rule);
  margin: 12px 0;
}

/* Strong callout: used for “key patterns / high consequence” */
.series-page .callout-strong{
  background: #eef5ff;
  border-left-color: #9fb8de;
}

/* Soft callout: used for side topics / quick clarity */
.series-page .callout-soft{
  background: #f7f7f7;
  border-left-color: var(--rule);
}

/* WIP banner: subtle warm notice (injected via include-header.js) */
.series-page .callout-wip{
  background: #fff8e6;
  border-left-color: #d7a000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}
.series-page .callout-wip .wip-title{
  margin: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Updated .wip-actions styling for inline button + link */
.series-page .callout-wip .wip-actions{
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.series-page .callout-wip .wip-actions{
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 700px){
  /* Mobile: stack WIP banner and show full message (no ellipsis) */
  .series-page .callout-wip{
    flex-direction: column;
    align-items: flex-start;
  }
  .series-page .callout-wip .wip-title{
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

.series-page a.btn{
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: #fff;
  text-decoration: none;
  font-weight: 650;
}
.series-page a.btn:hover{
  border-color: #bdbdbd;
  text-decoration: none;
}

/* Small inline control for expanding the WIP message */
.series-page .wip-more{
  font: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
}
.series-page .wip-more:hover{ border-color: #bdbdbd; }

/* When expanded, show the full message (no truncation) */
.series-page .callout-wip.is-expanded .wip-title{
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Details/summary styling inside callouts */
.series-page details.callout > summary{
  cursor: pointer;
  list-style: none;
  margin: 0;
}
.series-page details.callout > summary::-webkit-details-marker{ display: none; }

/* Collapsible callout summary: one-line layout + chevron affordance */
.series-page details.callout > summary{
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* Override the default block display so title + subtitle sit on one line in the summary */
.series-page details.callout > summary .summary-title,
.series-page details.callout > summary .summary-sub{
  display: inline;
  margin: 0;
}

.series-page details.callout > summary .summary-sub{
  white-space: nowrap;
}

.series-page details.callout > summary::after{
  content: "▸";
  margin-left: auto;
  color: var(--muted);
  transition: transform 140ms ease;
}

.series-page details.callout[open] > summary::after{
  transform: rotate(90deg);
}
.series-page details.callout[open] > summary{ margin-bottom: 8px; }

.series-page .summary-title{
  display: block;
  font-weight: 750;
}
.series-page .summary-sub{
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* Keep callouts tidy */
.series-page .callout h3{ margin: 0 0 6px; font-size: 14px; }
.series-page .callout ul{ margin: 6px 0 0 20px; }
.series-page .callout ul:last-child{ margin-bottom: 0; }

/* Subheadings used for nested structure under a section */
.series-page .subhead{
  font-size: 14px;
  font-weight: 750;
  margin: 10px 0 6px;
}

.series-page .scorecard{ display:grid; gap: 10px; margin-top: 10px; }
.series-page .scoregroup{
  border: 1px solid var(--rule-soft);
  padding: 10px 12px;
}
.series-page .scoregroup-title{
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  margin-bottom: 6px;
}
.series-page .scorelist{ margin: 0 0 0 18px; }

.series-page .example-inline{
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.series-page .concept{ margin: 12px 0; }
.series-page .concept-title{ font-weight: 750; }
.series-page .takeaway{ color: var(--muted); margin: 6px 0 0 0; }
.series-page .takeaway::before{ content: "→ "; font-weight: 700; }

.series-page .resources{ margin-left: 20px; }
.series-page .resources li{ margin: 10px 0; }
.series-page .ref-note{ color: var(--muted); font-size: 13px; margin-top: 4px; }

.series-page .navband{
  margin: 18px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}
.series-page .footer{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 960px){
  body.series-page{ margin: 16px; }
  .series-page h1{ font-size: 21px; }
}

@media print{
  body.series-page{ margin: 0.5in; }
  .series-page .navlinks,
  .series-page .navband{ display:none !important; }
  .series-page a{ text-decoration: none; }
}

/* =========================================================
Cost Elements table (Affordability series index)
========================================================= */
table.ce-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 12px 0 20px;
}
table.ce-table thead th{
  text-align: left;
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 2px solid var(--border);
  background-color: #d0d0d0;
}
table.ce-table tbody td{
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
}
table.ce-table tbody td:last-child{
  white-space: nowrap;
  font-family: monospace;
  font-size: 13px;
  color: var(--muted);
}
table.ce-table tbody tr.stage-header td{
  padding-top: 14px;
  padding-bottom: 6px;
  border-bottom: none;
  background-color: #e8e8e8;
  color: var(--text);
}
table.ce-table tbody tr:nth-child(even):not(.stage-header){
  background-color: #f7f7f7;
}

/* Collapsible sections */
details.collapsible{
  margin: 12px 0 20px;
  padding: 12px 16px;
  background: #f9f9f9;
  border-left: 4px solid #999;
}
details.collapsible summary{
  cursor: pointer;
  font-weight: 600;
  padding: 0;
  list-style: none;
}
details.collapsible summary::-webkit-details-marker{
  display: none;
}
details.collapsible summary::before{
  content: "▶ ";
  font-size: 12px;
  margin-right: 6px;
}
details.collapsible[open] summary::before{
  content: "▼ ";
}
details.collapsible summary:hover{
  color: var(--muted);
}

/* Nested collapsible sections (CROs inside CEs) */
details.collapsible-cro{
  margin: 12px 0 8px;
  padding: 12px 16px;
  background-color: #eef4f8;
  border-left: 4px solid #7a9cb8;
}
details.collapsible-cro summary{
  cursor: pointer;
  font-weight: 600;
  padding: 0;
  list-style: none;
}
details.collapsible-cro summary::-webkit-details-marker{
  display: none;
}
details.collapsible-cro summary::before{
  content: "▶ ";
  font-size: 12px;
  margin-right: 6px;
}
details.collapsible-cro[open] summary::before{
  content: "▼ ";
}
details.collapsible-cro summary:hover{
  color: var(--muted);
}

details.collapsible .ce-table{
  margin-bottom: 0;
}
details.collapsible p.muted{
  margin-top: 8px;
}

/* Framework pointer lines — visually quiet navigation aids */
.framework-pointer{
  font-size: 0.82em;
  color: #888;
  margin-top: 12px;
  margin-bottom: 0;
  line-height: 1.4;
  padding-left: 10px;
  border-left: 2px solid #d9d9d9;
}
.framework-pointer em{
  font-style: normal;
}
