/* エンジニアスクール Online-Tutor  共通スタイル */
:root {
  --ink: #17233A;
  --ink-2: #4A5670;
  --paper: #FFFFFF;
  --paper-2: #F1F4F8;
  --rule: #D3DAE4;
  --accent: #1466C0;
  --soon: #B76E00;
  --dev: #6B7487;
  --focus: #F2B600;
  --font: "BIZ UDPGothic", "Meiryo", "メイリオ", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --wrap: 1120px;
  --gutter: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E7ECF4; --ink-2: #A9B4C8; --paper: #121A28; --paper-2: #1A2436;
    --rule: #2E3B52; --accent: #6AA8F0; --soon: #F0B04A; --dev: #9AA4B8; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E7ECF4; --ink-2: #A9B4C8; --paper: #121A28; --paper-2: #1A2436;
  --rule: #2E3B52; --accent: #6AA8F0; --soon: #F0B04A; --dev: #9AA4B8; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.85; letter-spacing: .02em;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.4; letter-spacing: .03em; margin: 0; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.3; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-2); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: 15px; }
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 6px 6px 0 0; }

/* 見出し・本文 */
.page-head { padding-top: 56px; padding-bottom: 32px; }
.page-head h1 { font-size: clamp(26px, 4vw, 38px); }
.page-head p { color: var(--ink-2); max-width: 46em; margin-top: 14px; }
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--rule); }
.sec-title { font-size: clamp(21px, 2.6vw, 26px); margin-bottom: 8px; }
.sec-lead { color: var(--ink-2); max-width: 46em; margin-bottom: 28px; }
.muted { color: var(--ink-2); }
.note { font-size: 14px; color: var(--ink-2); }

/* ヒーロー（トップ） */
.hero { padding: 64px 0 56px; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.3; letter-spacing: .04em; }
.hero h1 span { display: block; }
.hero p { margin-top: 20px; color: var(--ink-2); max-width: 30em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--accent); font-size: 15px; font-family: inherit; cursor: pointer; line-height: 1.4; }
.btn-primary { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #0D1626; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0D1626; } }
.btn-ghost { background: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.08); }

/* ミニ路線図（トップ） */
.lines { list-style: none; margin: 0; padding: 22px 24px; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; }
.lines li + li { margin-top: 14px; }
.lines a { display: grid; grid-template-columns: 12em minmax(0, 1fr); gap: 14px; align-items: center; color: var(--ink); text-decoration: none; border-radius: 8px; padding: 4px 6px; }
.lines a:hover { background: var(--paper-2); }
.lines .line-name { font-size: 13px; font-weight: 700; line-height: 1.45; }
.mini-track { position: relative; display: flex; justify-content: space-between; align-items: center; height: 18px; }
.mini-track::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 6px; margin-top: -3px; background: var(--line); border-radius: 3px; }
.mini-dot { position: relative; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 4px solid var(--line); }
.mini-dot.is-soon, .mini-dot.is-dev { border-color: color-mix(in srgb, var(--line) 40%, var(--paper)); }

/* コンセプト */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; list-style: none; padding: 0; margin: 0; }
.principles li { padding: 24px 0; border-top: 1px solid var(--rule); }
.principles h3 { font-size: 19px; margin-bottom: 8px; display: flex; gap: 12px; align-items: baseline; }
.principles h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--accent); flex: none; transform: translateY(1px); }
.principles p { color: var(--ink-2); margin: 0; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.door { display: block; padding: 28px; border-radius: 14px; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); background: var(--paper); }
.door:hover { border-color: var(--accent); }
.door h3 { font-size: 21px; margin-bottom: 10px; color: var(--accent); }
.door p { color: var(--ink-2); margin: 0 0 14px; }
.door ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); font-size: 15px; }

.profile { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.profile dl { margin: 0; display: grid; grid-template-columns: 7em 1fr; gap: 10px 16px; }
.profile dt { color: var(--ink-2); font-size: 14px; }
.profile dd { margin: 0; }

/* 学習パス（路線） */
.path-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; list-style: none; padding: 0; }
.path-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14px; }
.path-nav a::before { content: ""; width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.path-nav a:hover { border-color: var(--line); }

.path { padding: 28px 0 36px; border-top: 1px solid var(--rule); scroll-margin-top: 80px; }
.path-head { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; margin-bottom: 6px; }
.path-head h3 { font-size: 21px; display: flex; align-items: center; gap: 12px; }
.path-head h3::before { content: ""; width: 28px; height: 10px; border-radius: 5px; background: var(--line); flex: none; }
.path-meta { color: var(--ink-2); font-size: 14px; }
.path-target { color: var(--ink-2); margin: 0 0 4px; }
.path-after { font-size: 14px; margin: 0 0 4px; }

.route { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: relative; }
.route::before { content: ""; position: absolute; top: 19px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: 8px; background: var(--line); border-radius: 4px; }
.stop { position: relative; display: flex; justify-content: center; }
.stop-btn { appearance: none; background: none; border: 0; padding: 0 4px 6px; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border-radius: 8px; width: 100%; }
.stop-dot { width: 46px; height: 46px; border-radius: 50%; background: var(--paper); border: 6px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 17px; position: relative; }
.stop.is-soon .stop-dot, .stop.is-dev .stop-dot { border-style: dashed; color: var(--ink-2); }
.stop-text { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stop-text .badge { margin-top: 4px; }
.stop-name { font-size: 14px; font-weight: 700; line-height: 1.45; }
.stop-level { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.stop-btn:hover .stop-name { text-decoration: underline; text-underline-offset: .2em; }
.stop-btn:hover .stop-dot { background: var(--paper-2); }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 4px; line-height: 1.6; white-space: nowrap; }
.badge-open { color: var(--accent); border: 1px solid currentColor; }
.badge-soon { color: var(--soon); border: 1px solid currentColor; }
.badge-dev { color: var(--dev); border: 1px dashed currentColor; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--ink-2); margin: 0 0 8px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend .ring { width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--ink-2); }
.legend .ring.dashed { border-style: dashed; }

/* 分野×レベル */
.grid-map { display: grid; grid-template-columns: 13em repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.grid-map > div { padding: 12px 14px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.grid-map .gh { background: var(--paper-2); font-weight: 700; font-size: 14px; border-top: 0; }
.grid-map .gh:first-child, .grid-map .gf { border-left: 0; }
.grid-map .gf { font-weight: 700; font-size: 15px; background: var(--paper-2); }
.grid-map .gc { display: flex; flex-direction: column; gap: 8px; }
.gc .lv { display: none; }
.chip { appearance: none; font: inherit; text-align: left; cursor: pointer; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-left: 5px solid var(--accent); border-radius: 6px; padding: 8px 10px; font-size: 14px; line-height: 1.5; width: 100%; }
.chip:hover { border-color: var(--accent); }
.chip.is-soon { border-left-color: var(--soon); }
.chip.is-dev { border-left-color: var(--dev); border-left-style: dashed; }
.chip .badge { margin-left: 6px; }
.chip .req { display: block; font-size: 12px; color: var(--ink-2); }

/* コース詳細ダイアログ */
dialog.course { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--rule); border-radius: 16px; padding: 0; background: var(--paper); color: var(--ink); }
dialog.course::backdrop { background: rgba(10, 18, 32, .55); }
.dlg-in { padding: 28px 28px 24px; }
.dlg-close { position: absolute; top: 10px; right: 10px; appearance: none; border: 0; background: var(--paper-2); color: var(--ink); width: 40px; height: 40px; border-radius: 50%; font-size: 22px; cursor: pointer; line-height: 1; }
.dlg-in h2 { font-size: 20px; margin: 6px 44px 14px 0; }
.dlg-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 4px; background: var(--paper-2); color: var(--ink-2); }
.dlg-in dl { margin: 18px 0; display: grid; grid-template-columns: 8.5em 1fr; gap: 10px 16px; font-size: 15px; }
.dlg-in dt { color: var(--ink-2); font-size: 14px; }
.dlg-in dd { margin: 0; }
.on-paths { list-style: none; margin: 0; padding: 0; }
.on-paths li { display: flex; align-items: center; gap: 8px; }
.on-paths li::before { content: ""; width: 18px; height: 6px; border-radius: 3px; background: var(--line); flex: none; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* 企業管理者向け */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.filter { appearance: none; font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; }
table.quick { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 760px; }
.quick th, .quick td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.quick thead th { background: var(--paper-2); font-size: 13px; white-space: nowrap; position: sticky; top: 0; }
.quick tbody tr:last-child td, .quick tbody tr:last-child th { border-bottom: 0; }
.quick tbody th { font-weight: 700; white-space: nowrap; }
.plan-table td:last-child { white-space: nowrap; }
.quick tbody th a { color: var(--ink); }
.quick .yes { color: var(--accent); font-weight: 700; }
.quick .warn { color: var(--soon); font-weight: 700; }
.quick tr[hidden] { display: none; }
.count { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }

.spec { border: 1px solid var(--rule); border-radius: 12px; padding: 22px 24px; margin-bottom: 16px; scroll-margin-top: 80px; break-inside: avoid; }
.spec[hidden] { display: none; }
.spec h3 { font-size: 18px; margin-bottom: 8px; }
.spec dl { margin: 14px 0 0; display: grid; grid-template-columns: 10em 1fr; gap: 8px 18px; font-size: 15px; }
.spec dt { color: var(--ink-2); font-size: 14px; }
.spec dd { margin: 0; }
.spec ul { margin: 0; padding-left: 1.2em; }
.spec-field { font-size: 17px; margin: 32px 0 14px; padding-left: 12px; border-left: 4px solid var(--ink); }

.checklist { list-style: none; padding: 0; margin: 0; counter-reset: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.checklist li { padding: 16px 0 16px 34px; border-top: 1px solid var(--rule); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 20px; width: 20px; height: 20px; border: 2px solid var(--ink-2); border-radius: 4px; }
.checklist strong { display: block; }
.checklist span { color: var(--ink-2); font-size: 15px; }

.plan-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.plan-table th, .plan-table td { padding: 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.plan-table th { font-weight: 700; }
.plan-table th span { display: inline-block; width: 18px; height: 6px; border-radius: 3px; background: var(--line); margin-right: 8px; vertical-align: middle; }

/* フッター */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper-2); padding: 32px 0 40px; font-size: 14px; color: var(--ink-2); margin-top: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.theme-toggle { appearance: none; font: inherit; font-size: 13px; background: transparent; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; cursor: pointer; }

/* レスポンシブ */
@media (max-width: 900px) {
  .hero .wrap, .profile { grid-template-columns: 1fr; gap: 32px; }
  .principles, .split, .checklist { grid-template-columns: 1fr; }
  .grid-map { grid-template-columns: 1fr; }
  .grid-map .gh { display: none; }
  .grid-map > div { border-left: 0; }
  .grid-map .gc:empty { display: none; }
  .gc .lv { display: block; font-size: 12px; color: var(--ink-2); }
  /* 路線を縦に */
  .route { grid-auto-flow: row; grid-auto-columns: auto; gap: 14px; margin-top: 20px; }
  .route::before { top: 20px; bottom: 20px; left: 19px; right: auto; width: 8px; height: auto; }
  .stop { justify-content: flex-start; }
  .stop-btn { flex-direction: row; text-align: left; gap: 14px; padding: 0; }
  .stop-dot { width: 46px; height: 46px; flex: none; }
  .stop-text { align-items: flex-start; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .lines { padding: 16px; }
  .lines a { grid-template-columns: 1fr; gap: 6px; }
  .spec dl, .dlg-in dl, .profile dl { grid-template-columns: 1fr; gap: 2px; }
  .spec dd, .dlg-in dd { margin-bottom: 10px; }
  .dlg-in { padding: 24px 18px 20px; }
  .site-header .wrap { padding-top: 8px; padding-bottom: 6px; }
  .nav { gap: 0; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  section { padding: 36px 0; }
}

/* 印刷（企業向けページを配る用） */
@media print {
  .site-header, .site-footer, .filters, .no-print, .skip { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  section { padding: 16px 0; }
  .spec { border-color: #999; page-break-inside: avoid; }
  .spec[hidden], .quick tr[hidden] { display: block !important; }
  .quick tr[hidden] { display: table-row !important; }
  .table-wrap { overflow: visible; border: 0; }
  table.quick { min-width: 0; }
  a { color: #000; text-decoration: none; }
}

/* 制作の体制 */
.team { list-style: none; margin: 0; padding: 0; }
.team li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--rule); }
.team li:last-child { border-bottom: 0; }
.team span { color: var(--ink-2); font-size: 14px; }
@media (max-width: 600px) { .team li { grid-template-columns: 8.5em 1fr; gap: 8px; } }
