.v17-answer,
.v17-hub {
  --v17-line: #b9d9d2;
  --v17-soft: #edf8f5;
  --v17-warm: #fff7e9;
  margin: 1.4rem 0 2.2rem;
  border: 1px solid var(--v17-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card, 0 0.45rem 1.4rem rgb(11 98 89 / 10%));
}

.v17-hub {
  padding: clamp(1rem, 3.5vw, 1.55rem);
}

.v17-hub--answer {
  border-width: 2px;
  background: linear-gradient(135deg, var(--v17-soft), var(--v17-warm));
}

.v17-hub--answer > h2,
.v17-hub--decision > h2,
.v17-hub--shopping > h2,
.v17-hub--stop > h2,
.v17-hub--links > h2,
.v17-hub--sources > h2 {
  margin: 0 0 0.6rem;
  color: var(--color-brand-900);
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
}

.v17-answer__quick,
.v17-answer__intro,
.v17-hub__intro {
  padding: clamp(1.05rem, 3.5vw, 1.7rem);
  border-bottom: 1px solid var(--v17-line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(135deg, var(--v17-soft), var(--v17-warm));
}

.v17-answer__quick h2,
.v17-answer__intro h2,
.v17-hub__intro h2 {
  margin: 0.16rem 0 0.55rem;
  color: var(--color-brand-900);
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  line-height: 1.35;
}

.v17-answer__quick > :last-child,
.v17-answer__intro > :last-child,
.v17-hub__intro > :last-child {
  margin-bottom: 0;
}

.v17-answer__quick aside {
  margin-top: 0.9rem;
  border-left: 0.32rem solid #d29b20;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgb(255 255 255 / 72%);
  padding: 0.8rem 0.95rem;
}

.v17-answer__quick aside > :first-child {
  margin-top: 0;
}

.v17-answer__quick aside > :last-child {
  margin-bottom: 0;
}

.v17-quick-jump {
  margin-top: 0.9rem;
}

.v17-quick-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  border-radius: 0.45rem;
  background: var(--color-brand-900);
  padding: 0.58rem 0.9rem;
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}

.v17-kicker {
  margin: 0;
  color: var(--color-accent-700);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.v17-marker {
  display: inline;
  background: linear-gradient(transparent 58%, #ffe29b 58% 94%, transparent 94%);
  color: inherit;
  padding: 0 0.08em;
  font-weight: 850;
}

.v17-answer__body,
.v17-hub__body {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1rem, 3.5vw, 1.6rem);
}

.v17-answer section,
.v17-hub section {
  min-width: 0;
}

.v17-answer h3,
.v17-hub h3 {
  margin: 0 0 0.55rem;
  color: var(--color-brand-900);
  font-size: clamp(1.08rem, 2.7vw, 1.3rem);
  line-height: 1.4;
}

.v17-answer p,
.v17-answer li,
.v17-answer td,
.v17-answer th,
.v17-hub p,
.v17-hub li,
.v17-hub td,
.v17-hub th {
  font-size: 1rem;
  line-height: 1.75;
}

.v17-answer ul,
.v17-answer ol,
.v17-hub ul,
.v17-hub ol {
  margin-block: 0.45rem 0;
  padding-left: 1.35rem;
}

.v17-answer li + li,
.v17-hub li + li {
  margin-top: 0.35rem;
}

.v17-answer a,
.v17-hub a {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.v17-answer a:focus-visible,
.v17-hub a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 0.2rem;
}

.v17-answer__grid,
.v17-hub__grid,
.v17-example-grid,
.v17-decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.v17-card,
.v17-example,
.v17-decision,
.v17-shopping {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.95rem;
}

.v17-decision[data-state="check"] {
  border-top: 0.3rem solid #d29b20;
}

.v17-decision[data-state="stop"],
.v17-stop {
  border: 2px solid #d46a44;
  background: #fff1eb;
}

.v17-decision[data-state="go"] {
  border-top: 0.3rem solid var(--color-brand-700);
}

.v17-table-wrap,
.v17-hub__table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #fff;
}

.v17-table-wrap:focus-visible,
.v17-hub__table-wrap:focus-visible,
.v17-label-map:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.v17-table-wrap table,
.v17-hub__table-wrap table {
  width: 100%;
  min-width: 39rem;
  border-collapse: collapse;
}

.v17-table-wrap caption,
.v17-hub__table-wrap caption {
  padding: 0.75rem 0.85rem;
  color: var(--color-brand-900);
  font-weight: 850;
  text-align: left;
}

.v17-table-wrap th,
.v17-table-wrap td,
.v17-hub__table-wrap th,
.v17-hub__table-wrap td {
  border-top: 1px solid var(--color-line);
  border-right: 1px solid var(--color-line);
  padding: 0.72rem 0.78rem;
  text-align: left;
  vertical-align: top;
}

.v17-table-wrap th:last-child,
.v17-table-wrap td:last-child,
.v17-hub__table-wrap th:last-child,
.v17-hub__table-wrap td:last-child {
  border-right: 0;
}

.v17-table-wrap thead th,
.v17-hub__table-wrap thead th {
  background: var(--v17-soft);
  color: var(--color-brand-900);
}

.v17-table-wrap tbody th,
.v17-hub__table-wrap tbody th {
  background: #f7faf8;
}

.v17-answer > .v17-table-wrap,
.v17-answer > .v17-label-map,
.v17-answer > .v17-examples,
.v17-answer > .v17-factors,
.v17-answer > .v17-cta {
  margin: 1rem clamp(0.9rem, 3.5vw, 1.6rem) 0;
}

.v17-answer > .v17-cta {
  margin-bottom: clamp(0.9rem, 3.5vw, 1.6rem);
}

.v17-label-map,
.v17-examples,
.v17-factors {
  min-width: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: clamp(0.9rem, 2.8vw, 1.15rem);
}

.v17-label-map {
  overflow-x: auto;
  background: #fff;
}

.v17-label-map table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
}

.v17-label-map th,
.v17-label-map td {
  border-top: 1px solid var(--color-line);
  padding: 0.68rem 0.72rem;
  text-align: left;
  vertical-align: top;
}

.v17-label-map thead th {
  background: var(--v17-soft);
  color: var(--color-brand-900);
}

.v17-label-map tbody td:first-child {
  font-weight: 720;
}

.v17-label-map > :last-child,
.v17-examples > :last-child,
.v17-factors > :last-child {
  margin-bottom: 0;
}

.v17-examples {
  border-top: 0.3rem solid var(--color-brand-700);
  background: #f7fbfa;
}

.v17-factors {
  border-left: 0.35rem solid #d29b20;
  background: var(--v17-warm);
}

.v17-note,
.v17-source-note {
  margin: 0;
  border-left: 0.32rem solid #d29b20;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-warning-bg);
  padding: 0.78rem 0.9rem;
}

.v17-stop {
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.v17-hub--stop {
  border: 2px solid #d46a44;
  background: #fff1eb;
}

.v17-hub--stop > h2 {
  color: #842c0c;
}

.v17-hub__link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.v17-hub__link-grid a {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.v17-hub__link-grid a:hover {
  border-color: var(--color-brand-700);
  box-shadow: var(--shadow-card, 0 0.45rem 1.4rem rgb(11 98 89 / 10%));
}

.v17-hub__link-grid strong {
  color: var(--color-brand-900);
}

.v17-hub__link-grid span {
  margin-top: 0.25rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.v17-hub__check-list,
.v17-hub__stop-list {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.3rem;
}

.v17-stop > :first-child {
  margin-top: 0;
  color: #842c0c;
}

.v17-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: var(--radius-md);
  background: var(--color-brand-900);
  padding: 0.9rem 1rem;
  color: #fff;
}

.v17-cta p {
  flex: 1 1 18rem;
  margin: 0;
}

.v17-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.62rem 0.9rem;
  color: var(--color-brand-900);
  font-weight: 900;
  text-decoration: none;
}

.v17-cta a.button--secondary {
  border: 1px solid rgb(255 255 255 / 78%);
  background: transparent;
  color: #fff;
}

.v17-answer__sources,
.v17-sources {
  margin: 1rem clamp(0.9rem, 3.5vw, 1.6rem) 0;
  border-top: 1px solid var(--color-line);
  padding-top: 0.85rem;
}

.v17-answer__sources h3,
.v17-sources h3 {
  font-size: 1rem;
}

.v17-answer__sources ul,
.v17-sources ul {
  display: grid;
  gap: 0.35rem;
}

.buying-aid__companions li > a {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1.45rem minmax(0, 1fr);
  gap: 0.42rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

/* v1.4以前の補助文だけを本文相当へ引き上げる。バッジとeyebrowは小さいまま保つ。 */
.buying-aid__coverage p:not(.buying-aid__label),
.buying-aid__coverage .buying-aid__note,
.buying-aid__companions strong,
.buying-aid__companions small,
.buying-aid__memo p,
.buying-aid__memo li,
.buying-aid__footer > p,
.buying-aid__sources li,
.buying-aid__actions,
.input-origin-map__example,
.field-note,
.submit-note,
.beginner-term-help dd {
  font-size: 0.875rem;
}

@media (width <= 48rem) {
  .v17-answer__grid,
  .v17-hub__grid,
  .v17-example-grid,
  .v17-decision-grid,
  .v17-hub__link-grid {
    grid-template-columns: 1fr;
  }

  .v17-table-wrap::before,
  .v17-hub__table-wrap::before,
  .v17-label-map h3::after {
    display: block;
    color: var(--color-muted);
    content: "表は横にスクロールできます →";
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.5;
  }

  .v17-table-wrap::before,
  .v17-hub__table-wrap::before {
    position: sticky;
    left: 0;
    width: max-content;
    padding: 0.55rem 0.75rem 0;
  }

  .v17-label-map h3::after {
    margin-top: 0.25rem;
  }
}

@media (width <= 38rem) {
  .v17-answer,
  .v17-hub {
    margin-inline: 0;
  }

  .v17-answer__quick,
  .v17-answer__intro,
  .v17-hub__intro,
  .v17-answer__body,
  .v17-hub__body {
    padding: 0.92rem;
  }

  .v17-answer p,
  .v17-answer li,
  .v17-answer td,
  .v17-answer th,
  .v17-hub p,
  .v17-hub li,
  .v17-hub td,
  .v17-hub th {
    font-size: 1rem;
  }
}

@media print {
  .v17-answer,
  .v17-hub,
  .v17-card,
  .v17-example,
  .v17-decision,
  .v17-shopping,
  .v17-stop {
    break-inside: avoid;
    box-shadow: none;
  }

  .v17-table-wrap,
  .v17-hub__table-wrap {
    overflow: visible;
  }

  .v17-table-wrap table,
  .v17-hub__table-wrap table,
  .v17-label-map table {
    min-width: 0;
  }

  .v17-cta {
    display: none;
  }
}
