/* UUS19L 研修サイト 共通スタイル */
:root {
  --paper: #F4F6F8;
  --panel: #FFFFFF;
  --ink: #17202A;
  --muted: #5A6875;
  --rule: #CAD2DB;
  --rule-soft: #E3E8ED;
  --iis: #1F5FBF;
  --iis-soft: #E4ECF9;
  --sql: #B3262E;
  --sql-soft: #F8E4E5;
  --net: #5B3FB8;
  --net-soft: #ECE6F8;
  --host: #4A5560;
  --host-soft: #E8EBEE;
  --ok: #2E7D4F;
  --warn: #9A5B00;
  --warn-soft: #FFF3DC;
  --font: "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", "Hiragino Sans", sans-serif;
  --mono: "BIZ UDGothic", "MS Gothic", "Consolas", monospace;
  --measure: 40em;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.9;
  font-feature-settings: "palt" 0;
}
a { color: var(--iis); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--iis); outline-offset: 2px; }
img { max-width: 100%; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--rule-soft); padding: 0.05em 0.35em; border-radius: 3px; word-break: break-all; }
pre {
  background: #1E2630; color: #E6EBF0; padding: 1em 1.2em; border-radius: 4px;
  overflow-x: auto; line-height: 1.6; margin: 1em 0;
}
pre code { background: none; padding: 0; color: inherit; font-size: 0.88em; word-break: normal; }
h1, h2, h3, h4 { line-height: 1.4; font-weight: 700; margin: 0; }
h1 { font-size: 1.9rem; letter-spacing: 0.01em; }
h2 { font-size: 1.35rem; margin-top: 3rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink); }
h3 { font-size: 1.1rem; margin-top: 2rem; }
h4 { font-size: 1rem; margin-top: 1.5rem; color: var(--muted); }
p, ul, ol { margin: 0.8em 0; }
ul, ol { padding-left: 1.5em; }
li { margin: 0.25em 0; }
p, li { max-width: var(--measure); }
table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.95rem; line-height: 1.6; }
th, td { border-bottom: 1px solid var(--rule); padding: 0.55em 0.7em; text-align: left; vertical-align: top; }
th { background: var(--rule-soft); font-weight: 700; border-bottom: 2px solid var(--rule); }
tr:last-child td { border-bottom: 2px solid var(--rule); }
.tablewrap { overflow-x: auto; }
blockquote {
  margin: 1.2em 0; padding: 0.2em 1.2em; border-left: 4px solid var(--rule);
  color: var(--ink); background: var(--panel);
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
small, .small { font-size: 0.875rem; color: var(--muted); }

/* レイヤー色（IIS / SQL Server / .NET） */
.c-iis { color: var(--iis); }
.c-sql { color: var(--sql); }
.c-net { color: var(--net); }
.bg-iis { background: var(--iis-soft); }
.bg-sql { background: var(--sql-soft); }
.bg-net { background: var(--net-soft); }
.chip {
  display: inline-block; font-size: 0.8rem; line-height: 1.5; padding: 0.05em 0.6em;
  border-radius: 999px; border: 1px solid currentColor; font-weight: 700; white-space: nowrap;
  vertical-align: middle;
}
.chip-iis { color: var(--iis); background: var(--iis-soft); }
.chip-sql { color: var(--sql); background: var(--sql-soft); }
.chip-net { color: var(--net); background: var(--net-soft); }
.chip-host { color: var(--host); background: var(--host-soft); }

/* 形式（講／デ／ハ／演） */
.fmt { display: inline-block; min-width: 2.2em; text-align: center; font-size: 0.8rem; line-height: 1.6; padding: 0 0.35em; border-radius: 3px; font-weight: 700; white-space: nowrap; }
.fmt-k { background: var(--panel); border: 1px solid var(--rule); color: var(--muted); }
.fmt-d { background: var(--rule-soft); border: 1px dashed var(--muted); color: var(--ink); }
.fmt-h { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.fmt-e { background: var(--warn); color: #fff; border: 1px solid var(--warn); }
.fmt-b { background: transparent; border: 1px solid transparent; color: var(--muted); }

/* 注意書き */
.note, .warn, .todo {
  padding: 0.9em 1.2em; margin: 1.2em 0; border-radius: 4px; background: var(--panel);
  border: 1px solid var(--rule);
}
.note { border-left: 5px solid var(--iis); }
.warn { border-left: 5px solid var(--warn); background: var(--warn-soft); }
.todo { border-left: 5px solid var(--ok); }
.note > :first-child, .warn > :first-child, .todo > :first-child { margin-top: 0; }
.note > :last-child, .warn > :last-child, .todo > :last-child { margin-bottom: 0; }

/* チェックリスト */
.checklist { list-style: none; padding-left: 0; }
.checklist li { padding-left: 1.8em; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 0.95em; height: 0.95em;
  border: 2px solid var(--muted); border-radius: 2px; background: var(--panel);
}

/* 基準図（リクエストの経路） */
.rail { display: flex; align-items: stretch; gap: 0; margin: 2rem 0; }
.rail .node {
  flex: 1 1 0; background: var(--panel); border: 2px solid var(--rule); border-top-width: 6px;
  padding: 0.9rem 1rem; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start;
}
.rail .node .name { font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.rail .node .sub { font-size: 0.85rem; color: var(--muted); line-height: 1.5; margin-top: 0.2rem; }
.rail .node .day { margin-top: auto; padding-top: 0.6rem; font-size: 0.85rem; font-weight: 700; }
.rail .node.host { border-top-color: var(--host); }
.rail .node.iis { border-top-color: var(--iis); }
.rail .node.iis .day { color: var(--iis); }
.rail .node.net { border-top-color: var(--net); }
.rail .node.net .day { color: var(--net); }
.rail .node.sql { border-top-color: var(--sql); }
.rail .node.sql .day { color: var(--sql); }
.rail .arrow { flex: 0 0 2.2rem; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.rail .arrow svg { width: 1.4rem; height: 1.4rem; }
.rail-caption { font-size: 0.875rem; color: var(--muted); margin-top: -1rem; }
@media (max-width: 760px) {
  .rail { flex-direction: column; }
  .rail .arrow { flex-basis: 1.8rem; }
  .rail .arrow svg { transform: rotate(90deg); }
}

/* 公開トップ */
.public { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem 5rem; }
.masthead { padding: 3rem 0 1rem; border-bottom: 1px solid var(--rule); }
.masthead .code { color: var(--muted); font-size: 0.9rem; }
.masthead h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-top: 0.3rem; }
.masthead .lead { font-size: 1.1rem; margin-top: 1rem; max-width: 44em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 2rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.facts li { max-width: none; border-top: 1px solid var(--rule); padding: 0.5rem 0; }
.facts .k { display: block; font-size: 0.8rem; color: var(--muted); }
.facts .v { font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.plan { width: 100%; }
.plan th:first-child { width: 9em; }
.plan .d1 { border-left: 6px solid var(--iis); }
.plan .d2 { border-left: 6px solid var(--sql); }
.plan .d3 { border-left: 6px solid var(--net); }
.gate {
  margin: 3rem 0 0; padding: 1.5rem; background: var(--panel); border: 1px solid var(--rule);
  border-left: 6px solid var(--ink); display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
}
.gate p { margin: 0; }
.btn {
  display: inline-block; background: var(--ink); color: #fff; padding: 0.7em 1.4em; border-radius: 4px;
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #000; }
.btn-lite { background: var(--panel); color: var(--ink); border: 1px solid var(--ink); }
.btn-lite:hover { background: var(--rule-soft); }

/* ポータル（サイドバー付き） */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--panel); border-right: 1px solid var(--rule); padding: 1.5rem 1.2rem 3rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; font-size: 0.93rem;
}
.side .brand { display: block; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.4; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.side .brand small { display: block; color: var(--muted); font-weight: 400; }
.side nav { margin-top: 1rem; }
.side nav .grp { color: var(--muted); font-size: 0.8rem; margin: 1.1rem 0 0.2rem; }
.side nav a { display: block; color: var(--ink); text-decoration: none; padding: 0.3rem 0.6rem; border-radius: 3px; border-left: 3px solid transparent; line-height: 1.5; }
.side nav a:hover { background: var(--rule-soft); }
.side nav a.on { background: var(--rule-soft); font-weight: 700; border-left-color: var(--ink); }
.side nav a.d1.on { border-left-color: var(--iis); }
.side nav a.d2.on { border-left-color: var(--sql); }
.side nav a.d3.on { border-left-color: var(--net); }
.side .foot { margin-top: 2rem; font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.main { padding: 2.5rem 3rem 6rem; max-width: 920px; min-width: 0; }
.main.wide { max-width: 1100px; }
.pagehead { padding-bottom: 1rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; }
.pagehead .over { color: var(--muted); font-size: 0.9rem; }
.pagehead h1 { margin-top: 0.2rem; }
.pagehead.d1 { border-top: 6px solid var(--iis); padding-top: 1rem; }
.pagehead.d2 { border-top: 6px solid var(--sql); padding-top: 1rem; }
.pagehead.d3 { border-top: 6px solid var(--net); padding-top: 1rem; }
.pagehead .lead { font-size: 1.05rem; max-width: 44em; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: 1rem 1.2rem; }
  .side nav { display: flex; flex-wrap: wrap; gap: 0.2rem 0.4rem; }
  .side nav .grp { flex-basis: 100%; margin: 0.6rem 0 0; }
  .side nav a { border-left: 0; border-bottom: 3px solid transparent; }
  .side nav a.on { border-bottom-color: var(--ink); }
  .side nav a.d1.on { border-bottom-color: var(--iis); }
  .side nav a.d2.on { border-bottom-color: var(--sql); }
  .side nav a.d3.on { border-bottom-color: var(--net); }
  .side .foot { display: none; }
  .main { padding: 1.5rem 1.2rem 4rem; }
}

/* タイムテーブル */
.tt th:nth-child(1), .tt td:nth-child(1) { width: 4.5em; white-space: nowrap; font-family: var(--mono); font-size: 0.9em; }
.tt th:nth-child(2), .tt td:nth-child(2) { width: 3em; text-align: right; white-space: nowrap; }
.tt th:nth-child(3), .tt td:nth-child(3) { width: 3.2em; }
.tt tr.brk td { color: var(--muted); background: var(--rule-soft); }
.tt tr.ex td { background: var(--warn-soft); }
.tt td .det { display: block; color: var(--muted); font-size: 0.88em; line-height: 1.55; }

/* 目次（生成ページ） */
.toc { background: var(--panel); border: 1px solid var(--rule); padding: 1rem 1.4rem; margin: 1.5rem 0 2.5rem; font-size: 0.93rem; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; max-width: none; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 760px) { .toc ol { columns: 1; } }
.doc h1 { font-size: 1.6rem; margin-top: 3rem; padding-bottom: 0.4rem; border-bottom: 3px solid var(--ink); }
.doc h1:first-child { margin-top: 0; }
.doc h2 { font-size: 1.3rem; border-bottom: 2px solid var(--rule); }
.doc h3 { font-size: 1.08rem; }
.doc table { font-size: 0.92rem; }
.doc p, .doc li { max-width: 44em; }
.doc pre { max-width: none; }
.doc input[type="checkbox"] { margin-right: 0.4em; }
.doc figure.shot { margin: 1rem 0 1.4rem; max-width: 44em; }
.doc figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.doc figure.shot a { display: block; cursor: zoom-in; }
.doc .shots2 { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; max-width: 44em; }
.doc .shots2 figure.shot { flex: 1 1 16em; margin: 0.5rem 0 1rem; }
.doc .shots2 figure.shot img { width: auto; max-width: 100%; }

.doc figure.shot a:hover img { box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.doc figure.shot figcaption { font-size: 0.88rem; color: var(--muted, #555); margin-top: 0.4rem; line-height: 1.5; }

/* ダウンロード一覧 */
.dl { width: 100%; }
.dl td:first-child { white-space: nowrap; }
.dl .sz { color: var(--muted); white-space: nowrap; font-size: 0.85em; }
.dl a.file { font-family: var(--mono); font-size: 0.92em; }

/* 日別ヘッダー内のゴール */
.goals { padding-left: 1.4em; }
.goals li { max-width: 46em; }

/* ページ内リンク */
.pager { margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; }

@media print {
  .side, .pager { display: none; }
  .shell { display: block; }
  .main { max-width: none; padding: 0; }
  body { background: #fff; }
  pre { background: #f0f0f0; color: #000; border: 1px solid #ccc; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
