:root {
  --ink: #17201b;
  --muted: #5d685f;
  --paper: #f6f1e8;
  --surface: #fffaf1;
  --line: #ddd2bf;
  --green: #285747;
  --green-deep: #143629;
  --amber: #c88932;
  --red: #a64b35;
  --blue: #3f6475;
  --shadow: 0 18px 50px rgba(23, 32, 27, 0.14);
  /* ヘッダー実高。スティッキー分のアンカー位置やヒーロー高さの計算に使う。 */
  --header-h: 66px;
  --tap: 44px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* スティッキーヘッダーに見出しが隠れないよう、全アンカー先に余白を確保する。 */
[id] {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

/* 画像・バナーが親幅を超えて横スクロールを起こさないようにする。 */
img,
svg,
iframe {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* キーボード操作時のみ、どの配色の上でも見えるフォーカスリングを出す。 */
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

.site-header :focus-visible,
.article-band :focus-visible,
.hero :focus-visible,
.category-hero :focus-visible,
.sub-hero :focus-visible,
.site-footer :focus-visible {
  outline-color: #f5d69f;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 40px);
  min-height: var(--header-h);
  padding: 12px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid rgba(255, 250, 241, 0.24);
  color: #fffaf1;
  background: rgba(20, 54, 41, 0.92);
  backdrop-filter: blur(16px);
}

.brand,
.header-nav,
.hero-actions,
.filters,
.cta-inner {
  display: flex;
  align-items: center;
}

/*
 * ブランドは常に1行。ヘッダーが詰まってもナビ側を縮め、
 * 「献」マークと「開業の献立」の相対位置は変えない。
 */
.brand {
  flex: 0 0 auto;
  gap: 11px;
  font-size: clamp(17px, 1.34vw, 19px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: var(--green-deep);
  background: #f5d69f;
  font-size: 20px;
  font-weight: 800;
  /* 全角1文字を箱の中央に置くため、行間の余りを消す。 */
  line-height: 1;
  letter-spacing: 0;
}

.brand:hover .brand-mark {
  background: #f8e2ba;
}

.header-nav {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  gap: clamp(12px, 2.2vw, 30px);
  color: rgba(255, 250, 241, 0.88);
  font-size: 14px;
  font-weight: 700;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
}

.header-nav a:hover {
  color: #fff;
}

.hero {
  position: relative;
  /* ヒーローだけで画面を使い切らず、直下の導線が見える高さに収める。 */
  min-height: clamp(500px, calc(100svh - var(--header-h)), 700px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--green-deep);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(20, 54, 41, 0.96) 0%, rgba(20, 54, 41, 0.78) 34%, rgba(20, 54, 41, 0.2) 68%, rgba(20, 54, 41, 0.08) 100%),
    linear-gradient(0deg, rgba(20, 54, 41, 0.5), transparent 36%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 6vw, 86px);
  padding: clamp(40px, 6vw, 64px) 0 clamp(30px, 4vw, 44px);
  color: #fffaf1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  /* anywhere は最小content幅も潰すため、はみ出し防止だけを目的に break-word にする。 */
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  /* 和文の約物アキを詰め、見出しの字面を揃える。 */
  font-feature-settings: "palt" 1;
}

h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(29px, 4.6vw, 56px);
  /* 和文は 1.08 だと行が接触するため、多行でも読める行送りにする。 */
  line-height: 1.26;
  letter-spacing: 0.01em;
}

h2 {
  margin: 0;
  font-size: clamp(24px, 2.9vw, 40px);
  line-height: 1.34;
  letter-spacing: 0.01em;
}

h3 {
  margin: 0;
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.hero-copy {
  max-width: 650px;
  margin: 20px 0 0;
  color: rgba(255, 250, 241, 0.9);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.85;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.button:hover {
  filter: brightness(1.06);
}

.button.primary {
  color: var(--green-deep);
  background: #f5d69f;
}

.button.primary.dark {
  color: #fffaf1;
  background: var(--green-deep);
}

.button.secondary {
  color: #fffaf1;
  border-color: rgba(255, 250, 241, 0.38);
  background: rgba(255, 250, 241, 0.1);
}

.button.secondary.light {
  color: #fffaf1;
  border-color: rgba(255, 250, 241, 0.44);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
  margin: 30px 0 0;
}

.hero-stats div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 250, 241, 0.24);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.1);
}

.hero-stats dt {
  color: rgba(255, 250, 241, 0.72);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.hero-stats dd {
  margin: 4px 0 0;
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 900;
  line-height: 1.45;
}

.section {
  padding: clamp(56px, 7vw, 96px) clamp(18px, 4vw, 54px);
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.intro-band {
  background: var(--surface);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(26px, 6vw, 78px);
  align-items: start;
}

.intro-grid p:last-child,
.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.85;
}

.section-heading {
  display: grid;
  max-width: 780px;
  gap: 12px;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.section-heading.compact {
  max-width: 660px;
}

.priority-grid,
.article-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.priority-card,
.article-cards article,
.timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 32, 27, 0.06);
}

/*
 * 本文量が違ってもカード下端の「詳しく比較する」が揃うよう、
 * 説明文の行に余白を吸わせる。
 */
.priority-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  padding: 22px;
}

.priority-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.priority-card:hover {
  border-color: rgba(40, 87, 71, 0.42);
}

.text-link,
.table-link {
  color: var(--green);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 40px;
}

.card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 11px;
  color: #fffaf1;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
  white-space: nowrap;
}

/* 費用の「見る点」を示すラベル。警告色ではなく主色で落ち着かせる。 */
.reward {
  color: var(--green-deep);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.55;
}

.card-meta,
.demand {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  white-space: nowrap;
}

.roadmap-band {
  background: #eaf0eb;
}

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

.timeline article {
  position: relative;
  padding: 22px;
}

.timeline p,
.article-cards p {
  margin: 10px 0 0;
  color: var(--muted);
}

.step {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #fffaf1;
  background: var(--green);
  font-weight: 900;
}

.filters {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-button {
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 16px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: #fffaf1;
  border-color: var(--green);
  background: var(--green);
}

.table-wrap,
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  /*
   * 左右のグラデーションで「まだ続きがある」ことを示す。
   * local レイヤーは中身と一緒に流れ、scroll レイヤーは枠に固定される。
   */
  background:
    linear-gradient(to right, var(--surface) 40%, rgba(255, 250, 241, 0)) left center / 44px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 40%, rgba(255, 250, 241, 0)) right center / 44px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(23, 32, 27, 0.17), rgba(23, 32, 27, 0)) left center / 15px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(23, 32, 27, 0.17), rgba(23, 32, 27, 0)) right center / 15px 100% no-repeat scroll,
    var(--surface);
  box-shadow: var(--shadow);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.75;
}

/* 横スクロール中でも、どの列を読んでいるかを見失わないようにする。 */
tr > :not(:first-child) {
  border-left: 1px solid var(--line);
}

.service-table-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  color: var(--green-deep);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(40, 87, 71, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.service-table-link span {
  color: var(--green);
  font-size: 0.82em;
}

.service-table-link:hover,
.service-table-link:focus-visible {
  color: var(--green);
  text-decoration-color: currentColor;
}

thead th {
  border-bottom: 2px solid #d9c9ae;
}

th {
  color: var(--green-deep);
  background: #efe5d4;
  font-size: 13px;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fbf4e8;
}

.category-hero {
  padding: clamp(48px, 7vw, 92px) clamp(18px, 4vw, 54px);
  color: #fffaf1;
  background:
    linear-gradient(90deg, rgba(20, 54, 41, 0.96), rgba(40, 87, 71, 0.82)),
    url("assets/restaurant-opening-hero.jpg") center / cover;
}

.category-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: end;
}

.category-hero h1 {
  max-width: none;
  font-size: clamp(28px, 3.6vw, 48px);
}

.category-hero p {
  max-width: 720px;
  color: rgba(255, 250, 241, 0.88);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.85;
}

.category-summary {
  border: 1px solid rgba(255, 250, 241, 0.24);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 250, 241, 0.1);
}

.category-summary h2 {
  font-size: clamp(19px, 1.6vw, 22px);
}

.category-summary ul,
.pros-cons ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.category-summary li,
.pros-cons li {
  margin-top: 8px;
  line-height: 1.8;
}

.category-summary p,
.category-summary li {
  font-size: 15px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.guide-copy,
.writer-placeholder,
.product-card,
.empty-products {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
}

.guide-copy p,
.writer-placeholder p,
.product-card p,
.empty-products p {
  color: var(--muted);
}

.writer-placeholder {
  border-style: dashed;
  background: #fbf4e8;
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

/*
 * トップの比較表は min-width 760px。左右余白を差し引いても収まる
 * 830px 超では横スクロールが発生しないので、案内を出さない。
 */
@media (min-width: 831px) {
  .scroll-hint-narrow {
    display: none;
  }
}

.compare-scroll {
  position: relative;
}

.product-table {
  min-width: 1540px;
}

.product-table th,
.product-table td {
  vertical-align: top;
  line-height: 1.75;
}

.product-table th:first-child,
.product-table td:first-child {
  width: 180px;
}

.product-table th:not(:first-child):not(:last-child),
.product-table td:not(:first-child):not(:last-child) {
  min-width: 320px;
}

.product-table th:last-child,
.product-table td:last-child {
  min-width: 320px;
}

.table-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.1em;
}

.table-list li {
  padding-left: 2px;
}

.service-head strong,
.service-head span {
  display: block;
}

.service-detail-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-detail-button {
  width: fit-content;
  margin-top: 22px;
  color: var(--green-deep);
  border-color: var(--line);
  background: #fffaf1;
}

.service-head span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

/* 公式ロゴ素材がないサービスでも、比較表・カードで同じ識別子を保つ。 */
.service-logo {
  display: inline-grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(40, 87, 71, 0.18);
  border-radius: 12px;
  color: var(--green-deep);
  background: #fff;
  box-shadow: 0 4px 10px rgba(23, 32, 27, 0.06);
}

.service-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

/* 公式ロゴを確認できない6サービスは、機能を伝える汎用写真で識別する。 */
.service-logo.service-visual {
  width: 96px;
  height: 54px;
  flex-basis: 96px;
  border-radius: 10px;
  background: var(--surface);
}

.service-logo.service-visual img {
  padding: 0;
  object-fit: cover;
}

.service-logo-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--green-deep);
  background: #f4ead8;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.service-logo.compact {
  display: inline-grid;
  width: 32px;
  height: 32px;
  margin: 0 0 8px;
  border-radius: 9px;
}

.service-logo.service-visual.compact {
  width: 64px;
  height: 40px;
  flex-basis: 64px;
  border-radius: 8px;
}

.article-brand-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 4px;
  color: var(--green-deep);
}

.article-brand-identity .service-logo.compact,
.service-table-name .service-logo.compact {
  margin: 0;
}

.article-brand-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.article-brand-identity strong {
  font-size: 16px;
}

.service-table-name {
  white-space: normal;
}

.service-table-name > .service-logo {
  display: inline-grid;
  margin: 0 7px 0 0;
  vertical-align: middle;
}

.service-table-name > .service-logo.service-visual {
  margin-right: 8px;
}

.article-list-card > .service-logo.compact,
.related-article-card > .service-logo.compact {
  margin: 0 0 2px;
}

.service-head .service-logo,
.service-head .service-logo-fallback {
  margin-top: 0;
  color: var(--green-deep);
  font-size: 14px;
}

.service-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.service-identity > div {
  min-width: 0;
}

.service-identity .eyebrow {
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  /* 比較カードでは情報量を優先し、用途写真は見分けられる最小限の高さに抑える。 */
  .service-logo.service-visual {
    width: 72px;
    height: 44px;
    flex-basis: 72px;
  }

  .service-logo.service-visual.compact {
    width: 58px;
    height: 36px;
    flex-basis: 58px;
  }
}

/* --text は未定義だったため、本文色トークンに合わせる。 */
.compare-label {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.table-cta-cell {
  vertical-align: middle;
}

.sticky-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 8px 0 14px rgba(23, 32, 27, 0.06);
}

.sticky-cell span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-button {
  display: inline-flex;
  min-width: 124px;
  min-height: var(--tap);
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 8px 14px;
  color: #fffaf1;
  background: var(--green);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
  white-space: nowrap;
}

.mini-button:hover {
  background: var(--green-deep);
}

.product-band {
  background: #eaf0eb;
}

.product-list {
  display: grid;
  gap: 18px;
}

.product-card {
  display: grid;
  gap: 18px;
}

.product-media {
  display: block;
  width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.product-media img {
  display: block;
  width: 100%;
  height: auto;
}

.product-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.product-head .button {
  flex: 0 0 auto;
}

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

.pros-cons section,
.note-box {
  border-radius: 8px;
  padding: 18px;
  background: #fbf4e8;
}

/* 静的カテゴリページは h3、動的生成は h4 を使うため、見た目を揃える。 */
.pros-cons h3,
.pros-cons h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.note-box {
  border-left: 4px solid var(--amber);
}

.note-box p {
  margin: 6px 0 0;
}

.related-article-band {
  background: #fffaf1;
}

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

.related-article-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.related-article-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 93, 72, 0.34);
  box-shadow: 0 14px 34px rgba(23, 32, 27, 0.08);
}

.related-article-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.related-article-card h3,
.related-article-card p {
  margin: 0;
}

.related-article-card h3 {
  font-size: 17px;
  line-height: 1.55;
}

.related-article-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.article-band {
  background: var(--green-deep);
  color: #fffaf1;
}

.article-band .section-heading p,
.article-cards p {
  color: rgba(255, 250, 241, 0.76);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(26px, 5vw, 64px);
}

.article-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-cards article {
  padding: 22px;
  color: #fffaf1;
  border-color: rgba(255, 250, 241, 0.16);
  background: rgba(255, 250, 241, 0.08);
}

.cta-section {
  background: var(--surface);
}

.cta-inner {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.cta-inner h2 {
  max-width: 760px;
}

.cta-inner .button {
  flex: 0 0 auto;
}

/*
 * フッターは1行に詰め込まず、狭くなった順に折り返す。
 * 折返し時も © 表記が先頭に残るようにする。
 */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px clamp(20px, 3vw, 40px);
  padding: 28px clamp(18px, 4vw, 54px);
  color: rgba(255, 250, 241, 0.74);
  background: #101a15;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer p {
  flex: 0 0 auto;
  margin: 0;
  padding-top: 9px;
  font-weight: 800;
}

.footer-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 2px 18px;
  font-weight: 800;
}

.footer-category-nav {
  flex: 2 1 320px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
}

.footer-nav a:hover {
  color: #fffaf1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sub-hero {
  padding: clamp(44px, 6vw, 84px) clamp(18px, 4vw, 54px);
  color: #fffaf1;
  background:
    linear-gradient(90deg, rgba(20, 54, 41, 0.98), rgba(40, 87, 71, 0.86)),
    url("assets/restaurant-opening-hero.jpg") center / cover;
}

.article-hero {
  background: linear-gradient(90deg, rgba(20, 54, 41, 0.98), rgba(40, 87, 71, 0.86));
  background-position: center;
  background-size: cover;
}

.article-hero h1 {
  max-width: 1100px;
  font-size: clamp(27px, 3.4vw, 46px);
  line-height: 1.32;
}

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

.sub-hero p {
  max-width: 760px;
  color: rgba(255, 250, 241, 0.88);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.85;
}

.content-page {
  display: grid;
  gap: 18px;
  max-width: 920px;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 32, 27, 0.06);
}

.content-card h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.content-card p,
.content-card li {
  color: var(--muted);
  line-height: 1.88;
}

.content-card ul,
.content-card ol {
  display: grid;
  gap: 10px;
  padding-left: 1.35em;
}

.info-table {
  min-width: 0;
  margin-top: 18px;
}

.info-table th {
  width: 180px;
  background: #efe5d4;
}

.contact-form-card {
  padding: clamp(26px, 5vw, 46px);
}

.contact-form-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.contact-form {
  display: grid;
  gap: 24px;
}

.form-field {
  display: grid;
  gap: 9px;
}

.form-field label {
  font-weight: 800;
  color: var(--ink);
}

.form-field label span {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f3dfd8;
  color: #8b3829;
  font-size: 11px;
  vertical-align: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #b7b2a8;
  border-radius: 6px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}

.form-field textarea {
  min-height: 190px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 3px solid rgba(37, 103, 79, 0.18);
  border-color: var(--green);
}

.form-field small {
  color: var(--muted);
  line-height: 1.7;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--muted);
  line-height: 1.7;
  cursor: pointer;
}

.form-consent input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.form-consent a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-honey {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  justify-self: start;
  min-width: 210px;
  border: 0;
  cursor: pointer;
}

.form-submit:disabled {
  opacity: 0.58;
  cursor: wait;
}

.form-status {
  min-height: 1.7em;
  margin: 0;
  font-weight: 800;
}

.form-status[data-state="success"] {
  color: var(--green);
}

.form-status[data-state="error"] {
  color: #a23f30;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 850px) minmax(240px, 300px);
  align-items: start;
  gap: clamp(22px, 4vw, 34px);
}

.article-body {
  width: 100%;
  min-width: 0;
  max-width: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(30px, 5vw, 58px);
  box-shadow: var(--shadow);
}

.article-body .table-wrap {
  width: 100%;
  max-width: 100%;
}

.article-body h2 {
  margin-top: clamp(44px, 6vw, 64px);
  padding-top: 18px;
  border-top: 1px solid #e3d7c4;
  font-size: clamp(23px, 2.6vw, 32px);
  line-height: 1.45;
}

.article-body h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.article-body p,
.article-body li {
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 17px);
  line-height: 1.88;
}

.article-body p {
  margin: 16px 0 0;
}

/*
 * 本文中の内部リンクは既定の a 規則だと本文色・下線なしで見分けが付かないため、
 * ボタン等の既存コンポーネントを除いて明示的にリンクとして見せる。
 */
.article-body p a:not(.button),
.article-body li a:not(.button),
.article-body dd a:not(.button),
.article-body td a:not(.button):not(.service-table-link):not(.mini-button) {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-body p a:not(.button):hover,
.article-body li a:not(.button):hover,
.article-body dd a:not(.button):hover,
.article-body td a:not(.button):not(.service-table-link):not(.mini-button):hover {
  color: var(--green-deep);
  text-decoration-thickness: 2px;
}

/*
 * 記事内の表は列数がまちまち。全体 min-width ではなくセル幅で下限を決め、
 * 収まるときは横スクロールを出さない。
 */
.article-body table {
  min-width: 0;
}

.article-body th,
.article-body td {
  min-width: 8.5em;
  white-space: normal;
}

.article-body h2 + p,
.article-body h3 + p {
  max-width: 46em;
}

.article-body ul,
.article-body ol {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-left: 1.35em;
}

.article-body li::marker {
  color: var(--amber);
  font-weight: 900;
}

.article-body > p > strong:first-child {
  color: var(--ink);
  font-size: 1.04em;
}

.article-body h3 {
  margin: 34px 0 0;
  padding-left: 14px;
  border-left: 4px solid var(--amber);
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.55;
}

.key-point,
.example-box,
.caution-box {
  margin: 26px 0;
  border-radius: 8px;
  padding: clamp(20px, 3vw, 28px);
}

.key-point {
  border: 1px solid #b9d0c7;
  border-left: 5px solid var(--green);
  background: #eef6f2;
}

.example-box {
  border: 1px solid #dfc89d;
  border-left: 5px solid var(--amber);
  background: #fff8e9;
}

.caution-box {
  border: 1px solid #dfb9ae;
  border-left: 5px solid var(--red);
  background: #fff3ef;
}

.key-point h3,
.example-box h3,
.caution-box h3 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(18px, 2vw, 21px);
}

.key-point p:first-of-type,
.example-box p:first-of-type,
.caution-box p:first-of-type {
  margin-top: 10px;
}

.formula {
  margin: 18px 0 0;
  border-radius: 6px;
  padding: 15px 18px;
  color: var(--green-deep);
  background: #fff;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 900;
  line-height: 1.65;
}

.article-body .table-wrap {
  margin-top: 22px;
}

.article-body caption {
  padding: 12px 16px;
  color: var(--green-deep);
  background: #fbf4e8;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.article-body th {
  color: var(--ink);
  background: #f3eadb;
}

.article-body td {
  line-height: 1.75;
}

.article-cover {
  margin: clamp(22px, 4vw, 34px) 0 clamp(32px, 5vw, 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #efe5d4;
  aspect-ratio: 16 / 9;
}

.article-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-article-banner {
  width: min(100%, 360px);
  margin: 28px auto 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.service-article-banner a,
.service-article-banner img {
  display: block;
}

.service-article-banner img {
  width: 100%;
  height: auto;
}

/*
 * PCでは長文記事を読みながら関連記事に移れるよう追従させる。
 * 921px 未満では下のメディアクエリで static に戻す。
 */
.article-sidebar {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 18px);
  max-height: calc(100svh - var(--header-h) - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 250, 241, 0.92);
  box-shadow: 0 12px 28px rgba(23, 32, 27, 0.08);
}

.sidebar-label {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.article-side-nav {
  display: grid;
  gap: 4px;
}

.article-side-nav a {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: var(--tap);
  border-radius: 8px;
  padding: 9px 12px;
  background: transparent;
}

.article-side-nav a:hover,
.article-side-nav a.active {
  background: #f3eadb;
}

.article-side-nav a.active {
  box-shadow: inset 3px 0 0 var(--green);
}

.article-side-nav span {
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.5;
}

.article-side-nav strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.source-box {
  margin: clamp(34px, 5vw, 52px) 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 3vw, 26px);
  background: #fffaf1;
}

.source-box h2 {
  margin-top: 0;
}

.source-box ul {
  margin-bottom: 0;
}

.source-box a {
  color: var(--green);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-toc {
  margin: 28px 0 36px;
  padding: 18px 22px;
  border-left: 4px solid var(--amber);
  background: #fffaf1;
}

.article-toc strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.article-toc ol {
  margin: 0;
  padding-left: 1.3em;
}

.article-toc li + li {
  margin-top: 6px;
}

.article-toc a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-toc li {
  line-height: 1.8;
}

.ad-notice,
.article-cta {
  border-radius: 8px;
  padding: clamp(18px, 3vw, 24px);
  background: #fbf4e8;
}

.article-cta {
  margin-top: 34px;
  border-left: 4px solid var(--green);
}

.article-cta h2 {
  margin: 0;
}

.adsense-slot {
  min-height: 110px;
  margin: clamp(42px, 6vw, 64px) 0;
  padding: 14px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.adsense-slot .ad-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.article-index {
  display: grid;
  gap: 44px;
}

.article-topic-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-topic-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.article-topic-nav a:hover {
  border-color: var(--green);
  background: #f3eadb;
}

/* スティッキーヘッダー分を差し引いた位置で止める。 */
.article-topic {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.article-topic-heading {
  margin-bottom: 16px;
}

.article-topic-heading h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 32px);
}

.article-topic-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.article-topic-grid {
  display: grid;
  gap: 16px;
}

.article-list-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 3vw, 28px);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 32, 27, 0.06);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.article-list-card:hover {
  border-color: rgba(40, 87, 71, 0.42);
  box-shadow: 0 14px 34px rgba(23, 32, 27, 0.09);
  transform: translateY(-2px);
}

.article-list-card span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

/* 一覧カードの見出しは記事本文 h2 ほど大きくせず、一覧の視線移動を軽くする。 */
.article-list-card h2 {
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.55;
}

.article-list-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.start-guide {
  background: var(--surface);
}

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

/* ラベル / 見出し / 説明の3段。説明が余白を吸い、カード高さと下端を揃える。 */
.start-guide-grid a {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-height: 196px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 8px 22px rgba(23, 32, 27, 0.05);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.start-guide-grid a:hover {
  border-color: rgba(40, 87, 71, 0.42);
  box-shadow: 0 14px 30px rgba(23, 32, 27, 0.08);
  transform: translateY(-2px);
}

.start-guide-grid span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

.start-guide-grid h3 {
  margin: 0;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
}

.start-guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

img.tracking-pixel,
.service-article-banner > img[width="1"][height="1"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  max-width: 1px;
  max-height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 920px) {
  .start-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /*
   * ヘッダーの折返し・高さ・ナビの送り方は、末尾の統合レイヤーで
   * 1行構成に一本化している。ここでは指定しない。
   */

  .article-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .article-side-nav {
    max-height: 320px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .hero {
    min-height: auto;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(20, 54, 41, 0.96) 0%, rgba(20, 54, 41, 0.82) 52%, rgba(20, 54, 41, 0.34) 100%),
      linear-gradient(90deg, rgba(20, 54, 41, 0.42), transparent);
  }

  .hero-content {
    width: min(720px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(36px, 8vw, 52px) 0 clamp(28px, 5vw, 36px);
  }

  .intro-grid,
  .article-layout,
  .category-hero-inner,
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .priority-grid,
  .timeline,
  .related-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    gap: 10px 24px;
  }

  .site-footer p {
    flex: 1 1 100%;
    padding-top: 0;
  }
}

.article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.article-breadcrumbs a {
  color: var(--green);
  text-decoration: none;
}

.article-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  text-decoration: underline;
  text-decoration-color: rgba(40, 87, 71, 0.4);
  text-underline-offset: 3px;
}

.article-breadcrumbs a:hover {
  text-decoration-color: currentColor;
}

.article-reader-guide {
  margin: 0 0 2.25rem;
  padding: clamp(1.15rem, 3vw, 1.5rem);
  border: 1px solid #d7e5dd;
  border-radius: 14px;
  background: #f6faf7;
}

.article-reader-guide h2 {
  margin: 0.1rem 0 1rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}

.article-reader-guide dl {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.article-reader-guide dl div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.9rem;
}

.article-reader-guide dt {
  font-weight: 700;
  color: var(--green);
  line-height: 1.8;
}

.article-reader-guide dd {
  margin: 0;
  line-height: 1.8;
}

.article-guide-next,
.article-guide-related {
  margin: 1.1rem 0 0;
}

.article-guide-related ul {
  display: grid;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
  padding-left: 1.2rem;
}

.contextual-related-links {
  margin: 0 0 2rem;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  background: #f7f3ea;
}

.contextual-related-links p {
  margin: 0.4rem 0;
}

.contextual-related-links > :first-child {
  margin-top: 0;
}

.contextual-related-links > :last-child {
  margin-bottom: 0;
}

.checklist-phase-heading {
  margin-bottom: 0.45rem;
}

.checklist-phase-intro {
  margin-top: 0;
}

.checklist-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 2rem;
}

.checklist-link-grid a {
  display: grid;
  align-content: center;
  gap: 0.25rem;
  min-height: var(--tap);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  line-height: 1.7;
  text-decoration: none;
  background: #fffdf9;
}

.checklist-link-grid a:hover {
  border-color: var(--green);
  background: #f6faf7;
}

.checklist-link-grid span {
  color: var(--green);
  font-size: 0.9rem;
  line-height: 1.6;
}

.checklist-phase-subheading {
  margin-top: 2rem;
}

.calculation-assumption {
  margin: 0.8rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e1d4bd;
  border-radius: 10px;
  background: #fffaf1;
  font-size: 0.94rem;
}

.inuki-record-sheet {
  margin: 1.5rem 0 2rem;
  padding: 1.15rem;
  border: 1px solid #d7e5dd;
  border-radius: 12px;
  background: #f6faf7;
}

.inuki-record-sheet h2 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .article-reader-guide dl div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

  .article-body {
    padding: 24px 20px;
  }

  .checklist-link-grid {
    grid-template-columns: 1fr;
  }

  .article-body h2 {
    margin-top: 42px;
    font-size: 25px;
  }

  .article-body p,
  .article-body li {
    line-height: 1.82;
  }

  .article-body h3 {
    margin-top: 30px;
  }

  /* 390px 幅では 8.5em だと3列でも常に横スクロールになるため下限を下げる。 */
  .article-body th,
  .article-body td {
    min-width: 7.5em;
    padding: 13px 14px;
  }

  /* 「献」マークと文字の大きさの比を保ったまま、1行のまま縮める。 */
  .brand {
    gap: 9px;
    font-size: 16px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 18px;
  }

  .hero {
    min-height: auto;
  }

  .hero-stats,
  .priority-grid,
  .timeline,
  .start-guide-grid,
  .article-cards,
  .related-article-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
  }

  .hero-stats div {
    padding: 11px 9px;
  }

  .hero-stats dt {
    font-size: 11px;
  }

  .hero-stats dd {
    font-size: 14px;
  }

  .hero-content {
    padding-top: 34px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 26px;
  }

  .hero-actions .button,
  .category-hero .hero-actions .button {
    width: 100%;
  }

  .form-submit {
    width: 100%;
  }

  .cta-inner,
  .product-head,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-inner .button,
  .product-head .button,
  .article-cta .button {
    width: 100%;
  }

  /* 縦並びでは flex-basis が高さに効いてしまうため、行方向用の指定を戻す。 */
  .site-footer p,
  .footer-nav,
  .footer-category-nav {
    flex: 0 0 auto;
    padding-top: 0;
  }

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .filter-button {
    flex: 1 1 auto;
  }
}
.article-trust-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.75rem 0 1.25rem;
  color: #5b665f;
  font-size: 0.88rem;
}

.article-trust-meta a {
  color: #285d49;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.sidebar-all-link {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(40, 93, 73, 0.18);
}

.sidebar-all-link a {
  color: #285d49;
  font-weight: 700;
}

/* Global polish: keep the interface calm, tactile, and readable across every page. */
:root {
  --header-height: 70px;
  --focus-ring: 0 0 0 3px rgba(245, 214, 159, 0.44);
}

body {
  text-rendering: optimizeLegibility;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.site-header {
  min-height: var(--header-height);
  gap: 32px;
  padding-top: 12px;
  padding-bottom: 12px;
  box-shadow: 0 5px 20px rgba(10, 35, 26, 0.13);
}

.brand {
  flex: 0 0 auto;
  gap: 11px;
  min-height: 46px;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 250, 241, 0.38);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 8px rgba(0, 0, 0, 0.12);
  font-size: 19px;
  line-height: 1;
}

.header-nav {
  gap: clamp(14px, 2.4vw, 30px);
  min-height: 42px;
}

.header-nav a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 2px;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  border-bottom-color: #f5d69f;
}

.button,
.filter-button,
.product-detail-button {
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover,
.product-detail-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(20, 54, 41, 0.18);
}

.button:active,
.product-detail-button:active {
  transform: translateY(0);
}

.section-heading {
  gap: 14px;
  margin-bottom: 42px;
}

.section-heading h2,
.article-topic-heading h2 {
  text-wrap: balance;
}

.priority-card,
.article-cards article,
.timeline article,
.article-list-card,
.related-article-card,
.product-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.priority-card:hover,
.article-cards article:hover,
.timeline article:hover,
.article-list-card:hover,
.related-article-card:hover,
.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(40, 87, 71, 0.42);
  box-shadow: 0 16px 32px rgba(23, 32, 27, 0.11);
}

.timeline article {
  overflow: hidden;
}

.timeline article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--amber);
}

.filters {
  gap: 9px;
  padding: 4px 0 2px;
}

.filter-button {
  min-height: 42px;
  border-radius: 999px;
  padding: 8px 14px;
}

.filter-button:hover {
  transform: translateY(-1px);
}

.table-wrap {
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(23, 32, 27, 0.06);
}

table th {
  letter-spacing: 0;
}

table td {
  vertical-align: top;
}

.category-hero,
.sub-hero {
  position: relative;
  overflow: hidden;
}

.category-hero::after,
.sub-hero::after {
  content: "";
  position: absolute;
  right: -7rem;
  bottom: -9rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(245, 214, 159, 0.28);
  border-radius: 50%;
  pointer-events: none;
}

.category-hero-inner,
.sub-hero .section-inner {
  position: relative;
  z-index: 1;
}

.article-body {
  padding: clamp(30px, 5vw, 58px);
}

.article-body h2 {
  padding-top: 0.25rem;
  scroll-margin-top: calc(var(--header-height) + 30px);
}

.article-body p,
.article-body li {
  line-height: 1.9;
}

.article-body p + p {
  margin-top: 1.35rem;
}

.article-sidebar {
  border-radius: 12px;
}

.article-list-card {
  min-height: 100%;
  border-radius: 10px;
}

.site-footer {
  gap: 18px 30px;
  padding-top: 34px;
  padding-bottom: 34px;
}

@media (max-width: 920px) {
  :root {
    --header-height: 116px;
  }

  .site-header {
    gap: 5px;
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .brand {
    min-height: 42px;
  }

  .header-nav {
    gap: 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 108px;
  }

  .site-header {
    padding-right: 18px;
    padding-left: 18px;
  }

  .brand {
    gap: 9px;
    min-height: 40px;
    font-size: 16px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 17px;
  }

  .header-nav {
    gap: 16px;
    max-width: 100%;
    font-size: 13px;
  }

  .header-nav a {
    min-height: 38px;
    white-space: nowrap;
  }

  .section-heading {
    margin-bottom: 30px;
  }

  .priority-card:hover,
  .article-cards article:hover,
  .timeline article:hover,
  .article-list-card:hover,
  .related-article-card:hover,
  .product-card:hover,
  .button:hover,
  .product-detail-button:hover {
    transform: none;
  }

  .table-wrap {
    margin-right: -2px;
    margin-left: -2px;
    border-radius: 8px;
  }

  .table-wrap table {
    min-width: 680px;
  }

  .article-body {
    padding: 26px 20px 34px;
  }

  .article-body p + p {
    margin-top: 1.15rem;
  }

  .category-hero::after,
  .sub-hero::after {
    right: -12rem;
    width: 19rem;
    height: 19rem;
  }
}

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

/* ==========================================================================
 * 統合レイヤー
 * 上の各レイヤーで二重定義になっていた値（ヘッダー高さ、モバイル時のヘッダー
 * 折返し、表の最小幅など）をここで一本化する。最後に読み込まれるため、
 * 同一詳細度なら本ブロックが最終値になる。
 * ========================================================================== */

:root {
  /* ヘッダー実高。--header-height は旧名。両方を同じ値に束ねる。 */
  --header-h: 64px;
  --header-height: var(--header-h);
  --tap: 44px;
  --ink-soft: #39443c;
  --speed: 180ms;
  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
}

/* 想定外の広い要素が入っても横スクロールを出さない。clip は sticky を壊さない。 */
body {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

/* --------------------------------------------------------------------------
 * ヘッダー：PC・スマホとも常に1行。ブランドは縮めず、ナビ側だけを送る。
 * -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  min-height: var(--header-h);
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  /* 「献」と「開業の献立」の天地中央を揃えるため、行送りの余りを持たせない。 */
  line-height: 1;
  white-space: nowrap;
}

.brand-mark {
  /* 全角1文字を正方形の中央へ。padding や行送りでずらさない。 */
  place-items: center;
  padding: 0;
  line-height: 1;
  text-align: center;
}

.brand > span:not(.brand-mark) {
  display: inline-block;
  /* 和文の重心はやや下寄りのため、マークに対して視覚的に揃える。 */
  transform: translateY(0.5px);
}

.header-nav {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  margin-left: auto;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.header-nav::-webkit-scrollbar {
  display: none;
}

.header-nav a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 2px;
  white-space: nowrap;
}

@media (max-width: 920px) {
  /* 上位レイヤーの縦積みヘッダーを打ち消し、2行折返しを起こさせない。 */
  .site-header {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .header-nav {
    width: auto;
    padding-bottom: 0;
    font-size: 13px;
  }

  /* ナビが隠れているとき、右端のフェードで「まだ続く」ことを示す。 */
  .site-header::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(90deg, rgba(20, 54, 41, 0), rgba(20, 54, 41, 0.92));
    pointer-events: none;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 58px;
  }

  .brand {
    gap: 9px;
    min-height: 40px;
    font-size: 16px;
  }

  .header-nav {
    gap: 14px;
  }

  .header-nav a {
    min-height: 40px;
    padding: 0 1px;
  }
}

/* --------------------------------------------------------------------------
 * 見出しと余白のリズム
 * -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.62em;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section-heading .eyebrow,
.category-hero .eyebrow {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
 * ボタン：明るい面の上で secondary が読めなくなる問題を解消する。
 * secondary は元々ダークヒーロー用の配色で、カード内では文字が消えていた。
 * -------------------------------------------------------------------------- */

.content-card .button.secondary,
.product-card .button.secondary,
.article-body .button.secondary,
.cta-section .button.secondary,
.empty-products .button.secondary {
  color: var(--green-deep);
  border-color: rgba(40, 87, 71, 0.4);
  background: #fffdf9;
}

.content-card .button.secondary:hover,
.product-card .button.secondary:hover,
.article-body .button.secondary:hover,
.cta-section .button.secondary:hover {
  border-color: var(--green);
  background: #f2f7f3;
}

/* ダークヒーロー上の .light 指定は従来配色のまま維持する。 */
.category-hero .button.secondary.light,
.sub-hero .button.secondary.light,
.hero .button.secondary.light {
  color: #fffaf1;
  background: rgba(255, 250, 241, 0.12);
}

.button {
  padding: 12px 22px;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
 * 比較表
 * -------------------------------------------------------------------------- */

.filter-count {
  margin: 0 0 14px;
  min-height: 1.7em;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.scroll-hint {
  align-items: center;
  gap: 0.4em;
  min-height: 32px;
  color: var(--green-deep);
  border-color: rgba(40, 87, 71, 0.28);
}

.scroll-hint::after {
  content: "→";
  color: var(--amber);
  font-size: 13px;
}

/*
 * 上位レイヤーの `.table-wrap table { min-width: 680px }` は
 * 詳細度で .product-table を上書きし、7列の比較表を潰してしまう。
 * 列ごとの最小幅を保ったまま横スクロールさせる。
 */
@media (max-width: 640px) {
  .table-wrap .product-table {
    min-width: 1180px;
  }

  .table-wrap .product-table th:first-child,
  .table-wrap .product-table td:first-child {
    width: 148px;
  }

  .table-wrap .product-table th:not(:first-child),
  .table-wrap .product-table td:not(:first-child) {
    min-width: 232px;
  }

  .table-wrap .info-table {
    min-width: 0;
  }
}

/* 申込ボタンは指で押せる高さを確保する。 */
.mini-button {
  min-width: 124px;
  min-height: var(--tap);
  padding: 10px 14px;
  transition:
    background-color var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease);
}

.mini-button:hover {
  background: var(--green-deep);
  box-shadow: 0 8px 18px rgba(20, 54, 41, 0.24);
}

.service-detail-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
}

.compare-label {
  color: var(--muted);
}

/* 本文中の表は行を交互に敷いて、横に長い行でも視線が迷わないようにする。 */
.article-body tbody tr:nth-child(even) td,
.article-body tbody tr:nth-child(even) th {
  background: #fdf8ef;
}

.article-body tbody tr:hover td,
.article-body tbody tr:hover th {
  background: #f6efe2;
}

tbody tr {
  transition: background-color var(--speed) var(--ease);
}

/* --------------------------------------------------------------------------
 * カード・回遊導線
 * -------------------------------------------------------------------------- */

.start-guide-grid a,
.checklist-link-grid a {
  transition:
    transform var(--speed) var(--ease),
    border-color var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease);
}

.start-guide-grid a:hover {
  box-shadow: 0 14px 30px rgba(23, 32, 27, 0.1);
}

.text-link {
  min-height: 40px;
  gap: 0.35em;
  transition: color var(--speed) var(--ease);
}

.text-link::after {
  content: "→";
  transition: transform var(--speed) var(--ease);
}

.priority-card:hover .text-link::after,
.text-link:hover::after {
  transform: translateX(3px);
}

/* 関連記事カードは、クリックできることが一目で分かる終端を持たせる。 */
.related-article-card {
  padding: 20px 22px 18px;
}

.related-article-card::after {
  content: "記事を読む →";
  margin-top: 2px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  transition: transform var(--speed) var(--ease);
}

.related-article-card:hover::after {
  transform: translateX(3px);
}

.article-list-card {
  align-content: start;
}

.article-topic-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition:
    color var(--speed) var(--ease),
    border-color var(--speed) var(--ease),
    background-color var(--speed) var(--ease);
}

.article-topic-nav a:hover {
  color: var(--green-deep);
  background: #fffdf9;
}

/* 静的カテゴリページの製品カードは、見出し階層をカード内に収める。 */
.category-static-product h2 {
  font-size: clamp(21px, 2.2vw, 27px);
}

.pros-cons h3,
.pros-cons h4 {
  margin: 0;
  color: var(--green-deep);
  font-size: 16px;
  line-height: 1.5;
}

.pros-cons section {
  padding: 18px 20px;
}

/* --------------------------------------------------------------------------
 * 記事本文：長文の読みやすさと、本文内リンクの可視性
 * -------------------------------------------------------------------------- */

.article-body p,
.article-body li,
.article-body dd {
  color: var(--ink-soft);
}

.article-body th,
.article-body td {
  color: var(--ink);
}

/*
 * 本文中のリンクは色を継承したままだと本文と見分けが付かず、
 * 内部リンクが導線として機能しない。
 */
.article-body p > a:not(.button),
.article-body li a:not(.button),
.article-body dd a:not(.button) {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(40, 87, 71, 0.42);
  transition:
    color var(--speed) var(--ease),
    text-decoration-color var(--speed) var(--ease);
}

.article-body p > a:not(.button):hover,
.article-body li a:not(.button):hover,
.article-body dd a:not(.button):hover {
  color: var(--green-deep);
  text-decoration-color: currentColor;
}

/* 広告表記は本文と混ざらないよう、明示的に区別できる面にする。 */
.ad-notice {
  border: 1px solid #e6d8bd;
  border-left: 4px solid var(--amber);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.article-trust-meta {
  gap: 0.4rem 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.article-trust-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

/* --------------------------------------------------------------------------
 * 目次（article.js が h2 から生成）
 * -------------------------------------------------------------------------- */

.article-toc {
  margin: 0 0 clamp(30px, 4vw, 42px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 10px;
  padding: clamp(18px, 3vw, 24px) clamp(20px, 3vw, 28px);
  background: #fffdf7;
}

.article-toc strong {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 900;
}

.article-toc ol {
  display: grid;
  gap: 2px;
  padding-left: 1.35em;
}

.article-toc li {
  color: var(--muted);
}

.article-toc li + li {
  margin-top: 0;
}

.article-toc li::marker {
  color: var(--amber);
  font-weight: 900;
}

/* 本文リンクの装飾（下線・太字）より詳細度を上げ、目次は静かな見た目に保つ。 */
.article-body .article-toc li a,
.article-toc a {
  display: inline-block;
  padding: 7px 0;
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}

.article-body .article-toc li a:hover,
.article-toc a:hover {
  color: var(--green-deep);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.2em;
}

/* 目次が長い記事では2列に分け、本文開始位置が遠くなりすぎないようにする。 */
@media (min-width: 900px) {
  .article-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
  }
}

/* --------------------------------------------------------------------------
 * サイドバー：PCでは追従させ、長い記事でも回遊先が視界に残るようにする。
 * -------------------------------------------------------------------------- */

.article-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 18px);
}

.sidebar-block {
  max-height: calc(100svh - var(--header-h) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
}

.article-side-nav {
  gap: 4px;
}

.article-side-nav a {
  align-content: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid transparent;
  transition:
    background-color var(--speed) var(--ease),
    border-color var(--speed) var(--ease);
}

.article-side-nav a:hover {
  border-color: rgba(40, 87, 71, 0.2);
}

.article-side-nav a.active {
  border-color: rgba(40, 87, 71, 0.3);
  background: #eef4ef;
  box-shadow: inset 3px 0 0 var(--green);
}

.sidebar-all-link a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 920px) {
  .article-sidebar {
    position: static;
  }

  .sidebar-block {
    max-height: none;
    overflow-y: visible;
  }
}

/* --------------------------------------------------------------------------
 * フッター
 * -------------------------------------------------------------------------- */

.site-footer {
  flex-wrap: wrap;
  border-top: 1px solid rgba(245, 214, 159, 0.16);
  line-height: 1.7;
}

.footer-nav {
  gap: 6px 18px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid transparent;
  transition:
    color var(--speed) var(--ease),
    border-color var(--speed) var(--ease);
}

.footer-nav a:hover {
  border-bottom-color: rgba(255, 250, 241, 0.5);
}

/* --------------------------------------------------------------------------
 * スクロール連動の控えめな立ち上がり
 * transform ではなく translate を使い、hover の translateY と衝突させない。
 * 対応ブラウザのみ・reduced motion では無効。JS も依存関係も増やさない。
 * -------------------------------------------------------------------------- */

@keyframes kondate-rise {
  from {
    opacity: 0.35;
    translate: 0 14px;
  }

  to {
    opacity: 1;
    translate: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .priority-card,
    .timeline article,
    .article-cards article,
    .start-guide-grid a,
    .article-list-card,
    .related-article-card {
      animation: kondate-rise linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 58%;
    }
  }
}

/* --------------------------------------------------------------------------
 * モバイル最終調整（390px前後）
 * -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .cta-inner .button,
  .article-cta .button,
  .product-head .button {
    width: 100%;
  }

  .product-head .button {
    margin-top: 4px;
  }

  .category-hero h1 {
    font-size: clamp(27px, 8vw, 38px);
  }

  .article-hero h1 {
    font-size: clamp(26px, 7.4vw, 36px);
  }

  .sub-hero p,
  .category-hero p {
    font-size: 16px;
  }

  .article-toc {
    padding: 18px 20px;
  }

  .related-article-card,
  .article-list-card {
    padding: 20px;
  }

  .site-footer {
    gap: 16px;
  }
}

/* Small article headers can contain five navigation items. Keep every item
   visible instead of making visitors discover a horizontal nav scroll. */
@media (max-width: 480px) {
  .header-nav {
    min-height: 38px;
    gap: 14px;
    padding: 0;
    font-size: 12px;
  }

  .header-nav a {
    min-height: 38px;
  }
}

/*
 * 上の 480px ブロックはナビ5項目を全部見せる狙いだが、縦積みにすると
 * ヘッダーが2行に折り返し、--header-h と実高もずれてアンカー先が隠れる。
 * 狙い（全項目に到達できる）は1行のまま維持し、字送りを詰めて収まりを良くする。
 * 収まらない場合は右端のフェードでスクロールできることを示す。
 */
@media (max-width: 480px) {
  :root {
    --header-h: 56px;
  }

  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: var(--header-h);
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand {
    gap: 8px;
    min-height: 40px;
    font-size: 15px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 17px;
  }

  .header-nav {
    width: auto;
    gap: 12px;
    overflow-x: auto;
    font-size: 12.5px;
  }

  .header-nav a {
    min-height: 40px;
  }

  .site-header::after {
    width: 20px;
  }
}

/* --------------------------------------------------------------------------
 * 配布資料・開業費用シミュレーター
 * -------------------------------------------------------------------------- */

.resource-page,
.calculator-page {
  display: grid;
  gap: clamp(30px, 5vw, 52px);
}

.resource-page .key-point {
  margin: 0;
}

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

.resource-download-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.resource-download-card h2 {
  margin: 8px 0 0;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.45;
}

.resource-download-card p {
  color: var(--muted);
  line-height: 1.8;
}

.resource-download-card .button {
  width: 100%;
  margin-top: auto;
  text-align: center;
}

.resource-file-type {
  margin: 0;
  color: var(--green-deep) !important;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.resource-privacy-note,
.calculator-local-note {
  border: 1px solid #b9d0c7;
  border-radius: 10px;
  padding: 20px 24px;
  background: #eef6f2;
}

.resource-privacy-note h2 {
  margin: 0;
  font-size: 20px;
}

.resource-privacy-note p,
.calculator-local-note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.calculator-local-note {
  margin: 0;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: start;
  gap: clamp(22px, 4vw, 38px);
}

.calculator-inputs {
  display: grid;
  min-width: 0;
  gap: 22px;
}

.cost-calculator fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 30px);
  background: var(--surface);
}

.cost-calculator legend {
  padding: 0 8px;
  color: var(--green-deep);
  font-size: 20px;
  font-weight: 900;
}

.field-help {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.calculator-field-grid label,
.calculator-note-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.calculator-field-grid label {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.calculator-field-grid label > input,
.calculator-field-grid label > select {
  grid-column: 1 / -1;
}

.calculator-field-grid input,
.calculator-field-grid select,
.calculator-note-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #b9c4bd;
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 500;
}

.calculator-note-field {
  margin-top: 18px;
}

.calculator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.calculator-results {
  position: sticky;
  top: calc(var(--header-h, 72px) + 24px);
  min-width: 0;
  border: 1px solid #b9d0c7;
  border-radius: 14px;
  padding: 26px;
  background: #eef6f2;
  box-shadow: var(--shadow);
}

.calculator-results h2 {
  margin: 4px 0 20px;
}

.calculator-results dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.calculator-results dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border-top: 1px solid rgba(40, 87, 71, 0.18);
  padding: 14px 0;
}

.calculator-results dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.calculator-results dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.calculator-results .calculator-grand-total {
  grid-template-columns: 1fr;
  margin-top: 6px;
  border-radius: 8px;
  padding: 16px;
  color: #fff;
  background: var(--green);
}

.calculator-grand-total dt,
.calculator-grand-total dd {
  color: #fff;
  text-align: left;
}

.calculator-grand-total dd {
  font-size: clamp(24px, 4vw, 32px);
}

.calculator-contract-summary {
  margin: 18px 0;
  border-left: 4px solid var(--amber);
  padding-left: 13px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.calculator-related h2 {
  margin-top: 0;
}

.cashless-content-map {
  margin-top: 28px;
}

.cashless-content-map h2 {
  margin-top: 0;
}

.cashless-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.cashless-role-card {
  display: grid;
  min-width: 0;
  gap: 5px;
  border: 1px solid #c8d6d0;
  border-radius: 9px;
  padding: 16px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}

.cashless-role-card > span {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 900;
}

.cashless-role-card > strong {
  font-size: 16px;
  line-height: 1.45;
}

.cashless-role-card > small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.cashless-role-card.active {
  border-color: var(--green);
  background: #e6f1eb;
  box-shadow: inset 4px 0 0 var(--green);
}

@media (max-width: 820px) {
  .resource-download-grid,
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .calculator-results {
    position: static;
    order: -1;
  }
}

@media (max-width: 540px) {
  .resource-download-card,
  .cost-calculator fieldset,
  .calculator-results {
    padding: 20px;
  }

  .calculator-field-grid {
    grid-template-columns: 1fr;
  }

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

  .cashless-role-grid {
    grid-template-columns: 1fr;
  }
}
