/* =========================================================
   下層ページ共通のスタイル。
   トークン（色・書体・余白）は style.css の :root を使う。
   ここには「TOPには無い、下層ページだけの部品」を書く。
   ========================================================= */

/* ---- パンくず ---- */

.crumbs {
  /* ヘッダーは sticky（position: fixed ではない）ので、
     高さぶんの余白を足す必要はない */
  padding-top: 22px;
  font-size: 12px;
  color: var(--ink-mute);
}

/* 下層ページにはナビが無いので、CTAを右端に寄せる */
.site-header .header-actions {
  margin-left: auto;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li + li::before {
  content: '›';
  margin-right: 8px;
  color: var(--line);
}

.crumbs a:hover {
  color: var(--blue-600);
}

/* ---- 下層ページのヒーロー（写真を置かない） ---- */

.page-hero {
  padding-block: clamp(28px, 4vw, 52px) clamp(40px, 5vw, 72px);
  background: linear-gradient(180deg, var(--bg-hero) 0%, var(--bg) 100%);
}

.page-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  word-break: auto-phrase;
  line-break: strict;
  text-wrap: balance;
}

.page-hero .lead {
  margin: 18px 0 0;
  max-width: 42em;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.95;
  color: var(--ink-body);
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* ---- 安心材料の横並び ---- */

.assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.assurance li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.assurance svg {
  flex: none;
  color: var(--blue-600);
}

/* ---- 法務ページ（プライバシーポリシー等） ---- */

.legal {
  max-width: 820px;
  padding-block: clamp(40px, 5vw, 72px) clamp(56px, 7vw, 96px);
}

.legal h2 {
  margin: 44px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink);
  word-break: auto-phrase;
}

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

.legal h3 {
  margin: 22px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.legal p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-body);
  text-wrap: pretty;
}

.legal ul,
.legal ol {
  margin: 12px 0 0;
  padding-left: 1.4em;
}

.legal li {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-body);
}

.legal a {
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal .meta {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-mute);
}

/* 未確定の項目を目立たせる。公開前に必ず埋める */
.todo {
  display: inline-block;
  padding: 2px 8px;
  border: 1px dashed var(--stat-orange);
  border-radius: 4px;
  background: #fff6ee;
  color: #a24f0a;
  font-size: 12px;
  font-weight: 700;
}

/* ---- 汎用の注記 ---- */

.note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-mute);
}

/* =========================================================
   下層ページのセクション骨格
   ========================================================= */

.section-pad {
  padding-block: clamp(48px, 6vw, 88px);
}

.section-tint {
  background: var(--bg-tint);
  border-block: 1px solid var(--line);
}

.section-title {
  margin: 12px 0 0;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  word-break: auto-phrase;
  line-break: strict;
  text-wrap: balance;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-600);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.link-arrow:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---- 02 こんな相談ができます ---- */

.ask-grid {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ask-item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.ask-item img {
  width: 24px;
  height: 24px;
}

.ask-item h3 {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  word-break: auto-phrase;
}

.ask-item p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-body);
  word-break: auto-phrase;
}

.reassure {
  margin-top: 26px;
  padding: 24px 26px;
  border-radius: 14px;
  background: var(--blue-050);
}

.reassure h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  word-break: auto-phrase;
}

.reassure p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-body);
  word-break: auto-phrase;
  text-wrap: pretty;
}

.reassure .link-arrow {
  margin-top: 14px;
}

/* ---- 03 相談の流れ ---- */

.flow-steps {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.flow-steps li {
  padding-top: 18px;
  border-top: 2px solid var(--blue-600);
}

.flow-no {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue-600);
}

.flow-steps h3 {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  word-break: auto-phrase;
}

.flow-steps p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-body);
  word-break: auto-phrase;
}

.flow-note {
  margin: 26px 0 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-body);
}

/* =========================================================
   フォーム（このページの主役）
   ========================================================= */

.form-wrap {
  max-width: 720px;
}

.form-intro {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-body);
}

.form-intro b {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--blue-050);
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 700;
}

.form {
  margin-top: 28px;
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.field > label,
.field > legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.req {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--blue-050);
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field select,
.field textarea {
  width: 100%;
  padding: 0 14px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  transition:
    border-color 120ms var(--ease-out, ease),
    box-shadow 120ms var(--ease-out, ease);
}

.field textarea {
  height: auto;
  padding: 12px 14px;
  line-height: 1.85;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(13, 28, 193, 0.12);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

.field[data-invalid='true'] input,
.field[data-invalid='true'] select,
.field[data-invalid='true'] textarea {
  border-color: #c0392b;
}

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

.radios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

/* label に input を入れ子にしない。入れ子にすると二重トグルで
   チェックが入らなくなる（2026-09-04 の受け入れテストで実測） */
.radios span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.radios label {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-body);
  cursor: pointer;
}

.consent .check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.consent .check label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-body);
  cursor: pointer;
}

.consent input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex: none;
}

.consent a {
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.error {
  margin: 0;
  color: #c0392b;
  font-size: 13px;
  line-height: 1.6;
}

/* 一度エラーを出した項目は高さを確保しておく。
   エラーが消えた瞬間に下がせり上がると、押そうとした場所がずれる */
.error[data-reserved='true'] {
  min-height: 1.6em;
}

.form-error {
  padding: 12px 14px;
  border: 1px solid #f0c4be;
  border-radius: 8px;
  background: #fdf2f0;
}

.submit-note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-body);
}

.btn-submit {
  justify-self: start;
  height: 56px;
  padding-inline: 40px;
  font-size: 16px;
}

.btn-submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* 迷惑送信対策のハニーポット。人には見えない */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- 送信完了 ---- */

.done {
  margin-top: 28px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.done:focus {
  outline: none;
}

.done h2 {
  margin: 0;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 900;
  color: var(--ink);
  word-break: auto-phrase;
}

.done p {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-body);
}

.done-links {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

/* =========================================================
   FAQ
   ========================================================= */

.faq-wrap {
  max-width: 820px;
}

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

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  padding: 18px 40px 18px 0;
  position: relative;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  word-break: auto-phrase;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  color: var(--blue-600);
  font-size: 20px;
  font-weight: 700;
}

.faq details[open] summary::after {
  content: '−';
}

.faq summary:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.faq p {
  margin: 0;
  padding: 0 40px 20px 0;
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-body);
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* =========================================================
   下層ページの簡易フッター
   ========================================================= */

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding-block: 30px;
}

.footer-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 13px;
  color: var(--ink-body);
}

.footer-mini a:hover {
  color: var(--blue-600);
}

/* =========================================================
   画面幅
   ========================================================= */

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

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

@media (max-width: 600px) {
  .ask-grid,
  .flow-steps,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .assurance li {
    white-space: normal;
  }

  .btn-submit {
    justify-self: stretch;
    width: 100%;
  }

  .done {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field input,
  .field select,
  .field textarea {
    transition: none;
  }
}

/* 固定ヘッダーが入力欄を覆わないようにする。
   タブ移動やページ内リンクで飛んだとき、ヘッダーの下に隠れて
   クリックできなくなる（2026-09-04 の受け入れテストで実測）。 */
.field,
.field input,
.field select,
.field textarea,
.check,
.btn-submit,
[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* .form { display: grid } がブラウザ既定の [hidden]{display:none} に勝ってしまい、
   送信後もフォームが消えなかった（2026-09-04 の受け入れテストで実測）。 */
[hidden] {
  display: none !important;
}

/* ---- 会社概要テーブル（/about/） ---- */
.company-table {
  width: 100%;
  margin-top: 30px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  font-size: 14px;
  line-height: 1.8;
}

.company-table th,
.company-table td {
  padding: 18px 22px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: 0;
}

.company-table th {
  width: 200px;
  background: var(--bg-tint);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.company-table a {
  color: var(--blue-600);
  font-weight: 700;
}

@media (max-width: 640px) {
  .company-table,
  .company-table tbody,
  .company-table tr,
  .company-table th,
  .company-table td {
    display: block;
    width: auto;
    white-space: normal;
  }

  .company-table th {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .company-table td {
    padding-top: 0;
  }
}

/* 見出しの下に置く本文。TOPの .section-caption は見出しの横に置く前提で
   max-width:430px が入っているため、下層ページの通し本文には使わない。 */
.section-lead {
  margin: 16px 0 0;
  max-width: 46em;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.95;
  color: var(--ink-body);
  word-break: auto-phrase;
  text-wrap: pretty;
}
