@charset "UTF-8";
/* ===========================================================================
   医療生成AIスペシャリスト試験 — トップページ（利用者別・総合ポータル型）
   ---------------------------------------------------------------------------
   design-patterns/01-portal.html の意匠を本実装に起こしたもの。
   公的団体ポータルの語彙（太い上罫・横並びの青ナビ・罫線ボックス・3カラム・
   クリーム色の告知帯）を保ち、角丸と影は使わない。フォントも Web フォントを
   読まず OS 標準の日本語ゴシックを使う。

   index.html 専用。styles.css / brand-magi.css とは併用しない。
   =========================================================================== */

:root {
  --navy:      #184e86; /* 上罫・見出し                    */
  --navy-bar:  #1e5489; /* グローバルナビ                  */
  --navy-deep: #123d67; /* フッター・最暗部                */
  --navy-btn:  #163d68; /* ボタン                          */
  --navy-link: #154f89; /* リンク・強調                    */
  --navy-cta:  #1d5a8d; /* 右カラムCTA                     */
  --rule:      #20598c; /* h2 下罫                         */

  --ink:       #182a3c;
  --muted:     #626d78;
  --sub:       #5c7084;

  --page:      #f2f5f8; /* ページ背景                      */
  --panel:     #ffffff;
  --band:      #dfeaf4; /* バナー帯                        */
  --tint:      #e5edf5; /* 淡い面                          */
  --line:      #ccd9e4;
  --line-soft: #d5e0e8;
  --line-hard: #bdcede;

  --cream:     #fff4df; /* 告知・日程ボックス              */
  --cream-2:   #fff3d7;
  --cream-ink: #694818;

  --focus:     #168fde;

  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  /* 文字サイズ変更（小/中/大）の基準。JS が data-fontsize を付け替える。 */
  font-size: calc(16px * var(--fs, 1));
}
body[data-fontsize="s"] { --fs: .92; }
body[data-fontsize="l"] { --fs: 1.14; }

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
/* height:auto を入れておかないと、HTML の height 属性が効いたままになり
   CSS 側の aspect-ratio や max-width での縮小で縦横比が崩れる */
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
small { font-size: 12px; }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.wrap { width: min(1120px, 90%); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 999;
  padding: 10px 16px; background: #fff; border: 2px solid var(--navy);
}
.skip-link:focus { top: 12px; }

/* 固定ヘッダーではないが、ページ内リンクの着地位置を少し空ける */
section[id], div[id] { scroll-margin-top: 20px; }

/* ── スクロール進捗バー ─────────────────────────────────────────── */
.scroll-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 90;
  height: 3px; width: 100%;
  background: var(--navy-bar);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  will-change: transform;
}

/* ── 上部ユーティリティ帯 ───────────────────────────────────────── */
.utility {
  background: #eef2f6;
  border-bottom: 1px solid #d0d6dc;
  font-size: 12px;
  color: #48515c;
}
.utility .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 8px 0;
}
.utility-links { display: flex; gap: 18px; }
.utility-links a:hover { text-decoration: underline; }
.fontsize { display: flex; align-items: center; gap: 8px; }
.fontsize span { color: #5b6672; }
.fontsize button {
  min-width: 30px; padding: 3px 8px;
  background: #fff; border: 1px solid #b9c4cf; color: #33404d;
  font-size: 12px; line-height: 1.5;
  transition: background .18s, color .18s, border-color .18s;
}
.fontsize button:hover { background: var(--tint); }
.fontsize button[aria-pressed="true"] {
  background: var(--navy-bar); border-color: var(--navy-bar); color: #fff;
}

/* ── ヘッダー ────────────────────────────────────────────────────── */
.p-head {
  background: var(--panel);
  border-top: 7px solid var(--navy);
  padding: 22px 0;
}
.p-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.p-brand { display: flex; align-items: center; gap: 15px; }
.p-brand img { width: 58px; height: auto; }
.p-brand small { display: block; color: #49627a; line-height: 1.6; }
.p-brand h1 { font-size: 25px; line-height: 1.4; letter-spacing: .02em; }
.p-head-side { display: flex; align-items: center; gap: 14px; }
.p-head-note { font-size: 12px; color: var(--sub); text-align: right; line-height: 1.7; }
.p-head-login {
  padding: 11px 18px;
  border: 1px solid var(--navy-btn); color: var(--navy-btn);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background .2s, color .2s;
}
.p-head-login:hover { background: var(--navy-btn); color: #fff; }

/* ── グローバルナビ ──────────────────────────────────────────────── */
.p-nav { background: var(--navy-bar); color: #fff; position: relative; z-index: 5; }
.p-nav ul { display: grid; grid-template-columns: repeat(6, 1fr); }
.p-nav a {
  position: relative;
  display: block; text-align: center;
  padding: 15px 6px;
  border-right: 1px solid #ffffff35;
  font-size: 14px;
  transition: background .2s;
}
.p-nav li:first-child a { border-left: 1px solid #ffffff35; }
.p-nav a:hover { background: #17456f; }
/* 下からせり上がる下線 */
.p-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: #ffd98a;
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform .25s var(--ease);
}
.p-nav a:hover::after,
.p-nav a[aria-current="true"]::after { transform: scaleX(1); }

/* ── 利用者別の入口 ──────────────────────────────────────────────── */
.p-audience {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--panel);
  border: 1px solid var(--line-hard);
  margin: 22px auto 16px;
}
.p-audience a {
  position: relative; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
  border-right: 1px solid var(--line-hard);
  color: var(--navy-link);
}
.p-audience a:last-child { border-right: 0; }
.p-audience figure { overflow: hidden; height: 122px; background: var(--tint); }
.p-audience img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.p-audience a:hover img { transform: scale(1.06); }
.p-audience .label { padding: 16px 22px 18px; }
.p-audience b { font-size: 19px; font-weight: 600; line-height: 1.5; }
.p-audience small {
  display: block; margin-top: 4px;
  color: var(--sub); font-weight: 400;
}
.p-audience .arrow {
  display: inline-block; margin-left: 4px;
  transition: transform .25s var(--ease);
}
.p-audience a:hover .arrow { transform: translateX(5px); }
.p-audience a::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: var(--navy-bar);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .3s var(--ease);
}
.p-audience a:hover::before { transform: scaleX(1); }

/* ── メインバナー ────────────────────────────────────────────────── */
.p-banner {
  display: grid; grid-template-columns: 1.15fr 1fr;
  background: var(--band);
  min-height: 250px;
}
.p-banner-copy { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.p-banner .eyebrow {
  font-size: 12px; letter-spacing: .16em; color: #2d6098; margin-bottom: 10px;
}
.p-banner h2 { font-size: 30px; line-height: 1.6; color: #164674; }
.p-banner p { font-size: 14px; margin: 12px 0 18px; color: #2e4a67; }
/* カウントダウンがある分コピー側が伸びるので、写真は列の高さに追従させる */
.p-banner figure { overflow: hidden; min-height: 250px; }
.p-banner img { width: 100%; height: 100%; object-fit: cover; }

.banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  background: var(--navy-btn); color: #fff;
  border: 1px solid var(--navy-btn);
  font-size: 14px; font-weight: 600;
  transition: background .2s, color .2s, border-color .2s;
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover { background: #0f2d4e; }
.btn:hover .arrow { transform: translateX(4px); }
.btn.ghost { background: #fff; color: var(--navy-btn); }
.btn.ghost:hover { background: var(--navy-btn); color: #fff; }

/* ── 申込締切カウントダウン ──────────────────────────────────────── */
.countdown {
  margin-top: 18px; padding: 14px 18px;
  background: #fff; border-left: 5px solid #c8912f;
}
.countdown .cd-label { font-size: 12px; color: var(--cream-ink); letter-spacing: .04em; }
.cd-units { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.cd-num {
  font-size: 34px; font-weight: 700; line-height: 1;
  color: #7a5314; font-variant-numeric: tabular-nums;
  min-width: 1.2em; text-align: right;
}
.cd-unit { font-size: 13px; color: var(--cream-ink); margin-right: 8px; }
.countdown.is-closed .cd-num { color: var(--muted); }

/* ── 告知リボン＋ニュースティッカー ──────────────────────────────── */
.p-ribbon {
  display: grid; grid-template-columns: auto 1fr;
  align-items: center; gap: 18px;
  background: var(--cream-2);
  border: 1px solid #e8d5a6;
  padding: 11px 18px;
  margin: 18px auto;
  font-size: 13px;
  color: var(--cream-ink);
}
.p-ribbon .tag {
  padding: 4px 12px; background: #8a6318; color: #fff;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.ticker { position: relative; overflow: hidden; }
/* -50% まで流して先頭に戻す方式なので、portal.js が同じ並びを複製して
   is-looping を付けるまで動かさない（複製前に流すと折り返しで空白が出る）。 */
.ticker-track { display: flex; gap: 48px; width: max-content; }
.ticker-track.is-looping { animation: ticker 34s linear infinite; }
.ticker:hover .ticker-track,
.ticker-track:focus-within { animation-play-state: paused; }
.ticker-track span { white-space: nowrap; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── 3カラム ────────────────────────────────────────────────────── */
.p-grid {
  display: grid; grid-template-columns: 215px minmax(0, 1fr) 235px;
  gap: 22px; margin-top: 22px; align-items: start;
}
.p-box {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px;
}
.p-box > h2 {
  font-size: 19px;
  border-bottom: 3px solid var(--rule);
  padding-bottom: 12px; margin-bottom: 6px;
}
.p-box > h2 .en {
  display: block; margin-top: 4px;
  font-size: 10px; letter-spacing: .16em; color: var(--muted); font-weight: 400;
}

/* 左：メニュー */
.p-menu a {
  display: block; padding: 13px 0 13px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  transition: padding-left .2s var(--ease), color .2s;
}
.p-menu a:hover { padding-left: 10px; color: var(--navy-link); }
.p-menu a::before { content: "▸ "; color: var(--navy-cta); }

/* 中央：新着情報 */
.newsline {
  display: grid; grid-template-columns: auto auto 1fr;
  align-items: baseline; gap: 0 14px;
  padding: 14px 2px; border-bottom: 1px solid #d2d7dc;
  font-size: 14px;
}
.newsline time { color: #6c727a; font-size: 12px; white-space: nowrap; }
.newsline .cat {
  padding: 2px 9px; font-size: 11px;
  border: 1px solid var(--navy-cta); color: var(--navy-cta); white-space: nowrap;
}
.newsline p { margin: 0; }
.newsline a:hover { text-decoration: underline; }
.news-status { padding: 16px 2px; color: var(--muted); font-size: 14px; }
.news-status.error { color: #b42318; }
.news-more {
  display: inline-block; margin-top: 16px;
  font-size: 13px; font-weight: 600; color: var(--navy-link);
  border-bottom: 1px solid currentColor;
}

/* 右：CTA */
.p-right > a {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 20px 16px; margin-bottom: 12px;
  background: var(--navy-cta); color: #fff;
  font-size: 16px; font-weight: 600; line-height: 1.5;
  transition: background .2s;
}
.p-right > a:hover { background: #164a77; }
.p-right > a .arrow { transition: transform .25s var(--ease); }
.p-right > a:hover .arrow { transform: translateX(5px); }
.p-right > a.secondary {
  background: var(--tint); color: var(--navy-cta);
  border: 1px solid #afc1d3;
}
.p-right > a.secondary:hover { background: #d7e3ef; }

.p-dates {
  padding: 18px; background: var(--cream); color: var(--cream-ink);
  border: 1px solid #e8d5a6;
}
.p-dates small { display: block; }
.p-dates strong { display: block; font-size: 25px; line-height: 1.4; margin: 2px 0; }
.p-support {
  margin-top: 12px; padding: 16px;
  background: #fff; border: 1px solid var(--line);
  font-size: 13px;
}
.p-support b { display: block; margin-bottom: 4px; color: var(--navy-link); }
.p-support a { color: var(--navy-link); text-decoration: underline; }

/* ── 汎用セクション（白い箱） ───────────────────────────────────── */
.p-bottom {
  margin-top: 26px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 30px;
}
.p-bottom > h2 {
  font-size: 23px; margin-bottom: 6px;
  border-bottom: 3px solid var(--rule); padding-bottom: 12px;
}
.p-bottom > h2 .en {
  display: block; margin-top: 4px;
  font-size: 10px; letter-spacing: .16em; color: var(--muted); font-weight: 400;
}
.lead { margin: 18px 0 22px; max-width: 46em; }
.note { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ── 数値サマリー（カウントアップ） ─────────────────────────────── */
.p-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: 20px;
}
.p-stats div { background: #fff; padding: 20px 18px; text-align: center; }
.p-stats dt { font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.p-stats dd {
  margin-top: 6px;
  font-size: 30px; font-weight: 700; color: var(--navy-link);
  font-variant-numeric: tabular-nums; line-height: 1.2;
  /* 「6,600」＋単位が折り返して単位だけ次行に落ちるのを防ぐ */
  white-space: nowrap;
}
.p-stats dd .u { font-size: 14px; font-weight: 500; margin-left: 2px; }

/* ── 表 ─────────────────────────────────────────────────────────── */
/* 見出しの 3px 罫と表の 2px 罫が隣り合って二重線に見えるので間隔を空ける */
.p-bottom .facts,
.p-bottom .schedule { margin-top: 20px; }

.facts { font-size: 15px; }
.facts th, .facts td {
  text-align: left; padding: 16px;
  border-bottom: 1px solid #ccd1d8; vertical-align: top;
}
.facts th { width: 28%; font-weight: 500; background: #f6f9fb; color: #44586c; }
.facts tr:first-child th, .facts tr:first-child td { border-top: 2px solid var(--rule); }
.facts .big { font-size: 19px; font-weight: 700; color: var(--navy-link); }
.facts a { color: var(--navy-link); text-decoration: underline; }

.schedule th, .schedule td {
  text-align: left; padding: 15px 14px; border-bottom: 1px solid #ccd1d8;
}
.schedule thead th {
  font-size: 13px; font-weight: 500; color: #44586c; background: #f6f9fb;
  border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.schedule .round { font-weight: 700; color: var(--navy-link); width: 6em; }
.schedule .period { font-weight: 700; }
.schedule .upcoming td { color: var(--muted); }
.badge { display: inline-block; padding: 4px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.open { background: #a3341f; color: #fff; }
.badge.pending { border: 1px solid var(--muted); color: var(--muted); font-weight: 500; }

/* ── 出題範囲 ───────────────────────────────────────────────────── */
.domains { margin-top: 20px; border-top: 2px solid var(--rule); }
.domains li {
  display: grid; grid-template-columns: 54px 1fr;
  gap: 16px; align-items: start;
  padding: 18px 2px; border-bottom: 1px solid var(--line-soft);
}
.domains .ico {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--tint); border: 1px solid var(--line-hard);
  color: var(--navy-link);
}
.domains .ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.domains h3 { font-size: 17px; }
.domains h3 .no { color: var(--navy-cta); margin-right: 8px; font-variant-numeric: tabular-nums; }
.domains p { font-size: 14px; color: #4a5866; margin-top: 2px; }
.domains .bar { grid-column: 2; height: 5px; background: #e6ecf2; margin-top: 10px; }
.domains .bar i {
  display: block; height: 100%; background: var(--navy-cta);
  width: 0; transition: width 1.1s var(--ease);
}
.domains li.shown .bar i { width: var(--w, 20%); }

/* サンプル問題 */
.sample-q {
  margin-top: 24px; padding: 24px 26px;
  background: #f6f9fb; border-left: 5px solid var(--rule);
}
.sample-q .tag {
  display: inline-block; padding: 3px 11px; margin-bottom: 12px;
  background: var(--rule); color: #fff; font-size: 11px; letter-spacing: .1em;
}
.sample-q .stem { font-weight: 700; color: #14375c; }
.sample-q ol { margin: 14px 0 0; display: grid; gap: 8px; font-size: 14px; }
.sample-q li { display: grid; grid-template-columns: 2.1em 1fr; }
.sample-q li .mk { color: var(--navy-cta); font-weight: 700; }
.sample-q .reveal-answer {
  margin-top: 16px; padding: 10px 18px;
  background: #fff; border: 1px solid var(--navy-cta); color: var(--navy-cta);
  font-size: 13px; font-weight: 700;
}
.sample-q .reveal-answer:hover { background: var(--navy-cta); color: #fff; }
.sample-q .answer {
  margin-top: 14px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line);
  font-size: 14px;
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease), opacity .3s, margin .3s, padding .3s;
  opacity: 0; padding-block: 0; border-width: 0 1px;
}
.sample-q .answer > div { overflow: hidden; }
.sample-q .answer.open { grid-template-rows: 1fr; opacity: 1; padding-block: 14px; border-width: 1px; }
.sample-q .answer b { color: #a3341f; }

/* ── 受験までの流れ ─────────────────────────────────────────────── */
.flow {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px; margin-top: 20px;
}
.flow > li {
  position: relative;
  padding: 20px 18px; background: #f0f2f4;
  border-top: 3px solid var(--navy-cta);
  transition: transform .25s var(--ease), background .25s;
}
.flow > li:hover { transform: translateY(-3px); background: #e9eef3; }
.flow small { color: var(--navy-cta); font-size: 11px; letter-spacing: .12em; font-weight: 700; }
.flow b { display: block; margin: 8px 0 6px; font-size: 15px; }
.flow p { font-size: 13px; color: #4a5866; }
/* 矢印でつなぐ */
.flow > li:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -11px; z-index: 1;
  width: 9px; height: 9px;
  border-top: 2px solid var(--line-hard); border-right: 2px solid var(--line-hard);
  transform: translateY(-50%) rotate(45deg);
}

/* ── 認定について ───────────────────────────────────────────────── */
.cert-grid { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; margin-top: 20px; }
.cert-copy p + p { margin-top: 14px; }
.cert-visual { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.cert-card {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1.414; padding: 18px;
  background: #fff; border: 1px solid var(--line-hard);
  display: flex; flex-direction: column; justify-content: space-between;
}
/* 斜めに走る光沢 */
.cert-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.85) 50%, transparent 62%);
  transform: translateX(-120%);
}
.cert-card.shine::after { animation: shine 1.5s var(--ease) .2s; }
@keyframes shine { to { transform: translateX(120%); } }
.cert-card .en { font-size: 9px; letter-spacing: .16em; color: var(--muted); }
.cert-card .title { margin-top: 10px; font: 600 13px/1.6 var(--serif); color: var(--navy-link); }
.cert-card .issuer { font-size: 9px; line-height: 1.6; color: var(--muted); }
.cert-card .seal {
  position: absolute; right: 14px; bottom: 14px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid #b8452f; color: #b8452f;
  display: grid; place-items: center;
  font-size: 8px; font-weight: 700; line-height: 1.2; text-align: center;
  transform: rotate(-12deg);
}
.cert-badge {
  align-self: start; aspect-ratio: 1; border-radius: 50%;
  background: var(--navy-cta); color: #fff;
  display: grid; place-items: center; text-align: center;
  font-size: 15px; font-weight: 700; letter-spacing: .06em;
}
.cert-badge small { display: block; margin-top: 4px; font-size: 8px; letter-spacing: .1em; font-weight: 400; }

/* ── 団体受験 ───────────────────────────────────────────────────── */
.group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; margin-top: 20px; }
.checklist li {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  padding: 9px 0; font-size: 14.5px;
}
.checklist li::before {
  content: "✓"; color: #1c7a4a; font-weight: 700;
}
.group-figure figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* 認定セクションの人物写真は添え物なので、本文幅いっぱいに伸ばさない */
.cert-copy .group-figure { max-width: 360px; }
/* aspect-ratio は img の幅か高さが確定していないと効かないので width を指定する */
.cert-copy .group-figure img {
  width: 100%; aspect-ratio: 4 / 3;
  object-fit: cover; object-position: 50% 22%;
}

/* ── FAQ ────────────────────────────────────────────────────────── */
/* 見出しの罫がすぐ上にあるので、ここでは上罫を引かない */
.faq { margin-top: 18px; }
.faq details { border-bottom: 1px solid #b9c2cc; }
.faq summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1.8em 1fr auto; gap: 10px;
  padding: 16px 2px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q { color: var(--navy-cta); font-weight: 700; }
.faq summary .mk {
  width: 20px; height: 20px; position: relative; align-self: center;
}
.faq summary .mk::before,
.faq summary .mk::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 13px; height: 2px; background: var(--navy-cta);
  transform: translate(-50%, -50%);
  transition: transform .28s var(--ease);
}
.faq summary .mk::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] summary .mk::after { transform: translate(-50%, -50%) rotate(0); }
.faq details > div { overflow: hidden; }
.faq details p { padding: 0 2px 16px 2.6em; font-size: 14px; color: #4a5866; }
.faq details[open] > div { animation: accordion .3s var(--ease); }
@keyframes accordion { from { opacity: 0; transform: translateY(-6px); } }

/* ── 目的から探す ───────────────────────────────────────────────── */
.p-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.p-categories a {
  position: relative; overflow: hidden;
  padding: 22px; border: 1px solid var(--line-hard); background: #fff;
  transition: background .2s, border-color .2s;
}
.p-categories a:hover { background: var(--tint); border-color: var(--navy-cta); }
.p-categories strong { display: block; color: var(--rule); font-size: 16px; }
.p-categories small { color: var(--muted); }
.p-categories .arrow { transition: transform .25s var(--ease); display: inline-block; }
.p-categories a:hover .arrow { transform: translateX(5px); }

/* ── 最下部CTA ──────────────────────────────────────────────────── */
.p-cta {
  margin-top: 26px; padding: 34px;
  background: var(--navy-bar); color: #fff;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.p-cta .en { font-size: 11px; letter-spacing: .16em; color: #a8c6e4; }
.p-cta h2 { font-size: 26px; line-height: 1.5; margin: 6px 0; }
.p-cta p { font-size: 13.5px; color: #cfdcea; }
.p-cta-actions { display: grid; gap: 10px; min-width: 270px; }
.p-cta .btn { justify-content: center; background: #fff; color: var(--navy-bar); border-color: #fff; }
.p-cta .btn:hover { background: var(--cream); color: #14375c; }
.p-cta .btn.ghost { background: transparent; color: #fff; border-color: #ffffff88; }
.p-cta .btn.ghost:hover { background: #ffffff1f; color: #fff; }

/* ── フッター ───────────────────────────────────────────────────── */
.plainfoot {
  margin-top: 40px; padding: 38px 0 26px;
  background: var(--navy-deep); color: #fff; font-size: 13px;
}
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px 40px; }
.foot-brand small { color: #a9c0d6; }
.foot-brand p { margin-top: 10px; font-size: 12px; color: #c3d3e2; line-height: 1.8; }
.plainfoot nav { display: grid; gap: 9px; align-content: start; }
.plainfoot nav a { color: #dce7f1; }
.plainfoot nav a:hover { text-decoration: underline; }
.plainfoot h3 { font-size: 13px; color: #9fb8d0; margin-bottom: 4px; font-weight: 600; }
.foot-bottom {
  margin-top: 26px; padding-top: 16px;
  border-top: 1px solid #ffffff2e;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11px; color: #a9c0d6;
}

/* ── ページ上部へ ───────────────────────────────────────────────── */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  width: 48px; height: 48px;
  background: var(--navy-bar); color: #fff; border: 0;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease), background .2s;
  transform: translateY(8px);
}
.to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--navy-deep); }

/* ── スクロール演出 ───────────────────────────────────────────────
   .js は portal.js が <html> に付ける。JS が落ちた場合は隠す指定自体が
   当たらないので、本文は最初から見える。 */
.js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js [data-reveal].shown { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }

/* ===========================================================================
   レスポンシブ
   =========================================================================== */
@media (max-width: 980px) {
  .p-grid { grid-template-columns: 190px minmax(0, 1fr); }
  .p-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
  .p-right > a { margin-bottom: 0; }
  .p-support { margin-top: 0; }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .flow > li:nth-child(3)::after { display: none; }
  .cert-grid { grid-template-columns: 1fr; }
  .cert-visual { max-width: 300px; }
  .group-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .p-nav ul { grid-template-columns: repeat(3, 1fr); }
  .p-nav a { border-bottom: 1px solid #ffffff35; font-size: 13px; }
  /* 説明文を隠すとログインだけが左に取り残されるので右に寄せる */
  .p-head-note { display: none; }
  .p-head .wrap { gap: 14px; }
  .p-head-side { width: 100%; justify-content: flex-end; }
  .p-brand h1 { font-size: 19px; }
  .p-brand img { width: 46px; }
  .p-audience { grid-template-columns: 1fr; }
  .p-audience a { border-right: 0; border-bottom: 1px solid var(--line-hard); }
  .p-audience a:last-child { border-bottom: 0; }
  .p-audience figure { height: 150px; }
  .p-banner { grid-template-columns: 1fr; }
  .p-banner figure { order: -1; }
  .p-banner img { max-height: 190px; }
  .p-banner-copy { padding: 26px 22px; }
  .p-banner h2 { font-size: 24px; }
  .p-grid { grid-template-columns: 1fr; }
  .p-right { grid-template-columns: 1fr; }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; }
  .flow > li::after { display: none !important; }
  .p-categories { grid-template-columns: 1fr; }
  .p-bottom { padding: 22px 18px; }
  .p-cta { grid-template-columns: 1fr; padding: 26px 22px; }
  .p-cta-actions { min-width: 0; }
  .foot-top { grid-template-columns: 1fr; }
  .p-ribbon { grid-template-columns: 1fr; gap: 10px; }

  /* 表はラベル/値の積み上げに切り替える（横スクロールを出さない） */
  .facts, .facts tbody, .facts tr, .facts th, .facts td { display: block; width: auto; }
  .facts tr { border-top: 1px solid #ccd1d8; padding: 4px 0 12px; }
  .facts tr:first-child { border-top: 2px solid var(--rule); }
  .facts th { background: none; padding: 12px 0 2px; font-size: 12px; color: var(--navy-cta); border: 0; }
  .facts td { padding: 0; border: 0; }

  .schedule, .schedule tbody, .schedule tr, .schedule td { display: block; width: auto; }
  .schedule thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .schedule tr { position: relative; padding: 14px 0 16px; border-top: 1px solid #ccd1d8; }
  .schedule tr:first-child { border-top: 2px solid var(--rule); }
  .schedule td { padding: 0; border: 0; }
  .schedule .round { width: auto; font-size: 17px; margin-bottom: 8px; padding-right: 7em; }
  .schedule .status { position: absolute; top: 14px; right: 0; }
  .schedule td[data-label] { display: grid; grid-template-columns: 5.5em 1fr; gap: 10px; padding: 3px 0; }
  .schedule td[data-label]::before {
    content: attr(data-label); font-size: 12px; color: var(--navy-cta); line-height: 1.9;
  }

  .to-top { right: 12px; bottom: 12px; width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .domains li .bar i { width: var(--w, 20%); }
}

@media print {
  .utility, .p-nav, .to-top, .scroll-progress, .p-right, .p-cta { display: none; }
  body { background: #fff; }
  .p-box, .p-bottom { border: 1px solid #999; }
}

/* 締切日の静的表示（portal.js が動く前／動かない場合） */
.cd-date { font-size: 21px; font-weight: 700; color: #7a5314; }
