:root {
  --bg: #EFF1F0;
  --panel: #FFFFFF;
  --panel-2: #E6E9E8;
  --border: #DADFDD;
  --accent: #1A56E8;
  --accent-dark: #0D3AAE;
  --text: #141716;
  --muted: #5B6361;
  --success: #1F9D6B;
  --warn: #C9821A;
  --error: #C2334D;
  --wine: #7A1F45;
  --hero-low: #E9ECEB;
  --hero-mid: #E1E7EF;
  --hero-wash: #D6E2F8;
  --accent-tint: #E6EDFD;
  --section-tint: #F1F5FE;
  --section-ink: #17233D;
  --on-ink: #FFFFFF;
  --on-ink-muted: #BCC8DF;
  --on-ink-link: #ADC5FF;
  --core-hi: #80A4F6;
  --core-deep: #0A2C86;
  --mask-solid: #000000;
  --clear: transparent;
  --veil: rgba(20,23,22,.36);
  --accent-ring: rgba(26,86,232,.14);
  --success-ring: rgba(31,157,107,.16);
  --grid-line: rgba(26,86,232,.085);
  --aurora-a: rgba(26,86,232,.11);
  --aurora-c: rgba(110,140,200,.12);
  --glass: rgba(255,255,255,.64);
  --glass-edge: rgba(255,255,255,.75);
  --shadow-sm: 0 1px 2px rgba(20,23,22,.05);
  --shadow-bar: 0 1px 0 rgba(20,23,22,.02), 0 6px 18px -14px rgba(20,23,22,.18);
  --shadow-card: 0 1px 2px rgba(20,23,22,.06), 0 16px 34px -14px rgba(16,42,110,.26);
  --shadow-card-lo: 0 1px 2px rgba(20,23,22,.05), 0 9px 22px -12px rgba(16,42,110,.18);
  --shadow-btn: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 24px -8px rgba(26,86,232,.55), 0 2px 4px rgba(13,58,174,.18);
  --shadow-btn-hover: inset 0 1px 0 rgba(255,255,255,.26), 0 14px 30px -8px rgba(26,86,232,.62), 0 2px 4px rgba(13,58,174,.2);
  --r-tag: 4px;
  --r-ctl: 6px;
  --r-compact: 8px;
  --r-card: 10px;
  --r-hero: 14px;
  --r-pill: 999px;
  --r-round: 50%;
  --font-display: 'Inter','Noto Sans SC','PingFang SC','Hiragino Sans','Yu Gothic','Apple SD Gothic Neo','Malgun Gothic','Microsoft YaHei',system-ui,sans-serif;
  --font-body: 'Inter','Noto Sans SC','PingFang SC','Hiragino Sans','Yu Gothic','Apple SD Gothic Neo','Malgun Gothic','Microsoft YaHei',system-ui,sans-serif;
  --font-mono: 'JetBrains Mono','SFMono-Regular',Menlo,Consolas,'Liberation Mono',monospace;
  --title-size: clamp(34px,3.4vw,48px);
  --title-mobile: clamp(24px,5.2vw,30px);
  --heading-size: clamp(24px,2.6vw,34px);
  --nav-height: 68px;
  --gutter: clamp(16px,4vw,32px);
  --reading: 1088px;
  --section-gap: clamp(40px,6vw,88px);
  --gap: 20px;
  --color-primary: var(--accent);
  --color-accent: var(--accent-dark);
  --color-text: var(--text);
  --color-bg: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
:where(main, section, article, aside, nav, .wrap, .prose, .article-body) { min-width: 0; }
:where(.card-grid, .split-notes, .feature-tabs, .hero, .footer-grid) > * { min-width: 0; }
:where(img, svg, video) { max-width: 100%; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-ctl); }
section[id], article[id], :is(h2,h3)[id] { scroll-margin-top: 6rem; }
h1, h2, h3 {
  margin: 0 0 .55em;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
}
h1, .type-display { font-size: var(--title-size); line-height: 1.1; text-wrap: pretty; }
h2 { font-size: var(--heading-size); line-height: 1.2; text-wrap: balance; }
h3 { font-size: 24px; line-height: 1.3; text-wrap: balance; }
:is(h1,h2,h3,.lede):lang(ja) { word-break: auto-phrase; }
:is(h1,h2):lang(ko) { word-break: keep-all; }
.keep { white-space: nowrap; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.5em; }
code, pre, kbd { font-family: var(--font-mono); }
:not(pre) > code {
  overflow-wrap: anywhere;
  background: var(--section-tint);
  color: var(--accent-dark);
  padding: .08em .26em;
  border-radius: var(--r-tag);
}
pre {
  max-width: 100%;
  margin: 1em 0;
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
  overflow-wrap: normal;
  background: var(--section-ink);
  color: var(--on-ink);
  border-radius: var(--r-ctl);
}
pre code { overflow-wrap: normal; }
.wrap { width: 100%; max-width: calc(var(--reading) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.prose { line-height: 1.78; }
.prose :is(h2,h3):not(:first-child) { margin-block-start: 1.5em; }
.prose :is(p,li) { max-inline-size: 75ch; }
.section-space { padding-top: var(--section-gap); padding-bottom: var(--section-gap); }
.sec--base { background: var(--bg); color: var(--text); }
.sec--tint { background: var(--section-tint); color: var(--text); }
.sec--ink { background: var(--section-ink); color: var(--on-ink); }
.sec--ink a:not(.btn) { color: var(--on-ink-link); }
.sec--ink .muted { color: var(--on-ink-muted); }
.sec--ink :focus-visible { outline-color: var(--on-ink-link); }
.sec--ink .card, .sec--ink .panel { color: var(--text); }
.sec--ink :is(.card,.panel) a:not(.btn) { color: var(--accent-dark); }
.sec--ink :is(.card,.panel) .muted { color: var(--muted); }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent-dark); font-size: 13px; letter-spacing: .06em; }
.decor-frame { position: relative; isolation: isolate; overflow-x: clip; }
.decor-cover { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.card, .panel {
  min-width: 0;
  padding: clamp(16px,3vw,28px);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-card-lo);
}
.panel { box-shadow: var(--shadow-sm); }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  max-width: 100%;
  padding: 8px 22px;
  border: 0;
  border-radius: var(--r-ctl);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  overflow-wrap: break-word;
  transition: transform .2s, box-shadow .2s, border-color .2s, background-color .2s;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-pri {
  color: var(--panel);
  background: linear-gradient(170deg,var(--accent) 0%,var(--accent) 40%,var(--accent-dark) 100%);
  box-shadow: var(--shadow-btn);
}
.btn-pri:not(:disabled):hover, .btn-pri.is-hover { transform: translateY(-1px); box-shadow: var(--shadow-btn-hover); }
.btn-sec {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.btn-sec:not(:disabled):hover, .btn-sec.is-hover { border-color: var(--accent); background: var(--panel); color: var(--text); }
.btn-sec svg { color: var(--accent); }
.btn:not(:disabled):active, .btn.is-pressed { transform: translateY(1px); box-shadow: var(--shadow-sm); }
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--panel-2);
  color: var(--muted);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.topbar {
  position: relative;
  z-index: 20;
  background: var(--panel);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-bar);
}
.topbar-in {
  --bar-gutter: 96px;
  position: relative;
  max-width: min(100%,calc(1280px + var(--bar-gutter) * 2));
  margin-inline: auto;
  height: var(--nav-height);
  padding-inline: var(--bar-gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.brand img { width: 30px; height: 30px; flex: none; }
.brand span { max-width: 16.5rem; line-height: 1.25; text-wrap: balance; }
.nav { margin-inline-start: auto; min-width: 0; }
.nav ul, .drawer ul, .lang-options, .footer-grid ul, .footer-legal {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav ul { display: flex; align-items: center; gap: 2px; }
.nav li { min-width: 0; }
.nav a {
  display: block;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover, .drawer a:hover, .lang-options a:hover { color: var(--accent-dark); text-decoration: underline; }
:is(.nav,.drawer,.lang-options) a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-dark); }
.nav a[aria-current="page"] { color: var(--accent); }
.topbar-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-unit { position: relative; flex-shrink: 0; }
.lang, .nav-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
}
.lang svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.lang-caret { color: var(--muted); font-size: 11px; }
.lang-short, .nav-toggle, .drawer, .nav-veil, .preview-menu { display: none; }
.lang-options {
  position: absolute;
  z-index: 4;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  width: max-content;
  min-width: 164px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - var(--nav-height) - 12px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.lang-options a, .drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-ctl);
  text-decoration: none;
  color: var(--text);
}
.nav-toggle { min-width: 44px; min-height: 44px; padding: 0; }
.nav-toggle svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--veil);
  color: var(--panel);
}
.drawer {
  position: absolute;
  z-index: 3;
  inset: 100% 0 auto;
  max-height: calc(100dvh - var(--nav-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px var(--gutter) 20px;
  background: var(--panel);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card-lo);
}
.drawer .drawer-languages { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.topbar-in { z-index: 1; }

.site-footer {
  margin-top: 0;
  background: var(--panel);
  color: var(--text);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) repeat(3,minmax(0,1fr));
  gap: clamp(16px,4vw,48px);
  padding-top: 48px;
  padding-bottom: 32px;
}
.footer-brand p { margin: 14px 0 0; color: var(--muted); max-width: 31ch; }
.footer-label { font-size: 16px; letter-spacing: normal; margin: 4px 0 10px; }
.footer-grid li + li { margin-top: 5px; }
.footer-grid a:not(.brand), .footer-legal a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent-dark); text-decoration: underline; }
.footer-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 16px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.footer-end p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 16px; }
body:has(.dl-fab) .footer-end { padding-bottom: 88px; }

.reveal { transition: opacity .45s ease, transform .45s ease; }
.reveal.is-watched:not(.shown):not(:focus-within) { opacity: 0; transform: translateY(10px); }

/* At the preview width, preserve the signed-off desktop inset. */
@media (min-width: 1600px) {
  .topbar-in { --bar-gutter: var(--gutter); }
}
@media (max-width: 1280px) {
  .topbar-in { --bar-gutter: 40px; gap: 20px; }
  .nav a { padding-inline: 11px; font-size: 14px; }
  .topbar:is(:lang(en),:lang(ja),:lang(ko)) .nav { display: none; }
  .topbar:is(:lang(en),:lang(ja),:lang(ko)) .topbar-tools { margin-inline-start: auto; }
  .topbar:is(:lang(en),:lang(ja),:lang(ko)) .nav-toggle { display: inline-flex; }
  .topbar:is(:lang(en),:lang(ja),:lang(ko)) :is(.drawer,.nav-veil):not([hidden]) { display: block; }
}
@media (max-width: 1100px) {
  .topbar-in { --bar-gutter: var(--gutter); }
  .nav { display: none; }
  .topbar-tools { margin-inline-start: auto; }
  .nav-toggle { display: inline-flex; }
  :is(.drawer,.nav-veil):not([hidden]), .preview-menu { display: block; }
  .preview-menu summary { list-style: none; cursor: pointer; }
  .preview-menu summary::-webkit-details-marker { display: none; }
}
@media (max-width: 768px) {
  :root { --nav-height: 60px; }
  h1, .type-display { font-size: var(--title-mobile); }
  .topbar-in { gap: 8px; }
  .brand span { max-width: min(16.5rem,calc(100vw - 160px)); font-size: 14px; }
  .lang { min-height: 44px; padding-inline: 9px; }
  .lang-text { display: none; }
  .lang-short { display: inline; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .tilt, .tilt-decor, [data-tilt] { transform: none !important; }
  .footer-grid { gap: 20px 14px; padding-top: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .btn { transition: none; }
  .reveal.is-watched:not(.shown):not(:focus-within) { opacity: 1; transform: none; }
  .btn-pri:not(:disabled):hover { transform: none; }
}
@media (forced-colors: active) {
  .btn, .nav a[aria-current="page"] { border: 1px solid currentColor; }
}