/* Patient guide — layout from sample-patient-guide.html */
.tsi-pg-modern-shell {
  --pg-bg: #f7f5f1;
  --pg-surface: #ffffff;
  --pg-ink: #14201c;
  --pg-muted: #5b6b66;
  --pg-accent: #0f766e;
  --pg-accent-soft: #ccfbf1;
  --pg-danger: #b91c1c;
  --pg-danger-soft: #fee2e2;
  --pg-good-soft: #dcfce7;
  --pg-border: #e6e2d9;
  --pg-radius: 16px;
  --pg-shadow: 0 6px 24px rgba(20, 32, 28, 0.06);
  --pg-maxw: 760px;
  background: var(--pg-bg);
  padding: 0 0 48px;
}

.pg-modern-toolbar {
  max-width: var(--pg-maxw);
  margin: 0 auto;
  padding: 18px 22px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.pg-modern-toolbar a {
  color: var(--pg-accent);
  text-decoration: none;
  font-weight: 500;
}
.pg-modern-toolbar a:hover { text-decoration: underline; }
.pg-modern-toolbar-sep {
  color: #c4bfb4;
  user-select: none;
}
.pg-modern-toolbar-current {
  color: var(--pg-muted);
  font-weight: 500;
}

.pg-modern {
  max-width: var(--pg-maxw);
  margin: 0 auto;
  padding: 28px 22px 72px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: var(--pg-ink);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

/* Hero → eyebrow + title + lede */
.pg-modern .hero {
  background: none;
  color: inherit;
  padding: 0;
  margin: 0 0 8px;
  box-shadow: none;
  border-radius: 0;
}
.pg-modern .hero-label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pg-accent);
  font-weight: 600;
  background: var(--pg-accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin: 0 0 20px;
  opacity: 1;
}
.pg-modern .hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: var(--pg-ink);
}
.pg-modern .hero p:not(.hero-label) {
  font-size: 20px;
  color: #2b3a35;
  margin: 0 0 28px;
  max-width: none;
  opacity: 1;
}

/* Meta bar */
.pg-modern .meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--pg-muted);
  font-size: 14px;
  margin: 0 0 40px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--pg-border);
}
.pg-modern .meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  font-family: inherit;
  color: var(--pg-muted);
}
.pg-modern .meta-tag strong {
  color: var(--pg-ink);
  font-weight: 600;
}

/* Typography */
.pg-modern h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.pg-modern h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.005em;
  margin: 56px 0 14px;
  padding-top: 32px;
  border-top: 1px solid var(--pg-border);
  color: var(--pg-ink);
}
.pg-modern section:first-of-type h2,
.pg-modern > section > h2:first-child {
  margin-top: 32px;
}
.pg-modern h3 {
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 600;
  margin: 28px 0 8px;
  color: var(--pg-ink);
}
.pg-modern h4 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--pg-ink);
}
.pg-modern p {
  margin: 0 0 16px;
  color: #2b3a35;
}
.pg-modern ul,
.pg-modern ol {
  padding-left: 22px;
  margin: 0 0 18px;
}
.pg-modern li { margin-bottom: 6px; }
.pg-modern strong { color: var(--pg-ink); }

/* Sections — flat article flow */
.pg-modern section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}
.pg-modern section[id] {
  scroll-margin-top: 88px;
}

/* Callouts */
.pg-modern .callout {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-left: 3px solid var(--pg-accent);
  border-radius: var(--pg-radius);
  padding: 20px 22px;
  margin: 24px 0;
  box-shadow: var(--pg-shadow);
}
.pg-modern .callout h3,
.pg-modern .callout h4 { margin-top: 0; }
.pg-modern .callout-warning {
  border-left-color: #d97706;
  background: #fffbeb;
}
.pg-modern .callout-danger {
  border-left-color: var(--pg-danger);
  background: var(--pg-danger-soft);
}
.pg-modern .callout-success {
  border-left-color: #16a34a;
  background: var(--pg-good-soft);
}

/* Tables */
.pg-modern .responsive-table,
.pg-modern section {
  overflow-x: auto;
}
.pg-modern table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pg-surface);
  border-radius: var(--pg-radius);
  overflow: hidden;
  box-shadow: var(--pg-shadow);
  margin: 22px 0;
  font-size: 16px;
}
.pg-modern th,
.pg-modern td {
  text-align: left;
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--pg-border);
}
.pg-modern th {
  background: #f0ede6;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pg-ink);
  font-family: 'Inter', sans-serif;
}
.pg-modern tr:last-child td { border-bottom: none; }
.pg-modern td.good { background: color-mix(in oklab, var(--pg-good-soft) 55%, transparent); }
.pg-modern td.bad { background: color-mix(in oklab, var(--pg-danger-soft) 45%, transparent); }

/* FAQ */
.pg-modern .faq-accordion { margin: 8px 0 0; }
.pg-modern .faq-accordion-item,
.pg-modern details.faq-accordion-item {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.pg-modern .faq-accordion-item[open],
.pg-modern details.faq-accordion-item[open] {
  border-color: var(--pg-accent);
}
.pg-modern .faq-accordion-item summary,
.pg-modern details.faq-accordion-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--pg-ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0;
  font-size: 1rem;
  position: relative;
}
.pg-modern .faq-accordion-item summary::-webkit-details-marker { display: none; }
.pg-modern .faq-accordion-item summary::after,
.pg-modern details.faq-accordion-item summary::after {
  content: "+";
  color: var(--pg-accent);
  font-size: 22px;
  font-weight: 400;
  position: static;
  transform: none;
}
.pg-modern .faq-accordion-item[open] summary::after,
.pg-modern details.faq-accordion-item[open] summary::after {
  content: "−";
}
.pg-modern .faq-accordion-body {
  margin: 12px 0 4px;
  padding: 0;
  border: none;
  font-size: inherit;
  color: #34433d;
}
.pg-modern .faq-accordion-body p { margin: 0 0 8px; }

/* Index hub */
.pg-modern .index-group { margin-top: 28px; }
.pg-modern .index-group > h2 {
  font-size: 1.5rem;
  border: none;
  padding-top: 0;
  margin: 0 0 12px;
}
.pg-modern .index-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pg-modern .index-list li { margin: 0 0 10px; }
.pg-modern .index-list a {
  display: block;
  padding: 14px 18px;
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  color: var(--pg-accent);
  text-decoration: none;
  font-weight: 500;
  box-shadow: var(--pg-shadow);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pg-modern .index-list a:hover {
  background: var(--pg-accent-soft);
  text-decoration: none;
}

/* Disclaimer */
.pg-modern .disclaimer,
.pg-modern .end-note {
  margin-top: 56px;
  padding: 22px;
  border-radius: var(--pg-radius);
  background: var(--pg-accent-soft);
  color: #0b3d38;
  font-size: 14px;
  font-style: normal;
  border: none;
}

/* Two-column cards from legacy HTML */
.pg-modern .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}
.pg-modern .stage,
.pg-modern .day-card {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  padding: 22px 24px;
  box-shadow: var(--pg-shadow);
}

.pg-modern .toc { display: none !important; }

/* Pager */
.pg-modern-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--pg-border);
  font-size: 14px;
}
.pg-modern-pager a {
  color: var(--pg-accent);
  font-weight: 600;
  text-decoration: none;
}
.pg-modern-pager a:hover { text-decoration: underline; }

/* Hide legacy site chrome inside article */
.tsi-pg-modern-shell .tsi-patient-guide-breadcrumb { display: none; }

@media (max-width: 520px) {
  .pg-modern { padding: 20px 16px 56px; font-size: 17px; }
  .pg-modern-toolbar { padding: 14px 16px 0; }
  .pg-modern th,
  .pg-modern td { padding: 10px 12px; }
  .pg-modern .two-col { grid-template-columns: 1fr; }
}
