/* ============================================================
   TDCOS — Shared Stylesheet
   The Dale Collaborative | Collaborative Operating System
   ============================================================ */


/* ── 1. CSS Custom Properties ───────────────────────────── */

:root {
  /* Brand colors */
  --blue:   #0060AC;
  --red:    #D21437;
  --gold:   #FAA621;
  --green:  #00AB63;
  --black:  #1a1a1a;
  --white:  #ffffff;

  /* UI colors */
  --bg:         #f5f6f7;
  --surface:    #ffffff;
  --border:     #e2e4e8;
  --text:       #1a1a1a;
  --text-muted: #6b7280;
  --overlay:    rgba(0, 0, 0, 0.55);

  /* Section accent colors (1–6) */
  --s1: var(--blue);
  --s2: var(--green);
  --s3: var(--gold);
  --s4: var(--red);
  --s5: var(--blue);
  --s6: var(--blue);

  /* Spacing */
  --gap:    24px;
  --radius: 6px;

  /* Nav */
  --nav-height: 56px;
  --drawer-width: 340px;

  /* Typography */
  --font: 'Segoe UI', Calibri, 'Carlito', system-ui, sans-serif;
}


/* ── 2. Reset & Base ─────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Offset anchored jumps so targets clear the fixed nav bar */
[id] {
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}


/* ── 3. Typography ───────────────────────────────────────── */

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 600;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}


/* ── 4. Page Layout ──────────────────────────────────────── */

.page-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--gap) 60px;
}

.page-content--wide {
  max-width: 100%;
  padding: 0;
}


/* ── 5. Navigation Bar ───────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.nav-brand-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.nav-rainbow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--blue)  0%   25%,
    var(--red)   25%  50%,
    var(--gold)  50%  75%,
    var(--green) 75%  100%
  );
}

.nav-menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.4rem;
  transition: background 0.15s;
}

.nav-menu-btn:hover {
  background: var(--bg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  transition: background 0.15s;
}

.nav-back-btn:hover {
  background: var(--bg);
}


/* ── 6. Nav Drawer ───────────────────────────────────────── */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 201;
  width: var(--drawer-width);
  max-width: 90vw;
  height: 100vh;
  background: var(--white);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: 32px;
}

.nav-drawer.open {
  transform: translateX(0);
}

.drawer-close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  margin: 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.drawer-close:hover {
  background: var(--bg);
  color: var(--text);
}

.drawer-section {
  padding: 16px 20px 4px;
}

.drawer-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0 8px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius);
  transition: background 0.15s;
  cursor: pointer;
}

.drawer-link:hover {
  background: var(--bg);
}

.drawer-link.active {
  background: #f0f5fb;
}

.drawer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.drawer-dot--s1 { background: var(--s1); }
.drawer-dot--s2 { background: var(--s2); }
.drawer-dot--s3 { background: var(--s3); }
.drawer-dot--s4 { background: var(--s4); }
.drawer-dot--s5 { background: var(--s5); }
.drawer-dot--s6 {
  background: conic-gradient(
    var(--blue)  0deg   90deg,
    var(--red)   90deg  180deg,
    var(--gold)  180deg 270deg,
    var(--green) 270deg 360deg
  );
}
.drawer-dot--home {
  background: var(--blue);
}
.drawer-dot--companion {
  background: var(--black);
}
.drawer-dot--podcast {
  background: var(--gold);
}
.drawer-dot--install {
  background: var(--green);
}

.drawer-link-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.drawer-link-text {
  flex: 1;
}

.drawer-link-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.drawer-link-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

.drawer-refresh {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 28px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
  cursor: pointer;
}

.drawer-refresh:hover {
  color: var(--text);
}

.drawer-refresh-icon {
  font-size: 1rem;
  transition: transform 0.5s ease;
}

.drawer-refresh.spinning .drawer-refresh-icon {
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ── 7. Hero ─────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px 24px 40px;
  overflow: hidden;
  background-color: var(--blue);
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.55) 100%
  );
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-logo {
  width: 180px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-rainbow {
  height: 4px;
  width: 360px;
  max-width: 100%;
  background: linear-gradient(
    to right,
    var(--blue)  0%   25%,
    var(--red)   25%  50%,
    var(--gold)  50%  75%,
    var(--green) 75%  100%
  );
  margin-bottom: 20px;
  border-radius: 2px;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.88);
  font-weight: 300;
  max-width: 520px;
}

/* Section hero (used on section pages) */
.section-hero {
  min-height: 280px;
  padding: 40px 24px 36px;
  background-size: cover;
  background-position: center;
}

.section-hero .hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}


/* ── 8. Section Content ──────────────────────────────────── */

.content-section {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
}

.content-section:last-child {
  border-bottom: none;
}

.content-section__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.content-section__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.content-section__body {
  font-size: 0.975rem;
  color: var(--text);
  line-height: 1.75;
}

.content-section__body p + p {
  margin-top: 14px;
}

.content-section__body strong {
  font-weight: 600;
}

.content-section__body em {
  font-style: italic;
}


/* ── 9. Section Cards (home page entry points) ───────────── */

.entry-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0;
}

.entry-card {
  background: var(--surface);
  border-radius: var(--radius);
  border-top: 4px solid var(--border);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.entry-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.entry-card--s1 { border-top-color: var(--s1); }
.entry-card--s2 { border-top-color: var(--s2); }
.entry-card--s3 { border-top-color: var(--s3); }
.entry-card--s4 { border-top-color: var(--s4); }
.entry-card--s5 { border-top-color: var(--s5); }
.entry-card--s6 { border-top-color: var(--s6); }

/* Companion Resources variants — accents match the drawer dots */
.entry-card--pod { border-top-color: var(--gold); }
.entry-card--fg  { border-top-color: var(--black); }
.entry-card--pc  { border-top-color: var(--black); }

.entry-card__desc {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 20px;
}

.entry-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.entry-card__num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.entry-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.entry-card__arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}


/* ── 10. Accordion / Expandable ──────────────────────────── */

.accordion {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion summary,
.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  list-style: none;
  user-select: none;
  gap: 12px;
}

.accordion summary::-webkit-details-marker { display: none; }

.accordion summary::after,
.accordion-trigger::after {
  content: '▾';
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.accordion[open] summary::after,
.accordion-trigger.open::after {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 20px 20px;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* "Start Here" style large accordion */
.start-here {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  margin: 24px 0 0;
  overflow: hidden;
}

.start-here summary {
  padding: 20px 24px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.start-here summary::-webkit-details-marker { display: none; }

.start-here summary::after {
  content: '▸';
  font-size: 1rem;
  color: var(--text-muted);
}

.start-here[open] summary::after {
  content: '▾';
}

.start-here-body {
  padding: 0 24px 24px;
}


/* ── 11. Callout / Info Boxes ────────────────────────────── */

.callout {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.callout--gold {
  border-left: 4px solid var(--gold);
}

.callout--blue {
  border-left: 4px solid var(--blue);
}

.callout--red {
  border-left: 4px solid var(--red);
}

.callout--green {
  border-left: 4px solid var(--green);
}

.callout__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.callout--blue .callout__eyebrow  { color: var(--blue); }
.callout--red .callout__eyebrow   { color: var(--red); }
.callout--green .callout__eyebrow { color: var(--green); }

.callout__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.callout__body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Principle box */
.principle-box {
  background: #f0f5fb;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 20px 0;
  border-left: 4px solid var(--blue);
}

.principle-box__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}

.principle-box__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  font-style: italic;
}

.principle-box__body {
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Easy Rule box */
.easy-rule {
  background: #fff8e6;
  border: 1px solid #fce5b0;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.easy-rule strong {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}


/* ── 12. Companion / CTA Banner ──────────────────────────── */

.companion-banner {
  background: #111827;
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 32px 0 0;
  flex-wrap: wrap;
}

.companion-banner__icon {
  font-size: 1rem;
  margin-right: 6px;
}

.companion-banner__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}

.companion-banner__title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
}

.companion-banner__btn {
  flex-shrink: 0;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.companion-banner__btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}


/* ── 13. Photo Gallery ───────────────────────────────────── */

.gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 24px 0;
  background: #ccc;
}

.gallery-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.gallery-photo.active {
  opacity: 1;
}


/* ── 14. Footer ──────────────────────────────────────────── */

.site-footer {
  background: #111827;
  padding: 40px 24px 32px;
  text-align: center;
  margin-top: 48px;
}

.site-footer img {
  width: 160px;
  margin: 0 auto 16px;
}

.site-footer__copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}

.site-footer__version {
  margin-top: 8px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
}


/* ── 15. Utilities ───────────────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.text-blue   { color: var(--blue); }
.text-red    { color: var(--red); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--text-muted); }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  cursor: pointer;
  z-index: 50;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: all;
}


/* ── 16. Responsive ──────────────────────────────────────── */

@media (max-width: 768px) {
  .entry-cards {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 340px;
    padding: 40px 20px 32px;
  }

  .hero-logo {
    width: 140px;
  }

  .companion-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-content {
    padding: 0 16px 48px;
  }
}

@media (min-width: 600px) and (max-width: 768px) {
  .entry-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  :root {
    --drawer-width: 85vw;
  }
}


/* ── 17. Install as App ──────────────────────────────────── */

/* Home-page install banner */
.install-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
  font-family: var(--font);
}

.install-banner:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.install-banner__text {
  flex: 1;
  min-width: 0;
}

.install-banner__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 3px;
}

.install-banner__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.install-banner__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.45;
}

.install-banner__btn {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--green);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  white-space: nowrap;
}

/* Modal */
.install-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.install-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.install-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  width: calc(100% - 32px);
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2101;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.install-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.install-modal__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.install-modal__close:hover {
  background: var(--bg);
  color: var(--text);
}

.install-modal__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue);
  margin: 0 0 14px;
  padding-right: 32px;
}

.install-state {
  display: none;
}

.install-modal.show-installed .install-state--installed,
.install-modal.show-prompt    .install-state--prompt,
.install-modal.show-ios       .install-state--ios,
.install-modal.show-fallback  .install-state--fallback {
  display: block;
}

.install-state__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.install-state__text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 14px;
}

.install-state__note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 12px 0 0;
  line-height: 1.5;
}

.install-modal__action {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.15s;
}

.install-modal__action:hover {
  background: #004a8a;
}

.install-steps {
  padding-left: 22px;
  margin: 10px 0;
  font-size: 0.9rem;
  line-height: 1.65;
  list-style: decimal;
}

.install-steps li {
  margin-bottom: 8px;
}

/* Hide install triggers (drawer entry, home banner) once installed */
body.app-installed .js-install-trigger {
  display: none !important;
}


/* ── Lightbox ────────────────────────────────────────────── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lightbox.open {
  display: flex;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}
.lightbox-caption {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  font-style: italic;
}
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0.8;
  line-height: 1;
  padding: 4px 8px;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  opacity: 0.7;
  padding: 0 16px;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

/* Make gallery clickable */
.gallery-photo {
  cursor: pointer;
}

/* ===== Site Search (added 2026-06-02) ===== */
.drawer-search{margin:4px 0 8px;}
.drawer-search__box{display:flex;align-items:center;gap:8px;background:var(--bg,#f4f6f9);border:1.5px solid #e1e6ec;border-radius:24px;padding:9px 14px;transition:border-color .15s;}
.drawer-search__box:focus-within{border-color:var(--blue);}
.drawer-search__input{border:0;background:transparent;outline:none;font:inherit;font-size:0.95rem;width:100%;color:var(--text,#1d2733);}
.drawer-search__clear{border:0;background:transparent;color:var(--text-muted);cursor:pointer;font-size:1rem;line-height:1;display:none;}
.drawer-search__clear.show{display:block;}
.search-results{margin-top:8px;}
.search-meta{font-size:0.7rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);padding:6px 6px 8px;}
.result{display:flex;gap:10px;align-items:flex-start;padding:10px;border-radius:var(--radius);text-decoration:none;color:inherit;}
.result:hover,.result.active{background:var(--bg,#f4f6f9);}
.result__dot{width:9px;height:9px;border-radius:50%;margin-top:6px;flex-shrink:0;}
.result__main{display:flex;flex-direction:column;}
.result__label{font-size:0.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);}
.result__title{font-size:0.92rem;font-weight:600;margin:1px 0 2px;}
.result__snippet{font-size:0.8rem;color:var(--text-muted);line-height:1.45;}
.result__title mark,.result__snippet mark{background:rgba(250,166,33,0.35);color:inherit;padding:0 1px;border-radius:2px;}
.search-empty{padding:16px 8px;color:var(--text-muted);font-size:0.86rem;}
.nav-drawer.searching .drawer-section:not(.drawer-section--app),
.nav-drawer.searching .drawer-divider{display:none;}
.nav-drawer.searching .drawer-section--app .drawer-section-label,
.nav-drawer.searching .drawer-section--app .drawer-refresh,
.nav-drawer.searching .drawer-section--app .drawer-link{display:none;}
.nav-drawer.searching .drawer-search{margin-top:34px;}


/* ===== Podcast — "Together" (added 2026-06-04) =====
   Shared by the episode landing page (tdcos-podcast.html) and the
   per-episode pages (ep-NN-*.html). Player/reader markup only exists
   on episode pages; the body padding below is scoped to body.dn-player-page
   so the landing page does not reserve space for a player that isn't there. */
:root{ --dn-player-h:88px; }

/* Hero — streamlined, matches the website family (white + rainbow line) */
.podcast-hero { background:#fff; min-height:auto; padding:0; display:block; overflow:visible; }
.podcast-hero::after { display:none; } /* disable the global .hero darkening overlay */
.podcast-hero__rainbow { height:4px; width:100%; background:linear-gradient(to right, var(--blue) 0% 25%, var(--red) 25% 50%, var(--gold) 50% 75%, var(--green) 75% 100%); }
.podcast-hero__frame { position:relative; z-index:1; padding:30px 24px; display:flex; align-items:center; justify-content:flex-start; gap:24px; text-align:left; margin:0; }
.podcast-hero__logo { display:block; width:92px; height:auto; flex-shrink:0; margin:0; }
.podcast-hero__textblock { flex:1; min-width:0; }
.podcast-hero__title { font-size:clamp(1.9rem, 6vw, 2.6rem); font-weight:800; letter-spacing:0.06em; color:var(--text); line-height:1; margin:0 0 12px; }
.podcast-hero__divider { height:3px; width:70%; max-width:160px; background:linear-gradient(to right, var(--blue) 0% 25%, var(--red) 25% 50%, var(--gold) 50% 75%, var(--green) 75% 100%); border-radius:2px; margin:0 0 10px; }
.podcast-hero__tagline { font-size:0.74rem; letter-spacing:0.14em; color:var(--text-muted); font-weight:700; text-transform:uppercase; margin:0; }

/* Episode list intro + back link */
.episode-list-intro { font-size:0.78rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-muted); margin:4px 0 14px; }
.episode-back { display:inline-flex; align-items:center; gap:4px; color:var(--blue); font-size:0.85rem; font-weight:700; text-decoration:none; margin:4px 0 14px; }
.episode-back:hover { text-decoration:underline; }

.episode-card { background:var(--surface); border-radius:var(--radius); overflow:hidden; box-shadow:0 1px 6px rgba(0,0,0,0.09); margin-bottom:18px; border-top:4px solid var(--gold); }
.episode-card__top { display:flex; gap:14px; padding:18px 20px 8px; align-items:flex-start; }
.episode-card__coverlink { display:block; flex-shrink:0; line-height:0; }
.episode-card__cover { width:96px; height:96px; flex-shrink:0; border-radius:4px; object-fit:cover; background:#000; box-shadow:0 1px 4px rgba(0,0,0,0.18); }
.episode-card__body { flex:1; min-width:0; }
.episode-card__meta { display:flex; align-items:center; gap:10px; font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-muted); margin-bottom:6px; flex-wrap:wrap; }
.episode-card__meta-dot { width:4px; height:4px; border-radius:50%; background:var(--text-muted); }
.episode-card__title { font-size:1.15rem; font-weight:700; line-height:1.3; margin-bottom:8px; color:var(--text); }
.episode-card__title-link { text-decoration:none; color:inherit; }
.episode-card__title-link:hover .episode-card__title { color:var(--blue); }
.episode-card__desc { font-size:0.9rem; line-height:1.6; color:var(--text); margin-bottom:14px; }
.episode-card__actions { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.episode-card__notes-link { color:var(--blue); font-size:0.82rem; font-weight:700; text-decoration:none; }
.episode-card__notes-link:hover { text-decoration:underline; }

.btn-play-episode { display:inline-flex; align-items:center; gap:8px; background:var(--blue); color:#fff; border:none; border-radius:999px; padding:10px 18px; font-size:0.9rem; font-weight:700; cursor:pointer; text-decoration:none; }
.btn-play-episode:hover { filter:brightness(1.07); }

/* ── Subscribe block (podcast landing) ─────────────── */
.subscribe-card { border-top:4px solid var(--blue); }
.subscribe-card__body { padding:18px 20px 8px; }
.subscribe-card__desc { font-size:0.9rem; line-height:1.6; color:var(--text); margin:6px 0 14px; }
.subscribe-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding-bottom:16px; }
.sub-app { display:inline-flex; align-items:center; gap:8px; border:2px solid var(--blue); border-radius:999px; padding:9px 16px; font-size:0.9rem; font-weight:700; cursor:pointer; font-family:inherit; text-decoration:none; }
.sub-app--primary { background:var(--blue); color:#fff; }
.sub-app--primary:hover { filter:brightness(1.07); }
.sub-app--ghost { background:transparent; color:var(--blue); }
.sub-app--ghost:hover { background:rgba(0,96,172,0.07); }
.sub-app--ghost.is-active { background:rgba(0,96,172,0.10); }
.subscribe-panel { border-top:1px solid var(--border); padding:16px 20px; font-size:0.88rem; line-height:1.6; color:var(--text); }
.subscribe-panel[hidden] { display:none; }
.subscribe-panel__app { font-weight:700; margin:0 0 8px; }
.subscribe-copied { color:var(--green); font-weight:700; font-size:0.8rem; margin:0 0 10px; display:flex; align-items:center; gap:6px; }
.subscribe-feedline { display:block; background:#f3f4f6; border:1px solid var(--border); border-radius:6px; padding:8px 10px; font-size:0.78rem; word-break:break-all; color:var(--text); user-select:all; margin:4px 0 12px; }
.subscribe-steps { margin:6px 0 0; padding-left:18px; }
.subscribe-steps li { margin-bottom:8px; line-height:1.6; }
.subscribe-note { color:var(--text-muted); font-size:0.82rem; margin:10px 0 0; }

.episode-tags { display:flex; flex-wrap:wrap; gap:6px; padding:0 20px 14px; }
.episode-tag { display:inline-block; font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; padding:4px 9px; border-radius:999px; background:#f3f4f6; color:var(--text-muted); text-decoration:none; }
a.episode-tag:hover { filter:brightness(0.95); }
.episode-tag--s1 { background:rgba(0,96,172,0.10); color:var(--blue); }
.episode-tag--s2 { background:rgba(0,171,99,0.12); color:var(--green); }
.episode-tag--s3 { background:rgba(250,166,33,0.18); color:#8a5a00; }
.episode-tag--s4 { background:rgba(210,20,55,0.10); color:var(--red); }
.episode-tag--s5 { background:rgba(0,96,172,0.10); color:var(--blue); }
.episode-tag--s6 { background:linear-gradient(90deg, rgba(0,96,172,0.10), rgba(210,20,55,0.10), rgba(250,166,33,0.12), rgba(0,171,99,0.12)); color:var(--text); }

.episode-notes { border-top:1px solid var(--border); }
.episode-notes summary { padding:14px 20px; font-size:0.85rem; font-weight:700; cursor:pointer; list-style:none; display:flex; align-items:center; justify-content:space-between; color:var(--text); }
.episode-notes summary::-webkit-details-marker { display:none; }
.episode-notes summary::after { content:'+'; font-size:1.1rem; color:var(--text-muted); }
.episode-notes[open] summary::after { content:'–'; }
.episode-notes-body { padding:0 20px 18px; font-size:0.88rem; line-height:1.65; color:var(--text); }

.notes-summary { margin-bottom:16px; }
.notes-subhead { font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-muted); margin:18px 0 10px; padding-bottom:6px; border-bottom:1px solid var(--border); }
.notes-timeline { list-style:none; margin:0 0 6px; padding:0; }
.notes-timeline > li { padding:10px 0; border-bottom:1px solid var(--border); }
.notes-timeline > li:last-child { border-bottom:none; }

/* Tappable chapter timestamps */
.dn-chapter { font-variant-numeric:tabular-nums; font-weight:700; color:var(--blue); background:rgba(0,96,172,0.08); border:none; border-radius:6px; padding:2px 7px; margin-right:8px; cursor:pointer; font-size:0.82rem; font-family:inherit; }
.dn-chapter:hover { background:rgba(0,96,172,0.16); }
.dn-chapter.is-active { background:var(--blue); color:#fff; }
.notes-timeline a.episode-tag { margin:0 0 2px 6px; vertical-align:middle; white-space:nowrap; }

.notes-quotes { margin:6px 0 0; padding:0; list-style:none; }
.notes-quotes blockquote { margin:0 0 12px; padding:8px 0 8px 14px; border-left:3px solid var(--gold); font-style:italic; color:var(--text); }
.notes-quotes cite { font-style:normal; font-weight:600; color:var(--text-muted); }

/* ── Persistent mini-player (pinned) ───────────────── */
.dn-player { position:fixed; left:0; right:0; bottom:0; z-index:95; background:var(--surface); border-top:1px solid var(--border); box-shadow:0 -2px 12px rgba(0,0,0,0.10); padding:8px 14px calc(8px + env(safe-area-inset-bottom,0px)); display:flex; align-items:center; gap:12px; }
.dn-player__badge { position:absolute; top:-9px; left:50%; transform:translateX(-50%); background:var(--green); color:#fff; font-size:0.6rem; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; padding:2px 10px; border-radius:999px; opacity:0; transition:opacity .25s; white-space:nowrap; }
.dn-player.is-playing .dn-player__badge { opacity:1; }
.dn-player__cover { width:52px; height:52px; border-radius:6px; object-fit:cover; flex-shrink:0; background:#000; }
.dn-player__main { flex:1; min-width:0; }
.dn-player__title { font-size:0.82rem; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dn-player__sub { font-size:0.7rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:4px; }
.dn-player audio { width:100%; height:34px; display:block; }
.dn-player__speed { display:flex; flex-direction:column; align-items:center; gap:2px; flex-shrink:0; }
.dn-player__speed-label { font-size:0.6rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted); }
.dn-player__speed-select { font-size:0.8rem; font-weight:600; padding:4px 6px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); cursor:pointer; }

/* Keep page content clear of the pinned player (episode pages only) */
body.dn-player-page { padding-bottom:calc(var(--dn-player-h) + env(safe-area-inset-bottom,0px)); }

/* ── In-page section reader ────────────────────────── */
.dn-reader { position:fixed; left:0; right:0; top:var(--nav-height,60px); bottom:var(--dn-player-h); z-index:90; background:var(--bg,#f4f5f7); transform:translateY(100%); transition:transform .28s ease; visibility:hidden; display:flex; flex-direction:column; }
.dn-reader.is-open { transform:translateY(0); visibility:visible; }
.dn-reader__bar { display:flex; align-items:center; gap:12px; padding:12px 16px; background:var(--surface); border-bottom:1px solid var(--border); flex-shrink:0; }
.dn-reader__back { background:none; border:none; color:var(--blue); font-size:0.9rem; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; gap:4px; padding:4px 0; font-family:inherit; }
.dn-reader__title { font-size:0.95rem; font-weight:700; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; }
.dn-reader__tag { margin-left:auto; flex-shrink:0; }
.dn-reader__scroll { overflow-y:auto; -webkit-overflow-scrolling:touch; flex:1; padding-top:14px; }
@media (prefers-reduced-motion: reduce) { .dn-reader { transition:none; } }

.dn-flash { animation:dn-flash 1.4s ease; }
@keyframes dn-flash { 0%{ background:rgba(250,166,33,0.35); } 100%{ background:transparent; } }
