:root {
  color-scheme: light;
  --paper: #faf8f1;
  --ink: #182b31;
  --muted: #4e6266;
  --accent: #00665e;
  --line: #c8d5cf;
  --soft: #eaf2ed;
  --sun: #ffe294;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.8; }
a { color: var(--accent); text-underline-offset: .2em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: .15em; }
a:focus-visible, [tabindex]:focus-visible { outline: 3px solid #a75600; outline-offset: 4px; }
code { overflow-wrap: anywhere; }
.skip-link { position: absolute; top: -6rem; left: 1rem; padding: .6rem 1rem; background: var(--sun); z-index: 10; }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--line); background: #fffdf7; }
.header-inner, .main-nav, main, .site-footer { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 3rem); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { display: flex; gap: .85rem; align-items: center; color: var(--ink); font-weight: 800; font-size: 1.2rem; line-height: 1.3; text-decoration: none; }
.brand-detail { display: block; font-size: .78rem; font-weight: 500; letter-spacing: .06em; color: var(--muted); }
.brick-mark { position: relative; display: block; width: 2.5rem; height: 1.65rem; background: var(--accent); border-radius: .3rem; flex-shrink: 0; }
.brick-mark::before, .brick-mark::after { content: ""; position: absolute; width: .7rem; height: .35rem; background: var(--accent); top: -.35rem; border-radius: .15rem .15rem 0 0; }
.brick-mark::before { left: .35rem; }
.brick-mark::after { right: .35rem; }
.header-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .88rem; }
.header-tools a { min-height: 2.75rem; display: inline-flex; align-items: center; }
.language-switch { border: 1px solid var(--line); border-radius: .5rem; padding: .3rem .75rem; text-decoration: none; }
.main-nav { display: flex; flex-wrap: wrap; gap: .1rem 1.25rem; padding-bottom: .7rem; }
.main-nav:empty { display: none; }
.main-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; font-size: .95rem; border-bottom: 3px solid transparent; }
.main-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 750; color: var(--ink); }
main { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: 3rem; }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 0 0 1.25rem; }
article { max-width: 58rem; min-width: 0; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -.025em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3.3rem); margin: 0 0 1.6rem; max-width: 25ch; }
html[lang="ja"] h1 { max-width: 22em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); margin: 3rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.12rem; margin-top: 2rem; }
p, ul, ol { margin: 1rem 0 1.3rem; }
ul, ol { padding-left: 1.5rem; }
li { margin-block: .55rem; }
strong { font-weight: 730; }
article > p:first-of-type > strong:only-child { display: block; background: var(--soft); border-left: 4px solid var(--accent); padding: 1rem 1.2rem; border-radius: 0 .5rem .5rem 0; font-size: .95rem; font-weight: 550; }
pre, code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; }
code { background: #e8eee7; border-radius: .2rem; padding: .12em .28em; }
pre { background: #172c30; color: #f1f7ee; border-radius: .65rem; padding: 1.2rem; max-width: 100%; overflow-x: auto; line-height: 1.7; }
pre code { background: none; color: inherit; padding: 0; overflow-wrap: normal; font-size: 1em; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: .65rem; background: #fffdf8; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .8rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 9rem; overflow-wrap: anywhere; }
th { background: var(--soft); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 550; }
.intro { font-size: 1.15rem; color: var(--muted); }
.language-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2.5rem 0; }
.language-cards a { display: grid; gap: .7rem; padding: 2rem; color: var(--ink); border: 1px solid var(--line); border-radius: 1rem; background: #fffdf8; text-decoration: none; }
.language-cards a:first-child { background: var(--sun); border-color: #dcbd6c; }
.language-cards a:hover { border-color: var(--accent); }
.card-label { font-size: 1.75rem; font-weight: 750; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.8rem; color: var(--muted); font-size: .8rem; }
.site-footer p { margin: .3rem 0; }
@media (max-width: 40rem) {
  .header-inner { flex-wrap: wrap; }
  .header-tools { gap: .5rem .8rem; }
  .main-nav { gap: 0 1rem; }
  .language-cards { grid-template-columns: 1fr; }
  .language-cards a { padding: 1.5rem; }
  th, td { padding: .7rem; min-width: 8rem; }
}
@media print {
  .site-header, .skip-link, .eyebrow, .site-footer { display: none; }
  body { background: white; color: black; font-size: 10pt; }
  main { padding: 0; }
  pre { white-space: pre-wrap; color: black; background: #eee; }
  .table-scroll { overflow: visible; }
  h2, h3 { break-after: avoid; }
}
