/* =====================================================================
   cidea docs — measured design system (clean-room)
   Every value below comes from planning/rea/canva/token-map.md, which
   traces it to MEASURED evidence (REA + style/app/subtree probes of the
   logged-in reference product, 2026-10). Values that had no evidence are
   marked "파생(미측정)" here and in token-map.md.
   Clean room: values only. No third-party names, logos, wordmarks,
   proprietary font files, icon paths, illustrations, copy or code.
   Font: Noto Sans KR (Google Fonts). Pages should load
   wght@400;500;600;700 (600 is used by the measured UI scale).
   Owns: tokens · base · app shell · page header · .prose BASE only ·
         blocks · cards/chips/hero · forms · auth · utilities.
   Rendered-markdown details live in assets/theme-prose.css.
   Sections: 1 tokens · 2 base · 3 app shell · 4 page header · 5 prose base
             6 blocks · 7 cards/chips/hero · 8 forms · 9 auth
             10 states/utilities · 11 responsive
   ===================================================================== */

/* 1. TOKENS ------------------------------------------------------------ */
:root {
  color-scheme: light dark;

  /* type families — UI font substitute (see token-map §Font) */
  --font-sans: "Noto Sans KR", "Noto Sans", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Noto Sans KR", monospace;
  --font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;

  /* --- measured palette (cv-*) ------------------------------------- */
  --cv-page: #fcfbfe;            /* home body bg */
  --cv-surface: #fff;            /* main panel, search, cards */
  --cv-surface-2: #fff;          /* light: same white; dark differs */
  --cv-surface-3: #fff;
  --cv-canvas: #f3f4f7;          /* docs canvas, viewer stage area, footer bar */
  --cv-text: #0f1015;
  --cv-text-85: #0f1015d9;       /* text button */
  --cv-text-70: #101219b2;       /* idle pill text, footer controls */
  --cv-text-60: #13162099;       /* muted text (4.74:1 on white) */
  --cv-docs-text: #000;          /* docs body (applied as --cv-text, see map) */
  --cv-docs-placeholder: #c0c2c9;
  --cv-divider: #e3e5e8;         /* pixel: panel/canvas border, bottom bar top */
  --cv-dash: #35415a33;          /* dashed drop-zone border */
  --cv-primary: #8b3dff;
  --cv-primary-700: #7630d7;     /* nav active icon */
  --cv-primary-800: #612dae;     /* nav active label */
  --cv-primary-900: #4a2e7e;
  --cv-nav-idle: #4a2e7ecc;      /* nav icon + label, idle/hover */
  --cv-nav-tile: #7630d71a;      /* nav tile bg, hover + active */
  --cv-nav-active-icon: var(--cv-primary-700);
  --cv-nav-active-label: var(--cv-primary-800);
  --cv-tint: #a370fc33;          /* selected pill tint */
  --cv-tint-soft: #a370fc26;
  --cv-lilac: #e7dbff;           /* idle pill border, search border + glow */
  --cv-lilac-strong: #d6c2ff;    /* outlined pill border (pixel) */
  --cv-teal: #00c4cc;
  --cv-teal-deep: #0097a0;
  --cv-violet: #7d2ae8;
  --cv-gold: #fdbd68;            /* upgrade icon */
  --cv-error: #db142c; --cv-success: #008009; --cv-warning: #ad5a00; --cv-info: #1a62ff;

  --cv-grad-bar: linear-gradient(90deg, #00c4cc 0%, #7d2ae8 100%);
  --cv-grad-heading: linear-gradient(to bottom right, #0097a0, #5a32fa, #7d2ae8);
  --cv-grad-135: linear-gradient(135deg, #00c4cc, #7d2ae8);
  --cv-grad-135-deep: linear-gradient(135deg, #03a5ab, #7d2ae8);
  --cv-grad-soft: linear-gradient(180deg, #f9f5fe, #f5ffff);
  --cv-grad-hero:
    radial-gradient(ellipse 72% 150% at 50% 100%, #fff, rgb(255 255 255 / 0)),
    linear-gradient(to bottom, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 0) 9.5%, #fff 94%),
    linear-gradient(#ffffff59, #ffffff59),
    linear-gradient(#ffffff59, #ffffff59),
    linear-gradient(#ffffff1a, #ffffff1a),
    linear-gradient(to bottom, rgb(255 255 255 / 0) 0%, #fff 100%),
    linear-gradient(to right, #00c4cc 0%, #6f00ff 100%);

  --cv-shadow-ring: 0 0 0 1px #404f6d0f, 0 0 8px 0 #39466024;
  --cv-shadow-low: 0 0 0 .5px #404f6d0f, 0 1px 2px 0 #151e821f, 0 2px 4px 0 #151e820f;
  --cv-shadow-mid: 0 0 0 .5px #404f6d12, 0 2px 5px 0 #151e821f, 0 6px 12px 0 #151e820f;
  --cv-shadow-high: 0 0 0 .5px #404f6d0f, 0 8px 16px 0 #151e821f, 0 24px 24px 0 #151e820f;
  --cv-shadow-primary: inset 0 24px 24px -18px #ffffff29, inset 0 1px .5px 0 #ffffff40,
    inset 0 -1px .5px 0 #151e821f, 0 4px 8px 0 #151e8212, 0 8px 16px 0 #151e8208;
  --cv-shadow-primary-sm: inset 0 24px 24px -18px #ffffff29, inset 0 1px .5px 0 #ffffff40,
    inset 0 -1px .5px 0 #151e821f, 0 1px 2px 0 #151e8212, 0 3px 4px 0 #151e8208;
  --cv-shadow-glow: 0 6px 20px -4px var(--cv-lilac);
  --cv-shadow-stage: 0 4px 32px -14px rgba(64, 87, 109, .3);

  --cv-t-btn: background-color .1s linear, box-shadow .1s linear, color .1s linear, transform .07s;
  --cv-t-nav: background-color .2s ease-out, color .2s ease-out;
  --cv-t-layer: opacity .2s ease-out;

  /* --- viewer chrome (slides/) ------------------------------------- */
  --viewer-bar-h: 57px;
  --viewer-footer-h: 40px;
  --viewer-strip-h: 88px;
  --viewer-bg: var(--cv-canvas);
  --viewer-bar-bg: var(--cv-grad-bar);
  --viewer-bar-text: #fff;
  --viewer-bar-title: rgba(255, 255, 255, .898);
  --viewer-bar-muted: rgba(255, 255, 255, .698);
  --viewer-bar-outline: inset 0 0 0 1px rgba(255, 255, 255, .2);
  --viewer-bar-divider: rgba(255, 255, 255, .15);
  --viewer-share-bg: rgba(255, 255, 255, .898);
  --viewer-share-shadow: inset 0 24px 24px -18px rgba(255, 255, 255, .08), inset 0 1px .5px rgba(255, 255, 255, .25),
    inset 0 -1px .5px rgba(0, 0, 0, .25), 0 1px 2px rgba(0, 0, 0, .14), 0 3px 4px rgba(0, 0, 0, .07);
  --viewer-control: rgba(16, 18, 25, .698);
  --viewer-toggle-on: rgba(57, 70, 96, .14);
  --viewer-slider-fill: rgba(53, 65, 90, .2);
  --viewer-slider-dot: rgba(28, 33, 48, .5);
  --viewer-thumb-ring: rgb(136, 137, 145);   /* pixel only */
  --viewer-thumb-hairline: rgb(217, 219, 225); /* pixel only */
  --viewer-badge-bg: rgba(19, 22, 32, .6);

  /* --- legacy semantic tokens (class contract; mapped to measured) -- */
  --bg: var(--cv-page);
  --bg-surface: var(--cv-surface);
  --bg-subtle: var(--cv-canvas);
  --bg-sidebar: var(--cv-page);
  --bg-elevated: var(--cv-surface);
  --bg-hover: var(--cv-nav-tile);
  --bg-active: var(--cv-tint);
  --bg-pre: var(--cv-canvas);
  --bg-code: var(--cv-tint-soft);

  --text: var(--cv-text);
  --text-secondary: var(--cv-text-70);
  --text-tertiary: var(--cv-text-60);
  --code-text: var(--cv-primary-800);

  --divider: var(--cv-divider);
  --border: var(--cv-lilac);
  --border-strong: var(--cv-text-60);   /* contrast fix: 3:1 input edge */

  --accent: var(--cv-primary);
  --accent-hover: var(--cv-primary-700);
  --accent-ink: var(--cv-primary-800);
  --accent-soft: var(--cv-nav-tile);
  --accent-text: #fff;
  --teal: var(--cv-teal-deep);
  --teal-ink: var(--cv-teal-deep);
  --teal-soft: var(--cv-grad-soft);
  --link: var(--cv-primary);
  --link-underline: var(--cv-lilac-strong);
  --focus-ring: var(--cv-primary);
  --focus-halo: var(--cv-tint);
  --gradient-brand: var(--cv-grad-135);
  --gradient-brand-hover: var(--cv-grad-135-deep);
  --gradient-soft: var(--cv-grad-soft);
  --on-gradient: #fff;

  /* category tint (bg) + ink (text) + solid — measured bg/ink pairs */
  --purple-bg: #e7dbff; --purple-ink: #352459; --purple-solid: #8b3dff;
  --blue-bg:   #cce1ff; --blue-ink: #182c59;   --blue-solid: #1a62ff;
  --green-bg:  #c3eac4; --green-ink: #133416;  --green-solid: #008009;
  --red-bg:    #ffd6d8; --red-ink: #501b21;    --red-solid: #db142c;
  --orange-bg: #ffd9ad; --orange-ink: #3e2a14; --orange-solid: #ad5a00;
  --yellow-bg: #ffebd6; --yellow-ink: #3e2a14; --yellow-solid: #fdbd68;
  --gray-bg:   #f3f4f7; --gray-ink: #101219b2; --gray-solid: #c1c5cd;
  /* no measured pair: reuse the nearest measured one (see token-map) */
  --teal-bg: var(--blue-bg); --teal-ink-c: var(--blue-ink); --teal-solid: #00c4cc;
  --pink-bg: var(--red-bg);  --pink-ink: var(--red-ink);    --pink-solid: var(--red-solid);

  --callout-gray: var(--gray-bg);
  --callout-brown: var(--orange-bg);
  --callout-orange: var(--orange-bg);
  --callout-yellow: var(--yellow-bg);
  --callout-green: var(--green-bg);
  --callout-blue: var(--blue-bg);
  --callout-purple: var(--purple-bg);
  --callout-red: var(--red-bg);
  --red-text: var(--red-ink);
  --green-text: var(--green-ink);
  --input-bg: var(--cv-surface);

  /* elevation */
  --shadow-sm: var(--cv-shadow-low);
  --shadow-card: var(--cv-shadow-ring);
  --shadow-lift: var(--cv-shadow-mid);
  --shadow-drawer: var(--cv-shadow-high);
  --shadow-btn: var(--cv-shadow-primary);

  /* geometry: measured radius scale 6/10/12/16/20/9999 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* spacing: measured 4/8/12/16/24/32/48/80 */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 80px;

  /* type scale (UI 11/12/14/16/18/24 · docs 16/33/42/48) */
  --fs-caption: 11px;
  --fs-xs: 12px; --fs-sm: 14px; --fs-ui: 14px; --fs-body: 16px; --fs-prose: 16px;
  --fs-subtitle: 18px; --fs-title-ui: 24px;
  --fs-h4: 24px; --fs-h3: 33px; --fs-h2: 42px; --fs-h1: 48px; --fs-title: 48px;
  --lh-prose: 1.5; --lh-ui: 1.5715; --lh-heading: 1.4;

  /* layout */
  --rail-w: 72px;            /* rail occupies x 0–71, panel starts at x 72 */
  --rail-item-w: 64px;
  --rail-item-h: 52px;
  --rail-gap: 12px;          /* 64px pitch */
  --rail-tile: 36px;
  --panel-gap: 8px;
  --panel-radius: 16px;
  --hero-h: 277px;
  --sidebar-w: var(--rail-w);
  --topbar-h: 57px;
  --page-max: 720px;         /* docs reading column */
  --card-pad: 32px;          /* panel inner side padding */
  --gutter: 80px;            /* docs page side padding: 720 + 2×80 = 880 */
}

@media (prefers-color-scheme: dark) {
  :root {
    --cv-page: #1f142e;
    --cv-surface: #16171d;
    --cv-surface-2: #1d1f26;
    --cv-surface-3: #24262e;
    --cv-canvas: #0f1015;
    --cv-text: #fff;
    --cv-text-85: #ffffffe5;
    --cv-text-70: #ffffffb2;
    --cv-text-60: #ffffff80;
    --cv-divider: #ffffff26;         /* 파생(미측정) */
    --cv-dash: #fff3;
    --cv-primary: #a370fc;
    --cv-primary-700: #a370fc;       /* 파생(미측정) */
    --cv-primary-800: #a370fc;       /* 파생(미측정) */
    --cv-nav-idle: #ffffffb2;        /* 파생(미측정) */
    --cv-nav-tile: #a370fc1a;        /* 파생(미측정): 라이트 실측 알파 10% — 대비 보정, #a370fc on tile 4.71:1 (33이면 4.05) */
    --cv-tint: #a370fc33;
    --cv-tint-soft: #a370fc4d;
    --bg-code: var(--cv-nav-tile);   /* 대비 보정: #a370fc on #a370fc4d = 3.40 → 4.71 */
    --cv-lilac: #4a2e7e;
    --cv-lilac-strong: #4a2e7e;      /* 파생(미측정) */
    --cv-error: #b61629; --cv-success: #096d11; --cv-warning: #944f05; --cv-info: #1854d7;
    --cv-grad-heading: linear-gradient(to bottom right, #10e2ea 30%, #8b3dff);
    --cv-grad-soft: linear-gradient(180deg, #24262e, #1d1f26); /* 파생(미측정) */
    --cv-grad-hero:
      radial-gradient(ellipse 72% 150% at 50% 100%, #16171d, rgb(22 23 29 / 0)),
      linear-gradient(to bottom, rgb(22 23 29 / 0) 0%, rgb(22 23 29 / 0) 9.5%, #16171d 94%),
      linear-gradient(#16171d66, #16171d66),
      linear-gradient(to bottom, rgb(22 23 29 / 0) 0%, #16171d 100%),
      linear-gradient(to right, #00c4cc 0%, #6f00ff 100%);
    --cv-shadow-ring: 0 0 0 1px #ffffff12, 0 0 8px 0 #ffffff26; /* 파생: ring 성분 dark값 */
    --cv-shadow-low: inset 0 1px .5px 0 #ffffff12, inset 0 0 0 .5px #ffffff12, 0 1px 2px 0 #00000036, 0 2px 4px 0 #00000024;
    --cv-shadow-mid: inset 0 1px .5px 0 #ffffff1f, inset 0 0 0 .5px #ffffff1a, 0 2px 5px 0 #00000036, 0 6px 12px 0 #00000024;
    --cv-shadow-high: inset 0 1px .5px 0 #ffffff1f, inset 0 0 0 .5px #ffffff1a, 0 6px 12px 0 #00000036, 0 24px 24px 0 #00000024;
    --cv-shadow-primary: inset 0 24px 24px -18px #ffffff14, inset 0 1px .5px 0 #ffffff40,
      inset 0 -1px .5px 0 #00000040, 0 4px 8px 0 #00000024, 0 8px 16px 0 #00000012;
    --cv-shadow-primary-sm: inset 0 24px 24px -18px #ffffff14, inset 0 1px .5px 0 #ffffff40,
      inset 0 -1px .5px 0 #00000040, 0 1px 2px 0 #00000024, 0 3px 4px 0 #00000012;
    --viewer-control: #ffffffb2;     /* 파생(미측정) */
    --viewer-toggle-on: #ffffff26;   /* 파생(미측정) */

    --accent-text: #0f1015;          /* contrast fix: #fff on #a370fc = 3.34:1, #0f1015 = 5.68:1 */

    --purple-bg: #4a2e7e; --purple-ink: #fff; --purple-solid: #a370fc;
    --blue-bg:   #1d3b7c; --blue-ink: #fff;   --blue-solid: #1854d7;
    --green-bg:  #16461a; --green-ink: #fff;  --green-solid: #096d11;
    --red-bg:    #721d27; --red-ink: #fff;    --red-solid: #b61629;
    --orange-bg: #563715; --orange-ink: #fff; --orange-solid: #944f05;
    --yellow-bg: #563715; --yellow-ink: #fff; --yellow-solid: #fdbd68;  /* 파생: orange 쌍 재사용 */
    --gray-bg:   #24262e; --gray-ink: #ffffffb2; --gray-solid: #606671;
    --teal-solid: #00c4cc;
  }
}

/* 2. BASE -------------------------------------------------------------- */
*, *::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: var(--font-sans);
  font-size: var(--fs-ui);
  line-height: var(--lh-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg, video { max-width: 100%; height: auto; }
/* focus: measured focus = 1px #8b3dff border (search); ring width 파생 for keyboard visibility */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
::selection { background: var(--cv-tint); }
h1, h2, h3, h4 { font-family: var(--font-display); }

/* 3. APP SHELL --------------------------------------------------------- */
/* Desktop: 72px icon rail on the page bg + one white panel (top/right gap 8, radius 16, ring shadow). */
.app { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--bg); }

.sidebar {
  position: sticky; top: 0;
  flex: 0 0 var(--rail-w);
  width: var(--rail-w);
  height: 100vh; height: 100dvh;
  overflow-x: hidden; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: var(--space-2) 4px var(--space-4);
  background: var(--bg-sidebar);
  color: var(--cv-nav-idle);
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
/* brand slot = the rail's top 36×36 slot (toggle position 18,8) */
.sidebar-header {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: var(--rail-item-w); min-height: var(--rail-tile);
  margin: 0 0 var(--rail-gap);
  border-radius: var(--radius-md); text-decoration: none; color: var(--text);
  font-size: var(--fs-subtitle); font-weight: 600; line-height: 24px;
}
.sidebar-header > span:not(.ws-icon) {   /* wordmark text: visually hidden in the rail */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.sidebar-header .ws-icon {
  display: inline-grid; place-items: center; flex: 0 0 var(--rail-tile);
  width: var(--rail-tile); height: var(--rail-tile); border-radius: var(--radius-md);
  background: var(--cv-primary); color: var(--accent-text);
  font-size: var(--fs-sm); font-weight: 600; line-height: 22px;
  box-shadow: var(--cv-shadow-primary);
  transition: var(--cv-t-btn);
}
.sidebar-header:hover .ws-icon { background: var(--cv-primary-700); }
.sidebar-header:focus-visible { outline: none; }
.sidebar-header:focus-visible .ws-icon { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sidebar-section {  /* group caption: hidden in the rail, shown in the mobile drawer */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  font-size: var(--fs-caption); font-weight: 600; line-height: 16px; letter-spacing: .01em;
  color: var(--text-tertiary);
}
.sidebar-nav {
  display: flex; flex-direction: column; align-items: center; gap: var(--rail-gap);
  width: 100%; margin: 0; padding: 0; list-style: none;
}
/* rail item: 64×52, 36×36 tile (radius 12, padding 6) over an 11/16/500 label */
.sidebar-item {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  width: var(--rail-item-w); min-height: var(--rail-item-h);
  padding: 0;
  color: var(--cv-nav-idle); text-decoration: none;
  font-size: var(--fs-caption); font-weight: 500; line-height: 16px; letter-spacing: .11px;
  text-align: center;
}
.sidebar-item .icon {
  flex: 0 0 var(--rail-tile); width: var(--rail-tile); height: var(--rail-tile);
  display: inline-grid; place-items: center;
  padding: 6px; border-radius: var(--radius-md);
  background: transparent; color: var(--cv-nav-idle);
  font-family: var(--font-emoji); font-size: 18px; line-height: 1;
  transition: var(--cv-t-nav);
}
.sidebar-item .label {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  max-width: 100%; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere;
  transition: var(--cv-t-nav);
}
/* rail (desktop): measured label is one line, item stays 52 high → 64 pitch (H: nav-idle i7).
   Long names end in an ellipsis; the full name is in the link's title tooltip. */
@media (min-width: 861px) {
  .sidebar .sidebar-item .label {
    display: block; -webkit-line-clamp: 1; line-clamp: 1;
    max-width: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}
.sidebar-item:hover .icon { background: var(--cv-nav-tile); }
.sidebar-item.active .icon, .sidebar-item[aria-current="page"] .icon {
  background: var(--cv-nav-tile); color: var(--cv-nav-active-icon);
}
.sidebar-item.active, .sidebar-item[aria-current="page"] { color: var(--cv-nav-active-label); }
.sidebar-item:focus-visible { outline: none; }
.sidebar-item:focus-visible .icon { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sidebar-item.indent { padding-left: 0; }
/* divider = the rail's flexible spacer: account items sit at the bottom like the measured bell/avatar */
.sidebar-divider { flex: 1 1 auto; min-height: var(--space-5); width: 100%; margin: 0; border: 0; background: none; }

.main {
  flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column;
  margin: var(--panel-gap) var(--panel-gap) 0 0;
  min-height: calc(100vh - var(--panel-gap)); min-height: calc(100dvh - var(--panel-gap));
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  background-color: var(--cv-surface);
  background-image: var(--cv-grad-hero);
  background-size: 100% var(--hero-h);
  background-repeat: no-repeat;
  box-shadow: var(--cv-shadow-ring);
}

/* generic topbar (slides deck-bar reuses this class): white surface */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--space-2);
  height: var(--topbar-h); padding: 0 var(--space-4);
  background: var(--cv-surface);
  font-size: var(--fs-ui); line-height: 22px;
}
/* in the doc shell the bar carries the top slice of the hero band, so it is seamless at the top
   and stays a pale gradient strip while stuck */
.main > .topbar {
  padding: 0 var(--card-pad);
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  background-color: var(--cv-surface);
  background-image: var(--cv-grad-hero);
  background-size: 100% var(--hero-h);
  background-repeat: no-repeat;
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
/* outlined pill (measured upgrade pill: 40 high, padding 0 18, 14/22/600, #d6c2ff edge on white) */
.topbar-actions a, .topbar-actions button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--cv-lilac-strong); background-color: var(--cv-surface);
  color: var(--text); text-decoration: none; font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 22px;
  cursor: pointer; white-space: nowrap;
  transition: var(--cv-t-btn);
}
.topbar-actions a:hover, .topbar-actions button:hover {   /* 파생(미측정) */
  background-image: linear-gradient(var(--cv-tint-soft), var(--cv-tint-soft));
}

/* breadcrumb = measured hero tab pills (32 high, padding 4 10, 1px border, gap 8) */
.breadcrumb { display: flex; align-items: center; min-width: 0; gap: var(--space-2); color: var(--text-secondary); overflow: hidden; }
.breadcrumb a, .breadcrumb span:not(.sep) {
  display: inline-block; height: 32px; padding: 4px 10px;
  border: 1px solid var(--cv-lilac); border-radius: var(--radius-pill);
  background-color: var(--cv-surface); color: var(--cv-text-70);
  font-size: var(--fs-sm); font-weight: 600; line-height: 22px; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  transition: background-color .1s linear, border-color .1s linear, color .1s linear;
}
.breadcrumb a { flex: 0 0 auto; }
.breadcrumb a:hover { background-image: linear-gradient(var(--cv-tint-soft), var(--cv-tint-soft)); }  /* 파생(미측정) */
/* separator sits on the hero band: text-70 (6.02:1 on the light band top; text-60 was 4.26) */
.breadcrumb .sep { padding: 0; color: var(--text-secondary); }
/* span/a + attribute = (0,2,1): beats `.breadcrumb span:not(.sep)` above (measured active pill: 1px #8b3dff, #0f1015) */
.breadcrumb span[aria-current="page"], .breadcrumb a[aria-current="page"] {
  border-color: var(--cv-primary); color: var(--text);
  background-image: linear-gradient(var(--cv-tint), var(--cv-tint));
}
.breadcrumb a:focus-visible { outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  .breadcrumb .sep { color: var(--text); }        /* 대비 보정: dark text-70 on band 4.16, --text 6.69 */
  .main > .topbar { --focus-ring: #fff; }         /* 대비 보정: #a370fc on band 1.73–2.00, #fff 5.78 (pill 17.9) */
}

/* mobile menu button: 40×40 ghost icon button, radius 12 (viewer 390 icon buttons) */
.sidebar-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 40px; padding: 0;
  border: 0; border-radius: var(--radius-md); background: transparent;
  color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
  transition: var(--cv-t-btn);
}
.sidebar-toggle:hover { background: var(--cv-nav-tile); }   /* nav hover tile reused */
.sidebar-backdrop { display: none; }

/* 4. PAGE HEADER ------------------------------------------------------- */
/* .page = the docs page: 720 column + 80 side padding = 880 */
.page {
  width: 100%; max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-8);
}
/* header sits on the hero band painted by .main; no card of its own */
.page-header {
  position: relative;
  margin: 0 0 var(--space-7);
  padding: var(--space-7) 0 0;
  background: none;
}
.page-cover { height: 180px; border-radius: var(--radius-lg); background: var(--cv-grad-135); margin-bottom: var(--space-5); }
.page-icon {
  display: inline-grid; place-items: center;
  width: 56px; height: 56px;
  margin: 0 0 var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--cv-surface); box-shadow: var(--cv-shadow-low);
  font-family: var(--font-emoji); font-size: 32px; line-height: 1;
}
/* page title = docs H1: 48 / 700 / 1.4, margin-bottom 16 */
.page-title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: var(--fs-title); line-height: var(--lh-heading); font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
}
.page-meta {
  display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center;
  margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 22px;
}
.page-meta:empty { display: none; }

/* 5. PROSE BASE (details: assets/theme-prose.css) ---------------------- */
/* The panel is the white page; .prose is the 720px docs column on it. */
.prose {
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  font-size: var(--fs-prose);
  line-height: var(--lh-prose);
  color: var(--text);
  min-width: 0;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

/* 6. BLOCKS ------------------------------------------------------------ */
.table-wrap {
  width: 100%; overflow-x: auto; margin: 0 0 var(--space-4); -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md); box-shadow: var(--cv-shadow-ring);
}
.table-wrap > table { margin: 0; width: 100%; border: 0; }
table.table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); line-height: 22px; }
table.table th, table.table td {
  border-bottom: 1px solid var(--divider);
  padding: var(--space-2) var(--space-3); text-align: left; vertical-align: top; min-width: 96px;
}
table.table th { background: var(--bg-subtle); color: var(--text); font-weight: 600; }
table.table tr:last-child td { border-bottom: 0; }

/* callout: no measured docs equivalent; built from the measured tile (radius 16, tint bg, 14/22) */
.callout {
  display: flex; gap: var(--space-3); align-items: flex-start;
  margin: 0 0 var(--space-4); padding: var(--space-4);
  border-radius: var(--radius-lg); background: var(--gray-bg); color: var(--text);
}
.callout-icon {
  flex: 0 0 32px; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--radius); background: var(--cv-surface);
  font-family: var(--font-emoji); font-size: 18px; line-height: 1;
}
.callout-body { flex: 1 1 auto; min-width: 0; padding-top: 4px; }
.callout-body > :first-child { margin-top: 0; }
.callout-body > :last-child { margin-bottom: 0; }
.callout.brown  { background: var(--callout-brown);  color: var(--orange-ink); }
.callout.orange { background: var(--orange-bg); color: var(--orange-ink); }
.callout.yellow { background: var(--yellow-bg); color: var(--yellow-ink); }
.callout.green  { background: var(--green-bg);  color: var(--green-ink); }
.callout.blue   { background: var(--blue-bg);   color: var(--blue-ink); }
.callout.purple { background: var(--purple-bg); color: var(--purple-ink); }
.callout.red    { background: var(--red-bg);    color: var(--red-ink); }
.callout.teal   { background: var(--teal-bg);   color: var(--teal-ink-c); }
.callout.pink   { background: var(--pink-bg);   color: var(--pink-ink); }

.toggle { margin: 0 0 var(--space-4); border-radius: var(--radius-md); background: var(--cv-surface); box-shadow: var(--cv-shadow-ring); }
.toggle > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 40px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  font-weight: 600; transition: var(--cv-t-btn);
}
.toggle > summary::-webkit-details-marker { display: none; }
.toggle > summary::before {
  content: "›"; flex: 0 0 24px; height: 24px; display: grid; place-items: center;
  border-radius: var(--radius); color: var(--cv-primary-700);
  font-size: 18px; font-weight: 600; transition: transform .15s cubic-bezier(.35, 0, .58, 1);
}
.toggle[open] > summary::before { transform: rotate(90deg); }
.toggle > summary:hover { background: var(--cv-nav-tile); }
.toggle > .toggle-body { padding: 0 var(--space-4) var(--space-3) 44px; }

.page-link {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 52px; padding: var(--space-2) var(--space-4); margin: 0 0 var(--space-2); border-radius: var(--radius-lg);
  background: var(--cv-surface); box-shadow: var(--cv-shadow-ring);
  text-decoration: none; color: var(--text); font-size: var(--fs-sm); font-weight: 600; line-height: 22px;
  transition: box-shadow .1s linear;
}
.page-link:hover { box-shadow: var(--cv-shadow-mid); }   /* 파생(미측정) */
.page-link .icon { font-family: var(--font-emoji); font-size: 20px; line-height: 1; }
.page-link .label { flex: 1 1 auto; }

/* 7. CARDS / CHIPS / HERO ---------------------------------------------- */
.card {
  background: var(--cv-surface); border-radius: var(--radius-lg);
  box-shadow: var(--cv-shadow-ring); padding: var(--space-4);
}
a.card { display: block; text-decoration: none; color: inherit; transition: box-shadow .1s linear; }
a.card:hover { box-shadow: var(--cv-shadow-mid); }        /* 파생(미측정) */
.card-title { margin: 0 0 var(--space-1); font-family: var(--font-display); font-size: var(--fs-subtitle); font-weight: 600; line-height: 24px; }
.card-text { margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 22px; }
/* measured card grid: 196px columns, 24px gap both axes */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: var(--space-5); margin: 0 0 var(--space-4); }

.section-card {
  background: var(--cv-surface); border-radius: var(--radius-lg);
  box-shadow: var(--cv-shadow-ring); padding: var(--space-6);
  margin: 0 0 var(--space-7);
}
.section-card.teal, .section-card.blue, .section-card.pink,
.section-card.orange, .section-card.green { border-top: 0; }

/* hero / gradient band = measured hero band (pastel teal→violet fading to white, dark text) */
.hero, .gradient-band {
  position: relative; overflow: hidden;
  background-color: var(--cv-surface);
  background-image: var(--cv-grad-hero);
  background-size: 100% 100%;
  color: var(--text);
  border-radius: var(--radius-lg); padding: var(--space-7) var(--space-6);
  box-shadow: var(--cv-shadow-ring);
}
.gradient-band { padding: var(--space-5) var(--space-6); }
.hero h1, .hero h2, .hero p, .gradient-band h2, .gradient-band p { color: var(--text); margin-top: 0; }
/* measured hero heading: 24/32/600 gradient text */
.hero .hero-title {
  margin: 0 0 var(--space-3); font-size: var(--fs-title-ui); font-weight: 600; line-height: 32px;
  background-image: var(--cv-grad-heading); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero .hero-sub { margin: 0; font-size: var(--fs-body); line-height: 24px; color: var(--text-secondary); }

/* chips = measured tab pill geometry (32 high, padding 4 10, radius 9999, 14/22) */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 4px 10px;
  border: 1px solid var(--cv-lilac); border-radius: var(--radius-pill);
  background: var(--cv-surface); color: var(--cv-text-70);
  font-size: var(--fs-sm); font-weight: 600; line-height: 22px; white-space: nowrap;
  text-decoration: none;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cv-primary); }
.chip.purple { background: var(--purple-bg); color: var(--purple-ink); border-color: transparent; }
.chip.teal   { background: var(--teal-bg);   color: var(--teal-ink-c); border-color: transparent; }
.chip.blue   { background: var(--blue-bg);   color: var(--blue-ink); border-color: transparent; }
.chip.pink   { background: var(--pink-bg);   color: var(--pink-ink); border-color: transparent; }
.chip.orange { background: var(--orange-bg); color: var(--orange-ink); border-color: transparent; }
.chip.yellow { background: var(--yellow-bg); color: var(--yellow-ink); border-color: transparent; }
.chip.green  { background: var(--green-bg);  color: var(--green-ink); border-color: transparent; }
.chip.red    { background: var(--red-bg);    color: var(--red-ink); border-color: transparent; }
.chip.gray   { background: var(--gray-bg);   color: var(--gray-ink); border-color: transparent; }
.chip[class*=" "] .dot { background: currentColor; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* numbered badge = measured 28×28 primary circle, 12/20/600 */
.badge-num {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--cv-primary); color: var(--accent-text);
  font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; line-height: 20px;
  box-shadow: var(--cv-shadow-primary);
}

/* 8. FORMS ------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin: 0 0 var(--space-4); }
.field > label, .field-label { font-size: var(--fs-sm); font-weight: 600; line-height: 22px; color: var(--text); }
.field-hint { font-size: var(--fs-xs); line-height: 20px; color: var(--text-secondary); }
/* input: measured radius 12 + lilac glow; edge colour raised to 3:1 (contrast fix) */
.input {
  width: 100%; height: 48px; padding: 0 15px;
  font: inherit; font-size: var(--fs-body); line-height: 24px; color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  box-shadow: var(--cv-shadow-glow);
  transition: border-color .1s linear, box-shadow .1s linear;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--text-tertiary); }
.input:hover { border-color: var(--text-secondary); }
.input:focus, .input:focus-visible {
  border-color: var(--cv-primary);
  box-shadow: 0 0 0 1px var(--cv-primary), var(--cv-shadow-glow);
  outline: 2px solid transparent;
}

.checkbox-row {
  display: flex; align-items: center; gap: var(--space-2);
  margin: 0 0 var(--space-3); font-size: var(--fs-sm); line-height: 22px; color: var(--text); cursor: pointer; user-select: none;
  min-height: 28px;
}
.checkbox-row input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; margin: 0; flex: 0 0 20px;
  width: 20px; height: 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--input-bg);
  display: inline-grid; place-items: center; cursor: pointer;
  transition: background-color .1s linear, border-color .1s linear;
}
.checkbox-row input[type="checkbox"]::after {
  content: ""; width: 5px; height: 10px; margin-top: -2px;
  border: solid var(--accent-text); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transition: transform .1s linear;
}
.checkbox-row input[type="checkbox"]:checked { background: var(--cv-primary); border-color: var(--cv-primary); }
.checkbox-row input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
.checkbox-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (forced-colors: active) {
  .checkbox-row input[type="checkbox"] { -webkit-appearance: auto; appearance: auto; }
  .checkbox-row input[type="checkbox"]::after { display: none; }
}
.checkbox-row .hint { color: var(--text-secondary); font-size: var(--fs-xs); line-height: 20px; }

/* buttons: measured pill 9999 · height 40 · padding 0 16 · 14/22/600 · transitions .1s linear */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 40px; padding: 0 16px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 22px;
  color: var(--text); background-color: var(--cv-surface);
  border: 1px solid var(--cv-lilac-strong); border-radius: var(--radius-pill);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: var(--cv-t-btn);
}
.btn:hover { background-image: linear-gradient(var(--cv-tint-soft), var(--cv-tint-soft)); }  /* 파생(미측정) */
.btn:active { transform: scale(.98); }                                                     /* 파생(미측정) */
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary {
  color: var(--accent-text); background-color: var(--cv-primary); background-image: none;
  border-color: transparent; box-shadow: var(--cv-shadow-primary);
}
.btn-primary:hover { background-color: var(--cv-primary-700); background-image: none; }    /* 파생: 실측 단계색 */
.btn-primary:active { background-color: var(--cv-primary-800); }                           /* 파생: 실측 단계색 */
.btn-soft { background-color: var(--cv-tint-soft); color: var(--accent-ink); border-color: transparent; }
.btn-soft:hover { background-color: var(--cv-tint); background-image: none; }
.btn-block { width: 100%; }
/* ghost = measured text button (radius 12, 14/22/600, 85% text) */
.btn-ghost { background-color: transparent; border-color: transparent; border-radius: var(--radius-md); color: var(--cv-text-85); padding: 0 8px; }
.btn-ghost:hover { background-color: var(--cv-nav-tile); background-image: none; color: var(--text); }
.btn-lg { height: 48px; padding: 0 24px; font-size: var(--fs-body); line-height: 24px; }

.alert-error, .alert-ok {
  display: flex; gap: var(--space-2); align-items: flex-start;
  margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); font-size: var(--fs-sm); line-height: 22px; font-weight: 600;
}
.alert-error { background: var(--red-bg); color: var(--red-ink); }
.alert-ok { background: var(--green-bg); color: var(--green-ink); }

/* 9. AUTH -------------------------------------------------------------- */
/* page bg + hero band on top; one white card with the panel ring shadow */
.auth {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-7) var(--space-4);
  background-color: var(--cv-surface);   /* hero fades to white; avoids a seam at 277px */
  background-image: var(--cv-grad-hero);
  background-size: 100% var(--hero-h);
  background-repeat: no-repeat;
}
.auth-card {
  position: relative;
  width: 100%; max-width: 420px;
  padding: var(--space-7) var(--space-6) var(--space-6);
  background: var(--cv-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--cv-shadow-ring);
}
.auth-card::before { content: none; }
.auth-card .page-icon { display: grid; margin: 0 auto var(--space-4); width: 56px; height: 56px; font-size: 30px; }
/* measured hero heading: 24/32/600 with the heading gradient as text fill */
.auth-title {
  margin: 0 0 var(--space-2); text-align: center; font-family: var(--font-display);
  font-size: var(--fs-title-ui); font-weight: 600; line-height: 32px;
  background-image: var(--cv-grad-heading); -webkit-background-clip: text; background-clip: text;
  color: var(--text); -webkit-text-fill-color: transparent;
}
.auth-sub { margin: 0 0 var(--space-6); text-align: center; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 22px; }
.auth-card form { margin: 0; }
.auth-card .btn-primary { margin-top: var(--space-3); height: 48px; font-size: var(--fs-body); line-height: 24px; }
.auth-footer { margin: var(--space-5) 0 0; text-align: center; font-size: var(--fs-xs); line-height: 20px; color: var(--text-secondary); }
.auth-footer a { color: var(--link); font-weight: 600; }

/* 10. STATES / UTILITIES ---------------------------------------------- */
.muted { color: var(--text-secondary); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stack > * + * { margin-top: var(--space-4); }
.loading { display: flex; align-items: center; gap: var(--space-2); color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 600; }
.loading::before {
  content: ""; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%;
  border: 2px solid var(--cv-tint); border-top-color: var(--cv-primary);
  animation: cv-spin .8s linear infinite;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }
.skeleton {
  display: block; height: 1em; margin: .6em 0; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-subtle) 0%, var(--divider) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%; animation: cv-shimmer 1.4s ease infinite;
}
@keyframes cv-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.empty-state { text-align: center; padding: var(--space-7) var(--space-5); color: var(--text-secondary); }
.empty-state .empty-icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--space-3);
  border-radius: var(--radius-lg); background: var(--bg-subtle); font-family: var(--font-emoji); font-size: 30px;
}
.empty-state .empty-title { margin: 0 0 var(--space-1); color: var(--text); font-family: var(--font-display); font-size: var(--fs-subtitle); font-weight: 600; line-height: 24px; }
[hidden] { display: none !important; }
.skip-link {
  position: absolute; left: var(--space-3); top: var(--space-3); z-index: 100;
  height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: var(--radius-pill);
  background: var(--cv-primary); color: var(--accent-text); font-size: var(--fs-sm); font-weight: 600; text-decoration: none;
  box-shadow: var(--cv-shadow-primary);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* 11. RESPONSIVE ------------------------------------------------------- */
/* type breakpoints measured at 600/900/1200/1650; the rail→drawer switch (860) is kept from the
   existing JS contract because the measured rail→tab-bar width is 미측정 */
@media (max-width: 1100px) { :root { --gutter: 32px; } }   /* 파생: panel inner padding 32 */

@media (max-width: 860px) {
  :root {
    --gutter: 16px; --card-pad: 16px; --topbar-h: 49px;
    /* mobile docs scale: 파생(미측정) — docs ratios 48:42:33 scaled ×2/3 */
    --fs-title: 32px; --fs-h1: 32px; --fs-h2: 28px; --fs-h3: 22px; --fs-h4: 18px;
  }
  .app { background: var(--cv-surface); }      /* 390: body is white, no panel */
  .main { margin: 0; border-radius: 0; box-shadow: none; min-height: 100vh; min-height: 100dvh; }
  .main > .topbar { border-radius: 0; gap: var(--space-1); }
  .sidebar-toggle { display: inline-flex; }

  /* drawer (expanded panel 미측정): rows of 48px with the measured tile + 14/22/600 label */
  .sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; bottom: 0;
    width: min(300px, 86vw); flex-basis: auto;
    align-items: stretch;
    padding: var(--space-4) var(--space-3) var(--space-5);
    background: var(--cv-surface);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transform: translateX(-100%); visibility: hidden;
    transition: transform .2s ease-out, visibility 0s linear .2s;
    box-shadow: none;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0); visibility: visible; box-shadow: var(--cv-shadow-high);
    transition: transform .2s ease-out;
  }
  .sidebar-header { width: auto; justify-content: flex-start; gap: var(--space-3); padding: 0 var(--space-1); margin-bottom: var(--space-4); }
  .sidebar-header > span:not(.ws-icon) { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .sidebar-section { position: static; width: auto; height: auto; overflow: visible; clip: auto; padding: var(--space-2) var(--space-2) var(--space-1); }
  .sidebar-nav { align-items: stretch; gap: var(--space-1); }
  .sidebar-item {
    flex-direction: row; gap: var(--space-3); width: auto; min-height: 48px;
    padding: 6px var(--space-2) 6px 6px; border-radius: var(--radius-md);
    font-size: var(--fs-sm); font-weight: 600; line-height: 22px; letter-spacing: 0; text-align: left;
    transition: var(--cv-t-nav);
  }
  .sidebar-item .label { -webkit-line-clamp: 1; line-clamp: 1; }
  .sidebar-item:hover, .sidebar-item.active, .sidebar-item[aria-current="page"] { background: var(--cv-nav-tile); }
  .sidebar-item:hover .icon, .sidebar-item.active .icon, .sidebar-item[aria-current="page"] .icon { background: transparent; }
  .sidebar-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
  .sidebar-item:focus-visible .icon { outline: none; }
  .sidebar-item.indent { padding-left: 28px; }
  .sidebar-divider { flex: 0 0 auto; min-height: 0; height: 1px; margin: var(--space-3) var(--space-2); background: var(--divider); }

  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: #1c213080; opacity: 0; /* measured overlay token (light); usage 미추적 */ pointer-events: none; transition: var(--cv-t-layer);
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  body.sidebar-open { overflow: hidden; }

  .page { padding-bottom: var(--space-7); }
  .page-header { padding-top: var(--space-5); margin-bottom: var(--space-6); }
  .page-icon { width: 48px; height: 48px; font-size: 26px; border-radius: var(--radius-md); margin-bottom: var(--space-3); }
  .section-card { padding: var(--space-5) var(--space-4); }
  .hero { padding: var(--space-6) var(--space-4); }
  .auth-card { padding: var(--space-6) var(--space-4) var(--space-5); }
  .topbar-actions .hide-mobile { display: none; }
}

/* high-contrast safeguard: gradient-clipped titles fall back to the system text colour */
@media (forced-colors: active) {
  .auth-title, .hero .hero-title { -webkit-text-fill-color: currentColor; background-image: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .sidebar, .topbar, .sidebar-backdrop { display: none !important; }
  body, .app, .main { background: #fff; box-shadow: none; margin: 0; }
  .page { padding: 0; max-width: none; }
  .prose, .page-header, .section-card { box-shadow: none; padding: 0; background: none; }
}
