/* manners-etiquette.com
   One stylesheet: fonts, tokens, page chrome, home, pages. The guide components are appended by build.py
   from blog/house-guest-etiquette.html, so the guides have a single source of truth. */

/* ---------- fonts, self-hosted ---------- */
@font-face { font-family: "Libre Caslon Display"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/libre-caslon-display-400.woff2) format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/libre-caslon-text-400.woff2) format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/libre-caslon-text-400i.woff2) format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/libre-caslon-text-700.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/montserrat-var.woff2) format("woff2"); }

/* ---------- tokens ---------- */
:root {
  --paper: #f7f7f4;
  --ink: #1e211d;
  --ink-soft: #565b51;
  --hair: #d9dbd2;
  --accent: #5b6250;
  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --text: "Libre Caslon Text", Georgia, serif;
  --ui: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1160px;
  --gutter: clamp(1rem, 4vw, 3rem);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.6 var(--text); font-kerning: normal; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: color 0.3s var(--ease); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 1rem; top: -3rem; padding: 0.6rem 1rem; background: var(--ink); color: var(--paper); font: 600 0.75rem/1 var(--ui); letter-spacing: 0.12em; text-transform: uppercase; z-index: 10; }
.skip:focus { top: 1rem; }
.btn { display: inline-block; padding: 1rem 1.6rem; background: var(--ink); color: var(--paper) !important; text-decoration: none; white-space: nowrap;
  font: 600 0.75rem/1 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; transition: background-color 0.3s var(--ease), transform 0.15s var(--ease); }
.btn:hover { background: var(--accent); }
.btn:active { transform: translateY(1px); }
.label { font: 600 0.6875rem/1.5 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--hair); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.wordmark { font: 400 1.35rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }
.site-nav a { font: 500 0.75rem/1 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); padding: 0.5rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--hair); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.75rem 2.25rem; color: var(--ink-soft); font-size: 0.9375rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- home ---------- */
.home-hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem); }
.home-hero h1 { max-width: 14ch; font: 400 clamp(2.75rem, 6.5vw, 5.25rem)/1 var(--display); letter-spacing: -0.018em; }
.home-hero p { max-width: 34rem; margin-top: 1.5rem; font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.5; color: var(--ink-soft); }
.guides { padding-top: clamp(1rem, 3vw, 2rem); }
.guides > .label { display: block; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); }
.guide-list { list-style: none; margin: 0; padding: 0; }
.guide-card { border-bottom: 1px solid var(--hair); }
.guide-card a { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(1.75rem, 4vw, 3rem); text-decoration: none; }
.guide-card a:hover { color: inherit; }
.guide-card img { width: 100%; transition: transform 0.5s var(--ease); }
.guide-card a:hover img { transform: translateY(-4px); }
.guide-card h2 { margin-top: 0.4rem; font: 400 clamp(1.9rem, 3.2vw, 2.75rem)/1.08 var(--display); letter-spacing: -0.012em; }
.guide-card a:hover h2 { color: var(--accent); }
.guide-card .dek { max-width: 36rem; margin-top: 0.75rem; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-soft); }
.guide-card .meta { margin-top: 1.1rem; font: 500 0.6875rem/1.5 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.guide-card .meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 0.9rem; vertical-align: middle; background: var(--hair); }
.home-about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; padding-top: clamp(4rem, 9vw, 7rem); }
.home-about h2 { font: 400 clamp(1.9rem, 3.6vw, 2.75rem)/1.1 var(--display); letter-spacing: -0.012em; }
.home-about p { margin-top: 1.25rem; max-width: 36rem; color: var(--ink-soft); }
.home-about .btn { justify-self: start; }

/* ---------- pages (about, legal, 404, legacy articles) ---------- */
.page { max-width: 44rem; padding-block: clamp(3rem, 7vw, 5.5rem) 0; }
.page h1 { font: 400 clamp(2.5rem, 5.5vw, 4rem)/1.02 var(--display); letter-spacing: -0.016em; }
.page .lede { margin-top: 1.25rem; font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.5; color: var(--ink-soft); }
.page .byline { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--hair); font: 500 0.6875rem/1.5 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.page-body { margin-top: clamp(2rem, 4vw, 3rem); }
.page-body h2 { margin-top: 2.5rem; font: 400 clamp(1.5rem, 2.4vw, 1.9rem)/1.2 var(--display); }
.page-body h3 { margin-top: 1.75rem; font: 700 1.0625rem/1.4 var(--text); }
.page-body p, .page-body ul, .page-body ol { margin-top: 1rem; }
.page-body ul, .page-body ol { padding-left: 1.25rem; }
.page-body li + li { margin-top: 0.35rem; }
.page-body img { margin-top: 1.5rem; }
.page-body figure { margin: 1.5rem 0 0; }
.page-body figcaption { margin-top: 0.5rem; font-size: 0.875rem; color: var(--ink-soft); }
.page-body .placeholder { background: #fff3c4; padding: 0 0.2em; }
.page-body address { font-style: normal; }
.legacy-note { margin-top: 2.5rem; padding: 1.25rem 1.5rem; border-left: 3px solid var(--accent); background: #f1efe8; font-size: 1rem; color: var(--ink-soft); }
.legacy-note a { color: var(--ink); }

@media (max-width: 720px) {
  body { font-size: 1.0625rem; }
  .site-header .wrap { min-height: 4rem; }
  .wordmark { font-size: 1.1rem; }
  .site-nav { gap: 1rem; }
  .guide-card a { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
  .guide-card .dek { font-size: 1.0625rem; }
  .home-about { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .site-nav a:first-child { display: none; }   /* "Guides" is the home page anyway; keeps the bar on one line */
  .wordmark { font-size: 0.95rem; letter-spacing: 0.06em; }
  .site-nav { gap: 0.9rem; }
  .site-nav a { font-size: 0.6875rem; letter-spacing: 0.1em; }
}
.mg { padding-bottom: 0; }   /* on the site the footer provides the space below a guide */


/* ---------- guide components: copy from here into Additional CSS ---------- */
  .mg {
    --paper: #f7f7f4;
    --ink: #1e211d;
    --ink-soft: #565b51;
    --hair: #d9dbd2;
    --series: #8a8f7a;       /* series colour, identical to the Instagram panel */
    --series-deep: #5b6250;  /* same hue, dark enough for small text on paper */
    --panel: #6b715e;        /* same hue, white text on it passes WCAG AA */
    --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
    --text: "Libre Caslon Text", Georgia, serif;
    --ui: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--ink);
    background: var(--paper);
    font: 400 1.125rem/1.7 var(--text);
    font-kerning: normal;
    -webkit-font-smoothing: antialiased;
    padding-bottom: clamp(3rem, 6vw, 5rem);
  }
  .mg--table { --series: #c1a987; --series-deep: #7d6a4f; --panel: #8a7558; }
  .mg *, .mg *::before, .mg *::after { box-sizing: border-box; }
  .mg h1, .mg h2, .mg h3, .mg p, .mg ol, .mg ul, .mg li, .mg figure, .mg table { margin: 0; }
  .mg ol, .mg ul { padding: 0; }
  .mg img { max-width: 100%; border: 0; box-shadow: none; }
  .mg h1, .mg h2, .mg h3 { font-weight: 400; text-wrap: balance; color: inherit; text-transform: none; letter-spacing: normal; }   /* headings take the colour of their panel, white inside .mg-index */
  .mg p { text-wrap: pretty; }
  .mg a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: color 0.3s var(--ease); }
  .mg a:hover { color: var(--series-deep); }
  .mg :focus-visible { outline: 2px solid var(--series-deep); outline-offset: 3px; }
  .mg .mg-wrap { max-width: 1160px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }

  /* hero */
  .mg-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: end;
    padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
  .mg .mg-hero h1 { font: 400 clamp(3.25rem, 7vw, 5.75rem)/0.98 var(--display); letter-spacing: -0.018em; }
  .mg .mg-dek { margin-top: 1.5rem; max-width: 24ch; font: italic 400 clamp(1.3rem, 2.1vw, 1.7rem)/1.35 var(--text); }
  .mg .mg-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; margin-top: clamp(2rem, 4vw, 3.25rem); padding: 1.1rem 0 0; list-style: none;
    border-top: 1px solid var(--hair); font: 500 0.6875rem/1.5 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
  .mg .mg-lede { max-width: 44rem; padding-bottom: clamp(3rem, 6vw, 4.5rem); font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.55; }
  .mg .mg-lede em { color: var(--series-deep); }

  /* the ten rules at a glance: the Instagram panel, translated to the page */
  .mg-index { padding: clamp(2.75rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3.5rem); background: var(--panel); color: #fbfbf8; }
  .mg .mg-index__head { text-align: center; padding-bottom: clamp(2rem, 4vw, 3rem); }
  .mg .mg-index__orn { display: block; width: clamp(9rem, 16vw, 13rem); height: auto; margin: 0 auto 1.25rem; filter: brightness(0) invert(1); opacity: 0.92; }
  .mg .mg-index h2 { font: 400 clamp(2.25rem, 4vw, 3.25rem)/1.05 var(--display); letter-spacing: -0.01em; }
  .mg .mg-index ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); grid-auto-flow: column;
    column-gap: clamp(2.5rem, 5vw, 3.5rem); padding: 0; list-style: none; counter-reset: idx; }
  .mg .mg-index li { counter-increment: idx; display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); align-items: baseline;
    padding-block: 1.1rem; border-bottom: 1px solid rgb(251 251 248 / 0.28); }
  .mg .mg-index li:nth-child(1), .mg .mg-index li:nth-child(6) { border-top: 1px solid rgb(251 251 248 / 0.28); }
  .mg .mg-index li::before { content: counter(idx); font: 400 2.1rem/1 var(--display); color: rgb(251 251 248 / 0.82); }
  .mg .mg-index a { font-size: 1.3125rem; line-height: 1.3; text-wrap: balance; text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.4s var(--ease); }
  .mg .mg-index a:hover { color: inherit; background-size: 100% 1px; }

  /* rules */
  .mg-rules { padding-top: clamp(3rem, 6vw, 5rem); list-style: none; counter-reset: rule; }
  .mg .mg-rule { counter-increment: rule; display: grid; grid-template-columns: 5.5rem minmax(0, 32rem) 20rem; grid-template-rows: auto 1fr;
    grid-template-areas: "num head media" "num text media"; align-content: start; column-gap: clamp(2rem, 3.5vw, 3.5rem);
    padding-block: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--hair); scroll-margin-top: 1.5rem; }
  .mg .mg-rule:last-child { border-bottom: 1px solid var(--hair); }
  .mg .mg-rule::before { content: counter(rule); grid-area: num; margin-top: -0.06em; font: 400 3.75rem/0.9 var(--display); color: var(--series); }
  .mg .mg-rule h2 { grid-area: head; margin-bottom: 0.8rem; font: 400 clamp(1.7rem, 2.6vw, 2.125rem)/1.15 var(--display); letter-spacing: -0.008em; }
  .mg .mg-rule p { grid-area: text; font-size: 1.1875rem; line-height: 1.65; }
  .mg .mg-rule .mg-frame { grid-area: media; align-self: start; }

  /* frame around the Instagram originals, after the reference: a double rule with small acanthus corners, in the series colour, outside the post */
  .mg-frame { position: relative; padding: 4%; color: var(--series); }
  .mg .mg-frame__img { display: block; width: 100%; height: auto; }
  .mg .mg-frame::before, .mg .mg-frame::after { content: ""; position: absolute; border: solid currentColor; pointer-events: none; }
  .mg .mg-frame::before { inset: 0; border-width: 1.5px; }
  .mg .mg-frame::after { inset: 4px; border-width: 1px; }
  .mg .mg-frame__corner { position: absolute; display: block; width: 9%; aspect-ratio: 1; background: currentColor; pointer-events: none;
    -webkit-mask: url(/images/frame_corner.png) 0 0 / 100% 100% no-repeat; mask: url(/images/frame_corner.png) 0 0 / 100% 100% no-repeat; }
  .mg .mg-frame__corner.tl { top: 0; left: 0; }
  .mg .mg-frame__corner.tr { top: 0; right: 0; transform: scaleX(-1); }
  .mg .mg-frame__corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
  .mg .mg-frame__corner.br { bottom: 0; right: 0; transform: scale(-1); }

  /* around the world */
  .mg-h { font: 400 clamp(2rem, 4.2vw, 3.25rem)/1.06 var(--display); letter-spacing: -0.012em; }
  .mg .mg-world { padding-top: clamp(4rem, 9vw, 7rem); }
  .mg .mg-world .mg-h { max-width: 16ch; }
  .mg .mg-intro { max-width: 36rem; margin-top: 1.1rem; color: var(--ink-soft); }
  .mg .mg-compare { width: 100%; margin-top: clamp(2rem, 4vw, 3rem); border-collapse: collapse; font-size: 1.0625rem; line-height: 1.55; }
  .mg .mg-compare thead th { padding: 0 1.75rem 0.85rem 0; border-bottom: 1px solid var(--ink); text-align: left;
    font: 600 0.6875rem/1.3 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
  .mg .mg-compare tbody th, .mg .mg-compare td { padding: 1.35rem 1.75rem 1.35rem 0; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
  .mg .mg-compare tbody th { width: 9.5rem; font: 400 1.6rem/1.1 var(--display); }
  .mg .mg-compare td:last-child, .mg .mg-compare th:last-child { padding-right: 0; }

  /* faq */
  .mg-faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; padding-top: clamp(4rem, 9vw, 7rem); }
  .mg .mg-faq .mg-h { position: sticky; top: 2rem; }
  .mg .mg-faq details { border-top: 1px solid var(--hair); }
  .mg .mg-faq details:last-child { border-bottom: 1px solid var(--hair); }
  .mg .mg-faq summary { display: grid; grid-template-columns: 1fr 1rem; gap: 1.5rem; align-items: center; padding-block: 1.3rem;
    list-style: none; cursor: pointer; font-size: 1.1875rem; line-height: 1.4; transition: color 0.3s var(--ease); }
  .mg .mg-faq summary::-webkit-details-marker { display: none; }
  .mg .mg-faq summary::after { content: ""; width: 1rem; height: 1rem; transition: background-size 0.35s var(--ease);
    background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat, linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat; }
  .mg .mg-faq details[open] summary::after { background-size: 100% 1px, 1px 0; }
  .mg .mg-faq summary:hover { color: var(--series-deep); }
  .mg .mg-faq details p { max-width: 36rem; padding-bottom: 1.5rem; color: var(--ink-soft); }
  @supports (interpolate-size: allow-keywords) {
    .mg .mg-faq { interpolate-size: allow-keywords; }
    .mg .mg-faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.45s var(--ease), content-visibility 0.45s allow-discrete; }
    .mg .mg-faq details[open]::details-content { block-size: auto; }
  }

  /* instagram series */
  .mg-follow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: end; margin-top: clamp(4.5rem, 10vw, 8rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--hair); }
  .mg .mg-follow p { max-width: 30rem; margin-top: 1rem; color: var(--ink-soft); }
  .mg .mg-btn { display: inline-block; padding: 1rem 1.6rem; background: var(--ink); color: var(--paper) !important; text-decoration: none; white-space: nowrap;
    font: 600 0.75rem/1 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; transition: background-color 0.3s var(--ease), transform 0.15s var(--ease); }
  .mg .mg-btn:hover { background: var(--series-deep); }
  .mg .mg-btn:active { transform: translateY(1px); }

  /* reviewed date and sources */
  .mg-foot { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1rem clamp(1.5rem, 5vw, 4.5rem);
    margin-top: clamp(3.5rem, 7vw, 5.5rem); padding-top: 1.5rem; border-top: 1px solid var(--hair); font-size: 0.875rem; color: var(--ink-soft); }
  .mg .mg-foot h2 { font: 600 0.6875rem/1.9 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; }
  .mg .mg-foot ul { padding: 0; list-style: none; columns: 2; column-gap: 2rem; }
  .mg .mg-foot li { break-inside: avoid; padding-block: 0.15rem; }

  @media (max-width: 1040px) {
    .mg .mg-rule { grid-template-columns: 4.5rem minmax(0, 1fr) 16rem; }
  }
  @media (max-width: 860px) {
    .mg .mg-hero, .mg .mg-faq, .mg .mg-foot { grid-template-columns: minmax(0, 1fr); }
    .mg .mg-hero .mg-frame { width: min(100%, 20rem); margin-inline: auto; }
    .mg .mg-faq .mg-h { position: static; }
    .mg .mg-follow { grid-template-columns: minmax(0, 1fr); }
    .mg .mg-foot ul { columns: 1; }
  }
  @media (max-width: 720px) {
    .mg { font-size: 1.0625rem; }
    .mg .mg-index ol { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
    .mg .mg-index li { grid-template-columns: 3rem minmax(0, 1fr); padding-block: 0.95rem; }
    .mg .mg-index li:nth-child(6) { border-top: 0; }
    .mg .mg-index li::before { font-size: 1.8rem; }
    .mg .mg-index a { font-size: 1.2rem; }
    .mg .mg-rule { grid-template-columns: 2.4rem minmax(0, 1fr); grid-template-rows: auto auto auto;
      grid-template-areas: "num head" "text text" "media media"; column-gap: 1rem; }
    .mg .mg-rule::before { margin-top: 0; font-size: 2.6rem; line-height: 0.9; }
    .mg .mg-rule p { font-size: 1.0625rem; }
    .mg .mg-rule .mg-frame { width: min(100%, 17rem); justify-self: center; margin-top: 1.5rem; }
    .mg .mg-frame::before { border-width: 1px; }
    .mg .mg-frame::after { inset: 3px; }
    .mg .mg-compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .mg .mg-compare, .mg .mg-compare tbody, .mg .mg-compare tr, .mg .mg-compare th, .mg .mg-compare td { display: block; width: auto; }
    .mg .mg-compare tr { padding-block: 1.4rem 0.9rem; border-top: 1px solid var(--hair); }
    .mg .mg-compare tbody th, .mg .mg-compare td { padding: 0; border: 0; }
    .mg .mg-compare tbody th { width: auto; margin-bottom: 0.8rem; font-size: 1.75rem; }
    .mg .mg-compare td { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); gap: 1rem; padding-bottom: 0.65rem; }
    .mg .mg-compare td::before { content: attr(data-label); font: 600 0.625rem/2.1 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
  }
  @media (prefers-reduced-motion: reduce) {
    .mg *, .mg *::before, .mg *::after, .mg details::details-content { transition: none !important; }
  }
  
  /* ---------- table guide: rule groups ---------- */
  :where(.mg) h3{ margin: 0; font-weight: 400; text-wrap: balance; }
  .mg .mg-index__groups{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem clamp(2.5rem, 5vw, 3.5rem); }
  .mg .mg-index__group h3{ margin-bottom: 0.4rem; font: 600 0.6875rem/1.5 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: rgb(251 251 248 / 0.72); }
  .mg .mg-index__group ol{ display: block; }
  .mg .mg-index__group li:first-child{ border-top: 1px solid rgb(251 251 248 / 0.28); }
  .mg .mg-index__group li:nth-child(6){ border-top: 0; }
  .mg .mg-group{ padding-top: clamp(2.5rem, 5vw, 4rem); }
  .mg .mg-group__title{ font: italic 400 clamp(1.4rem, 2.2vw, 1.75rem)/1.2 var(--text); color: var(--series-deep); }
  .mg .mg-group .mg-rules{ padding-top: 1rem; }
  .mg .mg-rule h3{ grid-area: head; margin-bottom: 0.8rem; font: 400 clamp(1.7rem, 2.6vw, 2.125rem)/1.15 var(--display); letter-spacing: -0.008em; }
  @media (max-width: 720px){
    .mg .mg-index__groups{ grid-template-columns: minmax(0, 1fr); }
    .mg .mg-index__group li:first-child{ border-top: 1px solid rgb(251 251 248 / 0.28); }
  }
