/* 拡張機能 (extension/base.css) と同じ、紙・インク・赤ペンの配色 */
:root {
  color-scheme: light dark;
  --paper: #f7f8fa;
  --sheet: #ffffff;
  --ink: #1d2742;
  --ink-muted: #5b6480;
  --rule: #dadfe8;
  --red-pen: #c62d3a;

  --font-ui: "Avenir Next", "Hiragino Sans", "Segoe UI Variable Text", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  --font-text: "Iowan Old Style", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151a28;
    --sheet: #1b2133;
    --ink: #e7eaf2;
    --ink-muted: #9aa3ba;
    --rule: #2a3247;
    --red-pen: #ff7380;
  }
}

* { box-sizing: border-box; }

html { scroll-padding-top: 24px; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 14px;
}
.site-name { font-weight: 600; text-decoration: none; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--ink-muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

/* 冒頭 */
.hero { padding: 48px 0 56px; }
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero .lead {
  max-width: 36rem;
  margin: 0 0 28px;
  font-size: 18px;
  color: var(--ink-muted);
  text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.button {
  display: inline-block;
  padding: 11px 20px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border-radius: 8px;
  text-decoration: none;
}
.button:hover { opacity: 0.9; }
.actions .note { font-size: 14px; color: var(--ink-muted); }

/* 校閲された条文の見本。このサイトで一番目立たせる要素 */
.specimen {
  margin: 48px 0 0;
  padding: 28px 28px 20px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.specimen-title {
  margin: 0 0 16px;
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 700;
}
.clause {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 12px;
  margin: 0 0 14px;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.75;
}
.clause::before {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
}
.clause.high::before { content: "!" / ""; color: var(--red-pen); }
.clause > span { grid-column: 2; }
.clause.plain { color: var(--ink-muted); }
.clause .verdict {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}
.clause.high .verdict { color: var(--red-pen); }
.specimen-caption {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

/* 本文 */
main section {
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}
h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}
h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 600;
}
p { margin: 0 0 16px; }
.muted { color: var(--ink-muted); }

.categories {
  margin: 24px 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.categories li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.categories strong { font-weight: 600; }
.categories span { color: var(--ink-muted); }

.marks { margin: 0; padding: 0; list-style: none; }
.marks li { display: grid; grid-template-columns: 20px 1fr; column-gap: 12px; margin-bottom: 8px; }
.marks .glyph { font-family: var(--font-text); font-size: 20px; font-weight: 700; line-height: 1.4; }
.marks .high { color: var(--red-pen); }

/* 手順は実際に順番があるので番号を付ける */
.steps {
  margin: 24px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li {
  position: relative;
  padding: 0 0 20px 44px;
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}
.steps strong { font-weight: 600; }

code {
  padding: 2px 6px;
  font-size: 0.9em;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  border-radius: 4px;
}

.options { margin: 16px 0; padding: 0; list-style: none; }
.options li { padding: 12px 0 12px 16px; border-left: 2px solid var(--rule); margin-bottom: 8px; }
.options strong { display: block; font-weight: 600; }

figure { margin: 28px 0; }
figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-muted); }

.site-footer {
  padding-top: 32px;
  padding-bottom: 48px;
  font-size: 14px;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule);
}

@media (max-width: 560px) {
  .specimen { padding: 20px 16px 12px; }
  .categories li { grid-template-columns: 1fr; gap: 2px; }
  .site-nav .optional { display: none; }
}
