/*
 * Evaluate-Your-Surgeon tool styles.
 *
 * Ported verbatim (visually) from the standalone design mock
 * `Evaluate_page/evaluate-your-surgeon.html`, then integrated into the
 * Next.js app:
 *   • Every rule is scoped under `.est` so it cannot leak into the shared
 *     NavV2 / FooterV2 chrome (which is Tailwind-driven), and so the global
 *     `.eyebrow` / `.wrap` utilities in globals.css cannot leak in here
 *     (the mock's own `.eyebrow` / `.wrap` are renamed `.est-eyebrow` /
 *     `.est-wrap`).
 *   • Fonts resolve to the site's next/font CSS variables instead of the
 *     mock's Google Fonts <link>: --serif/--sans/--mono → --font-*.
 *   • Colors mirror the tailwind tokens exactly (spine == --blue #254A5D,
 *     etc.); the --blue-{80..20} gradients the mock uses for the score
 *     segments and viz bars have no token equivalent, so they stay here.
 *   • Print hides the site header/footer (the mock hid its own chrome).
 */

.est {
  --blue: #254a5d;
  --blue-80: #3d5f70;
  --blue-60: #607d8c;
  --blue-40: #93a8b2;
  --blue-20: #c9d4da;
  --ink: #0f1417;
  --newsprint: #f8f6f1;
  --cream: #f4f0e6;
  --wash: #eaf0f3;
  --gold: #f4d88a;
  --red: #b03a3a;
  --muted: #6b7378;
  --hairline: #ddd8cc;
  --serif: var(--font-serif), georgia, serif;
  --sans: var(--font-sans), -apple-system, sans-serif;
  --mono: var(--font-mono), monospace;
  --maxw: 1120px;

  background: var(--newsprint);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

.est *,
.est *::before,
.est *::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .est {
    scroll-behavior: auto;
  }
  .est *,
  .est *::before,
  .est *::after {
    animation: none !important;
    transition: none !important;
  }
}

.est img {
  max-width: 100%;
  display: block;
}
.est a {
  color: var(--blue);
}
.est-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.est-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 14px;
}
.est-eyebrow::before {
  content: none;
}
.est .serif-h {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.est .serif-h em {
  font-style: italic;
}
.est section {
  padding: 64px 0;
  scroll-margin-top: 84px;
}
.est .hairline-top {
  border-top: 1px solid var(--hairline);
}

/* Buttons (self-contained; the mock's header/footer buttons are gone) */
.est .btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border: 1px solid var(--blue);
  cursor: pointer;
  min-height: 44px;
  line-height: 1.4;
}
.est .btn:hover {
  background: var(--ink);
  border-color: var(--ink);
}
.est .btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.est .btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}
.est .btn-sm {
  font-size: 13px;
  padding: 9px 14px;
}

/* Hero — dark editorial gradient band.
 * A deep ink→spine gradient with a soft warm glow top-left gives the page a
 * real hero moment and high text contrast. Light type sits on top; the CTA
 * flips to gold so it reads as the primary action on the dark ground. */
.est .hero {
  position: relative;
  padding: clamp(128px, 16vw, 184px) 0 clamp(60px, 9vw, 96px);
  background:
    radial-gradient(
      90% 120% at 12% 4%,
      rgba(244, 216, 138, 0.16) 0%,
      rgba(244, 216, 138, 0) 55%
    ),
    linear-gradient(168deg, rgba(15, 20, 23, 0.88) 0%, rgba(20, 44, 55, 0.85) 58%, rgba(28, 61, 77, 0.90) 100%),
    url('../images/evaluate-hero.jpg') center/cover no-repeat;
  border-bottom: 1px solid #0a0e10;
  color: #f4f0e6;
}
.est .hero .est-eyebrow {
  color: var(--gold);
}
.est .hero h1 {
  font-size: clamp(34px, 5.5vw, 58px);
  max-width: 820px;
  color: #f8f6f1;
}
.est .hero .serif-h em {
  color: var(--gold);
}
.est .hero .lede {
  font-size: 19px;
  max-width: 680px;
  margin-top: 22px;
  color: rgba(244, 240, 230, 0.82);
}
.est .notice {
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(244, 240, 230, 0.18);
  padding: 14px 18px;
  font-size: 14px;
  max-width: 640px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(244, 240, 230, 0.82);
}
.est .notice .n-icon {
  font-family: var(--mono);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  padding-top: 2px;
}
.est .hero-ctas {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
/* CTAs on the dark hero ground */
.est .hero .btn {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.est .hero .btn:hover {
  background: #efc95f;
  border-color: #efc95f;
  color: var(--ink);
}
.est .hero .btn-ghost {
  background: transparent;
  color: #f4f0e6;
  border-color: rgba(244, 240, 230, 0.45);
}
.est .hero .btn-ghost:hover {
  background: #f4f0e6;
  color: var(--ink);
  border-color: #f4f0e6;
}
/* Medically-reviewed-by block on the dark hero */
.est .hero-review {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(244, 240, 230, 0.18);
  max-width: 680px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  font-size: 13px;
}
.est .hero-review-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.est .hero-review-name {
  color: #f8f6f1;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.est .hero-review-name:hover {
  color: var(--gold);
}
.est .hero-review-cred {
  color: rgba(244, 240, 230, 0.72);
}
.est .hero-review-date {
  width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(244, 240, 230, 0.55);
}

/* Editorial content */
.est .editorial {
  max-width: 720px;
}
.est .editorial h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  margin-bottom: 18px;
}
.est .editorial p {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
}
.est .editorial p:last-child {
  margin-bottom: 0;
}

/* Tool shell */
.est .tool {
  background: var(--cream);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.est .tool-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.est .tool-head h2 {
  font-size: clamp(26px, 3.6vw, 38px);
}
.est .add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.est .add-row input[type="text"] {
  flex: 1;
  min-width: 220px;
  font-family: var(--sans);
  font-size: 16px;
  padding: 11px 14px;
  border: 1px solid var(--ink);
  background: #fff;
  min-height: 44px;
}
.est .add-row input[type="text"]:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

/* Tabs */
.est .tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 26px;
  -webkit-overflow-scrolling: touch;
}
.est .tab-btn {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
}
.est .tab-btn[aria-selected="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.est .tab-btn.dash-tab {
  border-style: dashed;
}
.est .tab-btn:focus-visible,
.est .btn:focus-visible,
.est .seg:focus-visible,
.est input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Surgeon panel */
.est .panel {
  background: #fff;
  border: 1px solid var(--hairline);
  padding: 28px 22px;
  margin-top: 16px;
}
.est .panel-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.est .panel-top h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}
.est .remove-link {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  padding: 8px;
}
.est .remove-link:hover {
  color: var(--red);
}
.est .phase {
  margin-top: 26px;
}
.est .phase-hd {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
}
.est .phase-hd .p-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 0.12em;
}
.est .phase-hd h4 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}
.est .phase-hd .p-sub {
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
  font-family: var(--mono);
}
.est .crit {
  padding: 20px 0;
  border-bottom: 1px solid #efebe0;
}
.est .crit:last-child {
  border-bottom: none;
}
.est .crit-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.est .crit-name {
  font-weight: 600;
  font-size: 16px;
}
.est .crit-score-num {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--blue);
}
.est .crit-score-num.unscored {
  color: var(--muted);
}
.est .seg-row {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.est .seg {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--blue-40);
  background: #fff;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
}
.est .seg:hover {
  border-color: var(--blue);
}
.est .seg[aria-pressed="true"] {
  color: #fff;
  border-color: var(--blue);
}
.est .seg[data-v="1"][aria-pressed="true"] {
  background: var(--blue-40);
}
.est .seg[data-v="2"][aria-pressed="true"] {
  background: var(--blue-60);
}
.est .seg[data-v="3"][aria-pressed="true"] {
  background: var(--blue-80);
}
.est .seg[data-v="4"][aria-pressed="true"] {
  background: var(--blue);
}
.est .seg[data-v="5"][aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
}
.est .anchor-label {
  margin-top: 10px;
  font-size: 14px;
  color: #3a4247;
  min-height: 22px;
}
.est .anchor-label.muted-note {
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}
.est .crit.unscored-exp .crit-name {
  color: var(--muted);
}
.est .why {
  margin-top: 10px;
}
.est .why summary {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}
.est .why summary::-webkit-details-marker {
  display: none;
}
.est .why summary::before {
  content: "+";
  font-size: 14px;
}
.est .why[open] summary::before {
  content: "–";
}
.est .why .why-body {
  font-size: 14px;
  color: #3a4247;
  background: var(--wash);
  padding: 14px 16px;
  margin-top: 8px;
  border-left: 2px solid var(--blue);
}

/* Panel viz */
.est .viz {
  margin-top: 28px;
  background: var(--newsprint);
  border: 1px solid var(--hairline);
  padding: 22px;
}
.est .viz-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.est .viz-row:last-child {
  margin-bottom: 0;
}
.est .viz-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: 104px;
  flex: 0 0 auto;
  color: var(--ink);
}
.est .viz-track {
  flex: 1;
  height: 14px;
  background: var(--blue-20);
  position: relative;
}
.est .viz-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--blue);
  transition: width 0.5s ease;
}
.est .viz-fill.f-exp {
  background: var(--blue-80);
}
.est .viz-fill.f-total {
  background: var(--ink);
}
.est .viz-num {
  font-family: var(--mono);
  font-size: 14px;
  width: 74px;
  text-align: right;
  flex: 0 0 auto;
}
.est .viz-total-num {
  font-size: 20px;
  color: var(--ink);
}

/* Dashboard */
.est .dash-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 16px;
  border: 1px solid var(--hairline);
  background: #fff;
}
.est table.dash {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 14px;
}
.est table.dash th,
.est table.dash td {
  padding: 12px 14px;
  border-bottom: 1px solid #efebe0;
  text-align: left;
  vertical-align: middle;
}
.est table.dash thead th {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  background: #fff;
}
.est table.dash .rowhead {
  position: sticky;
  left: 0;
  background: #fff;
  font-weight: 500;
  min-width: 180px;
  max-width: 220px;
  z-index: 2;
  border-right: 1px solid #efebe0;
}
.est table.dash thead .rowhead {
  z-index: 3;
}
.est table.dash .sec-row td {
  background: var(--cream);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}
.est table.dash .subtotal td {
  font-family: var(--mono);
  background: var(--wash);
}
.est table.dash .total-row td {
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 16px;
  border-bottom: none;
}
.est table.dash .total-row .rowhead {
  background: var(--ink);
  color: #fff;
  border-right-color: #2a3237;
}
.est .cell-score {
  font-family: var(--mono);
}
.est .cell-unscored {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  font-family: var(--serif);
}
.est .mini-track {
  height: 8px;
  background: var(--blue-20);
  margin-top: 5px;
  max-width: 120px;
}
.est .mini-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  transition: width 0.4s ease;
}
.est .dash-empty {
  background: #fff;
  border: 1px dashed var(--blue-40);
  padding: 36px 24px;
  text-align: center;
  margin-top: 16px;
}
.est .dash-empty p {
  font-family: var(--serif);
  font-size: 19px;
  color: #3a4247;
}

/* Export */
.est .export {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--hairline);
  padding: 26px 22px;
}
.est .export h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 6px;
}
.est .export-grid {
  display: grid;
  gap: 26px;
  margin-top: 18px;
}
@media (min-width: 800px) {
  .est .export-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.est .opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.est .opt input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}
.est .opt label {
  font-size: 15px;
  cursor: pointer;
}
.est .opt .opt-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.est .email-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.est .email-row input[type="email"] {
  flex: 1;
  min-width: 220px;
  font-size: 16px;
  padding: 11px 14px;
  border: 1px solid var(--ink);
  min-height: 44px;
  font-family: var(--sans);
}
.est .form-msg {
  margin-top: 12px;
  font-size: 14px;
  display: none;
  padding: 10px 14px;
}
.est .form-msg.err {
  display: block;
  color: var(--red);
  border-left: 2px solid var(--red);
  background: #fbf1f1;
}
.est .form-msg.ok {
  display: block;
  color: var(--blue);
  border-left: 2px solid var(--blue);
  background: var(--wash);
}

/* Share */
.est .share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
}
.est .share-note {
  font-size: 13px;
  color: var(--muted);
  width: 100%;
}

/* Notes */
.est .note-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 14px;
}
.est .note-field {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--blue-40);
  background: #fff;
  color: var(--ink);
  resize: vertical;
  min-height: 52px;
  line-height: 1.5;
}
.est .note-field:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.est .note-field::placeholder {
  color: #9aa1a6;
}
.est .qs-list {
  list-style: none;
}
.est .qs-list li {
  padding: 6px 0 6px 18px;
  position: relative;
}
.est .qs-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 1.5px;
  background: var(--blue);
}

/* Question sub-blocks in education sections */
.est .edu-qs {
  margin-top: 14px;
  border-left: 2px solid var(--blue-20);
  padding-left: 16px;
}
.est .edu-qs-h {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
}
.est .edu-qs .qs-list li {
  font-size: 14.5px;
  color: #2a3237;
}

/* Education + FAQ */
.est .edu-grid {
  display: grid;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--ink);
}
.est .edu-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  gap: 8px;
}
@media (min-width: 840px) {
  .est .edu-item {
    grid-template-columns: 220px 1fr;
    gap: 32px;
  }
}
.est .edu-item .e-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 0.12em;
}
.est .edu-item h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  margin-top: 2px;
}
.est .edu-item p {
  font-size: 15px;
  color: #2a3237;
}
.est .faq-list {
  margin-top: 28px;
  border-top: 1px solid var(--ink);
}
.est .faq-item {
  border-bottom: 1px solid var(--hairline);
}
.est .faq-item summary {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  padding: 20px 30px 20px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  min-height: 44px;
}
.est .faq-item summary::-webkit-details-marker {
  display: none;
}
.est .faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 18px;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--blue);
}
.est .faq-item[open] summary::after {
  content: "–";
}
.est .faq-item .faq-body {
  padding: 0 0 22px;
  font-size: 15px;
  color: #2a3237;
  max-width: 720px;
}

/* Disclaimer + fallback
 * Restrained editorial fine print: a mono eyebrow label + the section hairline
 * set it apart. No tint box, accent rail, or italics. */
.est .disclaimer {
  max-width: 780px;
}
.est .disclaimer p {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.75;
  color: #3a4247;
}
.est .fallback {
  display: none;
  background: #fbf1f1;
  border: 1px solid var(--red);
  padding: 16px 18px;
  font-size: 14px;
  margin-top: 16px;
}
.est .fallback.show {
  display: block;
}
.est .help-line {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}
.est .help-line a {
  font-family: var(--mono);
}

.est .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hidden print sections (populated live from React) */
.est #print-report-sec,
.est #print-questions-sec {
  display: none;
}
.est .print-report-body h2 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 6px;
}
.est .print-report-body .pr-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: #555;
  margin-bottom: 16px;
}
.est .print-report-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  margin-top: 10px;
}
.est .print-report-body th,
.est .print-report-body td {
  border: 1px solid #999;
  padding: 6px 8px;
  text-align: left;
}
.est .print-report-body .pr-edu {
  margin-top: 18px;
  font-size: 11px;
  color: #333;
}
.est .print-report-body .pr-edu h3 {
  font-family: var(--serif);
  font-size: 14px;
  margin: 10px 0 3px;
}
.est .print-report-body .pq-intro {
  font-size: 12px;
  margin-bottom: 8px;
}
.est .print-report-body .pq-h {
  font-family: var(--serif);
  font-size: 15px;
  margin: 14px 0 4px;
}
.est .print-report-body .pq-list {
  list-style: none;
}
.est .print-report-body .pq-list li {
  font-size: 12px;
  padding: 2px 0;
}
.est .print-report-body .pq-list li::after {
  content: "";
  display: block;
  height: 0;
  border-bottom: 1px solid #999;
  margin: 26px 0 8px;
}

/* ============================================================
 * Editorial guide sections (added for parity with the "how to choose"
 * preview): Short Answer, Qualifications/Experience (reuse .editorial),
 * Devices/Cost spec tables, Red Flags, Why Premier, mid CTA, Sources,
 * Continue Reading. Editorial system only (eyebrow + serif heading +
 * hairlines), no tinted callout boxes.
 * ============================================================ */

/* Shared section chrome */
.est .section-h {
  font-size: clamp(26px, 3.6vw, 38px);
  margin-bottom: 16px;
}
.est .section-lede {
  font-size: 17px;
  line-height: 1.65;
  color: #2a3237;
  max-width: 720px;
  margin-bottom: 24px;
}
.est .section-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 780px;
  margin-top: 18px;
}
.est .section-link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  border-bottom: 1px solid var(--blue);
  padding-bottom: 2px;
  text-decoration: none;
}
.est .section-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Brand grounds for set-apart sections */
.est .band-cream {
  background: var(--cream);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.est .band-wash {
  background: var(--wash);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.est .cta-band {
  text-align: center;
  border-top: 1px solid var(--hairline);
}
.est .cta-band-text {
  font-size: clamp(22px, 3vw, 32px);
  color: var(--ink);
  max-width: 760px;
  margin: 0 auto 24px;
}

/* Short Answer — featured TL;DR */
.est .short-answer {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 900px;
}

/* Spec tables (Devices, Cost) */
.est .spec-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
  border: 1px solid var(--hairline);
  background: #fff;
}
.est table.spec {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.est table.spec.wide {
  min-width: 760px;
}
.est table.spec.cost {
  min-width: 560px;
}
.est table.spec th,
.est table.spec td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #efebe0;
  vertical-align: top;
}
.est table.spec thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  background: var(--cream);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.est table.spec tbody tr:last-child td {
  border-bottom: none;
}
.est table.spec .spec-name {
  font-weight: 600;
  color: var(--ink);
}
.est table.spec .spec-price {
  font-family: var(--mono);
  color: var(--blue);
  white-space: nowrap;
}

/* Red flags */
.est .flags {
  list-style: none;
  margin-top: 8px;
  border-top: 1px solid var(--ink);
}
.est .flag {
  display: grid;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 720px) {
  .est .flag {
    grid-template-columns: 260px 1fr;
  }
}
.est .flag-title {
  position: relative;
  padding-left: 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.est .flag-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--red);
}
.est .flag-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: #3a4247;
}

/* Why Premier */
.est .premier-points {
  list-style: none;
  margin-top: 8px;
  border-top: 1px solid var(--ink);
}
@media (min-width: 760px) {
  .est .premier-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }
}
.est .premier-point {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.est .premier-num {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--blue);
}
.est .premier-text {
  font-size: 15px;
  line-height: 1.55;
  color: #2a3237;
}
.est .premier-closing {
  margin-top: 34px;
}
.est .premier-closing-lead {
  font-size: clamp(22px, 3vw, 32px);
  color: var(--ink);
  margin-bottom: 8px;
}
.est .premier-closing-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Sources */
.est .sources {
  list-style: none;
  margin-top: 8px;
  border-top: 1px solid var(--ink);
}
.est .source {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.est .source-name {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.est .source-desc {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.55;
  color: #3a4247;
}
.est .source-link {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
}
.est .source-link:hover {
  color: var(--ink);
}

/* Continue Reading */
.est .continue-grid {
  display: grid;
  gap: 32px;
  margin-top: 24px;
}
@media (min-width: 760px) {
  .est .continue-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}
.est .continue-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.est .continue-col ul {
  list-style: none;
}
.est .continue-col li {
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.est .continue-col a {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
}
.est .continue-col a:hover {
  color: var(--blue);
}

/* Criteria "Questions to Ask" accordion (matches the FAQ pattern) */
.est .crit-accordion {
  margin-top: 28px;
  border-top: 1px solid var(--ink);
}
.est .crit-acc-item {
  border-bottom: 1px solid var(--hairline);
}
.est .crit-acc-item summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 18px 34px 18px 0;
  min-height: 44px;
}
.est .crit-acc-item summary::-webkit-details-marker {
  display: none;
}
.est .crit-acc-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--blue);
}
.est .crit-acc-item[open] summary::after {
  content: "–";
}
.est .crit-acc-num {
  flex: 0 0 168px;
  padding-top: 5px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  white-space: nowrap;
}
/* Fixed-width category so the "· NN" lines up across every row. */
.est .crit-acc-cat {
  display: inline-block;
  width: 84px;
}
.est .crit-acc-sep {
  margin: 0 6px;
}
.est .crit-acc-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}
.est .crit-acc-body {
  padding: 0 0 22px;
  max-width: 760px;
}
.est .crit-acc-body > p {
  font-size: 15px;
  line-height: 1.65;
  color: #2a3237;
  margin-bottom: 4px;
}

/* Print
 * The mock hid its own `.site-header` / `.site-footer`; here we hide the
 * shared chrome (NavV2 renders <header>, FooterV2 renders <footer>). These
 * rules only ship on this route, so the generic header/footer selectors are
 * safe. Body classes are toggled by the print buttons. */
@media print {
  header,
  footer,
  .est .hero-ctas,
  .est .share-bar,
  .est .export,
  .est .add-row,
  .est .tabs-bar,
  .est .remove-link,
  .est .seg-row,
  .est .no-print,
  .est .notice {
    display: none !important;
  }
  .est {
    background: #fff;
    font-size: 12px;
  }
  .est section {
    padding: 18px 0;
  }
  .est .hero {
    padding: 18px 0;
    background: #fff !important;
    color: var(--ink) !important;
  }
  .est .hero .est-eyebrow,
  .est .hero h1,
  .est .hero .serif-h em,
  .est .hero .lede {
    color: var(--ink) !important;
  }
  .est .note-label,
  .est .note-field {
    display: none;
  }
  .est .panel,
  .est .dash-scroll {
    border: 1px solid #999;
  }
  .est table.dash {
    min-width: 0;
  }
  .est a {
    color: var(--ink);
    text-decoration: none;
  }

  body.print-questions .est section:not(#print-questions-sec) {
    display: none;
  }
  body.print-questions .est #print-questions-sec {
    display: block !important;
  }
  body.print-report .est section:not(#print-report-sec) {
    display: none;
  }
  body.print-report .est #print-report-sec {
    display: block !important;
  }
}

/* ============================================================
 * MOBILE-ONLY OVERRIDES (screen ≤ 640px).
 *
 * Additive overrides for phones. Everything here is nested in
 * `@media screen and (max-width: …)`, so desktop (≥ 641px) and print
 * are provably untouched — the base rules above remain the sole
 * authority there. `screen` also keeps these out of the print path so
 * the @media print table handling above never conflicts when printing
 * from a phone.
 *
 * Primary fix: the summary dashboard <table> is re-flowed into
 * criterion-major cards. Each row becomes a card whose title is the
 * criterion and whose body lists every surgeon (name from data-label +
 * a full-width mini-bar on a shared 0–5 scale) — restoring true
 * side-by-side comparison with zero horizontal scroll. The real <table>
 * is preserved for a11y (roles + off-screen thead set in the JSX).
 * ============================================================ */
@media screen and (max-width: 640px) {
  /* ---------- Dashboard: table → criterion cards ---------- */

  /* Drop the horizontal scroller frame; cards sit flush. */
  .est .dash-scroll {
    overflow-x: visible;
    border: none;
    background: transparent;
    margin-top: 12px;
  }

  /* Remove the 520px floor that caused the ~218px overflow. */
  .est table.dash {
    display: block;
    min-width: 0;
    width: 100%;
    font-size: 15px;
  }

  /* Column headers are redundant once each cell self-labels; hide them
     visually but keep them for screen readers (not display:none). */
  .est table.dash thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .est table.dash tbody {
    display: block;
  }

  /* Each row is a card. */
  .est table.dash tr {
    display: block;
    background: #fff;
    border: 1px solid var(--hairline);
    margin-bottom: 12px;
    padding: 0 14px 10px;
  }

  /* Criterion name = card title. Undo the sticky/width/right-border that
     only make sense in real table layout. */
  .est table.dash .rowhead {
    display: block;
    position: static;
    min-width: 0;
    max-width: none;
    background: transparent;
    border-right: none;
    border-bottom: 1px solid var(--hairline);
    padding: 12px 0 8px;
    font-size: 16px;
    font-weight: 600;
  }

  /* Surgeon cell: label + score on one line, bar wraps to its own. */
  .est table.dash td:not(.rowhead) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding: 10px 0;
    border-bottom: 1px solid #efebe0;
  }
  .est table.dash tr td:not(.rowhead):last-child {
    border-bottom: none;
  }

  /* Surgeon name injected from data-label; flex:1 pushes value right. */
  .est table.dash td:not(.rowhead)::before {
    content: attr(data-label);
    flex: 1 1 auto;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .est table.dash .cell-score,
  .est table.dash .cell-unscored {
    margin-left: auto;
  }

  /* Mini-bar spans the full card width on line 2 (shared 0–5 scale). */
  .est table.dash .mini-track {
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
    height: 10px;
    margin-top: 2px;
  }

  /* Section divider row: full-width label, hide empty surgeon cells. */
  .est table.dash tr.sec-row {
    background: var(--cream);
    padding: 0;
    margin-bottom: 0;
    border-bottom: none;
  }
  .est table.dash tr.sec-row .rowhead {
    border-bottom: none;
    padding: 10px 14px;
  }
  .est table.dash tr.sec-row td:not(.rowhead) {
    display: none;
  }

  /* Subtotal card. */
  .est table.dash tr.subtotal {
    background: var(--wash);
  }
  .est table.dash tr.subtotal .rowhead {
    border-bottom-color: var(--blue-20);
  }

  /* Total card keeps the dark emphasis. */
  .est table.dash tr.total-row {
    background: var(--ink);
    border-color: var(--ink);
  }
  .est table.dash tr.total-row .rowhead {
    color: #fff;
    border-bottom-color: #2a3237;
  }
  .est table.dash tr.total-row td:not(.rowhead) {
    color: #fff;
    border-bottom-color: #2a3237;
  }
  .est table.dash tr.total-row td:not(.rowhead)::before {
    color: rgba(255, 255, 255, 0.6);
  }

  /* Per-criterion leader highlight (subtle comparison cue). */
  .est table.dash td.cell-leader::before {
    color: var(--blue);
  }
  .est table.dash td.cell-leader .cell-score {
    font-weight: 700;
    color: var(--blue);
  }
  .est table.dash td.cell-leader .mini-fill {
    background: var(--blue);
  }

  /* ---------- Tabs: wrap instead of hidden horizontal scroll ---------- */
  .est .tabs-bar {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .est .tab-btn {
    flex: 0 1 auto;
  }

  /* ---------- Share buttons: full-width tidy stack ---------- */
  .est .share-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .est .share-bar .btn {
    width: 100%;
  }

  /* ---------- Tap targets ≥ 44px ---------- */
  .est .why summary {
    min-height: 44px;
  }
  .est .remove-link {
    min-height: 44px;
    padding: 12px 8px;
  }
}

/* Very small phones: keep the tab chips compact (~2-up). */
@media screen and (max-width: 380px) {
  .est .tab-btn {
    font-size: 13px;
    padding: 10px 12px;
  }
}

/* Accordion labels: stack the criterion number above the name on phones so
   the fixed label column doesn't crowd the title. */
@media screen and (max-width: 640px) {
  .est .crit-acc-item summary {
    flex-wrap: wrap;
  }
  .est .crit-acc-num {
    flex-basis: 100%;
    padding-top: 0;
    margin-bottom: 4px;
  }
}

/* ============================================================
 * WordPress adapters (WP port only).
 *
 * On the WordPress build the editorial guide sections are editable Gutenberg
 * blocks that carry these same `.est` classNames, so the rules above style
 * them unchanged. Two block types need a small adapter because their DOM
 * differs from the hand-written React markup:
 *   1. core/table (the Devices + Cost comparison tables) renders
 *      <figure class="wp-block-table spec-wide|spec-cost"><table>…</table></figure>
 *      instead of <div class="spec-wrap"><table class="spec wide|cost">…>.
 *   2. core/details (the FAQ items) renders
 *      <details class="wp-block-details faq-item"><summary>…</summary>…blocks…>
 *      with no explicit .faq-body wrapper.
 * These rules reproduce the original look for both. Scoped to `.est`, so they
 * cannot leak into other blocks on the site.
 * ============================================================ */

/* --- core/table → .spec tables (Devices .spec-wide, Cost .spec-cost) --- */
.est .wp-block-table.spec-wide,
.est .wp-block-table.spec-cost {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0 0;
  border: 1px solid var(--hairline);
  background: #fff;
}
.est .wp-block-table.spec-wide table,
.est .wp-block-table.spec-cost table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  color: var(--ink);
}
.est .wp-block-table.spec-wide table {
  min-width: 760px;
}
.est .wp-block-table.spec-cost table {
  min-width: 560px;
}
.est .wp-block-table.spec-wide th,
.est .wp-block-table.spec-wide td,
.est .wp-block-table.spec-cost th,
.est .wp-block-table.spec-cost td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #efebe0;
  vertical-align: top;
}
.est .wp-block-table.spec-wide thead th,
.est .wp-block-table.spec-cost thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  background: var(--cream);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.est .wp-block-table.spec-wide tbody tr:last-child td,
.est .wp-block-table.spec-cost tbody tr:last-child td {
  border-bottom: none;
}
/* First column is the row label (bold ink), matching .spec .spec-name. */
.est .wp-block-table.spec-wide tbody td:first-child,
.est .wp-block-table.spec-cost tbody td:first-child {
  font-weight: 600;
  color: var(--ink);
}
/* Cost table value columns render as mono blue prices (.spec .spec-price). */
.est .wp-block-table.spec-cost tbody td:not(:first-child) {
  font-family: var(--mono);
  color: var(--blue);
  white-space: nowrap;
}

/* --- core/details → .faq-item accordion body --- */
.est .faq-item > :not(summary) {
  font-size: 15px;
  line-height: 1.6;
  color: #2a3237;
  max-width: 720px;
  margin: 0 0 22px;
}
.est .faq-item > :not(summary):first-of-type {
  margin-top: 0;
}
