:root {
  --indigo: #2E1A6B;
  --indigo-light: #534AB7;
  --indigo-pale: #EEEDFE;
  --lavender: #E8DEF8;
  --magenta: #D03A8C;
  --magenta-pale: #FBEAF0;
  --magenta-dark: #993556;
  --ink: #1A1A1A;
  --muted: #666;
  --subtle: #999;
  --border: #E0DDEB;
  --bg: #F8F6FC;
  --white: #ffffff;
  --green: #97C459;
  --green-dark: #3B6D11;
  --green-pale: #EAF3DE;
  --amber: #EF9F27;
  --amber-pale: #FAEEDA;
  --blue: #378ADD;
  --blue-pale: #E6F1FB;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Site header --- */
.site-header {
  background: var(--lavender);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-logo img {
  height: 40px;
  width: auto;
  display: block;
}
.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  font-weight: 500;
  color: var(--indigo);
  font-size: 15px;
}

.internal-banner {
  background: var(--magenta-pale);
  color: var(--magenta-dark);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-align: center;
  padding: 6px 24px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* --- Page container --- */
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}
.page-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* --- Headings --- */
h1, h2, h3 { color: var(--indigo); margin-top: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin-bottom: 8px; }
h2 { font-size: 22px; margin: 40px 0 12px; }
h3 { font-size: 17px; margin: 24px 0 8px; }
.lede { font-size: 17px; color: var(--muted); margin: 0 0 28px; max-width: 720px; line-height: 1.55; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; color: var(--magenta); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }

/* --- Calendar (index page) --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 36px;
}
.stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.stat-num { font-size: 28px; font-weight: 600; color: var(--indigo); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--muted); }

.calendar-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  overflow-x: auto;
}
.calendar {
  display: grid;
  grid-template-columns: 56px repeat(5, 1fr);
  gap: 8px;
  min-width: 920px;
}
.col-head {
  padding: 12px 10px;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
}
.col-head .day { font-size: 14px; margin-bottom: 2px; }
.col-head .type { font-size: 11px; opacity: 0.85; }
.ch-mon { background: #EEEDFE; color: #26215C; }
.ch-tue { background: #FAEEDA; color: #412402; }
.ch-wed { background: #E6F1FB; color: #042C53; }
.ch-thu { background: #EAF3DE; color: #173404; }
.ch-fri { background: #FBEAF0; color: #4B1528; }
.wk-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12px;
}
.wk-num { font-weight: 600; color: var(--indigo); font-size: 13px; }
.wk-date { color: var(--muted); font-size: 11px; margin-top: 2px; }
.cell {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  min-height: 64px;
  color: var(--ink);
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.18s, border-color 0.15s;
  font-weight: 500;
}
.cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(46,26,107,0.14);
}
.cell-mon { background: #EEEDFE; border-color: #CECBF6; color: #26215C; }
.cell-mon:hover { border-color: #7F77DD; }
.cell-tue { background: #FAEEDA; border-color: #FAC775; color: #412402; }
.cell-tue:hover { border-color: #EF9F27; }
.cell-wed { background: #E6F1FB; border-color: #B5D4F4; color: #042C53; }
.cell-wed:hover { border-color: #378ADD; }
.cell-thu { background: #EAF3DE; border-color: #C0DD97; color: #173404; }
.cell-thu:hover { border-color: #639922; }
.cell-fri { background: #FBEAF0; border-color: #F4C0D1; color: #4B1528; }
.cell-fri:hover { border-color: #D4537E; }

.legend {
  margin-top: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.legend h3 { font-size: 14px; margin: 0 0 10px; }
.legend ul {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px;
}
.legend li { font-size: 13px; padding-left: 16px; position: relative; }
.legend li::before { content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 2px; }
.l-mon::before { background: #7F77DD; }
.l-tue::before { background: #EF9F27; }
.l-wed::before { background: #378ADD; }
.l-thu::before { background: #97C459; }
.l-fri::before { background: #ED93B1; }

/* --- Brief page --- */
.brief-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 0 0 28px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
}
.brief-meta dt {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.brief-meta dd { margin: 0; font-weight: 500; color: var(--ink); }
.brief-meta .pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.pill-mon { background: var(--indigo-pale); color: #26215C; }
.pill-tue { background: var(--amber-pale); color: #412402; }
.pill-wed { background: var(--blue-pale); color: #042C53; }
.pill-thu { background: var(--green-pale); color: #173404; }
.pill-fri { background: var(--magenta-pale); color: #4B1528; }

.brief-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 16px;
}
.brief-section h2 {
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--indigo);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brief-section h2 .num {
  display: inline-block;
  background: var(--indigo);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 24px;
}
.brief-section ol, .brief-section ul { padding-left: 22px; margin: 8px 0; }
.brief-section li { margin-bottom: 6px; }
.brief-section .h2-item { margin-bottom: 14px; }
.brief-section .h2-item .h2-title { font-weight: 600; color: var(--indigo); display: block; margin-bottom: 2px; }
.brief-section .h2-item .h2-note { color: var(--muted); font-size: 14px; }

.kw {
  display: inline-block;
  background: var(--indigo-pale);
  color: var(--indigo);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin: 0 4px 4px 0;
}
.kw-primary { background: var(--indigo); color: white; font-weight: 500; }

.kw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.kw-list { padding: 4px 0; }
.gsc-badge {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 500;
}
.gsc-exact {
  background: #D4EDDA;
  color: #173404;
}
.gsc-related {
  background: var(--amber-pale);
  color: #854F0B;
}
.gsc-none {
  background: #F1EFE8;
  color: #5F5E5A;
  font-style: italic;
}

/* Live-data callout (the magenta one — important for tech team) */
.live-data {
  background: var(--magenta-pale);
  border: 1px solid #F4C0D1;
  border-left: 4px solid var(--magenta);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 10px 0;
}
.live-data .badge {
  display: inline-block;
  background: var(--magenta);
  color: white;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.live-data dl { margin: 0; display: grid; grid-template-columns: 70px 1fr; gap: 6px 12px; font-size: 13.5px; }
.live-data dt { color: var(--magenta-dark); font-weight: 600; }
.live-data dd { margin: 0; color: var(--ink); }

.link-list { margin: 0; padding-left: 0; list-style: none; }
.link-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.link-list li:last-child { border-bottom: none; }
.link-list .url {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--indigo-pale);
  color: var(--indigo);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
}
.link-list .anchor {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
  font-style: italic;
}

.cta-box {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--magenta) 100%);
  color: white;
  border-radius: 12px;
  padding: 18px 22px;
  margin-top: 20px;
}
.cta-box .cta-label { font-size: 11px; opacity: 0.8; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.cta-box .cta-text { font-size: 16px; font-weight: 500; }

.meta-block {
  background: var(--indigo-pale);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 10px 0;
}
.meta-block .label { font-size: 11px; color: var(--indigo); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.meta-block .value { display: block; margin-top: 4px; font-size: 14px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--ink); }

/* Brief navigation: back-to-calendar pill + prev/next cards */
.brief-nav-wrap {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.back-to-cal-btn {
  display: inline-block;
  background: var(--indigo);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 18px;
}
.back-to-cal-btn:hover { background: var(--indigo-light); text-decoration: none; color: white; }

.brief-nav-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nav-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 70px;
}
.nav-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(46,26,107,0.10);
  border-color: var(--indigo-light);
}
.nav-card.nav-next { text-align: right; }
.nav-direction {
  font-size: 11px;
  color: var(--magenta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-title {
  font-size: 13.5px;
  color: var(--indigo);
  font-weight: 500;
  line-height: 1.35;
}
.nav-sentinel {
  background: var(--bg);
  border-style: dashed;
  border-color: var(--border);
  cursor: default;
  opacity: 0.7;
}
.nav-sentinel:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}
.nav-sentinel .nav-direction { color: var(--subtle); }
.nav-sentinel .nav-title { color: var(--muted); font-style: italic; font-weight: 400; }

@media (max-width: 560px) {
  .brief-nav-cards { grid-template-columns: 1fr; }
  .nav-card.nav-next { text-align: left; }
}

/* Share section */
.share-section { background: var(--indigo-pale); border-color: transparent; }
.share-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.share-controls input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}
.share-controls input[type="email"]:focus { outline: none; border-color: var(--indigo); }
.share-btn {
  background: var(--indigo);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.share-btn:hover { background: var(--indigo-light); }
.share-btn-secondary {
  background: transparent;
  color: var(--indigo);
  border: 1px solid var(--indigo);
}
.share-btn-secondary:hover { background: var(--indigo); color: white; }
.share-status {
  font-size: 13px;
  color: var(--magenta-dark);
  margin-top: 10px;
  min-height: 18px;
}

/* Category cards page */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  border: 1px solid;
  border-radius: 14px;
  text-decoration: none !important;
  transition: transform 0.18s, box-shadow 0.18s;
  min-height: 180px;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(46,26,107,0.12);
}
.cat-hub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cat-name {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.cat-desc {
  font-size: 13.5px;
  line-height: 1.5;
  flex: 1;
  opacity: 0.85;
}
.cat-count {
  font-size: 13px;
  font-weight: 600;
  margin-top: auto;
}

/* Individual category page: brief list */
.cat-briefs-list { display: flex; flex-direction: column; gap: 12px; }
.cat-brief-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  color: var(--ink);
}
.cat-brief-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(46,26,107,0.10);
  border-color: var(--indigo-light);
}
.cat-brief-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.cat-brief-date {
  font-size: 12px;
  color: var(--muted);
}
.cat-brief-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--indigo);
  margin-bottom: 6px;
  line-height: 1.35;
}
.cat-brief-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* --- Site footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 24px;
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* --- Password gate --- */
.pw-gate {
  position: fixed; inset: 0;
  background: var(--indigo);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: 'Poppins', sans-serif;
}
.pw-gate .box {
  background: white;
  border-radius: 16px;
  padding: 32px 36px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.pw-logo {
  display: block;
  margin: 0 auto 18px;
  height: 56px;
  width: auto;
}
.pw-gate h2 { color: var(--indigo); font-size: 22px; margin: 0 0 6px; }
.pw-gate p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.pw-gate input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
}
.pw-gate input:focus { outline: none; border-color: var(--indigo); }
.pw-gate button {
  width: 100%;
  background: var(--indigo);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.pw-gate button:hover { background: var(--indigo-light); }
.pw-gate .err { color: #993556; font-size: 13px; margin: -4px 0 10px; min-height: 18px; }

@media (max-width: 720px) {
  .page, .page-narrow { padding: 20px 16px 40px; }
  .site-header-inner { padding: 14px 16px; }
  .site-nav { gap: 16px; font-size: 14px; }
  .calendar-wrap { padding: 12px; }
  .brief-section { padding: 18px 18px; }
}
