:root {
  color-scheme: light;
  --ink: #161e2d;
  --muted: #545e71;
  --soft: #5c677c;
  --canvas: #f7f8fb;
  --line: #e1e6ef;
  --blue: #2449d8;
  --blue-dark: #1a38aa;
  --blue-pale: #edf1ff;
  --white: #fff;
  font-family: Inter, "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 5; background: white; padding: 10px 14px; border-radius: 6px; }
.shell { width: min(1216px, calc(100% - 72px)); margin-inline: auto; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner, .brand, .topbar-tools, .private-label { display: flex; align-items: center; }
.topbar-inner { justify-content: space-between; gap: 16px; min-height: 65px; }
.brand { gap: 11px; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 6px); grid-template-rows: repeat(2, 6px); place-content: center; gap: 2px; width: 34px; height: 34px; background: var(--blue); border-radius: 8px; }
.brand-mark i { border: 1px solid white; border-radius: 1px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: white; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.045em; white-space: nowrap; }
.brand-divider { width: 1px; height: 17px; background: #dce1ec; margin-inline: 4px; }
.brand-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.topbar-tools { gap: 22px; font-size: 13px; font-weight: 650; }
.topbar-tools a { color: var(--muted); }
.topbar-tools a:hover { color: var(--blue-dark); }
.topbar-tools a span { margin-left: 3px; }
.private-label { gap: 7px; padding: 6px 10px; border-radius: 6px; background: #f0f2f7; color: #414d65; white-space: nowrap; }

.hero { display: grid; grid-template-columns: .75fr 1.65fr; gap: 36px; align-items: center; padding: 36px 0 32px; }
.hero-scope { display: flex; align-items: center; gap: 8px; color: var(--blue-dark); font-size: 13px; font-weight: 740; }
.scope-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px #e6ebff; margin: 0 2px 0 4px; }
.hero h1 { margin-top: 12px; font-size: clamp(45px, 5.15vw, 71px); line-height: 1.025; font-weight: 780; letter-spacing: -.073em; word-break: keep-all; }
.hero-copy p { max-width: 390px; margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.65; word-break: keep-all; }
.workflow { min-width: 0; position: relative; padding: 22px 22px 23px; border: 1px solid #dce4ff; border-radius: 15px; background: radial-gradient(circle, #c3cff0 1px, transparent 1.1px) 2px 2px / 13px 13px, linear-gradient(125deg, #f4f6ff, #e9eeff); }
.workflow-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.workflow-heading h2 { font-size: 15px; letter-spacing: -.03em; }
.workflow-heading > span { color: #465579; font-size: 12px; font-weight: 550; }
.stages { display: grid; grid-template-columns: repeat(7, minmax(82px, 1fr)); gap: 13px; overflow-x: auto; padding-bottom: 7px; }
.stage { position: relative; display: grid; justify-items: start; gap: 9px; min-width: 0; min-height: 86px; padding: 10px 8px 9px 10px; background: rgba(255, 255, 255, .93); border: 1px solid #d5dff8; border-radius: 9px; text-align: left; box-shadow: 0 2px 4px #2d4da60d; }
.stage:not(:last-child)::after { content: ""; position: absolute; z-index: 1; top: 50%; right: -14px; width: 13px; border-top: 1px solid #8599cf; pointer-events: none; }
.stage:hover, .stage[aria-pressed="true"] { background: #e9efff; border-color: #5977e3; }
.stage-number { font: 700 11px/1 ui-monospace, monospace; color: var(--blue-dark); background: #eaf0ff; border-radius: 5px; padding: 5px 6px; }
.stage[aria-pressed="true"] .stage-number { background: var(--blue); color: white; }
.stage-label { font-size: 13px; font-weight: 740; letter-spacing: -.04em; overflow-wrap: anywhere; }
.stage:last-child { border-color: #aebff7; }

.categories { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 31px; }
.category { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-width: 0; min-height: 74px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: white; text-align: left; }
.category:hover, .category[aria-pressed="true"] { border-color: #7890eb; background: #f7f9ff; }
.category[aria-pressed="true"] { box-shadow: inset 0 0 0 1px #7890eb; }
.category-name { display: block; font-size: 14px; font-weight: 760; letter-spacing: -.025em; }
.category-description { display: block; color: var(--soft); font-size: 12px; margin-top: 4px; line-height: 1.35; word-break: keep-all; }
.category-count { align-self: start; padding: 3px 5px; color: var(--muted); font: 700 11px/1.3 ui-monospace, monospace; border-radius: 5px; background: #f2f4f8; }
.type-icon { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: #2548ba; background: #edf1ff; }
.type-icon.token { color: #6342ac; background: #f2edfc; }
.type-icon.component { color: #116957; background: #e7f5f0; }
.type-icon.skill { color: #9b6914; background: #fff6df; font-size: 27px; line-height: 1; }
.type-icon.role { color: #96501f; background: #fff0e4; }
.type-icon::before, .type-icon::after { content: ""; position: absolute; }
.type-icon.connection::before { width: 12px; height: 6px; border: 1.5px solid currentColor; border-radius: 5px; transform: translate(-3px, 3px) rotate(-45deg); }
.type-icon.connection::after { width: 12px; height: 6px; border: 1.5px solid currentColor; border-radius: 5px; transform: translate(3px, -3px) rotate(-45deg); }
.type-icon.token::before { width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; transform: rotate(45deg); }
.type-icon.component::before { width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 2px; background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat, linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }
.type-icon.role::before { width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; top: 9px; }
.type-icon.role::after { width: 13px; height: 6px; border: 1.5px solid currentColor; border-radius: 8px 8px 3px 3px; bottom: 8px; }

.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 274px; gap: 24px; align-items: start; }
.catalog { min-width: 0; }
.catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.catalog-heading h2 { font-size: 25px; letter-spacing: -.055em; }
.result-count { color: var(--muted); font-size: 12px; font-weight: 650; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(106px, 130px) minmax(106px, 130px); gap: 8px; margin-bottom: 13px; }
.search-field, .select-field { position: relative; min-width: 0; }
.search-field .icon { position: absolute; left: 13px; top: 15px; pointer-events: none; color: var(--muted); }
.search-field input, .select-field select { width: 100%; height: 44px; border: 1px solid #dce2ed; border-radius: 8px; background: white; color: var(--ink); font-size: 13px; }
.search-field input { padding: 0 12px 0 37px; }
.search-field input::placeholder { color: var(--soft); }
.select-field select { appearance: none; padding: 0 24px 0 11px; cursor: pointer; text-overflow: ellipsis; }
.select-field::after { position: absolute; content: ""; top: 17px; right: 13px; width: 6px; height: 6px; transform: rotate(45deg); border-right: 1.5px solid #596782; border-bottom: 1.5px solid #596782; pointer-events: none; }
.active-filters { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 3px 0 11px; }
.filter-labels { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.filter-chip { max-width: 100%; padding: 3px 8px; border: 1px solid #dce4ff; border-radius: 5px; background: #eff3ff; color: var(--blue-dark); font-size: 12px; overflow-wrap: anywhere; }
.text-button { background: transparent; border: 0; padding: 4px 0; color: var(--blue-dark); font-weight: 700; font-size: 13px; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.catalog-labels { display: grid; grid-template-columns: minmax(0, 1fr) 181px; gap: 12px; padding: 0 16px 8px; color: var(--muted); font-size: 11px; font-weight: 750; }
.entries { display: grid; gap: 7px; }
.entry { border: 1px solid var(--line); border-radius: 10px; background: white; min-width: 0; scroll-margin: 14px; }
.entry[open] { border-color: #a5b6f2; box-shadow: 0 3px 13px #1f39800a; }
.entry summary { position: relative; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 155px 14px; align-items: center; gap: 10px; min-height: 63px; padding: 10px 15px; cursor: pointer; border-radius: 9px; }
.entry summary::-webkit-details-marker { display: none; }
.entry summary:hover { background: #f7f9ff; }
.entry[open] summary { background: #f5f7ff; border-bottom: 1px solid #e1e8ff; border-radius: 9px 9px 0 0; }
.entry-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.entry-title .type-icon { width: 33px; height: 33px; }
.entry-title .role::before { top: 7px; }
.entry-title .role::after { bottom: 7px; }
.entry-title strong { display: block; color: var(--ink); font-size: 14px; font-weight: 740; letter-spacing: -.018em; overflow-wrap: anywhere; }
.entry-meta { display: block; margin-top: 3px; color: var(--soft); font-size: 11px; overflow-wrap: anywhere; }
.badges { display: flex; align-items: center; gap: 4px; }
.badge { display: inline-flex; align-items: center; white-space: nowrap; padding: 4px 7px; border-radius: 5px; font-size: 11px; line-height: 1.3; font-weight: 750; }
.badge.external { color: #2347ae; background: #e9efff; }
.badge.internal { color: #3e5168; background: #edf1f5; }
.badge.gate { color: #8d490b; background: #fff0db; }
.badge.routine { color: #3d6055; background: #ebf4ef; }
.chevron { justify-self: center; display: inline-block; width: 7px; height: 7px; border-right: 1.5px solid #4d5c75; border-bottom: 1.5px solid #4d5c75; transform: translateY(-2px) rotate(45deg); }
.entry[open] .chevron { transform: translateY(2px) rotate(225deg); }

.entry-body { padding: 17px; font-size: 13px; line-height: 1.65; }
.entry-description { color: #3e4b62; margin-bottom: 14px; word-break: keep-all; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 16px; padding: 13px; border: 1px solid #e9edf6; border-radius: 8px; background: #f8f9fc; }
.facts dt { font-size: 11px; font-weight: 750; color: var(--muted); }
.facts dd { margin-top: 2px; overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }
.relations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.relations h3 { font-size: 13px; margin-bottom: 6px; }
.relations ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.relations li { min-width: 0; }
.relation-link { display: block; padding: 7px 9px; border: 1px solid #e1e7f4; border-radius: 6px; font-size: 12px; color: var(--blue-dark); overflow-wrap: anywhere; }
.relation-link:hover { background: #f2f5ff; border-color: #b3c1f4; }
.relation-link strong { display: block; font-weight: 730; }
.relation-link span { display: block; margin-top: 1px; color: var(--muted); }
.none { color: var(--muted); font-size: 12px; }
.reference { display: inline-block; margin-top: 14px; color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.reference:hover { text-decoration: underline; }
.empty-state { text-align: center; padding: 38px 14px; background: white; border: 1px dashed #d4dceb; border-radius: 10px; font-size: 14px; }
.empty-state p { color: var(--muted); margin: 6px 0; font-size: 13px; }

.policy { position: sticky; top: 16px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.policy-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.policy-heading h2 { font-size: 16px; letter-spacing: -.035em; }
.policy-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #eef2ff; color: var(--blue-dark); }
.policy p { color: var(--muted); font-size: 12px; line-height: 1.55; word-break: keep-all; }
.policy-lead { padding-bottom: 12px; border-bottom: 1px solid #e9edf5; }
.policy-block { margin-top: 12px; }
.policy-block p { margin-top: 4px; }
.policy-action { display: flex; justify-content: space-between; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; margin-top: 13px; border: 1px solid #dce4ff; border-radius: 7px; background: #f3f6ff; color: var(--blue-dark); text-align: left; font-size: 12px; font-weight: 740; }
.policy-action:hover { background: #e9efff; }
.policy-note { margin-top: 12px; padding: 9px; border-radius: 7px; background: #f2f5fb; }
.policy-note strong { display: block; color: #394861; font-size: 12px; margin-bottom: 3px; }
.footer { display: flex; align-items: center; gap: 10px; margin-top: 34px; padding-block: 17px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer strong { color: var(--ink); letter-spacing: -.03em; }

.icon { position: relative; display: inline-block; width: 13px; height: 13px; flex: none; }
.icon::before, .icon::after { position: absolute; content: ""; }
.icon-lock::before { left: 1px; right: 1px; bottom: 0; height: 7px; border: 1.4px solid currentColor; border-radius: 2px; }
.icon-lock::after { left: 3px; right: 3px; top: 0; height: 6px; border: 1.4px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; }
.icon-search::before { width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; left: 0; top: 0; }
.icon-search::after { width: 5px; height: 1.5px; background: currentColor; transform: rotate(45deg); right: -1px; bottom: 0; }

@media (max-width: 1040px) {
  .shell { width: calc(100% - 48px); }
  .hero { gap: 22px; }
  .workflow { padding-inline: 15px; }
  .workbench { grid-template-columns: minmax(0, 1fr) 238px; gap: 16px; }
  .category { gap: 8px; padding-inline: 9px; }
}
@media (max-width: 800px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .policy { position: static; }
  .hero { grid-template-columns: 1fr; gap: 20px; padding: 29px 0 20px; }
  .hero h1 br { display: none; }
  .hero-copy p { max-width: 540px; }
  .categories { margin-bottom: 23px; }
}
@media (max-width: 590px) {
  .shell { width: calc(100% - 30px); }
  .topbar-inner { min-height: 56px; flex-wrap: wrap; gap: 5px 8px; padding-block: 7px; }
  .brand-divider, .brand-label { display: none; }
  .topbar-tools { gap: 12px; }
  .hero h1 { font-size: clamp(36px, 9vw, 47px); }
  .hero-copy p { font-size: 14px; }
  .workflow { padding: 13px 10px; }
  .workflow-heading { margin: 0 2px 10px; }
  .stages { gap: 7px; }
  .stage { min-height: 62px; padding: 6px; gap: 4px; }
  .stage:not(:last-child)::after { width: 7px; right: -8px; }
  .stage-label { font-size: 12px; }
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .category { min-height: 66px; gap: 7px; padding-inline: 8px; }
  .category-description { font-size: 11px; }
  .category .type-icon { width: 30px; height: 32px; }
  .category .role::before { top: 7px; }
  .category .role::after { bottom: 7px; }
  .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .catalog-labels { display: none; }
  .entry summary { grid-template-columns: minmax(0, 1fr) 14px; gap: 5px 8px; padding: 9px 10px; }
  .entry-title { gap: 7px; }
  .entry summary > .badges { grid-column: 1; grid-row: 2; margin-left: 40px; flex-wrap: wrap; }
  .entry summary > .chevron { grid-column: 2; grid-row: 1 / 3; }
  .entry-body { padding: 12px; }
  .facts, .relations { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 370px) {
  .brand { gap: 7px; }
  .brand-name { font-size: 16px; }
  .topbar-tools { gap: 8px; font-size: 12px; }
}

/* Recent Markdown activity */
.activity-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--blue-pale); color: var(--blue-dark); font: 750 11px/1 ui-monospace, monospace; flex: none; }
.activity-count { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-item { padding: 15px 0; border-bottom: 1px solid #e9edf5; }
.activity-person { display: flex; align-items: center; gap: 7px; font-size: 12px; overflow-wrap: anywhere; }
.activity-avatar { display: grid; place-items: center; flex: none; width: 25px; height: 25px; border-radius: 50%; background: #edf1ff; color: var(--blue-dark); font: 700 10px/1 ui-monospace, monospace; }
.activity-item time { display: block; margin: 5px 0 8px 32px; color: var(--soft); font-size: 11px; }
.md-activity .activity-summary { color: var(--ink); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.activity-file { display: block; margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--soft); overflow-wrap: anywhere; }
.activity-commit { display: inline-block; margin-top: 7px; color: var(--blue-dark); font: 600 11px/1.5 ui-monospace, monospace; }
.activity-commit:hover, .activity-footer a:hover { text-decoration: underline; }
.activity-footer { padding-top: 14px; }
.activity-footer a { display: inline-block; color: var(--blue-dark); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.md-activity .activity-footer p { font-size: 11px; margin-top: 4px; }
.activity-empty { padding: 20px 0; }
.md-activity { max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (max-width: 800px) { .md-activity { max-height: none; overflow: visible; } }

.figma-link-panel { padding: 16px; margin: 16px 0; background: #f4f7ff; border: 1px solid #dce4ff; border-radius: 9px; }
.figma-link-panel h3 { font-size: 14px; margin-bottom: 10px; }
.figma-link-panel label { display: block; color: var(--muted); font-size: 12px; font-weight: 650; margin-bottom: 6px; }
.figma-link-controls { display: flex; gap: 8px; }
.figma-link-controls input { min-width: 0; width: 100%; height: 44px; padding: 0 12px; border: 1px solid #ccd6ec; border-radius: 7px; background: white; color: var(--ink); font-size: 13px; }
.figma-link-controls input[aria-invalid="true"] { border-color: #b42318; }
.figma-link-controls button { flex: none; min-height: 44px; padding: 0 15px; border: 0; border-radius: 7px; background: var(--blue); color: white; font-weight: 700; font-size: 13px; }
.figma-link-controls button:hover { background: var(--blue-dark); }
#figma-link-help, #library-link-help { margin-top: 8px; color: var(--muted); font-size: 12px; }
.figma-link-status { margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; }
.figma-link-status:empty { display: none; }
.figma-link-status[data-state="error"] { color: #b42318; }
.figma-link-status[data-state="success"] { color: #116957; }
.figma-link-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 8px; }
.figma-link-actions a { color: var(--blue-dark); font-size: 13px; font-weight: 700; }
@media (max-width: 590px) { .figma-link-controls { flex-direction: column; } .figma-link-panel { padding: 12px; } }

.figma-setup { margin: 18px 0 0; }
.figma-setup > h3 { font-size: 15px; margin-bottom: 6px; }
.figma-setup-intro { color: var(--muted); font-size: 12px; }
.figma-setup-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.figma-setup-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfe; }
.figma-setup-number { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; background: #eaf0ff; color: var(--blue-dark); border-radius: 6px; font: 700 11px/1 ui-monospace, monospace; }
.figma-setup-steps h4 { font-size: 13px; margin: 2px 0 6px; }
.figma-setup-steps p { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.figma-setup-guide { display: inline-flex; align-items: center; min-height: 38px; margin-top: 8px; padding: 5px 10px; border: 1px solid #dce4ff; border-radius: 6px; background: white; color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.figma-setup-guide:hover { background: var(--blue-pale); }
.figma-setup-steps .figma-setup-note { margin-top: 8px; padding: 8px 10px; background: #eef2fa; border-radius: 6px; }
.figma-link-panel h3 { display: flex; align-items: center; gap: 10px; }

.entry-editor { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.entry-editor > span { color: var(--muted); }
.entry-editor > strong { font-weight: 700; }
.entry-editor > time { margin-left: auto; color: var(--soft); font-size: 11px; }

.library-manager { margin-top: 18px; }
.library-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.library-heading h3 { font-size: 15px; }
.library-heading h3 span { margin-left: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.library-heading p, .library-storage-note { color: var(--muted); font-size: 12px; line-height: 1.65; }
.library-heading p { margin-top: 5px; }
.library-primary, .library-secondary { flex: none; min-height: 40px; padding: 8px 13px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.library-primary { border: 1px solid var(--blue); background: var(--blue); color: white; }
.library-primary:hover { background: var(--blue-dark); }
.library-secondary { background: white; border: 1px solid #d5ddef; }
.library-storage-note { margin: 12px 0; padding: 10px 12px; border-radius: 7px; background: #f3f6fc; }
.library-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--blue-dark); font-size: 12px; }
.library-notice:has(#library-status:empty):has(#library-undo[hidden]) { display: none; }
.library-notice[data-state="error"] { color: #b42318; }
.library-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.library-card { min-width: 0; padding: 14px; border: 1px solid #dce3f0; border-radius: 9px; background: white; }
.library-kind { display: inline-block; padding: 3px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; background: #eef1f6; color: var(--muted); }
.library-kind.style { background: #f2edfc; color: #6342ac; }
.library-kind.design { background: #e7f5f0; color: #116957; }
.library-kind.combined { background: #edf1ff; color: #2548ba; }
.library-card h4 { margin: 10px 0 5px; font-size: 14px; overflow-wrap: anywhere; }
.library-card-description { color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.library-url { margin-top: 8px; color: var(--soft); font-size: 11px; overflow-wrap: anywhere; }
.library-card-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.library-card-actions a { color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.library-card-actions .text-button { font-size: 12px; min-height: 36px; }
.library-card-actions .library-delete { color: #925050; }
.library-card-editor { gap: 4px 7px; margin-top: 8px; padding-top: 10px; font-size: 10px; }
.library-card-editor time { flex-basis: 100%; margin-left: 0; font-size: 10px; }
.library-empty { padding: 24px 15px; border: 1px dashed #d5ddef; border-radius: 8px; margin-top: 12px; text-align: center; color: var(--muted); font-size: 12px; }
.library-editor { margin-top: 14px; padding: 16px; background: #f5f7ff; border: 1px solid #dce4ff; border-radius: 9px; }
.library-editor > h4 { margin: 0 0 12px; font-size: 14px; }
.library-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.library-fields > div { min-width: 0; }
.library-wide { grid-column: 1 / -1; }
.library-fields label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 5px; color: var(--muted); }
.library-fields input, .library-fields select, .library-fields textarea { display: block; width: 100%; min-width: 0; min-height: 42px; border: 1px solid #ccd6ec; border-radius: 6px; padding: 9px 10px; background: white; color: var(--ink); font: inherit; font-size: 12px; }
.library-fields textarea { resize: vertical; }
.library-fields [aria-invalid="true"] { border-color: #b42318; }
.library-optional { margin-left: 4px; font-size: 10px; font-weight: 400; }
.library-field-help { margin-top: 4px; font-size: 11px; color: var(--muted); }
.library-form-actions { display: flex; gap: 8px; margin-top: 12px; }
@media (max-width: 590px) { .library-list, .library-fields { grid-template-columns: minmax(0, 1fr); } .library-heading { flex-direction: column; } .library-heading > button { align-self: flex-start; } }

.library-editor .library-fields { grid-template-columns: minmax(0, 1fr); }
.library-card .library-url { margin-top: 12px; }

.desktop-setup .desktop-client-help { margin-top: 8px; }
.desktop-server { display: grid; gap: 7px; padding: 10px 12px; margin-top: 10px; border: 1px solid #e0e6f2; background: white; border-radius: 6px; font-size: 12px; }
.desktop-server > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
.desktop-server dt { color: var(--muted); }
.desktop-server dd { overflow-wrap: anywhere; }
.desktop-server code { font-size: 11px; }
.desktop-read-prompt { display: block; width: 100%; min-height: 110px; margin: 10px 0; padding: 12px; border: 1px solid #cfd9f1; border-radius: 7px; background: white; color: var(--ink); font: inherit; font-size: 12px; line-height: 1.7; resize: vertical; }
.desktop-scope-note { margin-top: 12px; color: var(--muted); font-size: 12px; }

.badge.connection-needed { color: #8d490b; background: #fff0db; }
.badge.connection-ready { color: #116957; background: #e7f5f0; }
.connection-state { padding: 14px; margin-top: 16px; border: 1px solid #e0e6f2; border-radius: 8px; background: #fafbfe; }
.connection-state h3 { font-size: 13px; margin-bottom: 6px; }
.connection-state p { font-size: 12px; color: var(--muted); }
.connection-state .connection-state-help { margin-top: 5px; font-size: 11px; }
.connection-state-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
.connection-state .connection-feedback { margin-top: 8px; font-size: 11px; }
.connection-feedback:empty { display: none; }

/* Design requirements workspace */
.req-heading { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.req-eyebrow { display: block; color: var(--blue-dark); font: 700 10px/1.5 ui-monospace, monospace; letter-spacing: .1em; margin-bottom: 6px; }
.req-heading h2 { font-size: clamp(22px, 3vw, 29px); letter-spacing: -.05em; }
.req-heading p { font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 7px; }
.req-status { flex: none; padding: 6px 10px; background: #eef1f7; color: #536078; border-radius: 6px; font-size: 11px; font-weight: 750; }
.req-status[data-state="ready"] { background: #e7f5f0; color: #116957; }
.req-storage-note { font-size: 12px; line-height: 1.6; padding: 12px 14px; margin-bottom: 16px; border: 1px solid #e0e6f1; border-radius: 8px; background: #f0f3fa; color: var(--muted); }
.req-document-picker { display: flex; gap: 10px; align-items: flex-end; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.req-document-picker > div { flex: 1; min-width: 0; }
.req-document-picker label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.req-document-picker select { width: 100%; min-height: 42px; border: 1px solid #d2dbed; background: white; border-radius: 7px; padding: 8px 10px; font-size: 13px; color: var(--ink); }
.req-feedback { font-size: 12px; color: var(--blue-dark); line-height: 1.7; margin: 10px 0; overflow-wrap: anywhere; }
.req-feedback:empty { display: none; }
.req-feedback[data-state="error"] { color: #b42318; }
.req-errors { padding: 14px 16px; border: 1px solid #f3c4bf; border-radius: 8px; background: #fff5f3; color: #922b20; font-size: 12px; line-height: 1.7; margin: 12px 0; }
.req-errors ul { margin: 5px 0 0; padding-left: 18px; }
.req-section { background: white; border: 1px solid var(--line); border-radius: 11px; padding: 18px; margin-top: 12px; }
.req-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.req-section-title > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 6px; background: #edf1ff; color: var(--blue-dark); font: 700 10px/1 ui-monospace, monospace; }
.req-section-title h3 { font-size: 15px; letter-spacing: -.025em; }
.req-section-title > button { margin-left: auto; font-size: 12px; }
.req-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.req-field { min-width: 0; }
.req-field label { display: block; color: #46536a; font-size: 12px; font-weight: 650; margin-bottom: 7px; }
.req-required { margin-left: 4px; font-size: 10px; font-weight: 400; color: var(--soft); }
.req-field input, .req-field textarea, .req-field select { display: block; width: 100%; min-width: 0; min-height: 42px; border: 1px solid #d4ddec; border-radius: 7px; padding: 10px 11px; background: white; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.6; }
.req-field textarea { resize: vertical; min-height: 90px; }
.req-field input::placeholder, .req-field textarea::placeholder { color: #7a8597; }
.req-field [aria-invalid="true"] { border-color: #b42318; }
.req-wide { grid-column: 1 / -1; }
.req-dates { margin-top: 12px; color: var(--soft); font-size: 10px; line-height: 1.7; }
.req-section-help { font-size: 12px; color: var(--muted); line-height: 1.65; margin: -4px 0 12px; }
.req-screen { min-width: 0; padding: 14px; border: 1px solid #e0e6f3; border-radius: 8px; background: #f8faff; margin: 12px 0 0; }
.req-screen legend { padding: 0 5px; font-size: 12px; font-weight: 750; color: var(--blue-dark); }
.req-remove-screen { display: block; margin: 8px 0 0 auto; color: #935150; font-size: 11px; }
.req-actions { position: sticky; bottom: 0; z-index: 2; padding: 14px; margin-top: 16px; background: rgba(255,255,255,.97); border: 1px solid #dce3f2; border-radius: 10px; box-shadow: 0 -4px 20px #263a7508; }
.req-actions > div { display: flex; gap: 8px; flex-wrap: wrap; }
.req-actions > p { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.req-context-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 18px; background: #eff3ff; border: 1px solid #dce4ff; border-radius: 9px; }
.req-context-inner strong { color: var(--blue-dark); font-size: 12px; }
.req-context-inner p { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 4px; overflow-wrap: anywhere; }
.req-context-inner button { font-size: 12px; flex: none; }
@media (max-width: 590px) { .req-heading { gap: 8px; } .req-fields { grid-template-columns: minmax(0, 1fr); } .req-section { padding: 14px; } .req-document-picker { flex-wrap: wrap; } .req-document-picker > div { flex-basis: 100%; } .req-context-inner { align-items: flex-start; } .req-status { padding: 5px 7px; font-size: 10px; } }

.req-reference-controls { display: flex; gap: 8px; align-items: stretch; }
.req-reference-controls input { flex: 1; min-width: 0; }
@media (max-width: 590px) { .req-reference-controls { flex-direction: column; } }

/* Requirements Git publication workflow */
.git-progress { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 4px 0 14px; }
.git-progress li { min-width: 0; padding: 10px 7px; border: 1px solid #dfe5f1; border-radius: 8px; background: #f8f9fc; }
.git-progress li > span { display: block; color: var(--soft); font: 700 10px/1 ui-monospace, monospace; margin-bottom: 8px; }
.git-progress strong { display: block; font-size: 11px; letter-spacing: -.03em; }
.git-progress small { display: block; font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: 5px; overflow-wrap: anywhere; }
.git-progress li[data-state="done"] { border-color: #bbdfd3; background: #f0f8f4; }
.git-progress li[data-state="done"] > span { color: #116957; }
.git-server-banner { padding: 12px; border: 1px solid #e2e7f1; border-radius: 8px; background: #f6f8fd; }
.git-server-banner p { margin: 7px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }
#git-settings { margin-top: 14px; border: 1px solid #dfe6f4; border-radius: 8px; padding: 12px; }
#git-settings > summary, #git-preview > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--blue-dark); }
.git-target-fields { margin-top: 14px; }
.git-target-fields .req-section-help { margin: 5px 0 0; font-size: 11px; }
.git-base-note { grid-column: 1 / -1; font-size: 11px; color: var(--muted); padding: 9px 11px; background: #f1f4fa; border-radius: 6px; }
.git-request-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.git-request-actions button { font-size: 11px; }
#req-git-workflow button:disabled { opacity: .5; cursor: not-allowed; }
#git-message { white-space: pre-line; }
#git-preview { border: 1px solid var(--line); padding: 12px; border-radius: 8px; margin-top: 12px; }
#git-markdown { display: block; width: 100%; margin-top: 10px; padding: 12px; border: 1px solid #d6dfee; border-radius: 6px; background: #fafbfe; color: var(--ink); font: 11px/1.7 ui-monospace, monospace; resize: vertical; }
.git-receipt { margin-top: 12px; padding: 13px; border: 1px solid #cddcf5; border-radius: 8px; background: #f5f8ff; }
.git-receipt > strong { font-size: 13px; }
.git-receipt p { font-size: 11px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.git-receipt > div { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.git-receipt a { color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.git-receipt small { color: var(--soft); font-size: 10px; }
.git-receipt .git-stale-note { color: #8d490b; }
.git-review-note { font-size: 11px; color: var(--muted); line-height: 1.7; margin-top: 12px; }
@media (max-width: 590px) { .git-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); } .git-progress li:last-child { grid-column: 1 / -1; } }

.req-document-mode { margin-top: 6px; font-size: 11px; color: var(--muted); }
.req-viewports { min-width: 0; padding: 14px; margin: 0; border: 1px solid #dce3f1; border-radius: 8px; background: #f8faff; }
.req-viewports > legend { padding: 0 6px; color: #46536a; font-size: 12px; font-weight: 650; }
.req-viewport-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.req-viewport-option { padding: 12px; border: 1px solid #dce4f4; border-radius: 7px; background: white; }
.req-viewport-option > label:not(.req-viewport-toggle) { display: block; margin: 9px 0 5px; font-size: 11px; color: var(--muted); }
.req-viewport-toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; cursor: pointer; }
.req-viewport-toggle input { width: 17px; height: 17px; accent-color: var(--blue); }
.req-viewport-option > input[type=number] { display: block; width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #ccd6ec; border-radius: 6px; background: white; color: var(--ink); font-size: 13px; }
.req-viewport-option > input:disabled { background: #f1f3f7; color: #929bab; }
.req-viewports [aria-invalid=true], .req-viewports[aria-invalid=true] { border-color: #b42318; }
.req-viewport-summary { margin-top: 10px; font-size: 11px; color: var(--blue-dark); }
#req-viewport-additional-wrap { margin-top: 12px; }
#req-basic-section { scroll-margin-top: 16px; }
@media (max-width: 590px) { .req-viewport-grid { grid-template-columns: minmax(0, 1fr); } }

.req-document-picker { display: grid; grid-template-columns: minmax(0, 1fr) 120px; align-items: stretch; gap: 8px 10px; }
.req-document-picker > label { grid-column: 1 / -1; margin-bottom: 0; }
.req-document-picker > select { grid-column: 1; grid-row: 2; min-height: 44px; height: 44px; }
.req-document-picker > #req-new { grid-column: 2; grid-row: 2; width: 120px; min-height: 44px; height: 44px; padding: 0 16px; white-space: nowrap; }
.req-document-picker > .req-document-mode { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 380px) { .req-document-picker { grid-template-columns: minmax(0, 1fr) 104px; } .req-document-picker > #req-new { width: 104px; } }

.req-work-types { border: 0; margin: 0; padding: 0; min-width: 0; }
.req-work-types legend { color: var(--muted); font-size: 12px; font-weight: 700; }
.req-work-type-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.req-work-type-options .req-work-type { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; color: var(--ink); font-size: 13px; }
.req-work-type input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: #2645cf; }
.req-work-type:has(input:checked) { background: #eef2ff; border-color: #92a3ed; }

.req-mobile-setting { justify-content: center; }
.req-mobile-setting .req-viewport-toggle { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
.req-mobile-setting input[type=checkbox] { width: 17px; height: 17px; min-height: 0; padding: 0; }
#req-viewports .req-section-help { margin-top: 6px; }

.req-screen-criteria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.req-device-criteria { min-width: 0; border: 0; margin: 0; padding: 0; }
.req-device-criteria legend { margin-bottom: 14px; }
.req-device-criteria input:disabled { background: #f1f3f7; color: #929bab; }
@media (max-width: 590px) { .req-screen-criteria { grid-template-columns: minmax(0, 1fr); } }

.req-policy-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; padding-left: 20px; margin: 16px 0; }
.req-policy-list li { padding-left: 3px; font-size: 13px; line-height: 1.7; }
.req-policy-list li::marker { color: var(--blue); font-weight: 700; }
.req-policy-list p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.req-layout-reference { padding: 12px 14px; background: #f5f7ff; border-radius: 8px; margin: 14px 0 18px; font-size: 12px; line-height: 1.7; }
.req-layout-reference p { margin-top: 4px; color: var(--muted); }
.req-layout-reference #req-layout-viewports { color: var(--blue-dark); }
@media (max-width: 590px) { .req-policy-list { grid-template-columns: minmax(0, 1fr); } }

#design-library-manager { margin-bottom: 24px; }
.library-unit { min-width: 0; }
.library-unit h4 { margin: 12px 0; font-size: 14px; }
.library-unit h4 span { color: var(--muted); font-size: 12px; }
.library-unit .library-card { margin-bottom: 10px; }

#library-form-slot .library-manager { margin-top: 0; }
#library-form-slot .library-heading h3 { font-size: 14px; }

.library-overview { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.library-overview-title { color: var(--muted); font-size: 11px; font-weight: 600; }
.library-overview .library-list { margin-top: 6px; gap: 12px; }
.library-overview .library-unit h4 { margin: 4px 0 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.library-overview .library-unit h4 span { font-size: 12px; color: var(--ink); }
.library-overview .library-card { padding: 10px; font-size: 12px; }

.req-story-upload { margin:16px 0; padding:14px; border:1px dashed #cdd7ed; border-radius:8px; }
.req-story-upload > label { display:block; font-size:12px; font-weight:700; margin-bottom:10px; }
.req-story-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.req-story-card { min-width:0; padding:14px; border:1px solid var(--line); border-radius:8px; font-size:12px; overflow-wrap:anywhere; }
.req-story-card strong { display:block; margin-bottom:10px; }
.req-story-card img { width:100%; max-height:280px; object-fit:contain; background:#f5f7fc; }
.req-story-card p { color:var(--muted); margin:8px 0; }
.req-story-card > button { display:block; margin-top:12px; }
@media(max-width:590px) { .req-story-list { grid-template-columns:minmax(0,1fr); } }

.concept-screen-stack { display: flex; flex-direction: column; gap: 18px; margin: 18px 0; }
.concept-media { border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 12px 0; }
.concept-media h4 { font-size: 14px; margin-bottom: 12px; }
.concept-media > label { display: block; color: var(--muted); font-size: 12px; margin: 12px 0; }
.concept-media input[type=file] { display: block; margin-top: 8px; max-width:100%; }
.concept-media-list { display: flex; flex-direction: column; gap: 10px; margin-top:12px; }
.concept-sync-controls { margin:16px 0; font-size:12px; }
.concept-sync-controls select { display:block; margin:6px 0; padding:9px; border:1px solid var(--line); border-radius:6px; }
.concept-unassigned-item { margin: 12px 0; padding:12px; border:1px dashed #ccd6ec; border-radius:8px; }
.concept-unassigned-item select { display:block; width:100%; margin:8px 0; padding:10px; }
#req-unassigned-media { margin:18px 0; }

.figma-job-panel { padding:16px; margin:18px 0; background:#f4f6ff; border:1px solid var(--line); border-radius:8px; font-size:12px; }
.figma-job-panel h4 { font-size:14px; margin-bottom:8px; }
.figma-job-panel > label { display:block; margin:12px 0; }
.figma-job-panel input { display:block; width:100%; padding:10px; margin-top:6px; border:1px solid var(--line); border-radius:6px; }
.figma-job-panel img { max-width:100%; max-height:350px; object-fit:contain; }
.figma-job-panel [data-figma-message] { margin-top:12px; color:var(--muted); }

.design-target,.design-production-card,.design-notice { padding:16px; border:1px solid var(--line); border-radius:8px; margin:14px 0; }
.design-target strong,.design-production-card h4,.design-notice h4 { display:block; margin-bottom:12px; font-size:14px; }
#req-design-workspace label { display:block; font-size:12px; color:var(--muted); margin:10px 0; }
#req-design-workspace input:not([type=checkbox]),#req-design-workspace textarea,#req-design-workspace select { display:block; width:100%; padding:10px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:white; margin-top:7px; }
.design-environments { border:0; padding:0; }
.design-environments label { display:inline-flex!important; gap:8px; margin-right:16px!important; }
.design-source { padding:12px; border:1px solid var(--line); border-radius:6px; margin:8px 0; }
.design-source img { display:block; width:100%; max-height:300px; object-fit:contain; }
.design-diff { display:flex; flex-direction:column; gap:12px; }
.design-diff pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:12px; padding:12px; background:#f4f6fc; border-radius:6px; }

.deliverable-checklist { display:grid; gap:12px; margin:16px 0; }
.deliverable-checklist label { display:flex; align-items:flex-start; gap:10px; padding:14px; border:1px solid var(--line); border-radius:8px; cursor:pointer; }
.deliverable-checklist input { width:17px; height:17px; margin-top:2px; accent-color:var(--blue); }
.deliverable-checklist strong { display:block; font-size:13px; }
.deliverable-checklist small { display:block; margin-top:5px; font-size:12px; color:var(--muted); line-height:1.6; }

#req-skill-library label { display:block; font-size:12px; color:var(--muted); margin:12px 0; }
#req-skill-library input:not([type=file]),#req-skill-library select,#req-skill-library textarea { display:block; width:100%; border:1px solid var(--line); border-radius:7px; padding:10px; margin-top:6px; background:white; color:var(--ink); }
#req-skill-library input[type=file] { display:block; max-width:100%; margin-top:8px; }
.skill-card { margin:14px 0; padding:16px; border:1px solid var(--line); border-radius:8px; }
.skill-card h4 { font-size:14px; margin-bottom:8px; }
.skill-card p { font-size:12px; line-height:1.7; }
.skill-card pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:11px; max-height:360px; overflow:auto; padding:12px; background:#f5f7fc; }
.skill-card details { margin:12px 0; font-size:12px; }
.skill-card > button { margin:8px 12px 0 0; }

#req-prepare-workspace label { display:block; margin:12px 0; font-size:12px; color:var(--muted); }
#req-prepare-workspace input:not([type=radio]),#req-prepare-workspace select,#req-prepare-workspace textarea { display:block; width:100%; padding:10px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:white; margin-top:7px; }
.prepare-modes { display:flex; flex-wrap:wrap; gap:20px; }
.prepare-modes label { display:flex!important; align-items:center; gap:8px; }
.prepare-modes input { accent-color:var(--blue); }
.prepare-steps { padding-left:20px; font-size:13px; line-height:1.9; margin:12px 0; }
.prepare-checks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0; }
.prepare-checks article { min-width:0; padding:14px; border:1px solid var(--line); border-radius:8px; }
.prepare-checks h4 { font-size:13px; }
.prepare-checks p { font-size:12px; color:var(--muted); margin:8px 0; }
.prepare-checks button { margin:8px 0; }
.prepare-server-actions { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }
#req-prepare-workspace details { margin:16px 0; padding:12px; border:1px solid var(--line); border-radius:7px; font-size:12px; line-height:1.8; }
#req-prepare-workspace [data-prepare-open] { margin-left:12px; font-size:12px; }
@media(max-width:700px) { .prepare-checks { grid-template-columns:minmax(0,1fr); } }

/* Shared UX documents retain a separate draft and review flow. */
.ux-controls {border:0;padding:0;margin:0;min-width:0}
.ux-baseline-label {padding:10px 14px;border-radius:8px;background:var(--blue-pale);color:var(--blue-dark);font-size:13px;font-weight:650}
.ux-toolbar {display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0 12px}
.ux-toolbar label {display:grid;gap:7px;flex:1 1 180px;font-size:13px;font-weight:650;color:var(--muted)}
.ux-toolbar input,.ux-toolbar select {width:100%;padding:12px;border:1px solid #cfd8eb;border-radius:8px;background:#fff;color:var(--ink);font:inherit}
.ux-layout {display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;margin-top:24px;align-items:start}
#ux-topics {max-height:740px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fafbfe}
#ux-topics h4 {margin:16px 8px 8px;font-size:12px;letter-spacing:.05em;color:var(--muted)}
#ux-topics button {display:flex;justify-content:space-between;gap:8px;width:100%;padding:10px 8px;border:0;border-radius:7px;background:transparent;text-align:left;color:var(--ink);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
#ux-topics button[aria-current="page"] {background:var(--blue-pale);color:var(--blue-dark);font-weight:700}
#ux-topics button small {flex-shrink:0;color:var(--muted);font-size:10px}
#ux-content {min-width:0;border:1px solid var(--line);border-radius:12px;padding:22px;background:white}
#ux-content h4 {font-size:21px;margin:0 0 14px;letter-spacing:-.035em}
.ux-entry-heading {display:flex;align-items:center;justify-content:space-between;gap:12px}
.ux-entry-heading p {font-size:12px;color:var(--muted);margin:0 0 8px}
.ux-reading section {margin:22px 0}
.ux-reading h5,.ux-history h5 {font-size:13px;margin:0 0 8px;color:var(--muted)}
.ux-reading p {white-space:pre-wrap;font-size:14px;line-height:1.8;margin:0;overflow-wrap:anywhere}
.ux-history {margin-top:24px;border-top:1px solid var(--line);padding-top:18px;font-size:13px}
.ux-history article {padding:16px 0;border-bottom:1px solid var(--line)}
.ux-diff {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.ux-diff>div {min-width:0;background:#f7f8fb;padding:10px;border-radius:8px}
.ux-diff pre {white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.7}
.ux-actions {margin-top:24px}
.ux-actions button {margin:0 8px 8px 0}
.ux-git {margin-top:24px;background:#fbfcff}
@media(max-width:800px){.ux-layout {grid-template-columns:1fr}#ux-topics {max-height:260px}.ux-diff {grid-template-columns:1fr}#ux-content {padding:16px}.ux-toolbar button {width:100%}}
.library-mode {border:0;padding:0;margin:0 0 18px;display:flex;flex-wrap:wrap;gap:12px}
.library-mode legend {font-size:13px;font-weight:700;color:var(--muted);margin-bottom:10px}
.library-mode label {display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:14px;background:white;font-size:14px}
.library-mode label:has(input:checked) {border-color:var(--blue);background:var(--blue-pale)}
.library-mode small {color:var(--muted);font-size:12px}
.library-config-list {display:grid;gap:14px}
.library-config-slot {border:1px solid var(--line);padding:18px;border-radius:12px;background:#fff;min-width:0}
.library-config-slot h4 {margin:0 0 5px;font-size:16px}
.library-config-slot .library-heading p {margin:0;font-size:12px;color:var(--muted)}
.library-inline-editor {display:grid;gap:10px;margin-top:15px}
.library-inline-editor label {font-size:13px;font-weight:650;color:var(--muted)}
.library-inline-editor input,.library-retained select {border:1px solid #cfd8eb;border-radius:8px;padding:12px;width:100%;font:inherit;min-width:0}
.library-retained {margin-top:20px;font-size:13px;color:var(--muted)}
.library-retained summary {cursor:pointer;font-weight:650}
.library-retained h4 {margin:18px 0 8px}
@media(max-width:650px){.library-mode label{width:100%;flex-wrap:wrap}.library-mode small{width:100%;padding-left:24px}}
.ux-document-import {border:1px solid var(--line);border-radius:10px;padding:16px;margin:18px 0;background:#fafbfe}
.ux-document-import>summary {font-size:14px;font-weight:700;cursor:pointer;color:var(--blue-dark)}
.ux-document-import>label {display:block;font-size:13px;font-weight:650;margin:14px 0 8px}
.ux-import-pages {max-height:600px;overflow:auto;margin:18px 0}
.ux-import-pages>details {padding:12px;border:1px solid var(--line);border-radius:8px;margin-bottom:10px;background:white}
.ux-import-pages summary {font-weight:650;font-size:13px;cursor:pointer}
.ux-import-pages label {display:block;margin:12px 0;font-size:13px}
.ux-import-pages input:not([type="checkbox"]),.ux-import-pages textarea {display:block;width:100%;padding:10px;margin-top:7px;border:1px solid #cfd8eb;border-radius:7px;font:inherit;box-sizing:border-box}
#ux-import-status {white-space:pre-wrap;font-size:13px;color:var(--muted)}
.skill-toolbar {display:flex;gap:14px;flex-wrap:wrap;margin:20px 0}
.skill-toolbar label {display:grid;gap:8px;flex:1 1 220px;font-size:14px;color:var(--muted);font-weight:650}
.skill-workspace input,.skill-workspace select,.skill-workspace textarea {padding:12px;border:1px solid #ccd5e7;border-radius:8px;font:inherit;max-width:100%;box-sizing:border-box}
.skill-table-wrap {overflow-x:auto;border:1px solid var(--line);border-radius:12px}
.skill-table {width:100%;min-width:1000px;border-collapse:collapse;font-size:14px;line-height:1.6}
.skill-table th {text-align:left;background:#f4f6fc;padding:14px;color:var(--muted)}
.skill-table td {padding:16px 14px;border-top:1px solid var(--line);vertical-align:top}
.skill-table td:first-child {min-width:160px}
.skill-table td small {display:block;color:var(--muted);margin-top:7px;font-size:12px}
.skill-row-actions {display:flex;flex-wrap:wrap;gap:8px;min-width:190px}
.skill-row-actions button {background:white;border:1px solid #ccd5e7;border-radius:6px;padding:6px 8px;font-size:14px;color:var(--blue-dark)}
.skill-row-actions button:disabled {color:#717887;background:#f5f6f9;cursor:not-allowed}
.skill-detail {margin-top:24px;padding:22px;border:1px solid var(--line);border-radius:12px;background:#fafbfe;font-size:16px;line-height:1.7}
.skill-detail h4 {margin:0 0 14px;font-size:21px}
.skill-detail pre {white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;background:white;padding:16px;border-radius:8px}
.skill-summary {display:grid;grid-template-columns:1fr 1fr;gap:16px;font-size:14px}
.skill-summary dt {font-weight:700;color:var(--muted)}
.skill-summary dd {margin:6px 0 0;white-space:pre-wrap}
.skill-actions {display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.skill-operation {border-top:1px solid var(--line);padding-top:18px;margin-top:24px}
.skill-operation h5 {font-size:17px;margin:0 0 12px}
.skill-operation label {display:grid;gap:8px;font-size:14px;margin:10px 0}
.skill-execution-record {padding:18px;border:1px solid var(--line);margin:14px 0;border-radius:10px;background:white}
@media(max-width:700px){.skill-summary {grid-template-columns:1fr}.skill-detail{padding:16px}.skill-detail .library-secondary,.skill-detail .library-primary{margin-bottom:8px}}
