/* Final signature layer: editorial spacing, structure, and interaction polish. */
:root {
  --signature-navy: #0d334a;
  --signature-blue: #087dbb;
  --signature-cyan: #31b5d9;
  --signature-gold: #f1bb38;
  --signature-green: #41966c;
}

::selection {
  color: #fff;
  background: #087dbb;
}

.header-inner,
.section-inner {
  width: min(1180px, calc(100% - 40px));
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #77c6e1 30%, #f1bb38 70%, transparent);
}

.global-nav a {
  font-size: 0.9rem;
  padding-inline: 13px;
}

.hero-inner {
  padding-bottom: 58px;
}

.hero-copy {
  max-width: 1040px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
}

.hero-checks {
  max-width: 1040px;
}

.hero-checks li:nth-child(1) {
  border-top-color: var(--signature-cyan);
}

.hero-checks li:nth-child(2) {
  border-top-color: var(--signature-gold);
}

.hero-checks li:nth-child(3) {
  border-top-color: #65b78b;
}

.hero-checks li:nth-child(2)::before {
  background: #d99f1b;
  box-shadow: 0 0 0 4px #fff3cf;
}

.hero-checks li:nth-child(3)::before {
  background: var(--signature-green);
  box-shadow: 0 0 0 4px #def2e6;
}

.hero-actions .button span,
.card-button span {
  transition: transform 180ms ease;
}

.hero-actions .button:hover span,
.card-button:hover span {
  transform: translate(2px, -1px);
}

.hero-stats strong {
  position: relative;
  padding-bottom: 9px;
}

.hero-stats strong::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 0;
  width: 34px;
  height: 3px;
  background: var(--signature-gold);
}

.best-summary {
  padding-top: 66px;
}

.summary-heading {
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  margin-bottom: 28px;
}

.summary-heading h2 {
  min-height: 70px;
  align-items: center;
}

.best-tab-list {
  gap: 10px;
  margin-bottom: 16px;
}

.best-tab {
  position: relative;
  min-height: 50px;
  overflow: hidden;
}

.best-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #bddbe8;
}

.best-tab.is-active::after {
  background: var(--signature-gold);
}

.best-grid article > img {
  min-height: 300px;
}

.best-grid article > div {
  padding: 36px;
}

.best-grid h3 {
  position: relative;
  padding-bottom: 13px;
}

.best-grid h3::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--signature-cyan);
}

.quick-search {
  padding-block: 32px;
}

.search-inner > div:first-child {
  max-width: 650px;
}

.filter-bar {
  justify-content: flex-end;
}

.filter-button {
  min-height: 44px;
}

.section-heading {
  position: relative;
  max-width: 980px;
  padding-left: 26px;
}

.section-heading::after {
  content: "";
  position: absolute;
  top: 4px;
  left: -7px;
  width: 7px;
  height: 34px;
  background: var(--signature-gold);
}

.section-heading h2 {
  font-size: clamp(1.9rem, 3vw, 2.55rem);
}

.section-heading p:last-child {
  max-width: 82ch;
  color: #425d6e;
  font-size: 1.01rem;
}

.advice-row {
  gap: 34px;
  padding: 34px;
}

.advice-balloon img {
  transition: transform 220ms ease;
}

.advice-row:hover .advice-balloon img {
  transform: translateY(-4px);
}

.photo-grid {
  gap: 20px;
}

.photo-grid figure {
  position: relative;
}

.photo-grid figure::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 5px;
  background: var(--signature-gold);
}

.photo-grid figcaption {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding-inline: 16px;
}

.criteria-grid article {
  position: relative;
  min-height: 238px;
}

.criteria-grid article::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 24px;
  height: 3px;
  background: var(--signature-gold);
}

.criteria-note {
  margin-top: 22px;
}

.ranking-heading {
  margin-bottom: 42px;
}

.ranking-heading::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 14px;
  width: 30%;
  height: 1px;
  background: #a7cad9;
}

.ranking-heading h2.image-heading {
  width: min(100%, 920px);
}

.ranking-heading p:last-child {
  max-width: 920px;
  color: #fff;
}

.ranking-list {
  gap: 34px;
}

.rank-card {
  isolation: isolate;
}

.rank-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  width: 92px;
  height: 6px;
  background: var(--signature-gold);
}

.ranking-list > .rank-card:nth-child(n + 4)::before {
  background: var(--signature-cyan);
}

.rank-heading {
  min-height: 88px;
  padding-inline: 28px;
}

.rank-heading h3 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.rank-visual > img {
  max-height: 360px;
}

.rank-content {
  padding: 30px 34px 34px;
}

.rank-content > .company-area + p,
.rank-content > .source-note + p {
  max-width: 1040px;
  font-size: 1.05rem;
  line-height: 2;
}

.company-area {
  padding-block: 13px;
}

.point-list,
.score-list {
  margin-top: 22px;
}

.review-box {
  margin-top: 28px;
  padding: 24px;
}

.review-box h4 {
  font-size: clamp(1.24rem, 2.3vw, 1.55rem);
}

.review-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.review-item {
  align-content: start;
}

.review-item p {
  height: 100%;
  padding: 16px 17px;
}

.company-facts {
  margin-top: 28px;
}

.company-facts h4 {
  padding: 14px 18px;
  font-size: 1.3rem;
}

.company-facts dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  padding: 18px 20px 22px;
}

.company-facts div {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 7px;
  padding: 13px 0;
}

.company-facts div:nth-child(2),
.company-facts div:nth-child(6) {
  grid-column: 1 / -1;
}

.company-facts dt {
  min-width: 112px;
  text-align: center;
}

.company-map {
  margin-top: 28px;
}

.company-map h4 {
  padding: 14px 18px;
  font-size: 1.12rem;
}

.company-map-frame,
.company-map-frame iframe {
  min-height: 250px;
}

.tag-row {
  margin-top: 20px;
}

.card-button {
  min-height: 54px;
  margin-top: 22px;
  font-size: 1rem;
}

.compare-section .section-heading,
.faq-section .section-heading {
  max-width: 900px;
}

.table-wrap th:first-child {
  width: 74px;
}

th,
td {
  padding: 16px;
}

.guide-list {
  gap: 16px;
}

.guide-list article {
  padding: 22px;
}

.guide-list span {
  font-size: 1.65rem;
}

.article-grid article,
.trivia-grid article {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.article-grid article::after,
.trivia-grid article::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 54px;
  height: 54px;
  border: 8px solid #d9edf5;
  transform: rotate(45deg);
}

.trivia-grid article::after {
  border-color: #fae6ab;
}

.faq-layout {
  grid-template-columns: 300px minmax(0, 1fr);
}

.faq-list {
  gap: 14px;
}

summary {
  min-height: 62px;
  display: flex;
  align-items: center;
}

.footer-inner {
  gap: 26px;
}

.footer-grid {
  gap: 16px;
}

.footer-grid section {
  border-top: 3px solid rgba(49, 181, 217, 0.72);
}

.footer-grid section:nth-child(2) {
  border-top-color: rgba(241, 187, 56, 0.84);
}

.footer-grid section:nth-child(3) {
  border-top-color: rgba(101, 183, 139, 0.82);
}

@media (max-width: 980px) {
  .header-inner,
  .section-inner {
    width: min(100% - 32px, 1180px);
  }

  .summary-heading {
    grid-template-columns: 1fr;
  }

  .best-grid article > img {
    min-height: 250px;
  }

  .review-list {
    grid-template-columns: 1fr;
  }

  .company-facts dl {
    grid-template-columns: 1fr;
  }

  .company-facts div:nth-child(2),
  .company-facts div:nth-child(6) {
    grid-column: auto;
  }

  .faq-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner,
  .section-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-inner {
    padding-bottom: 42px;
  }

  .hero-copy {
    border-right: 0;
  }

  .hero-stats strong::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-stats li {
    text-align: center;
  }

  .best-summary {
    padding-top: 52px;
  }

  .summary-heading h2 {
    min-height: 0;
  }

  .best-tab {
    min-height: 44px;
  }

  .best-grid article > img {
    min-height: 0;
  }

  .best-grid article > div {
    padding: 24px 19px 28px;
  }

  .section-heading {
    padding-left: 17px;
  }

  .section-heading::after {
    left: -6px;
    width: 5px;
    height: 28px;
  }

  .section-heading h2 {
    font-size: 1.68rem;
  }

  .advice-row {
    gap: 22px;
    padding: 22px 17px;
  }

  .criteria-grid article {
    min-height: 0;
  }

  .ranking-heading {
    margin-bottom: 32px;
  }

  .ranking-heading::before {
    content: none;
  }

  .rank-card::before {
    width: 58px;
    height: 5px;
  }

  .rank-heading {
    min-height: 72px;
    padding-inline: 14px;
  }

  .rank-heading h3 {
    font-size: 1.34rem;
  }

  .rank-content {
    padding: 20px 14px 24px;
  }

  .rank-content > .company-area + p,
  .rank-content > .source-note + p {
    font-size: 0.98rem;
    line-height: 1.9;
  }

  .review-box {
    padding: 16px 11px;
  }

  .review-list {
    grid-template-columns: 1fr;
  }

  .review-item p {
    padding: 13px;
  }

  .company-facts dl {
    grid-template-columns: 1fr;
    padding: 14px 16px 18px;
  }

  .company-map-frame,
  .company-map-frame iframe {
    min-height: 220px;
  }

  .article-grid article,
  .trivia-grid article {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
