:root {
  --bg: #f7f5f0;
  --paper: #fdfcf9;
  --text: #22211e;
  --muted: #6b6860;
  --rule: #d9d4c8;
  --accent: #9a3b2e;
  --accent-soft: #f3e4df;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1917;
    --paper: #211f1c;
    --text: #e6e2d8;
    --muted: #a19c90;
    --rule: #3b3833;
    --accent: #e0887a;
    --accent-soft: #3a2723;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic",
    "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP",
    system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 40px 0 24px;
}

.site-title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.4;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.site-sub span {
  display: inline-block;
  margin-right: 1em;
}

.site-header.compact {
  padding: 20px 0 16px;
}

.site-header.compact .site-title {
  font-size: 1.125rem;
}

/* ---------- main ---------- */
main {
  padding: 32px 0 48px;
}

h1,
h2,
h3 {
  line-height: 1.5;
  font-weight: 700;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 24px;
  letter-spacing: 0.04em;
}

h1 .kai {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

h2 {
  font-size: 1.1875rem;
  margin: 48px 0 16px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

p {
  margin: 0 0 1.4em;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 40px 0 12px;
  padding: 0 0 6px;
  border-left: 0;
  border-bottom: 1px solid var(--rule);
}

/* ---------- minutes meta box ---------- */
.minutes-meta {
  margin: 0 0 32px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
}

.minutes-meta dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.2em;
  row-gap: 4px;
}

.minutes-meta dt {
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.minutes-meta dd {
  margin: 0;
  min-width: 0;
}

/* ---------- vote block with stamp ---------- */
.vote {
  position: relative;
  margin: 0 0 24px;
  padding: 16px 20px;
  padding-right: 110px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.vote ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vote li + li {
  margin-top: 4px;
}

.stamp {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 72px;
  height: 72px;
  margin-top: -36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--accent);
}

.stamp strong {
  font-weight: 700;
}

/* ---------- tables ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.6em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.7;
  background: var(--paper);
}

th,
td {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  vertical-align: top;
}

thead th {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: var(--bg);
}

tr.chosen td {
  background: var(--accent-soft);
}

td.num {
  white-space: nowrap;
}

/* ---------- conclusion box ---------- */
.conclusion {
  margin: 0 0 24px;
  padding: 14px 18px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.conclusion p {
  margin: 0;
}

.conclusion strong {
  color: var(--accent);
}

/* ---------- reproduction memo ---------- */
.repro {
  margin: 48px 0 8px;
  padding: 4px 20px 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--text);
}

.repro h2 {
  margin: 12px 0 12px;
  padding-left: 0;
  border-left: 0;
  font-size: 1.0625rem;
  letter-spacing: 0.1em;
}

.repro ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.repro li {
  padding: 10px 0;
  border-top: 1px dashed var(--rule);
  line-height: 1.8;
}

.repro li strong {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- tally (index) ---------- */
.tally {
  margin: 32px 0 8px;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  padding: 12px 0 16px;
}

.tally-title {
  margin: 0 0 8px;
  padding: 0;
  border-left: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.tally dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tally dl > div {
  padding: 0 12px;
  border-left: 1px solid var(--rule);
}

.tally dl > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.tally dt {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.tally dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tally dd small {
  font-size: 0.8125rem;
  font-weight: 400;
  margin-left: 2px;
  color: var(--muted);
}

.next-agenda {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
}

/* ---------- index list ---------- */
.intro p {
  margin-bottom: 1em;
}

.minutes-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.minutes-list li {
  border-bottom: 1px solid var(--rule);
}

.minutes-list a {
  display: block;
  padding: 14px 4px;
  color: var(--text);
  text-decoration: none;
}

.minutes-list a:hover .agenda {
  color: var(--accent);
  text-decoration: underline;
}

.minutes-list .meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.minutes-list .agenda {
  display: block;
  font-weight: 700;
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.links li {
  margin: 4px 0;
}

/* ---------- nav ---------- */
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 24px;
}

.back {
  margin-top: 48px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 480px) {
  .site-header {
    padding-top: 28px;
  }
  .site-title {
    font-size: 1.5rem;
  }
  h1 {
    font-size: 1.3125rem;
  }
  .minutes-meta,
  .vote {
    padding: 14px 16px;
  }
  .vote {
    padding-right: 96px;
  }
  .stamp {
    right: 14px;
    width: 64px;
    height: 64px;
    margin-top: -32px;
    font-size: 1rem;
  }
  th,
  td {
    padding: 6px 8px;
  }
}

.minutes-list .summary {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 2px;
}

@media (max-width: 480px) {
  .minutes-meta {
    margin-bottom: 16px;
  }
  .conclusion {
    font-size: 1rem;
    padding: 12px 14px;
  }
  .repro {
    padding: 4px 16px 12px;
  }
  .tally dl > div {
    padding: 0 8px;
  }
  .tally dd {
    font-size: 1.1875rem;
  }
  .tally dd small {
    font-size: 0.75rem;
  }
}

/* ---------- premise line (standard on every article) ---------- */
.premise {
  margin: -12px 0 24px;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- start page link (index) ---------- */
.start-link {
  margin: 8px 0 0;
}

.start-link a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.start-link a::after {
  content: " →";
  color: var(--accent);
}

.start-link a span {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}

.start-link a:hover {
  border-color: var(--accent);
}

/* ---------- start page ---------- */
.asof {
  font-size: 0.875rem;
  color: var(--muted);
}

.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0 8px;
}

@media (min-width: 640px) {
  .pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pair-col {
  padding: 4px 16px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top-width: 4px;
}

.pair-col.have {
  border-top-color: var(--text);
}

.pair-col.lack {
  border-top-color: var(--muted);
  border-top-style: dashed;
}

.pair-col h2 {
  margin: 12px 0 8px;
  padding-left: 0;
  border-left: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.pair-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pair-col li {
  padding: 8px 0;
  border-top: 1px dashed var(--rule);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.pair-col li strong {
  display: block;
}

/* ---------- ordered list in article body ---------- */
ol.steps {
  margin: 0 0 1.4em;
  padding-left: 1.8em;
}

ol.steps li {
  padding-left: 0.2em;
}

/* ---------- prev/next navigation (articles) ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin: 40px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}

.pager a {
  display: block;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: var(--paper);
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--accent);
}

.pager-next {
  margin-left: auto;
  text-align: right;
}

.pager + .back {
  margin-top: 24px;
}
