:root {
  color-scheme: light;
  font-size: 80%;
  --ink: #232038;
  --muted: #5c576d;
  --accent: #5230a3;
  --accent-dark: #3d237e;
  --line: #e6e1ee;
  --paper: #fff;
  --page: #fbfafc;
  --wash: #f5efff;
  --dark-panel: #2d2341;
  --dark-panel-top: #403256;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 400 1rem/1.6 var(--font); color: var(--ink); background: var(--page); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.045em; }
code, pre { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; }
.skip, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { z-index: 10; top: 8px; left: 8px; width: auto; height: auto; padding: 10px 15px; clip-path: none; background: var(--paper); }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1280px; min-height: 68px; padding: 0 30px; margin: auto; display: flex; align-items: center; gap: 29px; }
.brand { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; font-weight: 820; letter-spacing: -.035em; font-size: 1.1rem; white-space: nowrap; }
.brand-icon { display: grid; place-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-dark); }
.brand-icon i { display: block; width: 13px; height: 8px; margin-top: -1px; border: 1.5px solid #f4efff; transform: skewY(-16deg); }
.brand-icon i:last-child { border-color: #dcf1b1; }
.top-nav { display: flex; gap: 26px; }
.top-nav a { display: grid; align-items: center; min-height: 44px; font-weight: 650; color: var(--muted); }
.top-nav a[aria-current="page"], .top-nav a:hover { color: var(--accent-dark); }
.top-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.search-button { display: inline-flex; gap: 11px; align-items: center; justify-content: center; padding: 7px 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--muted); font-size: .9rem; }
.search-button:hover { border-color: var(--accent); }
.search-icon { position: relative; width: 13px; height: 13px; border-radius: 100%; border: 1.6px solid currentColor; margin-right: 4px; }
.search-icon::after { content: ''; position: absolute; height: 1.6px; width: 6px; background: currentColor; transform: rotate(45deg); right: -5px; bottom: -2px; }
.layout { max-width: 1280px; margin: auto; padding: 30px 30px 74px; }
.main:focus { outline: none; }
.setup-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 20px; margin: 4px 0 17px; }
.setup-header h1 { font-size: clamp(2.65rem, 4vw, 4.45rem); font-weight: 780; letter-spacing: -.058em; }
.setup-header p { margin-top: 8px; color: var(--muted); font-size: 1.12rem; }
.setup-header > a { padding-bottom: 2px; }
.setup-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: start; gap: 20px; isolation: isolate; }
.setup-flow { display: grid; gap: 11px; list-style: none; margin: 0; padding: 0; }
.setup-flow > li { position: relative; }
.setup-flow > li:not(:last-child)::after { content: ''; position: absolute; bottom: -12px; left: 32px; z-index: -1; height: 13px; border-left: 2px solid #a48bd7; }
.setup-flow > li:not(:last-child)::before { content: ''; position: absolute; left: 29px; bottom: -9px; width: 7px; height: 7px; border-right: 2px solid #a48bd7; border-bottom: 2px solid #a48bd7; transform: rotate(45deg); }
.setup-node { position: relative; display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 11px; width: 100%; min-height: 56px; padding: 7px 15px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.setup-node:hover { border-color: var(--accent); }
.setup-node[aria-pressed="true"] { border-color: #a48bd7; background: var(--wash); }
.setup-number { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; border: 1px solid #d9ccf1; color: var(--accent-dark); background: var(--paper); font-weight: 750; }
.setup-node[aria-pressed="true"] .setup-number { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.setup-node-copy { display: grid; gap: 1px; line-height: 1.35; }
.setup-node-copy strong { font-size: 1.17rem; }
.setup-node-copy span { color: var(--muted); }
.skill-details { padding: clamp(15px, 2.7vw, 30px); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; background: var(--paper); }
.skill-label { color: var(--accent-dark); font-size: max(.9rem, 12px); font-weight: 700; }
.skill-details h2 { margin: 5px 0 6px; font-size: clamp(1.6rem, 2.65vw, 2.7rem); }
.skill-summary { max-width: 55ch; color: var(--muted); }
.skill-actions, .skill-example { margin-top: 14px; }
.skill-details h3 { margin-bottom: 5px; font-size: 1.15rem; letter-spacing: -.02em; }
.skill-actions ul { margin: 0; padding-left: 1.2rem; }
.skill-actions li + li { margin-top: 4px; }
.skill-actions li::marker { color: var(--accent); }
.skill-example { padding: 10px 12px; border-left: 2px solid #a48bd7; border-radius: 0 8px 8px 0; background: var(--wash); }
.skill-memo-link { display: inline-block; margin-top: 12px; }
.section-head { margin: 38px 0 15px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.35rem); }
.stage-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stage-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.stage-card:hover { border-color: var(--accent); }
.stage-card img { width: 100%; aspect-ratio: 1.65; object-fit: cover; }
.stage-copy { padding: 13px 14px 17px; }
.stage-card h3 { margin-top: 3px; font-size: 1.16rem; letter-spacing: -.035em; }
.stage-card p { margin-top: 6px; color: var(--muted); font-size: .95rem; line-height: 1.44; }
.article { max-width: 880px; margin: auto; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .93rem; margin-bottom: 15px; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.article-head { display: grid; grid-template-columns: 1.45fr 1fr; align-items: stretch; overflow: hidden; border-radius: 18px; background: var(--wash); }
.article-head > div { padding: clamp(20px, 4vw, 37px); }
.article-head img { width: 100%; height: 100%; min-height: 185px; object-fit: cover; }
.article-head h1 { margin: 8px 0 10px; font-size: clamp(2.15rem, 4.5vw, 3.65rem); }
.article-head p { max-width: 52ch; color: var(--muted); font-size: 1.07rem; }
.memo-list { list-style: none; padding: 0; margin: 22px 0 0; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.memo-list li + li { border-top: 1px solid var(--line); }
.memo-row { display: grid; gap: 2px; padding: 13px 16px; }
.memo-row strong { font-size: 1.08rem; }
.memo-row span { color: var(--muted); }
.memo-row:hover strong { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.article h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin-bottom: 9px; }
.memo-practice, .memo-example, .memo-section { margin-top: 22px; }
.memo-practice { padding: clamp(16px, 3.5vw, 27px); border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.memo-checks { margin: 7px 0 0; padding-left: 1.25rem; }
.memo-checks li + li { margin-top: 8px; }
.memo-checks li::marker { color: var(--accent); }
.memo-example { padding: 14px 18px; border-left: 3px solid #a48bd7; background: var(--wash); border-radius: 0 11px 11px 0; }
.memo-example h2 { font-size: 1.12rem; }
.memo-example p { max-width: 65ch; }
.memo-definitions { display: grid; gap: 10px; margin: 0; padding: 0; }
.memo-definitions div { display: grid; grid-template-columns: minmax(125px, 0.4fr) 1fr; gap: 6px 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.memo-definitions dt { font-weight: 700; overflow-wrap: anywhere; }
.memo-definitions dd { margin: 0; color: var(--muted); }
.template { overflow: hidden; border-radius: 10px; background: var(--dark-panel); color: var(--paper); }
.template-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 10px 14px; background: var(--dark-panel-top); }
.template-head h2 { font-size: 1rem; letter-spacing: 0; margin: 0; }
pre { padding: 13px; margin: 0; overflow: auto; font-size: .88rem; }
.copy { padding: 5px 9px; min-height: 36px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--accent-dark); font-size: .88rem; }
.copy:hover { border-color: var(--accent); }
.text-link { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { text-decoration-thickness: 2px; }
.related { display: flex; flex-wrap: wrap; gap: 8px 19px; margin-top: 22px; }
dialog { position: fixed; width: min(560px, calc(100% - 30px)); max-height: 70dvh; margin: min(14vh, 110px) auto 0; border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 18px 55px #28134d2e; }
dialog::backdrop { background: #24193c77; }
dialog label { display: block; font-weight: 710; font-size: 1.12rem; padding-right: 36px; }
dialog input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.close { position: absolute; top: 10px; right: 12px; border: 0; border-radius: 6px; background: var(--page); font-size: 1.45rem; width: 35px; height: 35px; line-height: 1; }
#search-results { margin-top: 8px; }
#search-results a { display: block; padding: 8px; border-radius: 6px; }
#search-results a:hover { background: var(--wash); }
#search-results small { display: block; color: var(--muted); }
.empty { padding: 10px 0; color: var(--muted); }
@media (max-width: 1000px) {
  .stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .top-inner { padding: 0 15px; gap: 12px; }
  .top-nav { gap: 13px; font-size: .89rem; }
  .search-button { min-width: 39px; padding: 6px; }
  .search-button span:last-child { display: none; }
  .layout { padding: 16px 15px 48px; }
  .setup-layout { grid-template-columns: 1fr; }
  .setup-flow .skill-details { margin-top: 7px; }
  .section-head { margin-top: 27px; }
  .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .article-head img { min-height: 155px; }
}
@media (max-width: 480px) {
  .top-inner { min-height: 57px; gap: 8px; }
  .top-nav { gap: 8px; }
  .brand { gap: 5px; font-size: .97rem; }
  .brand-icon { width: 27px; height: 27px; }
  .stage-grid { grid-template-columns: 1fr; }
  .stage-card { display: grid; grid-template-columns: 112px 1fr; }
  .stage-card img { height: 100%; aspect-ratio: auto; }
  .stage-copy { padding: 9px 10px 10px; }
  .stage-card p { font-size: .91rem; }
  .article-head { grid-template-columns: 1fr; }
  .article-head img { min-height: 0; max-height: 135px; }
  .memo-definitions div { grid-template-columns: 1fr; }
}
