/* ──────────────────────────────────────────────────────────────
   The 2027–2028 regulation centre (/pet-travel-regulation-changes): hub, article furniture and the
   components the articles share. Loaded only on those pages (after site.css), so it may rely on
   site.css tokens. Article-specific components are at the end, one block per article.
   ────────────────────────────────────────────────────────────── */

/* Status badges (.rc-status) and the notice on other pages (.rc-notice) live in site.css. */

.rc-date { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Hero: an editorial masthead rather than the photo hero of the guides ── */
.rc-hero {
  background: linear-gradient(180deg, #fbf8f1 0%, #fff 100%);
  border-top: 4px solid var(--navy); border-bottom: 1px solid var(--line);
  padding: 26px 0 40px;
}
.rc-hero .breadcrumbs, .rc-hero .breadcrumbs a { color: var(--muted); }
.rc-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 14px; }
.rc-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 14px 0 12px;
  font-size: .9rem; font-weight: 800; color: var(--navy); letter-spacing: .06em;
}
.rc-kicker .flag { width: 22px; height: 16px; }
.rc-kicker-year {
  font-variant-numeric: tabular-nums; color: var(--coral-strong);
  border-left: 2px solid var(--line); padding-left: 10px;
}
.rc-hero h1 {
  color: var(--navy-deep); font-size: clamp(1.6rem, 3.6vw, 2.35rem); font-weight: 800; line-height: 1.35;
  margin-bottom: 16px; max-width: 24em;
}
.rc-answer { font-size: 1.06rem; color: var(--ink); max-width: 42em; margin-bottom: 14px; }
.rc-answer b { color: var(--navy); }
.rc-stamp { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; color: var(--muted); margin-bottom: 20px; }
.rc-stamp svg { width: 16px; height: 16px; color: #2e9e6b; flex: none; margin-top: 4px; }
.rc-hero .hero-ctas { margin-bottom: 0; }
/* Article quote buttons carry a sentence ("確認您的毛孩是否符合…"): let it wrap on phones. */
.rc-hero .hero-ctas .btn, .rc-cta-inline .btn, .rc-bottom-cta .btn { white-space: normal; text-align: center; max-width: 100%; }

/* Key facts panel: a dossier card beside the answer. */
.rc-facts {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--coral);
  border-radius: 10px; padding: 6px 18px 16px; box-shadow: 0 6px 20px rgba(26, 51, 99, .07);
}
.rc-facts dl > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rc-facts dt { font-size: .76rem; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.rc-facts dd { font-size: .95rem; font-weight: 700; color: var(--navy-deep); }
.rc-facts dd small { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.rc-facts-prepare { font-size: .9rem; margin-top: 12px; color: var(--ink); }
.rc-facts-prepare b { display: block; font-size: .76rem; letter-spacing: .1em; color: var(--coral-strong); }

.rc-jump { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; }
.rc-jump a { font-weight: 700; font-size: .92rem; text-underline-offset: 4px; }

/* ── Hub ── */
.rc-hub { max-width: 1000px; }
.rc-hub > section { padding-top: 48px; }
.rc-hub > section:last-child { padding-bottom: 64px; }
.rc-hub h2 { color: var(--navy); font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 800; margin-bottom: 10px; }
.rc-section-sub { color: var(--muted); margin-bottom: 18px; }
.rc-year + .rc-year { margin-top: 40px; }
.rc-year-title { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--navy); padding-bottom: 8px; }
.rc-year-title span { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; color: var(--coral-strong); font-variant-numeric: tabular-nums; }

.rc-ledger { list-style: none; }
.rc-entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rc-entry-date { font-weight: 800; color: var(--navy-deep); font-size: 1.02rem; }
.rc-entry-date-label { display: block; font-size: .76rem; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.rc-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; font-size: .88rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.rc-entry h3 { font-size: 1.14rem; margin-bottom: 6px; }
.rc-entry h3 a { color: var(--navy); text-decoration: none; }
.rc-entry h3 a:hover { color: var(--coral-strong); text-decoration: underline; text-underline-offset: 4px; }
.rc-entry p { margin-bottom: 8px; }
.rc-entry-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; font-size: .9rem; }
.rc-entry-facts dt { font-weight: 800; color: var(--navy); font-size: .78rem; letter-spacing: .08em; }
.rc-entry-facts dd { color: var(--ink); }

/* Timeline with a marker for today; past steps are muted, expected ones dashed. */
.rc-timeline { list-style: none; position: relative; margin-left: 6px; }
.rc-timeline::before { content: ""; position: absolute; left: 118px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.rc-milestone { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 32px; padding: 10px 0; position: relative; }
.rc-milestone::before {
  content: ""; position: absolute; left: 112px; top: 18px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--navy);
}
.rc-milestone.is-past::before { background: var(--navy); }
.rc-milestone.is-expected::before { border-style: dashed; border-color: #9a3222; }
.rc-milestone-date { font-weight: 800; color: var(--navy-deep); text-align: right; font-size: .95rem; }
.rc-milestone.is-past .rc-milestone-date, .rc-milestone.is-past .rc-milestone-body p { color: var(--muted); }
.rc-tag { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .08em; }
.rc-tag--expected { color: #9a3222; }
.rc-milestone-body a { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .92rem; }
.rc-milestone-body p { margin: 2px 0 0; font-size: .95rem; }
.rc-today { position: relative; padding: 8px 0 8px 136px; }
.rc-today span {
  display: inline-block; font-size: .8rem; font-weight: 800; color: #fff; background: var(--coral-strong);
  border-radius: 999px; padding: 2px 12px; letter-spacing: .06em;
}
.rc-today::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--coral); z-index: -1; }

.rc-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--navy); }
.rc-route { padding: 18px 20px 6px 0; }
.rc-route + .rc-route { border-left: 1px solid var(--line); padding-left: 20px; }
.rc-route h3 { color: var(--navy); font-size: 1.04rem; margin-bottom: 8px; }
.rc-route ul { list-style: none; display: grid; gap: 8px; font-size: .94rem; }
.rc-route li a { font-weight: 700; }

.rc-method-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 34px; }
.rc-method p { margin-bottom: 12px; }
.rc-legend { display: grid; gap: 12px; background: var(--bg-soft); border-radius: 10px; padding: 16px 18px; align-self: start; }
.rc-legend dd { font-size: .88rem; color: var(--muted); margin-top: 3px; }

/* ── Article furniture ── */
.rc-article { max-width: 880px; margin: 0 auto; }
.rc-article > section { padding: 44px 0 0; }
.rc-article > section:last-child { padding-bottom: 56px; }
.rc-article h2 { color: var(--navy); font-size: clamp(1.28rem, 2.5vw, 1.6rem); font-weight: 800; margin-bottom: 12px; }
.rc-article h3 { color: var(--navy); font-size: 1.08rem; margin: 22px 0 8px; }
.rc-article p { margin-bottom: 14px; }
.rc-article [id] { scroll-margin-top: 90px; }
.rc-article ul:not([class]), .rc-article ol:not([class]) { margin: 0 0 16px 22px; }
.rc-article li { margin-bottom: 6px; }
.rc-article .table-wrap, .rc-article .rc-checklist, .rc-article .rc-pair, .rc-article .rc-steps,
.rc-article .rc-scenarios { margin-bottom: 18px; }

.rc-cta-inline {
  margin-top: 36px; padding: 20px 22px; border: 1px solid var(--line); border-left: 4px solid var(--coral);
  border-radius: 10px; background: #fffaf6;
}
.rc-cta-title { font-weight: 800; color: var(--navy); font-size: 1.06rem; margin-bottom: 6px; }
.rc-cta-inline .hero-ctas { margin: 12px 0 0; }

.rc-source-list { margin-left: 22px; font-size: .92rem; }
.rc-source-list li { margin-bottom: 9px; }
.rc-source-list a { overflow-wrap: anywhere; font-weight: 600; }
.rc-source-list small { display: block; color: var(--muted); font-size: .82rem; }

.rc-more { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; border-top: 1px solid var(--line); margin-bottom: 16px; }
.rc-more li { border-bottom: 1px solid var(--line); }
.rc-more a { display: flex; align-items: center; gap: 9px; padding: 11px 2px; text-decoration: none; color: var(--navy); font-weight: 700; }
.rc-more a:hover .rc-more-label { color: var(--coral-strong); text-decoration: underline; text-underline-offset: 4px; }
.rc-more-label { flex: 1; min-width: 0; }

/* Shared article components (any article may use them). */
.rc-compare { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 540px; }
.rc-compare caption { text-align: left; font-weight: 800; color: var(--navy); padding-bottom: 8px; }
.rc-compare th, .rc-compare td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rc-compare thead th { font-size: .82rem; letter-spacing: .08em; color: var(--muted); border-bottom: 2px solid var(--navy); }
.rc-compare tbody th { color: var(--navy); font-weight: 800; width: 24%; }
.rc-compare thead th { white-space: nowrap; }
/* Two-column tables fit a phone instead of scrolling. */
.rc-compare--fit { min-width: 0; }
.rc-compare .is-new { background: #fffaf2; }
.rc-compare .is-same { color: var(--muted); }

.rc-steps { list-style: none; counter-reset: rcstep; display: grid; gap: 0; }
.rc-steps > li { counter-increment: rcstep; position: relative; padding: 0 0 22px 52px; }
.rc-steps > li::before {
  content: counter(rcstep); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 8px;
  background: var(--navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.rc-steps > li::after { content: ""; position: absolute; left: 16px; top: 40px; bottom: 4px; border-left: 2px solid var(--line); }
.rc-steps > li:last-child::after { display: none; }
.rc-steps h3 { margin: 4px 0 4px; }
.rc-steps p { margin-bottom: 4px; }

.rc-checklist { list-style: none; display: grid; gap: 8px; }
.rc-checklist li { position: relative; padding-left: 30px; }
.rc-checklist li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border: 2px solid var(--navy); border-radius: 4px;
}

.rc-scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.rc-scenario { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: #fff; }
.rc-scenario h3 { margin-top: 0; font-size: 1rem; }
.rc-scenario p:last-child { margin-bottom: 0; }

.rc-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.rc-pair > div { border-top: 3px solid var(--navy); background: var(--bg-soft); padding: 14px 16px; border-radius: 0 0 10px 10px; }
.rc-pair > div:last-child { border-top-color: var(--coral); }
.rc-pair h3 { margin-top: 0; font-size: 1rem; }
.rc-pair p:last-child { margin-bottom: 0; }

.rc-note { font-size: .88rem; color: var(--muted); }

.rc-watch-table td { font-size: .92rem; }
.rc-watch-table th[scope="row"] { width: 26%; }
.rc-watch-status { font-weight: 800; white-space: nowrap; }
.rc-watch-status--adopted { color: var(--navy); }
.rc-watch-status--none { color: #1e6b34; }
.rc-watch-status--planned { color: #7a4a00; }
.rc-watch-status--unverified { color: #9a3222; }

@media (max-width: 900px) {
  .rc-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .rc-routes { grid-template-columns: 1fr; }
  .rc-route + .rc-route { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .rc-method-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rc-hero { padding: 18px 0 30px; }
  .rc-entry { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .rc-entry-date { display: flex; gap: 8px; align-items: baseline; }
  .rc-entry-date-label { display: inline; }
  .rc-entry-facts { grid-template-columns: 1fr; }
  .rc-timeline::before { left: 7px; }
  .rc-milestone { grid-template-columns: 1fr; gap: 2px; padding: 10px 0 10px 30px; }
  .rc-milestone::before { left: 1px; top: 15px; }
  .rc-milestone-date { text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .rc-milestone-date .rc-tag { display: inline; }
  .rc-today { padding-left: 30px; }
  .rc-more, .rc-scenarios, .rc-pair { grid-template-columns: 1fr; }
  .rc-compare tbody th { width: auto; }
}

/* ── Article-specific components (merged from app/assets/stylesheets/rule_changes/*.css) ── */

/* ── eu_health_certificate_2027 (app/views/rule_changes/eu_health_certificate_2027.html.erb) ── */
/* ── EU health certificate 2027 (rule_changes/eu_health_certificate_2027): a stylised Part II of the
   Annex III certificate, the certificate's life (10 days + 6 months, also used for the titer-test
   countdown on zh-CN), the date rail, the commercial/non-commercial path, lab cards, advice box. ── */

/* Certificate anatomy: what each box of Part II certifies, tagged new / changed / unchanged. */
.rc-ahc-cert {
  margin: 18px 0 10px; border: 1px solid #cfd8e3; border-radius: 6px; background: #fff;
  box-shadow: 0 6px 18px rgba(26, 51, 99, .08); overflow: hidden;
}
.rc-ahc-cert-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 10px 16px;
  background: var(--navy); color: #fff; font-size: .82rem; font-weight: 700;
}
.rc-ahc-cert-head span + span { font-weight: 600; opacity: .88; }
.rc-ahc-cert-rows { list-style: none; margin: 0; padding: 0; }
.rc-ahc-cert-rows > li {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 6px 14px; align-items: start;
  padding: 12px 16px; border-top: 1px dashed #d5dde7; margin: 0;
}
.rc-ahc-cert-rows > li:first-child { border-top: 0; }
.rc-ahc-cert-rows .is-new { background: #fffaf2; }
.rc-ahc-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700;
  color: var(--navy); font-size: .88rem; padding-top: 2px;
}
.rc-ahc-cert-rows b { color: var(--navy-deep); }
.rc-ahc-cert-rows p { margin: 2px 0 0; font-size: .93rem; }
.rc-ahc-tag {
  font-size: .76rem; font-weight: 800; line-height: 1.5; border-radius: 999px; padding: 2px 10px; white-space: nowrap;
  border: 1px solid var(--line); color: var(--muted); background: var(--bg-soft);
}
.rc-ahc-cert-rows .is-new .rc-ahc-tag { background: var(--coral-strong); border-color: var(--coral-strong); color: #fff; }
.rc-ahc-cert-rows .is-changed .rc-ahc-tag { background: #fff; border-color: var(--coral); color: var(--coral-strong); }
.rc-ahc-cert-foot { padding: 10px 16px; font-size: .84rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg-soft); }
.rc-ahc-cert-foot p { margin: 0; }

/* The certificate's life: stops (dated events) joined by spans (the periods between them). */
.rc-ahc-life { list-style: none; display: flex; align-items: stretch; margin: 18px 0 14px; padding: 0; }
.rc-ahc-life > li { margin: 0; }
.rc-ahc-stop {
  flex: 0 0 auto; width: 150px; border: 2px solid var(--navy); border-radius: 10px; background: #fff;
  padding: 10px 12px; font-size: .88rem;
}
.rc-ahc-stop b { display: block; color: var(--navy-deep); font-size: .95rem; }
.rc-ahc-stop span { display: block; color: var(--muted); font-size: .82rem; }
.rc-ahc-stop .rc-date { display: block; font-weight: 700; color: var(--coral-strong); margin-top: 4px; white-space: normal; }
.rc-ahc-stop--end { border-style: dashed; }
.rc-ahc-span {
  flex: 1 1 0; min-width: 70px; display: flex; flex-direction: column; justify-content: center;
  padding: 0 8px; text-align: center; font-size: .84rem; font-weight: 700; color: var(--navy);
}
.rc-ahc-span::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--navy); margin-bottom: 6px; }
.rc-ahc-span--long { flex-grow: 3; }
.rc-ahc-span--long::before { background: repeating-linear-gradient(90deg, var(--coral) 0 14px, #f3b6aa 14px 20px); }
.rc-ahc-life--four .rc-ahc-stop { width: 120px; padding: 8px 10px; }
.rc-ahc-life--four .rc-ahc-span { min-width: 76px; padding: 0 6px; }
.rc-ahc-span small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }

/* Date rail: the dated steps of the change, with their state today. */
.rc-ahc-rail { list-style: none; margin: 16px 0 10px; padding: 0; border-left: 3px solid var(--line); }
.rc-ahc-rail > li { position: relative; padding: 0 0 18px 22px; margin: 0; }
.rc-ahc-rail > li::before {
  content: ""; position: absolute; left: -10px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--navy);
}
.rc-ahc-rail > li.is-past::before { background: var(--navy); }
.rc-ahc-rail > li.is-key::before { border-color: var(--coral-strong); background: var(--coral-strong); }
.rc-ahc-rail-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 800; color: var(--navy-deep); }
.rc-ahc-state { font-size: .76rem; font-weight: 800; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; }
.rc-ahc-rail .is-key .rc-ahc-state { color: var(--coral-strong); border-color: var(--coral); }
.rc-ahc-rail p { margin: 4px 0 0; font-size: .94rem; }

/* Commercial or not: three questions, each with its exit. */
.rc-ahc-tree { list-style: none; counter-reset: rcahcq; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.rc-ahc-tree > li { counter-increment: rcahcq; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 12px 52px; position: relative; background: #fff; }
.rc-ahc-tree > li::before {
  content: "Q" counter(rcahcq); position: absolute; left: 14px; top: 12px; font-weight: 800; color: var(--navy); font-size: .9rem;
}
.rc-ahc-tree > li.rc-ahc-tree-end { border: 2px solid var(--navy); background: var(--bg-soft); padding-left: 16px; }
.rc-ahc-tree > li.rc-ahc-tree-end::before { content: none; }
.rc-ahc-tree p { margin: 0; }
.rc-ahc-tree .rc-ahc-q { font-weight: 800; color: var(--navy-deep); }
.rc-ahc-tree .rc-ahc-exit { margin-top: 6px; font-size: .92rem; color: #6e2a1d; }
.rc-ahc-tree .rc-ahc-exit b { color: var(--coral-hover); }

/* Designated laboratories (zh-CN): one card per lab, the Commission's English name kept verbatim. */
.rc-ahc-labs { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; padding: 0; }
.rc-ahc-labs > li { margin: 0; border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: 0 0 10px 10px; padding: 12px 14px; background: #fff; }
.rc-ahc-labs b { display: block; color: var(--navy); font-size: .95rem; }
.rc-ahc-labs span { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.rc-ahc-labs small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }

.rc-ahc-after-table { margin-top: 16px; }

/* Kekefei's advice, kept apart from the law. */
.rc-ahc-advice { border-left-color: var(--coral); }
.rc-ahc-advice-title { font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.rc-ahc-advice ul { margin: 0 0 0 20px; }
.rc-ahc-advice li { margin-bottom: 6px; }

@media (max-width: 900px) {
  .rc-ahc-life { flex-direction: column; }
  .rc-ahc-stop, .rc-ahc-life--four .rc-ahc-stop { width: auto; padding: 10px 12px; }
  .rc-ahc-life--four .rc-ahc-span { padding: 6px 0 6px 18px; }
  .rc-ahc-span { flex: 0 0 auto; min-height: 54px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 6px 0 6px 18px; text-align: left; }
  .rc-ahc-span::before { width: 6px; height: auto; align-self: stretch; margin: 0; flex: none; }
  .rc-ahc-span--long::before { background: repeating-linear-gradient(180deg, var(--coral) 0 14px, #f3b6aa 14px 20px); }
  .rc-ahc-labs { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .rc-ahc-cert-rows > li { grid-template-columns: 46px minmax(0, 1fr); }
  .rc-ahc-tag { grid-column: 2; justify-self: start; }
}

/* ── eu_microchip_2028 (app/views/rule_changes/eu_microchip_2028.html.erb) ── */
/* EU microchips 2028 (/pet-travel-regulation-changes/eu-microchip-2028): the chip-number anatomy,
   the prefix cards, the "keep or replace" decision tree, the transition timeline and the sample
   bars of Taiwan's chip prefixes. Every class starts with rc-chip-. */

/* ── Chip-number anatomy: 15 cells, the first three coloured by kind ── */
.rc-chip-figure {
  margin: 20px 0 8px; padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 70%);
}
.rc-chip-row + .rc-chip-row { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.rc-chip-row-title { font-weight: 800; color: var(--navy); font-size: .95rem; margin-bottom: 8px; }
.rc-chip-row-title small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.rc-chip-digits {
  display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; max-width: 600px;
  font-variant-numeric: tabular-nums;
}
.rc-chip-digits span {
  display: flex; align-items: center; justify-content: center; min-height: 38px; border-radius: 5px;
  background: #fff; border: 1px solid #c9d3df; color: var(--navy-deep); font-weight: 700; font-size: 1.02rem;
}
.rc-chip-digits .is-country { background: var(--navy); border-color: var(--navy); color: #fff; }
.rc-chip-digits .is-maker { background: var(--coral-strong); border-color: var(--coral-strong); color: #fff; }
.rc-chip-digits .is-species { background: #e8edf5; }
.rc-chip-digits .is-x { color: #9aa7b6; font-weight: 400; }
.rc-chip-braces {
  display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; max-width: 600px; margin-top: 6px;
  font-size: .8rem; line-height: 1.35; color: var(--muted);
}
.rc-chip-braces span { border-top: 2px solid currentColor; padding-top: 4px; }
.rc-chip-braces .is-head { grid-column: span 3; color: var(--navy); font-weight: 700; }
.rc-chip-braces .is-maker-head { grid-column: span 3; color: var(--coral-strong); font-weight: 700; }
.rc-chip-braces .is-body { grid-column: span 12; }
.rc-chip-braces .is-species { grid-column: span 2; }
.rc-chip-braces .is-make2 { grid-column: span 2; }
.rc-chip-braces .is-serial { grid-column: span 8; }
.rc-chip-figure figcaption { font-size: .86rem; color: var(--muted); margin-top: 14px; }

/* Prefix kinds: three cards, the code itself set large. */
.rc-chip-kinds { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 6px; }
.rc-chip-kinds li { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; }
.rc-chip-code {
  display: block; font-size: 1.55rem; font-weight: 800; line-height: 1.1; color: var(--navy);
  font-variant-numeric: tabular-nums; margin-bottom: 6px;
}
.rc-chip-kinds .is-maker .rc-chip-code { color: var(--coral-strong); }
.rc-chip-kinds .is-test .rc-chip-code { color: var(--muted); }
.rc-chip-kinds b { display: block; color: var(--navy); margin-bottom: 4px; }
.rc-chip-kinds p { font-size: .9rem; margin-bottom: 0; }

/* ── Decision tree: numbered questions, each with two outcomes ── */
.rc-chip-tree { list-style: none; counter-reset: rcchipq; margin-top: 18px; }
.rc-chip-tree > li { counter-increment: rcchipq; position: relative; padding: 0 0 20px 50px; }
.rc-chip-tree > li::before {
  content: counter(rcchipq); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.rc-chip-tree > li::after { content: ""; position: absolute; left: 16px; top: 40px; bottom: 2px; border-left: 2px dotted #b8c4d2; }
.rc-chip-tree > li:last-child::after { display: none; }
.rc-chip-q { font-weight: 800; color: var(--navy-deep); font-size: 1.04rem; margin: 5px 0 10px; }
.rc-chip-branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rc-chip-branch { border-radius: 9px; padding: 11px 14px; border: 1px solid var(--line); background: var(--bg-soft); font-size: .93rem; }
.rc-chip-branch p { margin: 0; }
.rc-chip-answer { display: inline-block; font-weight: 800; font-size: .82rem; letter-spacing: .04em; margin-bottom: 4px; }
.rc-chip-branch.is-ok { background: #eef7ef; border-color: #c6e2c8; }
.rc-chip-branch.is-ok .rc-chip-answer { color: var(--ok); }
.rc-chip-branch.is-stop { background: #fdf1ee; border-color: #f5cdc4; }
.rc-chip-branch.is-stop .rc-chip-answer { color: var(--coral-hover); }
.rc-chip-branch.is-open { background: #fff7e8; border-color: #f0d9a8; }
.rc-chip-branch.is-open .rc-chip-answer { color: #8a5a00; }
.rc-chip-branch.is-next .rc-chip-answer { color: var(--navy); }

/* ── Transition timeline (the article's own, longer than the hub's) ── */
.rc-chip-timeline { list-style: none; margin-top: 16px; border-left: 3px solid var(--line); margin-left: 8px; }
.rc-chip-timeline li { position: relative; padding: 0 0 16px 22px; }
.rc-chip-timeline li::before {
  content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 3px solid var(--navy);
}
.rc-chip-timeline li.is-past::before { background: var(--navy); }
.rc-chip-timeline li.is-key::before { border-color: var(--coral-strong); background: var(--coral-strong); }
.rc-chip-timeline li.is-today { padding-bottom: 14px; }
.rc-chip-timeline li.is-today::before { display: none; }
.rc-chip-timeline li.is-today span {
  display: inline-block; margin-left: -34px; font-size: .8rem; font-weight: 800; color: #fff;
  background: var(--coral-strong); border-radius: 999px; padding: 2px 12px;
}
.rc-chip-when { display: block; font-weight: 800; color: var(--navy-deep); }
.rc-chip-timeline p { margin: 2px 0 0; font-size: .95rem; }
.rc-chip-timeline li.is-past p, .rc-chip-timeline li.is-past .rc-chip-when { color: var(--muted); }

/* ── Sample of Taiwan's chip prefixes: labelled bars, numbers written out ── */
.rc-chip-sample { margin: 16px 0 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; }
.rc-chip-sample-title { font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.rc-chip-sample-note { font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.rc-chip-bars { list-style: none; display: grid; gap: 7px; }
.rc-chip-bars li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .9rem; }
.rc-chip-bars .rc-chip-bar-label { font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.rc-chip-bar { display: block; width: 100%; height: 14px; border-radius: 3px; background: var(--bg-soft); }
.rc-chip-bar rect { fill: var(--coral-strong); }
.rc-chip-bars .is-country .rc-chip-bar rect { fill: var(--navy); }
.rc-chip-bars .is-other .rc-chip-bar rect { fill: #9aa7b6; }
.rc-chip-bar-value { min-width: 8.2em; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }

/* Lead-in under the movement table; the third scenario spans both columns. */
.rc-chip-after-table { margin-top: 16px; font-weight: 700; color: var(--navy); }
.rc-chip-wide { grid-column: 1 / -1; }

/* ── Kekefei's advice: set apart from the law ── */
.rc-chip-advice {
  margin-top: 18px; border: 2px solid var(--navy); border-radius: 12px; padding: 16px 18px 6px; background: #fff;
}
.rc-chip-advice-label {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .08em; color: #fff;
  background: var(--navy); border-radius: 999px; padding: 2px 12px; margin-bottom: 8px;
}
.rc-chip-advice ul { margin: 0 0 10px 20px; }

/* ── zh-CN: the box on mainland China's chips ── */
.rc-chip-box { margin-top: 18px; border-left: 5px solid var(--coral); background: #fffaf6; border-radius: 0 10px 10px 0; padding: 14px 18px; }
.rc-chip-box h3 { margin-top: 0; }
.rc-chip-box p:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .rc-chip-kinds { grid-template-columns: 1fr; }
  .rc-chip-branches { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .rc-chip-figure { padding: 14px 10px 12px; }
  .rc-chip-digits { gap: 2px; }
  .rc-chip-digits span { min-height: 32px; font-size: .86rem; border-radius: 4px; }
  .rc-chip-braces { gap: 2px; font-size: .72rem; }
  .rc-chip-tree > li { padding-left: 44px; }
  .rc-chip-bars li { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; font-size: .85rem; }
  .rc-chip-bar-value { min-width: 7.6em; }
}

/* ── japan_2027 (app/views/rule_changes/japan_2027.html.erb) ── */
/* Japan 2027 (japan_2027): the 20-day countdown ruler before leaving Japan, the worked dates, the
   history of the AQS guidance, and the labelled advice box. Prefix rc-jp-. */

.rc-jp-ruler { margin: 18px 0 6px; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rc-jp-ruler figcaption { font-weight: 800; color: var(--navy); margin-bottom: 16px; }

/* 21 columns: day -20 (column 1) to the departure day 0 (column 21). */
.rc-jp-track { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); row-gap: 8px; align-items: center; padding: 0 4px; }
.rc-jp-base { grid-row: 2; grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--line); }
.rc-jp-window {
  grid-row: 2; grid-column: 11 / 22; height: 16px; border-radius: 8px;
  background: var(--bg-soft); border: 2px solid var(--navy);
}
.rc-jp-pin {
  grid-row: 1; justify-self: center; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; color: #fff;
}
.rc-jp-tick { grid-row: 3; justify-self: center; font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-jp-d20 { grid-column: 1; }
.rc-jp-d14 { grid-column: 7; }
.rc-jp-d10 { grid-column: 11; }
.rc-jp-d0 { grid-column: 21; }
.rc-jp-tick.rc-jp-d20 { justify-self: start; }
.rc-jp-tick.rc-jp-d0 { justify-self: end; color: var(--navy-deep); }

.rc-jp-key-tw { background: var(--navy); }
.rc-jp-key-jp { background: var(--coral-strong); }
.rc-jp-key-exam { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.rc-jp-key-go { background: var(--navy-deep); }

.rc-jp-legend { list-style: none; display: grid; gap: 10px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rc-jp-legend li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0; font-size: .94rem; }
.rc-jp-legend .rc-jp-pin { grid-row: auto; margin-top: 1px; }
.rc-jp-legend b { color: var(--navy); }

/* Two-column tables that fit a phone, so they do not scroll (the worked example, the GACC summary). */
.rc-jp-fit { min-width: 0; }
.rc-jp-example tbody th { width: 46%; }
.rc-jp-example td { font-weight: 700; color: var(--navy-deep); }
.rc-jp-example td small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* How the AQS wording moved, oldest first. */
.rc-jp-history { list-style: none; display: grid; gap: 0; margin: 14px 0 6px; border-left: 2px solid var(--line); }
.rc-jp-history li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 8px 0 8px 18px; margin: 0; position: relative; }
.rc-jp-history li::before {
  content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--navy);
}
.rc-jp-history li.is-law::before { background: var(--coral-strong); border-color: var(--coral-strong); }
.rc-jp-history-when { font-weight: 800; color: var(--navy-deep); font-size: .92rem; }

/* Kekefei's advice, kept apart from what the law says. */
.rc-jp-advice { border-left-color: var(--coral); background: #fff; }
.rc-jp-advice-label {
  display: inline-block; font-size: .82rem; font-weight: 800; color: var(--coral-strong);
  margin-bottom: 6px;
}
.rc-jp-advice ul { margin: 6px 0 0 20px; }
.rc-jp-advice li { margin-bottom: 6px; }

/* Spacing after a list, pair or table that a paragraph follows; a header cell that must not wrap. */
.rc-jp-spaced { margin-bottom: 16px; }
.rc-jp-nowrap { white-space: nowrap; }

@media (max-width: 600px) {
  .rc-jp-fit tbody th { width: 34%; }
  .rc-jp-ruler { padding: 16px 14px 14px; }
  .rc-jp-history li { grid-template-columns: 1fr; gap: 2px; }
  .rc-jp-example tbody th { width: 42%; }
}

/* ── new_zealand_2027 (app/views/rule_changes/new_zealand_2027.html.erb) ── */
/* New Zealand 2027 (new_zealand_2027): the dated ladder of the transition with a marker for today, the
   12-month plan of the official microchip check (route A / route B), the worked examples by departure
   date, the optional date calculator (nz_countdown_controller.js), the country-category table of the
   zh-CN page and the labelled advice box. Prefix rc-nz-. */

/* ── Transition ladder: date pill, rail, today marker ── */
.rc-nz-ladder { list-style: none; margin: 18px 0 16px; position: relative; }
.rc-nz-ladder::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; border-left: 2px solid var(--line); }
.rc-nz-step { position: relative; padding: 6px 0 12px 34px; margin: 0; }
.rc-nz-step::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 16px; height: 16px; border-radius: 4px;
  background: #fff; border: 3px solid var(--navy);
}
.rc-nz-step.is-past::before { background: var(--navy); }
.rc-nz-step.is-key::before { background: var(--coral-strong); border-color: var(--coral-strong); }
.rc-nz-step-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 2px; font-weight: 800; color: var(--navy-deep); }
.rc-nz-step-tag {
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 8px;
}
.rc-nz-step-text { margin: 0; font-size: .95rem; }
.rc-nz-step.is-past .rc-nz-step-date, .rc-nz-step.is-past .rc-nz-step-text { color: var(--muted); }
.rc-nz-step.is-key { background: #fffaf2; border-radius: 8px; }
.rc-nz-today { position: relative; margin: 0; padding: 4px 0 10px 34px; }
.rc-nz-today::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; border-top: 2px dashed var(--coral); }
.rc-nz-today span {
  position: relative; display: inline-block; font-size: .8rem; font-weight: 800; color: #fff; background: var(--coral-strong);
  border-radius: 999px; padding: 2px 12px; letter-spacing: .04em;
}
.rc-nz-today .rc-date { color: #fff; }

/* ── 12-month plan: one row per step, a 12-column month track, a dashed line at six months ── */
.rc-nz-plan { margin: 20px 0 10px; padding: 16px 18px 12px; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 10px; background: #fff; }
.rc-nz-plan figcaption { font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.rc-nz-plan-rows { list-style: none; }
.rc-nz-plan-row {
  display: grid; grid-template-columns: minmax(0, 17em) minmax(0, 1fr); gap: 6px 18px; align-items: center;
  padding: 9px 0; margin: 0; border-bottom: 1px solid var(--line);
}
.rc-nz-plan-label { margin: 0; font-size: .92rem; font-weight: 700; color: var(--navy-deep); line-height: 1.5; }
.rc-nz-plan-label small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.rc-nz-plan-lane {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--navy); vertical-align: 1px;
}
.rc-nz-plan-lane--b { background: var(--coral-strong); }
.rc-nz-plan-lane--both { background: var(--muted); }
.rc-nz-plan-track {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); height: 18px; border-radius: 4px;
  background-color: var(--bg-soft);
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}
.rc-nz-plan-track::after {
  content: ""; position: absolute; left: 50%; top: -5px; bottom: -5px; border-left: 2px dashed var(--coral-strong);
}
.rc-nz-plan-bar { grid-row: 1; border-radius: 4px; background: var(--navy); }
.rc-nz-plan-bar--b { background: var(--coral-strong); }
.rc-nz-plan-bar--both { background: var(--muted); }
.rc-nz-plan-c1-7 { grid-column: 1 / 7; }
.rc-nz-plan-c7-10 { grid-column: 7 / 10; }
.rc-nz-plan-c10-11 { grid-column: 10 / 11; }
.rc-nz-plan-c12-13 { grid-column: 12 / 13; }
.rc-nz-plan-axis { display: grid; grid-template-columns: minmax(0, 17em) minmax(0, 1fr); gap: 0 18px; margin: 6px 0 0; }
.rc-nz-plan-scale { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); font-size: .76rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.rc-nz-plan-t12 { grid-column: 1 / 4; justify-self: start; }
.rc-nz-plan-t6 { grid-column: 5 / 9; justify-self: center; color: var(--coral-strong); }
.rc-nz-plan-t3 { grid-column: 9 / 11; justify-self: center; }
.rc-nz-plan-t0 { grid-column: 11 / 13; justify-self: end; color: var(--navy-deep); }

/* ── Worked examples: six columns, scrolls inside .table-wrap on a phone ── */
.rc-nz-examples { min-width: 680px; }
.rc-nz-examples tbody th { width: 19%; }
.rc-nz-examples tbody th small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.rc-nz-examples td { font-size: .9rem; }

/* 2021 vs 2026: keep the row label readable when the table scrolls on a phone. */
.rc-nz-diff tbody th { min-width: 6.5em; }

/* ── Date calculator (shown only when its Stimulus controller runs) ── */
.rc-nz-calc { margin-top: 22px; padding: 16px 18px; border: 2px dashed var(--line); border-radius: 10px; background: var(--bg-soft); }
.rc-nz-calc-title { font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.rc-nz-calc-note { font-size: .86rem; color: var(--muted); }
.rc-nz-calc-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rc-nz-calc-field label { flex: 1 1 100%; font-weight: 700; font-size: .92rem; color: var(--navy-deep); }
.rc-nz-calc-field input {
  font: inherit; color: var(--ink); background: #fff; min-width: 0; max-width: 100%;
  padding: 8px 10px; border: 1px solid var(--muted); border-radius: 8px;
}
.rc-nz-calc-button { background: var(--navy); color: #fff; border: 0; cursor: pointer; }
.rc-nz-calc-button:hover { background: var(--navy-deep); color: #fff; }
.rc-nz-calc-result { list-style: none; display: grid; gap: 6px; margin-top: 12px; }
.rc-nz-calc-result:empty { display: none; }
.rc-nz-calc-result li { position: relative; margin: 0; padding-left: 18px; font-size: .94rem; }
.rc-nz-calc-result li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--navy); }
.rc-nz-calc-result li.is-warning { color: #7a2a1b; font-weight: 700; }
.rc-nz-calc-result li.is-warning::before { background: var(--coral-strong); }

/* ── zh-CN: the country categories, mainland China marked as not listed ── */
.rc-nz-cats { min-width: 0; }
.rc-nz-cats tbody th { width: 30%; }
.rc-nz-cats tbody th small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.rc-nz-cats td:last-child { width: 22%; }
.rc-nz-cats .is-out th, .rc-nz-cats .is-out td { background: #fdf1ee; color: #6e2a1d; }
.rc-nz-cats .is-home td { font-weight: 700; color: var(--navy-deep); }

/* ── Kekefei's advice, kept apart from the law ── */
.rc-nz-advice { border-left-color: var(--coral); background: #fff; }
.rc-nz-advice-label { font-size: .78rem; font-weight: 800; letter-spacing: .06em; color: var(--coral-strong); margin-bottom: 6px; }
.rc-nz-advice ul { margin: 6px 0 0 20px; }
.rc-nz-advice li { margin-bottom: 6px; }

@media (max-width: 600px) {
  .rc-nz-plan { padding: 14px 12px 10px; }
  .rc-nz-plan-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rc-nz-plan-axis { grid-template-columns: minmax(0, 1fr); }
  .rc-nz-plan-pad { display: none; }
}

/* ── taiwan_2027 (app/views/rule_changes/taiwan_2027.html.erb) ── */
/* Taiwan 2027 (taiwan_2027): the two permit documents side by side (old branch letter vs new form),
   the "basis" tags that separate law, APHIA's terms and our advice, the flight-notice date sum, the
   registration flow, the who-is-the-owner cards, and (zh-CN) the mainland decision tree. Prefix rc-tw-. */

/* Where a statement comes from: a legal text, a term printed by APHIA, or Kekefei's advice. */
.rc-tw-basis {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .04em; line-height: 1.5;
  padding: 1px 8px; border-radius: 4px; border: 1px solid currentColor; vertical-align: 2px; white-space: nowrap;
}
.rc-tw-basis--law { color: #1e6b34; }
.rc-tw-basis--terms { color: var(--navy); }
.rc-tw-basis--unconfirmed { color: #9a3222; border-style: dashed; }

/* What changes: two cards, each with its basis and status. */
.rc-tw-changes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.rc-tw-change { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: #fff; }
.rc-tw-change h3 { margin: 0 0 8px; font-size: 1.04rem; }
.rc-tw-change-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 10px; }
.rc-tw-change p:last-child { margin-bottom: 0; }
.rc-tw-change--terms { border-style: dashed; border-color: #c9b9b4; }

/* The two permits, drawn as paper. */
.rc-tw-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 18px 0 8px; }
.rc-tw-doc { margin: 0; }
.rc-tw-paper {
  position: relative; background: #fff; border: 1px solid #cfd6df; border-radius: 4px;
  box-shadow: 0 1px 0 #cfd6df, 0 6px 0 -3px #fff, 0 6px 0 -2px #cfd6df, 0 10px 24px rgba(13, 27, 56, .08);
  padding: 18px 18px 16px; font-size: .86rem; line-height: 1.65; color: var(--ink);
}
.rc-tw-ribbon {
  position: absolute; top: -11px; left: 14px; font-size: .74rem; font-weight: 800; letter-spacing: .04em;
  padding: 2px 10px; border-radius: 999px; color: #fff;
}
.rc-tw-doc--old .rc-tw-ribbon { background: var(--muted); }
.rc-tw-doc--new .rc-tw-ribbon { background: var(--navy); }
.rc-tw-paper-title { font-weight: 800; color: var(--navy-deep); font-size: .98rem; text-align: center; margin: 6px 0 2px; }
.rc-tw-paper-sub { text-align: center; color: var(--muted); font-size: .78rem; margin-bottom: 10px; }
.rc-tw-paper-meta { color: var(--muted); font-size: .78rem; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.rc-tw-paper ol { margin: 0 0 0 1.6em; padding: 0; }
.rc-tw-doc--old .rc-tw-paper ol { list-style: cjk-ideographic; margin-left: 2.4em; }
.rc-tw-paper li { margin: 0 0 3px; }
.rc-tw-paper p { margin-bottom: 6px; }
.rc-tw-paper mark, .rc-tw-paper .rc-tw-mark {
  background: #fff1c7; color: var(--navy-deep); font-weight: 700; padding: 0 2px; border-radius: 2px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.rc-tw-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 4px; margin: 4px 0 10px; }
.rc-tw-fields div { padding: 6px 8px; border-bottom: 1px solid var(--line); min-width: 0; }
.rc-tw-fields div:nth-child(odd) { border-right: 1px solid var(--line); }
.rc-tw-fields div:nth-last-child(-n+2) { border-bottom: 0; }
.rc-tw-fields dt { font-size: .72rem; color: var(--muted); font-weight: 700; }
.rc-tw-fields dd { font-weight: 700; color: var(--navy-deep); overflow-wrap: anywhere; }
.rc-tw-paper-foot { border-top: 1px dashed #cfd6df; margin-top: 8px; padding-top: 8px; font-size: .78rem; color: var(--muted); }
.rc-tw-doc figcaption { font-size: .86rem; color: var(--muted); margin-top: 14px; }
.rc-tw-doc figcaption b { color: var(--navy); }

/* Flight notice: the sum "shipment day minus 7 days". */
.rc-tw-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0 10px; }
.rc-tw-sum-case { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--bg-soft); }
.rc-tw-sum-case h3 { margin: 0 0 8px; font-size: .98rem; }
.rc-tw-sum-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.rc-tw-sum-row + .rc-tw-sum-row { margin-top: 4px; }
.rc-tw-sum-row span { font-size: .82rem; color: var(--muted); min-width: 6.5em; }
.rc-tw-sum-row b { color: var(--navy-deep); }
.rc-tw-sum-row--result b { color: var(--coral-strong); font-size: 1.06rem; }
.rc-tw-sum-case p { margin: 8px 0 0; font-size: .86rem; color: var(--muted); }

/* Registration flow: arrows on wide screens, a column on phones. */
.rc-tw-flow { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 18px 0 12px; counter-reset: rctwflow; }
.rc-tw-flow > li { counter-increment: rctwflow; position: relative; margin: 0; padding: 14px 18px 14px 14px; background: #fff; border: 1px solid var(--line); border-right: 0; }
.rc-tw-flow > li:first-child { border-radius: 10px 0 0 10px; }
.rc-tw-flow > li:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 10px 0; background: #eef4ec; }
.rc-tw-flow > li::before {
  content: counter(rctwflow); display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 800; margin-bottom: 6px;
}
.rc-tw-flow > li:not(:last-child)::after {
  content: ""; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; z-index: 1;
  background: #fff; border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: translateY(-50%) rotate(45deg);
}
.rc-tw-flow b { display: block; color: var(--navy-deep); font-size: .95rem; }
.rc-tw-flow small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.rc-tw-flow-after { border-left: 4px solid var(--coral); background: #fffaf6; padding: 12px 16px; border-radius: 0 10px 10px 0; font-size: .94rem; margin-bottom: 18px; }
.rc-tw-flow-after p:last-child { margin-bottom: 0; }

/* Who becomes the registered owner. */
.rc-tw-owners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.rc-tw-owner { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; display: flex; flex-direction: column; }
.rc-tw-owner h3 { margin: 0 0 6px; font-size: .98rem; }
.rc-tw-owner p { font-size: .9rem; margin-bottom: 10px; }
.rc-tw-who { margin-top: auto; border-top: 1px solid var(--line); padding-top: 9px; font-size: .9rem; }
.rc-tw-who span { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.rc-tw-who b { color: var(--navy-deep); }
.rc-tw-owner--check { border-color: #e9c46a; background: #fffcf2; }
.rc-tw-owner--special { border-color: var(--navy); box-shadow: inset 0 3px 0 var(--navy); }
.rc-tw-owner--unknown { border-style: dashed; }

/* The mainland pair (rc-pair) is followed by text: give it room. */
.rc-tw-china-pair { margin-bottom: 18px; }

/* Our advice, labelled as such. */
.rc-tw-advice { margin-top: 20px; border: 2px solid var(--navy); border-radius: 12px; padding: 16px 20px; background: #fff; }
.rc-tw-advice h3 { margin: 0 0 8px; font-size: 1rem; }
.rc-tw-advice ul { margin: 0 0 0 20px; }
.rc-tw-advice li:last-child { margin-bottom: 0; }

/* Arrival-date scenarios around New Year: a two-column table that fits a phone. */
.rc-tw-cutoff { min-width: 0; }
.rc-tw-cutoff tbody th { width: 38%; }

/* zh-CN: the mainland decision tree. */
.rc-tw-tree { margin: 18px 0 10px; }
.rc-tw-q {
  border: 2px solid var(--navy); border-radius: 12px; padding: 12px 16px; background: #fff; font-weight: 800;
  color: var(--navy-deep); text-align: center; max-width: 560px; margin: 0 auto;
}
.rc-tw-branches { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding-top: 26px; position: relative; }
.rc-tw-branches::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 14px; border: 2px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; }
.rc-tw-branch { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg-soft); }
.rc-tw-branch-answer { display: inline-block; font-size: .78rem; font-weight: 800; color: #fff; background: var(--navy); border-radius: 999px; padding: 1px 10px; margin-bottom: 6px; }
.rc-tw-branch:last-child .rc-tw-branch-answer { background: var(--coral-strong); }
.rc-tw-branch h3 { margin: 0 0 6px; font-size: 1rem; }
.rc-tw-branch ul { margin: 0 0 0 18px; font-size: .9rem; }
.rc-tw-branch li { margin-bottom: 4px; }

@media (max-width: 760px) {
  .rc-tw-changes, .rc-tw-docs, .rc-tw-sum { grid-template-columns: 1fr; }
  .rc-tw-owners { grid-template-columns: 1fr; }
  .rc-tw-flow { grid-template-columns: 1fr; }
  .rc-tw-flow > li { border-right: 1px solid var(--line); border-bottom: 0; padding: 12px 14px 16px 50px; }
  .rc-tw-flow > li::before { position: absolute; left: 14px; top: 13px; margin: 0; }
  .rc-tw-flow > li:first-child { border-radius: 10px 10px 0 0; }
  .rc-tw-flow > li:last-child { border-radius: 0 0 10px 10px; border-bottom: 1px solid var(--line); }
  .rc-tw-flow > li:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -9px; transform: translateX(-50%) rotate(135deg); }
  .rc-tw-branches { grid-template-columns: 1fr; padding-top: 14px; }
  .rc-tw-branches::before { left: 50%; right: auto; width: 0; height: 12px; border-width: 0 0 0 2px; border-radius: 0; }
}
@media (min-width: 761px) and (max-width: 980px) {
  .rc-tw-owners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── uk_2028 (app/views/rule_changes/uk_2028.html.erb) ── */
/* ── UK 2028 (uk-2028): a legislation tracker. Each measure shows how far it has gone (law, regulations,
   date), a dated timeline with a lane for measures that have no date, the pet-number conflict tiles,
   scenario verdicts and the agency's advice box. Every state is written out in text; the dots only
   repeat it. ── */

.rc-uk-jump { margin-top: 26px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }

/* Tracker: one card per measure, with three steps (law, regulations, date). */
.rc-uk-tracker { list-style: none; display: grid; gap: 14px; margin-top: 16px; }
.rc-uk-measure {
  border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 10px;
  padding: 14px 18px 12px; background: #fff;
}
.rc-uk-measure.is-current { border-left-color: #2e9e6b; }
.rc-uk-measure.is-announced { border-left-color: #9a3222; border-left-style: dashed; }
.rc-uk-measure-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rc-uk-measure-head h3 { margin: 0; font-size: 1.02rem; }
.rc-uk-measure > p { margin: 6px 0 10px; font-size: .94rem; }
.rc-uk-track { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); padding-top: 10px; }
.rc-uk-track li { position: relative; padding: 0 10px 0 26px; font-size: .86rem; line-height: 1.55; margin: 0; }
.rc-uk-track li + li { border-left: 1px solid var(--line); padding-left: 36px; }
.rc-uk-track li + li .rc-uk-dot { left: 10px; }
.rc-uk-track b { display: block; font-size: .74rem; letter-spacing: .08em; color: var(--muted); }
.rc-uk-dot {
  position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--navy); background: #fff;
}
.is-done > .rc-uk-dot { background: var(--navy); }
.is-done > .rc-uk-dot::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.is-announced > .rc-uk-dot { border-style: dashed; border-color: #9a3222; }
.is-open > .rc-uk-dot { border-color: var(--muted); }

/* Timeline: dated milestones beside a lane for what has no date yet. */
.rc-uk-lanes { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 26px; margin-top: 16px; align-items: start; }
.rc-uk-dated { list-style: none; border-left: 2px solid var(--line); margin-left: 6px; }
.rc-uk-dated li { position: relative; padding: 0 0 16px 20px; margin: 0; }
.rc-uk-dated li::before {
  content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--navy); border: 3px solid var(--navy);
}
.rc-uk-dated li.is-future::before { background: #fff; }
.rc-uk-dated li.is-expected::before { background: #fff; border-style: dashed; border-color: #9a3222; }
.rc-uk-dated .rc-uk-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 800; color: var(--navy-deep); }
.rc-uk-dated .rc-uk-when small { font-size: .74rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.rc-uk-dated li.is-expected .rc-uk-when small { color: #9a3222; }
.rc-uk-dated p { margin: 2px 0 0; font-size: .93rem; }
.rc-uk-dated li.rc-uk-today { padding-bottom: 14px; }
.rc-uk-dated li.rc-uk-today::before { background: var(--coral-strong); border-color: var(--coral-strong); }
.rc-uk-today span {
  display: inline-block; font-size: .8rem; font-weight: 800; color: #fff; background: var(--coral-strong);
  border-radius: 999px; padding: 1px 12px; letter-spacing: .06em;
}
.rc-uk-nodate { border: 2px dashed #d9b3aa; border-radius: 10px; padding: 14px 16px; background: #fffaf8; }
.rc-uk-nodate h3 { margin: 0 0 8px; color: #9a3222; font-size: 1rem; }
.rc-uk-nodate ul { list-style: none; display: grid; gap: 10px; }
.rc-uk-nodate li { margin: 0; font-size: .92rem; padding-left: 14px; border-left: 3px solid #e8c9c1; }

/* Pet numbers: three official answers side by side. */
.rc-uk-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.rc-uk-num { border: 1px solid var(--line); border-top: 4px solid #2e9e6b; border-radius: 10px; padding: 12px 14px; background: #fff; }
.rc-uk-num.is-law { border-top-color: var(--navy); }
.rc-uk-num.is-announced { border-top-color: #9a3222; border-top-style: dashed; }
.rc-uk-num-src { font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.rc-uk-num-figures { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; }
.rc-uk-num-figures span { display: inline-flex; align-items: baseline; gap: 4px; font-size: .86rem; color: var(--ink); }
.rc-uk-num-figures b { font-size: 1.9rem; line-height: 1.1; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.rc-uk-num p:last-child { margin: 0; font-size: .88rem; }

/* Scenario verdicts (inside the shared .rc-scenario cards). */
.rc-uk-verdict {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .04em; border-radius: 999px;
  padding: 1px 10px; margin-bottom: 6px; border: 1px solid currentColor;
}
.rc-uk-verdict.is-ok { color: #1e6b34; background: #ecf7ef; }
.rc-uk-verdict.is-change { color: var(--navy); background: #eaf0fb; }
.rc-uk-verdict.is-open { color: #9a3222; background: #fff; border-style: dashed; }

/* The agency's advice, kept apart from the law. */
.rc-uk-advice { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); padding: 14px 18px; }
.rc-uk-advice h3 { margin: 0 0 6px; font-size: 1rem; color: var(--coral-strong); }
.rc-uk-advice ul { margin: 0 0 0 20px; }
.rc-uk-advice li { margin-bottom: 4px; font-size: .94rem; }

/* zh-CN: the EU-approved laboratories in mainland China. */
.rc-uk-labs { list-style: none; counter-reset: rcuklab; display: grid; gap: 8px; margin: 10px 0 14px; }
.rc-uk-labs li { counter-increment: rcuklab; position: relative; padding: 8px 12px 8px 40px; border: 1px solid var(--line); border-radius: 8px; margin: 0; font-size: .92rem; }
.rc-uk-labs li::before {
  content: counter(rcuklab); position: absolute; left: 10px; top: 9px; width: 22px; height: 22px; border-radius: 6px;
  background: var(--navy); color: #fff; font-size: .8rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.rc-uk-labs small { display: block; color: var(--muted); font-size: .8rem; }

/* The four-column comparison keeps readable columns and scrolls inside .table-wrap on phones. */
.rc-uk-wide { min-width: 720px; }
.rc-uk-wide tbody th { min-width: 7.5em; }

@media (max-width: 760px) {
  .rc-uk-lanes, .rc-uk-numbers { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rc-uk-track { grid-template-columns: 1fr; gap: 4px; }
  .rc-uk-track li + li { border-left: 0; padding-left: 26px; }
  .rc-uk-track b { display: inline; margin-right: 8px; }
  .rc-uk-track li + li .rc-uk-dot { left: 0; }
  .rc-uk-measure { padding: 12px 14px 10px; }
}
