/* MMT editorial blocks: takeaways, tables, callouts, figures, charts, itineraries, steps, footnotes, sources.
   Brand tokens only: forest #163E35, paper #F6F3EA, orange #BC532D, sage #C7D4C3, ink #22302C. */
.ed-guide, .ed-prose { --forest:#163e35; --paper:#f6f3ea; --orange:#bc532d; --sage:#c7d4c3; --ink:#22302c; --muted:#63716a; --line:#d8ddd2; --wash:#edf0e6; }
.ed-guide *, .ed-prose * { box-sizing: border-box; }

/* Short version */
.ed-takeaways { border-top: 3px solid var(--forest); background: var(--wash); padding: 1.4rem 1.6rem 1.2rem; margin: 1.6rem 0 1.8rem; max-width: 860px; }
.ed-takeaways .eyebrow { margin-bottom: .7rem; }
.ed-takeaways ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.ed-takeaways li { font-size: 1.02rem; line-height: 1.55; }
.ed-takeaways li::marker { color: var(--orange); }

/* Prose */
.ed-guide .cg-section p, .ed-prose p { max-width: 72ch; }
.ed-guide strong, .ed-prose strong { color: var(--forest); font-weight: 700; }
.ed-list { margin: 0 0 1.25rem; padding-left: 1.3rem; display: grid; gap: .45rem; max-width: 72ch; line-height: 1.7; }
.ed-list li::marker { color: var(--orange); font-weight: 700; }
.ed-list--check { list-style: none; padding-left: 0; }
.ed-list--check li { padding-left: 1.7rem; position: relative; }
.ed-list--check li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--forest); font-weight: 700; }

/* Footnotes */
.ed-fn { font-size: .68em; line-height: 0; vertical-align: super; margin-left: .1em; white-space: nowrap; }
.ed-fn a { color: var(--orange); text-decoration: none; font-weight: 700; padding: 0 .1em; }
.ed-fn a:hover, .ed-fn a:focus-visible { text-decoration: underline; }
.ed-fn span { color: var(--muted); }

/* Tables */
.ed-table { margin: 1.4rem 0 1.8rem; max-width: 860px; }
.ed-table figcaption { font-family: Georgia, serif; font-size: 1.15rem; line-height: 1.35; margin: 0 0 .7rem; color: var(--ink); }
.ed-table-scroll { overflow-x: auto; border: 1px solid var(--sage); background: #fbfaf5; }
.ed-table table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .95rem; }
.ed-table th, .ed-table td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.45; }
.ed-table th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); background: var(--wash); }
.ed-table .ed-r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-table tfoot td { font-weight: 700; background: var(--wash); border-top: 2px solid var(--forest); border-bottom: 0; }
.ed-table-note { font-size: .82rem; color: var(--muted); line-height: 1.55; margin: .6rem 0 0; max-width: 72ch; }

/* Callouts */
.ed-callout { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .8rem; padding: 1.1rem 1.25rem; margin: 1.3rem 0 1.6rem; max-width: 760px; border-left: 3px solid var(--forest); background: var(--wash); }
.ed-callout--tip { border-color: var(--forest); }
.ed-callout--money { border-color: var(--orange); }
.ed-callout--warn { border-color: var(--orange); background: #f6ede4; }
.ed-callout--note { border-color: var(--sage); }
.ed-callout-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--forest); color: var(--paper); font-weight: 700; font-size: .95rem; }
.ed-callout--money .ed-callout-icon, .ed-callout--warn .ed-callout-icon { background: var(--orange); }
.ed-callout strong { display: block; font-family: Georgia, serif; font-weight: 400; font-size: 1.15rem; margin: .1rem 0 .35rem; color: var(--ink); }
.ed-callout p { margin: 0; font-size: .95rem; line-height: 1.65; }

/* Figures */
.ed-figure { margin: 1.2rem 0 2rem; max-width: 900px; }
.ed-figure img { display: block; width: 100%; height: auto; background: var(--wash); }
.ed-figure figcaption { margin-top: .6rem; font-size: .85rem; line-height: 1.55; color: #364c41; }
.ed-fig-caption { display: block; }
.ed-fig-credit { display: block; font-size: .72rem; color: var(--muted); margin-top: .2rem; overflow-wrap: anywhere; }
.ed-fig-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ed-hero { margin: 1.4rem 0 1.6rem; max-width: none; }
.ed-hero img { aspect-ratio: 16 / 9; object-fit: cover; }

/* Charts */
.ed-chart { margin: 1.4rem 0 2rem; max-width: 760px; padding: 1.1rem 1.2rem 1rem; border: 1px solid var(--sage); background: #fbfaf5; }
.ed-chart-head { display: flex; flex-direction: column; gap: .15rem; margin: 0 0 .9rem; }
.ed-chart-head strong { font-family: Georgia, serif; font-weight: 400; font-size: 1.15rem; line-height: 1.3; color: var(--ink); }
.ed-chart-head span { font-size: .85rem; color: var(--muted); }
.ed-chart svg { display: block; width: 100%; height: auto; }
.ed-chart-note { font-size: .78rem; color: var(--muted); line-height: 1.55; margin: .7rem 0 0; }
.ed-chart-table { margin-top: .7rem; font-size: .85rem; }
.ed-chart-table summary { cursor: pointer; color: var(--forest); font-weight: 700; font-size: .8rem; }
.ed-chart-table table { border-collapse: collapse; width: 100%; margin-top: .5rem; }
.ed-chart-table th, .ed-chart-table td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }

/* Itinerary */
.ed-itinerary { margin: 1.3rem 0 1.9rem; max-width: 760px; border: 1px solid var(--sage); background: #fbfaf5; padding: 1.2rem 1.4rem 1rem; }
.ed-itin-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-bottom: 1rem; }
.ed-itin-head .eyebrow { margin: 0; }
.ed-itin-head strong { font-family: Georgia, serif; font-weight: 400; font-size: 1.3rem; }
.ed-itin-total { margin-left: auto; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); font-weight: 700; }
.ed-itinerary ol { list-style: none; margin: 0; padding: 0; }
.ed-itinerary li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .8rem; position: relative; padding: 0 0 1.2rem; }
.ed-itinerary li:not(:last-child)::before { content: ""; position: absolute; left: 1.05rem; top: 2.3rem; bottom: .3rem; width: 1px; background: var(--sage); }
.ed-itin-n { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--forest); color: var(--paper); font-size: .72rem; font-weight: 700; letter-spacing: .05em; }
.ed-itin-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.ed-itin-top strong { font-family: Georgia, serif; font-weight: 400; font-size: 1.15rem; color: var(--ink); }
.ed-itin-nights { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); font-weight: 700; }
.ed-itinerary p { margin: .3rem 0 0; font-size: .95rem; line-height: 1.6; }
.ed-itin-transfer { display: block; margin-top: .35rem; font-size: .82rem; color: var(--muted); }
.ed-itin-cut { border-top: 1px solid var(--sage); padding-top: .8rem; margin: 0; font-size: .9rem; }

/* Steps */
.ed-steps { list-style: none; margin: 1.2rem 0 1.6rem; padding: 0; max-width: 760px; }
.ed-steps li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .9rem; padding: 0 0 1.4rem; position: relative; }
.ed-steps li:not(:last-child)::before { content: ""; position: absolute; left: 1.2rem; top: 2.6rem; bottom: .3rem; width: 1px; background: var(--sage); }
.ed-step-n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--forest); color: var(--paper); font-size: .75rem; font-weight: 700; letter-spacing: .05em; }
.ed-steps h3 { font-family: Georgia, serif; font-weight: 400; font-size: 1.2rem; margin: .2rem 0 .4rem; }
.ed-steps p { margin: 0; }

/* Confirm-before box and sources */
.ed-confirm { border: 1px solid var(--orange); background: #f6ede4; padding: 1.1rem 1.3rem; margin: 1.2rem 0 1.6rem; max-width: 760px; }
.ed-confirm strong { display: block; font-family: Georgia, serif; font-weight: 400; font-size: 1.15rem; margin: .2rem 0 .6rem; }
.ed-confirm ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; font-size: .92rem; line-height: 1.55; }
.ed-source-list { margin: 1.2rem 0 0; padding: 0; list-style: none; counter-reset: none; }
.ed-source-list li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.5; scroll-margin-top: 2rem; }
.ed-source-list li:target { background: var(--wash); }
.ed-src-n { font-weight: 700; color: var(--orange); }
.ed-source-list li > div > a { color: var(--forest); text-underline-offset: 3px; overflow-wrap: anywhere; }
.ed-source-list li > div > span { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.ed-source-list--plain li { grid-template-columns: minmax(0, 1fr); }
.ed-also { margin-top: 1rem; }
.ed-also summary { cursor: pointer; font-weight: 700; color: var(--forest); font-size: .85rem; }
.ed-related { border-top: 1px solid var(--sage); padding-top: 1.6rem; margin-top: 1.6rem; }
.ed-related h2 { font-family: Georgia, serif; font-weight: 400; font-size: 1.5rem; margin: 0 0 .8rem; }
.ed-related ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; }

/* Article prose tune-ups */
.ed-prose h3 { font-family: Georgia, serif; font-weight: 400; font-size: 1.35rem; margin: 1.6rem 0 .6rem; }
.ed-prose .cg-section-summary { font-size: 1.08rem; color: #425a50; line-height: 1.65; border-left: 3px solid var(--orange); padding-left: 1rem; margin: 0 0 1.2rem; }
.ed-faq details { border-top: 1px solid var(--sage); }
.ed-faq summary { font-weight: 700; cursor: pointer; }
.ed-prose .ed-sources h2 { font-size: 1.6rem; }
.ed-prose .ed-sources .eyebrow { margin-bottom: .6rem; }

@media (max-width: 700px) {
  .ed-takeaways { padding: 1.1rem 1.1rem 1rem; }
  .ed-callout { grid-template-columns: 1.8rem minmax(0, 1fr); padding: .9rem 1rem; }
  .ed-chart { padding: .9rem .8rem .8rem; }
  .ed-chart svg { font-size: 15px; }
  .ed-itinerary { padding: 1rem 1rem .8rem; }
  .ed-itin-total { margin-left: 0; }
  .ed-table th, .ed-table td { padding: .55rem .6rem; font-size: .9rem; }
}

/* Phones: tables with three or more columns stack into labeled rows, so no figure hides off-screen. Added 2026-09-13. */
@media (max-width: 700px) {
  .ed-table--stack .ed-table-scroll { overflow-x: visible; border: 0; background: transparent; }
  .ed-table--stack table { min-width: 0; }
  .ed-table:not(.ed-table--stack) table { min-width: 0; } /* two-column tables fit the phone; added 2026-09-24 */
  .ed-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .ed-table--stack tbody tr, .ed-table--stack tfoot tr { display: block; margin: 0 0 .75rem; border: 1px solid var(--sage); background: #fbfaf5; }
  .ed-table--stack td { display: grid; grid-template-columns: minmax(6rem, 40%) minmax(0, 1fr); gap: .75rem; padding: .5rem .7rem; border-bottom: 1px solid var(--line); white-space: normal; }
  .ed-table--stack td::before { content: attr(data-label); font-size: .7rem; line-height: 1.5; letter-spacing: .06em; text-transform: uppercase; color: var(--forest); font-weight: 700; }
  .ed-table--stack td:first-child { display: block; background: var(--wash); font-weight: 700; }
  .ed-table--stack td:first-child::before { content: none; }
  .ed-table--stack td:last-child { border-bottom: 0; }
  .ed-table--stack .ed-r { text-align: left; white-space: normal; }
  .ed-table--stack tfoot tr { border: 2px solid var(--forest); }
  .ed-table--stack tfoot td { border-top: 0; background: var(--wash); }
}

/* Phones: charts switch to a narrow layout with labels on their own line and full-size text. Added 2026-09-13. */
.ed-chart svg.ed-chart-narrow { display: none; }
@media (max-width: 700px) {
  .ed-chart svg.ed-chart-wide { display: none; }
  .ed-chart svg.ed-chart-narrow { display: block; }
}
