/* Taiwan site additions. Shared brand tokens live in styles.css. */

.tw-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.tw-hero-inner {
  max-width: 1180px;
}

.tw-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: 48px;
  align-items: center;
}

.tw-hero-copy {
  min-width: 0;
}

/* Functional registration entries on the hero's right side. */
.home-entry {
  min-width: 0;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.home-entry-head {
  margin-bottom: 10px;
}

.home-entry-head .section-index {
  margin: 0 0 4px;
}

.home-entry-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.home-entry-list {
  border-top: 1px solid var(--line);
}

.home-entry-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.home-entry-top,
.home-entry-code-row,
.home-entry-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.home-entry-top {
  justify-content: space-between;
}

.home-entry-platform {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.home-entry-status {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.home-entry-status.is-pending {
  color: #6b4c00;
  background: #fff4d6;
}

.home-entry-status.is-ok {
  color: #075e48;
  background: #e5f7f0;
}

.home-entry-status.is-blocked {
  color: #7c2d12;
  background: #ffeadf;
}

.home-entry-code-row {
  margin-top: 6px;
}

.home-entry-code-label {
  color: var(--muted);
  font-size: 12px;
}

.home-entry-code {
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef3f1;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  user-select: all;
}

.tw-copy-button.home-copy-button {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 11.5px;
}

.home-entry-action-row {
  justify-content: space-between;
  margin-top: 8px;
}

.home-entry-cta {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

.home-entry-cta:hover,
.home-entry-cta:focus-visible {
  background: var(--green-dark);
  outline: none;
}

.home-entry-cta.is-disabled {
  background: #e7ecea;
  color: #66736f;
  cursor: not-allowed;
}

.home-entry-guides {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-entry-guides a {
  color: var(--green-dark);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-entry-guides-mobile {
  display: none;
}

.home-entry-disclosure {
  margin: 10px 0 0;
  color: #6b5a1e;
  font-size: 11px;
  line-height: 1.5;
}

.tw-article-group {
  margin-top: 20px;
}

.tw-article-group:first-of-type {
  margin-top: 0;
}

.tw-article-group-title {
  margin: 0 0 2px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tw-hero h1 {
  max-width: 860px;
  margin: 16px 0 20px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.tw-hero h1 span {
  color: var(--green-dark);
}

.tw-hero-lead {
  max-width: 720px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.tw-editorial-section {
  padding: 54px 0 78px;
}

.tw-section-note {
  align-self: end;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* Editorial List: shared by the home list and the article table of contents. */
.editorial-list {
  border-top: 1px solid var(--line);
}

.editorial-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background .16s ease, padding .16s ease;
}

.editorial-list--plain .editorial-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.editorial-item:hover,
.editorial-item:focus-visible {
  padding-inline: 12px;
  background: rgba(11, 149, 114, .05);
  outline: none;
}

.editorial-index {
  padding-top: 2px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .1em;
}

.editorial-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.editorial-kicker {
  color: var(--green-dark);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.editorial-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
}

.editorial-summary {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.editorial-meta {
  color: #7b898d;
  font-size: 11.5px;
}

.editorial-arrow {
  align-self: center;
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 800;
  transition: transform .16s ease;
}

.editorial-item:hover .editorial-arrow,
.editorial-item:focus-visible .editorial-arrow {
  transform: translateX(3px);
}

/* Compact variant used as the article table of contents. */
.editorial-list--compact {
  border-top: 0;
}

.editorial-list--compact .editorial-item {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(24, 35, 33, .14);
}

.editorial-list--compact .editorial-item:last-child {
  border-bottom: 0;
}

.editorial-list--compact .editorial-index {
  font-size: 11px;
}

.editorial-list--compact .editorial-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
}

.editorial-list--compact .editorial-kicker {
  font-size: 10px;
}

.editorial-list--compact .editorial-arrow {
  display: none;
}

.tw-task-section {
  padding-top: 0;
}

.tw-recent-section {
  padding-top: 0;
}

.tw-disclosure-section {
  padding-top: 0;
}

.tw-disclosure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.tw-disclosure-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.tw-disclosure-item h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.tw-disclosure-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.tw-disclosure-risk {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: #6b5a1e;
  font-size: 12.5px;
  line-height: 1.7;
}

/* Eligibility entry shown before the article body. */
.tw-eligibility-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin: 28px 0 0;
  padding: 22px 24px;
  border: 1px solid rgba(11, 149, 114, .3);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f1fbf7, #fff);
}

.tw-eligibility-entry h2 {
  margin: 4px 0 8px;
  font-size: 25px;
  line-height: 1.25;
}

.tw-eligibility-entry p {
  margin: 0;
  color: #4d6260;
  font-size: 14px;
  line-height: 1.65;
}

.tw-eligibility-entry .button {
  white-space: nowrap;
}

/* First-screen quick answer, scenario navigation and entry status. */
.tw-quick-answer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tw-quick-answer-label {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.tw-quick-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.tw-quick-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.tw-quick-row dt {
  color: var(--green-dark);
  font-size: 12.5px;
  font-weight: 800;
}

.tw-quick-row dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.tw-scenario-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.tw-scenario-label {
  color: var(--muted);
  font-size: 12px;
}

.tw-scenario-link {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.tw-scenario-link:hover,
.tw-scenario-link:focus-visible {
  border-color: var(--green);
  outline: none;
}

.tw-inline-register {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  border-radius: 0 10px 10px 0;
  background: #f7fbf9;
}

.tw-inline-register .tw-cta-code-row {
  justify-content: flex-start;
  margin: 0;
}

.tw-inline-cta {
  width: auto;
  min-height: 40px;
  padding: 8px 16px;
  white-space: nowrap;
}

/* Primary registration action directly under the article H1. */
.tw-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 14px 0 0;
}

.tw-hero-cta-button {
  min-height: 44px;
}

.tw-hero-cta .tw-cta-code-row {
  justify-content: flex-start;
  margin: 0;
}

.tw-hero-benefit {
  flex-basis: 100%;
  margin: 0;
  color: #4d6260;
  font-size: 12px;
  line-height: 1.5;
}

.tw-hero-cta--compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tw-hero-cta--compare .tw-hero-cta-button {
  width: 100%;
  text-align: center;
}

.tw-hero-compare-codes {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tw-cta-block {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, .6fr);
  gap: 22px;
  margin: 24px 0 0;
  padding: 20px 22px;
  border: 1px solid rgba(11, 149, 114, .5);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f1fbf7, #fff);
}

.tw-cta-copy h2 {
  margin: 4px 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.tw-cta-benefit {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
}

.tw-cta-disclosure {
  margin: 0 0 8px;
  color: #6b5a1e;
  font-size: 12.5px;
  line-height: 1.6;
}

.tw-cta-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.tw-cta-gaps {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.tw-cta-gaps strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.tw-cta-gaps ul {
  margin: 0;
  padding-left: 18px;
}

.tw-cta-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.tw-cta-link {
  width: 100%;
  text-align: center;
  white-space: normal;
}

.tw-cta-code-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.tw-cta-code-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.tw-cta-code-value {
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef3f1;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  user-select: all;
}

.tw-copy-button {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.tw-copy-button:hover,
.tw-copy-button:focus-visible {
  border-color: var(--green-dark);
  background: rgba(11, 149, 114, .08);
  outline: none;
}

.tw-copy-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 149, 114, .22);
}

.tw-copy-button.is-copied {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.tw-copy-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

.tw-entry-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr);
  gap: 22px;
  margin: 24px 0 0;
  padding: 20px 22px;
  border: 1px dashed rgba(11, 149, 114, .4);
  border-radius: var(--radius);
  background: #fffdf5;
}

.tw-entry-block h2 {
  margin: 4px 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.tw-entry-block p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.tw-entry-disclosure {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px dashed rgba(24, 35, 33, .14);
  color: #6b5a1e !important;
  font-size: 12px !important;
}

.tw-entry-missing strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 12.5px;
}

.tw-entry-missing ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.article-byline {
  margin: 6px 0 0;
  color: #7b898d;
  font-size: 12px;
}

.article-figure {
  margin: 22px 0;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.article-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.faq-list {
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
}

.faq-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* On phones, turn wide data tables into label/value cards (two columns). */
@media (max-width: 760px) {
  .table-scroll {
    overflow-x: visible;
  }

  .table-scroll::before {
    display: none;
  }

  .table-scroll table.responsive-table,
  .table-scroll table.responsive-table tbody,
  .table-scroll table.responsive-table tr {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .table-scroll table.responsive-table thead {
    display: none;
  }

  .table-scroll table.responsive-table tr {
    margin: 0 0 12px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .table-scroll table.responsive-table td {
    display: grid;
    grid-template-columns: 7.2em minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px dashed rgba(24, 35, 33, .14);
    white-space: normal;
  }

  .table-scroll table.responsive-table td:last-child {
    border-bottom: 0;
  }

  .table-scroll table.responsive-table td::before {
    content: attr(data-label);
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 800;
  }
}

.tw-toc {
  min-width: 0;
}

.tw-toc-panel {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.tw-toc-panel .section-index {
  margin-bottom: 8px;
}

/* Blank Taiwan promotion configuration placeholder. */
.tw-placeholder {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px dashed rgba(11, 149, 114, .38);
  border-radius: 14px;
  background: #fff;
}

.tw-placeholder strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.tw-placeholder p {
  margin: 0 0 12px !important;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.tw-placeholder .button[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.tw-footer-inner {
  grid-template-columns: 1.4fr 1.15fr 0.85fr 1.1fr;
}

.footer-group + .footer-group {
  margin-top: 16px;
}

.footer-group h4 {
  margin: 0 0 6px;
  color: #d6e4df;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.footer-group h4 a {
  color: inherit;
  text-decoration: none;
}

.footer-group h4 a:hover,
.footer-group h4 a:focus-visible {
  text-decoration: underline;
}

.directory-shell {
  padding-top: 28px;
  padding-bottom: 72px;
}

.directory-hero {
  padding: 24px 0 22px;
  border-bottom: 1px solid var(--line);
}

.directory-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
}

.directory-hero .article-summary {
  max-width: 760px;
  margin: 0;
}

.directory-list {
  padding-top: 10px;
}

.directory-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 34px;
}

.directory-shortcut {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.directory-shortcut:hover,
.directory-shortcut:focus-visible {
  border-color: var(--green);
  background: #fff;
  transform: translateY(-1px);
  outline: none;
}

.directory-shortcut-label {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.directory-shortcut-count {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.directory-groups {
  display: grid;
  gap: 38px;
}

.directory-group {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.directory-group-head {
  margin-bottom: 10px;
}

.directory-group-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.25;
}

.directory-group-head p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.directory-return {
  margin-top: 30px;
}

.tw-directory-more {
  margin-top: 22px;
}

.tw-footer-pending {
  color: #9aa5a2;
  font-size: 13px;
}

@media (max-width: 980px) {
  .tw-toc-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .tw-footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .tw-hero {
    padding: 38px 0 32px;
  }

  .tw-hero h1 {
    font-size: clamp(29px, 8.5vw, 38px);
  }

  .tw-hero-lead {
    font-size: 15px;
    line-height: 1.7;
  }

  .tw-hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-entry {
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .home-entry-head h2 {
    font-size: 18px;
  }

  .home-entry-row {
    padding: 10px 0;
  }

  .home-entry-platform {
    font-size: 15px;
  }

  .home-entry-cta {
    min-height: 40px;
  }

  .tw-copy-button.home-copy-button {
    min-height: 38px;
  }

  .tw-article-group {
    margin-top: 16px;
  }

  .tw-editorial-section {
    padding: 40px 0 58px;
  }

  .directory-shortcuts {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 28px;
  }

  .directory-shortcut {
    padding: 12px 14px;
  }

  .directory-groups {
    gap: 32px;
  }

  .directory-group-head h2 {
    font-size: 22px;
  }

  .tw-disclosure-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 18px;
  }

  .tw-disclosure-item {
    padding: 16px;
  }

  .tw-disclosure-item h3 {
    font-size: 16px;
  }

  .editorial-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }

  .editorial-item:hover,
  .editorial-item:focus-visible {
    padding-inline: 6px;
  }

  .editorial-title {
    font-size: 17px;
  }

  .editorial-arrow {
    display: none;
  }

  .tw-section-note {
    display: none;
  }

  .tw-eligibility-entry {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .tw-eligibility-entry .button {
    width: 100%;
    white-space: normal;
  }

  .article-hero {
    padding: 8px 0 10px;
  }

  .article-hero .eyebrow {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
  }

  .article-hero h1 {
    margin: 6px 0 8px;
    font-size: 24px;
    line-height: 1.14;
    letter-spacing: -.02em;
  }

  .article-summary,
  .article-meta,
  .article-byline {
    display: none;
  }

  .tw-quick-answer {
    margin-top: 8px;
    padding-top: 8px;
  }

  .tw-quick-answer-label {
    margin-bottom: 5px;
    font-size: 10.5px;
  }

  .tw-quick-list {
    gap: 4px;
  }

  .tw-quick-row {
    grid-template-columns: 4.2em minmax(0, 1fr);
    gap: 6px;
  }

  .tw-quick-row dt {
    font-size: 11.5px;
  }

  .tw-quick-row dd {
    font-size: 12.8px;
    line-height: 1.4;
  }

  .tw-scenario-nav {
    margin-top: 7px;
    gap: 5px;
  }

  .tw-scenario-link {
    padding: 4px 7px;
    font-size: 11.5px;
  }

  .tw-inline-register {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .tw-inline-register .tw-cta-code-row {
    justify-content: flex-start;
  }

  .tw-inline-cta {
    width: 100%;
    text-align: center;
  }

  .tw-cta-block {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
    padding: 14px 16px;
  }

  .tw-cta-action {
    order: 1;
    gap: 8px;
  }

  .tw-cta-copy {
    order: 2;
  }

  .tw-cta-copy .section-index,
  .tw-cta-copy h2 {
    display: none;
  }

  .tw-cta-benefit {
    margin: 0 0 5px;
    font-size: 12.8px;
    line-height: 1.5;
  }

  .tw-cta-disclosure {
    margin: 0 0 5px;
    font-size: 11.8px;
    line-height: 1.45;
  }

  .tw-cta-status {
    margin-top: 6px;
    font-size: 11.2px;
  }

  .tw-cta-gaps {
    margin-top: 6px;
    font-size: 11.2px;
  }

  .tw-cta-code-row {
    gap: 6px 8px;
  }

  .tw-copy-button {
    flex: 0 0 auto;
  }

  .tw-copy-hint {
    font-size: 10.8px;
  }

  .tw-entry-block {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .tw-hero h1 {
    font-size: 29px;
    line-height: 1.15;
  }

  .tw-hero-cta--compare .tw-hero-cta-button {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .tw-hero-cta {
    gap: 8px;
    margin-top: 10px;
  }

  .tw-hero-cta-button {
    width: 100%;
  }

  .tw-hero-cta--compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tw-hero-cta--compare .tw-hero-cta-button {
    width: 100%;
  }

  .tw-hero-benefit {
    font-size: 11.5px;
    line-height: 1.45;
  }

  .tw-hero-compare-codes {
    font-size: 11.5px;
  }

  .tw-hero {
    padding: 20px 0 18px;
  }

  .tw-hero h1 {
    margin-bottom: 8px;
    font-size: clamp(26px, 8vw, 32px);
  }

  .tw-hero-lead {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.45;
  }

  .home-entry {
    padding: 8px 0 0;
    border-top: 0;
  }

  .home-entry-head {
    display: none;
  }

  .home-entry-list {
    border-top: 0;
  }

  .home-entry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "platform cta"
      "code code";
    gap: 4px 8px;
    padding: 6px 0;
  }

  .home-entry-top {
    grid-area: platform;
    align-items: center;
  }

  .home-entry-platform {
    font-size: 14px;
  }

  .home-entry-code-row {
    grid-area: code;
    margin-top: 2px;
  }

  .home-entry-action-row {
    grid-area: cta;
    margin-top: 0;
    justify-content: flex-end;
  }

  .home-entry-cta {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 12px;
  }

  .home-entry-guides {
    display: none;
  }

  .home-entry-guides-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 11px;
  }

  .home-entry-guides-mobile span {
    color: var(--muted);
    font-weight: 800;
  }

  .home-entry-guides-mobile a {
    color: var(--green-dark);
    font-weight: 700;
  }

  .tw-hero-copy .hero-actions {
    display: none;
  }
}

/* Two-level navigation. */
.nav-group {
  display: flex;
  align-items: center;
}

.nav-group-row {
  display: flex;
  align-items: center;
  gap: 1px;
}

.nav-group-row .nav-link {
  padding-right: 0;
}

.nav-group-row .nav-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 42px;
  padding: 0;
  border: 0;
  background: none;
}

.nav-group-row .nav-trigger::after {
  display: none;
}

.nav-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform .18s ease;
}

.nav-group.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-trigger--parent {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.nav-dropdown--wide {
  min-width: 260px;
}

.nav-dropdown--right {
  left: auto;
  right: -12px;
}

@media (min-width: 1121px) {
  .nav-group:hover > .nav-dropdown,
  .nav-group:focus-within:not(.is-open) > .nav-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
  }

  .nav-group.is-open > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* Make visibility switch immediately on keyboard open so the first
       child link can receive focus in the same key press. */
    transition: opacity .18s ease, transform .18s ease, visibility 0s;
  }
}

@media (max-width: 1120px) {
  .nav-group {
    display: block;
  }

  .nav-group-row {
    display: flex;
    align-items: center;
  }

  .nav-group-row .nav-link {
    flex: 1;
    min-height: 46px;
    padding: 10px 12px;
  }

  .nav-group-row .nav-trigger {
    width: 46px;
    height: 46px;
    margin-right: 4px;
  }

  .nav-trigger--parent {
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown--right {
    left: auto;
    right: auto;
  }
}

/* Calculator tools. */
.tool-shell {
  padding-top: 28px;
  padding-bottom: 72px;
}

.tool-hero {
  max-width: 900px;
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line);
}

.tool-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.tool-summary {
  max-width: 760px;
  margin: 0;
  color: #4d6260;
  font-size: 16px;
  line-height: 1.7;
}

.tool-card {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(11, 149, 114, .35);
  border-radius: 16px;
  background: #f7fbf9;
}

.tool-card-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.tool-card-head p {
  margin: 0 0 16px;
  color: #4d6260;
  font-size: 13px;
  line-height: 1.6;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tool-field {
  display: grid;
  gap: 6px;
  color: #263237;
  font-size: 13px;
  font-weight: 700;
}

.tool-field input,
.tool-field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
}

.tool-field input:focus-visible,
.tool-field select:focus-visible {
  border-color: var(--green);
  outline: 3px solid rgba(11, 149, 114, .18);
}

.tool-field--wide {
  grid-column: 1 / -1;
}

.tool-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-weight: 600;
  line-height: 1.5;
}

.tool-check input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin-top: 1px;
  accent-color: var(--green);
}

.tool-fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 8px;
}

.tool-note {
  margin: 14px 0 0;
  color: #5c6f6b;
  font-size: 12.5px;
  line-height: 1.6;
}

.tool-error {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: #ffeadf;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 700;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tool-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.tool-result {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.tool-result span {
  display: block;
  color: #5c6f6b;
  font-size: 12px;
  font-weight: 700;
}

.tool-result strong {
  display: block;
  margin: 4px 0;
  color: var(--green-dark);
  font-size: 24px;
  line-height: 1.2;
}

.tool-result small {
  color: #72817e;
  font-size: 11px;
}

.tool-result--note strong {
  font-size: 16px;
}

.tool-breakdown {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(24, 35, 33, .18);
}

.tool-breakdown h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.tool-breakdown p {
  margin: 0 0 10px;
  color: #4d6260;
  font-size: 13px;
  line-height: 1.65;
}

.tool-related {
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.tool-related h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.tool-related p {
  margin: 0 0 10px;
  color: #4d6260;
  font-size: 13px;
  line-height: 1.6;
}

.tool-related ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 1.2em;
  color: #354348;
  font-size: 13px;
  line-height: 1.6;
}

.tool-related a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .tool-shell {
    padding-top: 18px;
    padding-bottom: 48px;
  }

  .tool-hero h1 {
    font-size: 28px;
  }

  .tool-card {
    padding: 16px;
  }

  .tool-grid,
  .tool-results {
    grid-template-columns: 1fr;
  }

  .tool-fee-row {
    grid-template-columns: minmax(0, 1fr) 90px;
  }

  .tool-actions .button {
    width: 100%;
  }
}
