:root {
  color-scheme: light;
  --ink: #28222b;
  --muted: #665e68;
  --paper: #fff;
  --line: #dbd5dd;
  --plum: #763950;
  --plum-soft: #f6edf1;
  --green: #1c6147;
  --green-soft: #edf6f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #f8f6f8;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1024px; margin-inline: auto; padding: 32px 28px 72px; }
a { color: var(--plum); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; }
.skip { position: absolute; top: -100px; left: 16px; padding: 12px; background: var(--paper); z-index: 1; }
.skip:focus { top: 12px; }
nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .85rem; }
header { margin: 32px 0 40px; padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
.project { color: var(--muted); font-size: .9rem; }
.heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 8px; }
h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.4; letter-spacing: -.025em; }
.stage { padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; font-size: .8rem; white-space: nowrap; background: var(--paper); }
section + section { margin-top: 48px; }
.section-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
h2 { margin: 0; font-size: 1.3rem; line-height: 1.5; }
h3 { margin: 0 0 12px; font-size: 1rem; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9em; overflow-wrap: anywhere; }
.badge { border: 1px solid currentColor; border-radius: 3px; padding: 1px 8px; font-size: .75rem; white-space: nowrap; }
.changed { color: var(--plum); background: var(--plum-soft); }
.added { color: var(--green); background: var(--green-soft); }
.retained { color: var(--muted); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--paper); }
th, td { padding: 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { padding-block: 10px; font-size: .8rem; font-weight: 600; border-top: 1px solid var(--line); color: var(--muted); }
tbody th { font-weight: 500; }
.field-column { width: 30%; }
.before-column { width: 30%; }
.after-column { width: 40%; }
.logical { display: block; margin-bottom: 4px; font-size: .85rem; }
.logical + code { color: var(--muted); }
.value, .reference { display: block; margin-top: 6px; font-size: .85rem; }
.reference { font-family: "SFMono-Regular", Consolas, monospace; }
.values { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.changed-cell { background: var(--plum-soft); }
.added-cell, .added-row td, .added-row th { background: var(--green-soft); }
.addition { color: var(--green); font-weight: 600; }
.added-cell > code { display: block; margin-top: 6px; }
.added-row .addition { display: block; font-size: .8rem; }
.absent { color: var(--muted); }
.checks { margin-top: 28px; }
.checks table th:first-child { width: 52%; }
details { margin-top: 12px; border-bottom: 1px solid var(--line); }
summary { padding: 12px 0; color: var(--plum); cursor: pointer; font-size: .9rem; }
.sql { max-width: 100%; overflow: auto; border-left: 3px solid var(--green); background: var(--paper); }
pre { margin: 0; padding: 16px; line-height: 1.7; }
pre code { overflow-wrap: normal; }
.retained-definitions { margin: 0; border-top: 1px solid var(--line); }
.retained-definitions > div { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
dt { font-size: .9rem; }
dd { margin: 0; }
dd > code { display: block; }
.impact-heading, .impact { display: grid; grid-template-columns: 1fr 1.65fr 1.65fr; gap: 20px; }
.impact-heading { color: var(--muted); font-size: .8rem; padding-bottom: 10px; }
.impact { padding: 22px 0; border-top: 1px solid var(--line); }
.impact:last-child { border-bottom: 1px solid var(--line); }
.impact h3 { color: var(--plum); }
.impact ul, .impact ol { margin: 0; padding-left: 1.25em; }
.impact li + li { margin-top: 8px; }
.mobile-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ownership { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; margin-bottom: 32px; }
.ownership > div { padding: 20px; border-left: 3px solid var(--line); background: var(--paper); }
.ownership span, .ownership strong, .ownership code { display: block; }
.ownership > div > span { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.ownership .previous { color: var(--muted); }
.ownership .current { border-color: var(--green); background: var(--green-soft); }
.ownership-arrow { font-size: 1.5rem; }
.path-flow { display: flex; list-style: none; padding: 0; margin: 0 0 28px; gap: 26px; }
.path-flow li { flex: 1; min-width: 0; position: relative; border-top: 3px solid var(--plum); padding-top: 12px; }
.path-flow li + li::before { content: '→'; position: absolute; left: -23px; top: 12px; color: var(--plum); }
.path-flow strong, .path-flow span { display: block; }
.path-flow strong { font-size: .9rem; }
.path-flow span { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.return-rules { margin-top: 12px; }
@media (max-width: 600px) {
  main { padding: 20px 16px 48px; }
  header { margin-block: 24px 32px; }
  th, td { padding: 12px 8px; font-size: .9rem; }
  thead th { font-size: .75rem; }
  h2 { font-size: 1.15rem; }
  .retained-definitions > div { grid-template-columns: 1fr; gap: 6px; }
  .impact-heading { display: none; }
  .impact { grid-template-columns: 1fr; gap: 16px; }
  .impact h3 { margin-bottom: 0; }
  .mobile-label { position: static; width: auto; height: auto; margin: 0 0 6px; overflow: visible; clip-path: none; white-space: normal; font-size: .8rem; font-weight: 400; color: var(--muted); }
  .ownership { gap: 12px; grid-template-columns: 1fr; }
  .ownership-arrow { transform: rotate(90deg); justify-self: center; }
  .path-flow { flex-direction: column; gap: 28px; }
  .path-flow li { border-top: 0; border-left: 3px solid var(--plum); padding: 0 0 0 14px; }
  .path-flow li + li::before { content: '↓'; left: 14px; top: -27px; }
}
@media (max-width: 360px) {
  th, td { padding-inline: 6px; }
}
