/* docs/layout-style-guide.md の確定値を正とする。値をここで勝手に変えない。 */

:root {
  --ground: #fbfaf7;
  --surface: #ffffff;
  --ink: #1f2328;
  --ink-soft: #5c636c;
  --line: #e3e0d8;
  --accent: #1c5d78;

  --tag-school-list: #1d6b4f;
  --tag-schedule: #8a6a12;
  --tag-ask: #8a5a2b;
  --tag-external: #4a5568;
  --tag-none: #8a3f3f;

  --container: 880px;
  --container-wide: 1040px;
  --gutter: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.85;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.wrap-wide { max-width: var(--container-wide); }

a { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 冒頭の見出し領域。小さく保つ。min-height を置かない。 */
.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.masthead-inner {
  padding-block: 28px 24px;
}

.sitename {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.sitename a { color: inherit; text-decoration: none; }
.sitename a:hover { text-decoration: underline; }

h1 {
  margin: 10px 0 12px;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.45;
  font-weight: 700;
}

h2 {
  margin: 40px 0 12px;
  font-size: clamp(19px, 2.1vw, 22px);
  line-height: 1.5;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  line-height: 1.6;
}

p { margin: 0 0 18px; overflow-wrap: break-word; }

.lead { color: var(--ink-soft); margin-bottom: 0; }

main { padding-block: 8px 56px; }

nav.sitenav {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

nav.sitenav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0;
  padding-block: 12px;
  list-style: none;
}

nav.sitenav a { font-size: 16px; }

/* 3つの問い */
.questions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 22px 0 8px;
  padding: 0;
  list-style: none;
}

.questions li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
}

.questions strong { display: block; font-size: 17px; margin-bottom: 4px; }
.questions p { margin: 0; font-size: 16px; color: var(--ink-soft); }
.questions a { display: inline-block; margin-top: 8px; font-size: 16px; }

/* 数字 */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
  padding: 0;
  list-style: none;
}

.figures li {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px 18px;
}

.figures .value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
}

.figures .label { display: block; font-size: 16px; color: var(--ink-soft); }
.figures .note { display: block; font-size: 15px; color: var(--ink-soft); margin-top: 6px; }

/* 表 */
.table-scroll { overflow-x: auto; margin: 18px 0 10px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 16px;
}

caption {
  caption-side: top;
  text-align: left;
  font-size: 15px;
  color: var(--ink-soft);
  padding-bottom: 8px;
}

th, td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

th { background: #f2efe9; font-weight: 700; white-space: nowrap; }

td.pref-name { white-space: nowrap; font-weight: 700; }

.tag {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  padding: 2px 8px;
  border-radius: 3px;
  color: #fff;
  white-space: nowrap;
}

.tag-school_list { background: var(--tag-school-list); }
.tag-schedule_only { background: var(--tag-schedule); }
.tag-ask_school { background: var(--tag-ask); }
.tag-external_system { background: var(--tag-external); }
.tag-not_found { background: var(--tag-none); }

.meta { font-size: 15px; color: var(--ink-soft); }

/* 条文 */
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  margin: 0 0 16px;
}

.article-head {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.article-head .topic { color: var(--ink-soft); font-weight: 400; }
.article blockquote { margin: 0; font-size: 16px; }

.callout {
  background: #f2efe9;
  border: 1px solid var(--line);
  padding: 16px 18px;
  margin: 18px 0;
}

.callout p:last-child { margin-bottom: 0; }

/* 絞り込み */
.filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 18px 0 6px;
  font-size: 16px;
}

.filter label { color: var(--ink-soft); }

.filter select {
  font-size: 16px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  max-width: 100%;
}

.filter-count { color: var(--ink-soft); font-size: 15px; }

footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 24px 32px;
  font-size: 15px;
  color: var(--ink-soft);
}

footer p { margin: 0 0 8px; }

ul.plain { padding-left: 1.2em; }
ul.plain li { margin-bottom: 6px; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  th, td { padding: 9px 10px; }
  .masthead-inner { padding-block: 22px 18px; }
}
