:root {
  --ink: #0b1f2a;
  --ink-soft: #28404c;
  --gold: #c6922e;
  --gold-ink: #8a5c00;
  --gold-pale: #fbf6e8;
  --slate: #6e7d90;
  --slate-pale: #f1f3f5;
  --paper: #f5f2ea;
  --white: #ffffff;
  --line: #dfe3e7;
  --line-dark: #c8cdd4;
  --success: #39745a;
  --danger: #a5473d;
  --shadow-sm: 0 1px 2px rgba(11, 31, 42, 0.06), 0 5px 16px rgba(11, 31, 42, 0.04);
  --shadow-md: 0 14px 40px rgba(11, 31, 42, 0.1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8f9f9;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f8f9f9; color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 252px; flex: 0 0 252px; background: var(--ink); color: var(--white); padding: 28px 18px 20px; display: flex; flex-direction: column; }
.brand-lockup { display: flex; gap: 11px; align-items: center; padding: 0 10px 34px; }
.brand-mark { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.35); border-radius: 9px; display: grid; place-items: center; color: var(--gold); font-weight: 750; letter-spacing: -.05em; }
.brand-name { font-size: 14px; font-weight: 760; letter-spacing: -.02em; }
.brand-product { margin-top: 3px; color: rgba(255,255,255,.56); font-size: 11px; letter-spacing: .03em; }
.sidebar-section-label { padding: 0 11px 9px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; font-weight: 750; }
.primary-nav { display: grid; gap: 4px; }
.nav-item, .sidebar-link { border: 0; background: transparent; color: rgba(255,255,255,.66); text-align: left; border-radius: 9px; min-height: 40px; padding: 0 11px; display: flex; align-items: center; gap: 10px; font-size: 12px; transition: background .16s ease, color .16s ease; }
.nav-item:hover, .sidebar-link:hover { background: rgba(255,255,255,.08); color: var(--white); }
.nav-item.is-active { color: var(--white); background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 var(--gold); }
.nav-icon { width: 17px; color: var(--gold); font-size: 16px; line-height: 1; text-align: center; }
.library-nav-label { margin-top: 33px; }
.sidebar-links { display: grid; gap: 2px; }
.sidebar-link { width: 100%; min-height: 34px; font-size: 11px; }
.link-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-left: 2px; }
.dot-gold { background: var(--gold); }.dot-ink { background: #9cb3c0; }.dot-slate { background: #718094; }
.sidebar-count { margin-left: auto; color: rgba(255,255,255,.42); font-variant-numeric: tabular-nums; }
.sidebar-footer { margin-top: auto; padding: 17px 11px 0; border-top: 1px solid rgba(255,255,255,.11); }
.local-status { color: rgba(255,255,255,.78); font-size: 10px; display: flex; align-items: center; gap: 7px; }
.status-pulse { width: 7px; height: 7px; border-radius: 50%; background: #72bf8e; box-shadow: 0 0 0 3px rgba(114,191,142,.14); }
.sidebar-path { color: rgba(255,255,255,.38); font-size: 9px; margin-top: 8px; }

.workspace { min-width: 0; flex: 1; }
.topbar { height: 76px; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.84); }
.breadcrumb { font-size: 12px; color: var(--slate); display: flex; align-items: center; gap: 9px; }
.breadcrumb strong { color: var(--ink); font-weight: 680; }.breadcrumb-slash { color: var(--line-dark); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.search-box { height: 38px; width: min(280px, 28vw); border: 1px solid var(--line); background: var(--white); border-radius: 8px; display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--slate); }
.search-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,146,46,.12); }
.search-icon { font-size: 19px; line-height: 1; color: var(--gold-ink); }.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); font-size: 11px; background: transparent; }.search-key { color: #a6afb8; font-size: 9px; white-space: nowrap; }
.button { border: 1px solid var(--line-dark); background: var(--white); color: var(--ink); border-radius: 8px; height: 38px; padding: 0 14px; font-size: 11px; font-weight: 680; display: inline-flex; align-items: center; gap: 7px; transition: all .16s ease; }.button:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-sm); }.button-primary { background: var(--ink); color: var(--white); border-color: var(--ink); }.button-primary:hover { background: #183746; }.button-gold { background: var(--gold); border-color: var(--gold); color: var(--white); }.button-quiet { border-color: transparent; background: transparent; color: var(--slate); }.button-danger { color: var(--danger); }
.main-content { max-width: 1440px; margin: 0 auto; padding: 38px 42px 70px; }

.eyebrow { color: var(--gold-ink); text-transform: uppercase; letter-spacing: .16em; font-size: 9px; font-weight: 780; }.page-title { margin: 9px 0 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -.045em; font-weight: 740; }.page-intro { max-width: 650px; color: var(--slate); font-size: 13px; line-height: 1.6; margin: 12px 0 0; }
.hero { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin-bottom: 34px; }.hero-copy { min-width: 0; }.hero-aside { width: 300px; border-left: 2px solid var(--gold); padding: 2px 0 2px 18px; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }.hero-aside strong { display: block; font-size: 10px; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-ink); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 34px; }.metric-card { min-height: 124px; padding: 19px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }.metric-label { color: var(--slate); font-size: 10px; text-transform: uppercase; letter-spacing: .11em; font-weight: 730; }.metric-value { margin-top: 16px; font-size: 31px; font-weight: 720; letter-spacing: -.05em; }.metric-foot { color: var(--slate); font-size: 10px; margin-top: 4px; }.metric-accent { border-top: 3px solid var(--gold); }.metric-accent-ink { border-top: 3px solid var(--ink); }.metric-accent-slate { border-top: 3px solid var(--slate); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 13px; }.section-heading h2 { margin: 0; font-size: 15px; letter-spacing: -.02em; }.section-heading p { margin: 4px 0 0; color: var(--slate); font-size: 11px; }.text-link { border: 0; background: transparent; color: var(--gold-ink); font-size: 11px; font-weight: 700; padding: 0; }.text-link:hover { text-decoration: underline; }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 36px; }.action-card { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-md); min-height: 130px; padding: 18px; text-align: left; transition: all .16s ease; }.action-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); transform: translateY(-2px); }.action-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--gold-pale); color: var(--gold-ink); font-weight: 800; }.action-card h3 { margin: 15px 0 5px; font-size: 12px; }.action-card p { margin: 0; color: var(--slate); font-size: 10px; line-height: 1.5; }
.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }.library-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; cursor: pointer; transition: all .16s ease; }.library-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-2px); }.card-preview { height: 150px; background: var(--paper); position: relative; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }.card-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }.card-preview.asset img { object-fit: contain; padding: 24px; }.preview-fallback { width: calc(100% - 40px); height: calc(100% - 40px); border: 1px dashed var(--line-dark); border-radius: 10px; display: grid; place-items: center; text-align: center; color: var(--slate); font-size: 10px; padding: 12px; }.preview-fallback.hidden { display: none; }.generic-preview { width: 72%; height: 72%; border-radius: 11px; background: linear-gradient(135deg, var(--ink) 0 32%, var(--gold) 32% 38%, var(--slate-pale) 38%); opacity: .88; }.card-body { padding: 14px 15px 15px; }.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 8px; }.status-badge, .kind-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; font-weight: 780; white-space: nowrap; }.status-draft { background: var(--slate-pale); color: var(--slate); }.status-review { background: var(--gold-pale); color: var(--gold-ink); }.status-approved { background: #edf6ef; color: var(--success); }.status-archived { background: #f4eeee; color: var(--danger); }.kind-badge { color: var(--slate); background: #f8f9f9; border: 1px solid var(--line); }.card-title { margin: 11px 0 4px; font-weight: 700; font-size: 12px; line-height: 1.3; }.card-description { color: var(--slate); font-size: 10px; line-height: 1.45; min-height: 29px; }.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }.tag { color: var(--slate); background: var(--slate-pale); border-radius: 4px; padding: 4px 6px; font-size: 9px; }.tag-more { color: var(--gold-ink); background: var(--gold-pale); }

.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 29px 0 16px; }.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }.filter-tab { border: 1px solid transparent; background: transparent; padding: 7px 10px; border-radius: 7px; color: var(--slate); font-size: 10px; font-weight: 680; }.filter-tab:hover { color: var(--ink); background: var(--white); }.filter-tab.is-active { color: var(--ink); border-color: var(--line); background: var(--white); box-shadow: var(--shadow-sm); }.toolbar-controls { display: flex; gap: 8px; align-items: center; }.select-control { border: 1px solid var(--line); background: var(--white); border-radius: 7px; height: 34px; padding: 0 9px; color: var(--slate); font-size: 10px; outline: 0; }.select-control:focus { border-color: var(--gold); }
.library-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 390px); gap: 18px; align-items: start; }.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }.library-grid .card-preview { height: 168px; }.library-grid .library-card.is-selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(198,146,46,.16); }.empty-state { min-height: 250px; border: 1px dashed var(--line-dark); border-radius: var(--radius-md); display: grid; place-items: center; text-align: center; color: var(--slate); padding: 30px; background: rgba(255,255,255,.5); }.empty-state strong { color: var(--ink); display: block; margin-bottom: 6px; }
.detail-panel { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); position: sticky; top: 20px; overflow: hidden; }.detail-preview { background: var(--paper); min-height: 200px; display: grid; place-items: center; border-bottom: 1px solid var(--line); position: relative; }.detail-preview img { width: 100%; height: 220px; object-fit: contain; }.detail-preview.asset img { padding: 24px; }.detail-preview .preview-fallback { width: calc(100% - 36px); height: calc(100% - 36px); }.detail-content { padding: 18px; }.detail-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }.detail-title { margin: 0; font-size: 17px; line-height: 1.22; letter-spacing: -.03em; }.detail-meta { margin-top: 7px; color: var(--slate); font-size: 10px; }.detail-divider { height: 1px; background: var(--line); margin: 18px 0; }.field { display: grid; gap: 6px; margin-bottom: 13px; }.field label { color: var(--slate); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 760; }.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #fcfdfd; color: var(--ink); font-size: 11px; outline: 0; padding: 9px 10px; }.field textarea { resize: vertical; min-height: 72px; line-height: 1.45; }.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,146,46,.1); }.source-path { color: var(--slate); background: var(--slate-pale); border-radius: 6px; padding: 8px; font: 10px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }.detail-actions .button { flex: 1; justify-content: center; min-width: 110px; }.checklist { display: grid; gap: 8px; }.check-row { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--ink-soft); }.check-row input { accent-color: var(--gold); width: 14px; height: 14px; }

.token-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 16px; }.panel { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }.panel h2 { margin: 0; font-size: 14px; letter-spacing: -.02em; }.panel h3 { margin: 25px 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .11em; color: var(--slate); }.panel-intro { color: var(--slate); font-size: 11px; line-height: 1.55; margin: 8px 0 0; }.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }.swatch { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }.swatch-color { height: 58px; }.swatch-info { padding: 8px; }.swatch-name { font-weight: 700; font-size: 10px; }.swatch-value { display: block; color: var(--slate); margin-top: 3px; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }.type-table { display: grid; gap: 0; }.type-row { display: grid; grid-template-columns: 90px 1fr 54px; align-items: center; gap: 12px; min-height: 45px; border-bottom: 1px solid var(--line); }.type-row:last-child { border-bottom: 0; }.type-name { font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold-ink); }.type-sample { color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.type-size { color: var(--slate); text-align: right; font-size: 9px; }.spacing-list { display: grid; gap: 9px; }.spacing-row { display: grid; grid-template-columns: 58px 1fr 32px; gap: 9px; align-items: center; color: var(--slate); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }.spacing-bar { height: 9px; background: var(--gold); opacity: .76; border-radius: 3px; min-width: 5px; }.source-note { margin-top: 18px; padding: 11px 12px; border-left: 2px solid var(--gold); background: var(--gold-pale); color: var(--gold-ink); font-size: 10px; line-height: 1.5; }
.pattern-list { display: grid; gap: 8px; }.pattern-row { padding: 12px; background: var(--slate-pale); border-radius: 8px; }.pattern-row strong { font-size: 11px; }.pattern-row p { margin: 4px 0 0; color: var(--slate); font-size: 10px; line-height: 1.45; }.capacity-note { color: var(--slate); font-size: 10px; line-height: 1.5; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(11,31,42,.44); display: grid; place-items: center; padding: 20px; z-index: 20; }.modal { width: min(570px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 24px 80px rgba(11,31,42,.25); }.modal-header { padding: 20px 22px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }.modal-header h2 { margin: 0; font-size: 17px; letter-spacing: -.03em; }.modal-header p { margin: 5px 0 0; color: var(--slate); font-size: 10px; }.close-button { border: 0; background: transparent; color: var(--slate); width: 28px; height: 28px; border-radius: 6px; font-size: 20px; }.close-button:hover { background: var(--slate-pale); color: var(--ink); }.modal-body { padding: 20px 22px 22px; }.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; background: var(--slate-pale); border-radius: 8px; margin-bottom: 18px; }.mode-button { border: 0; border-radius: 6px; padding: 9px; background: transparent; color: var(--slate); font-size: 10px; font-weight: 700; }.mode-button.is-active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }.file-drop { border: 1px dashed var(--line-dark); background: #fcfdfd; border-radius: 9px; padding: 17px; text-align: center; margin-bottom: 15px; }.file-drop:hover { border-color: var(--gold); background: var(--gold-pale); }.file-drop strong { display: block; font-size: 11px; }.file-drop span { display: block; margin-top: 5px; color: var(--slate); font-size: 10px; }.file-drop input { width: 100%; margin-top: 12px; font-size: 10px; }.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }.modal-footer .button { min-width: 100px; justify-content: center; }.help-text { color: var(--slate); font-size: 9px; line-height: 1.45; margin-top: -3px; }
.toast-root { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 8px; z-index: 30; }.toast { background: var(--ink); color: var(--white); padding: 11px 14px; border-radius: 8px; box-shadow: var(--shadow-md); font-size: 11px; animation: toast-in .18s ease-out; }.toast.error { background: var(--danger); }@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.loading { color: var(--slate); font-size: 12px; padding: 60px 0; }.error-banner { border: 1px solid #e2b8b3; background: #fff4f2; color: var(--danger); border-radius: 9px; padding: 13px; font-size: 11px; }.muted { color: var(--slate); }.hidden { display: none !important; }

@media (max-width: 1050px) { .sidebar { width: 215px; flex-basis: 215px; }.topbar, .main-content { padding-left: 28px; padding-right: 28px; }.library-layout, .token-layout { grid-template-columns: 1fr; }.detail-panel { position: static; }.detail-preview img { height: 260px; } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { width: 100%; padding: 13px 14px; display: block; }.brand-lockup { padding: 0 4px 12px; }.sidebar-section-label, .sidebar-links, .sidebar-footer { display: none; }.primary-nav { display: flex; gap: 4px; overflow-x: auto; }.nav-item { min-height: 34px; white-space: nowrap; }.nav-item.is-active { box-shadow: inset 0 -2px 0 var(--gold); }.topbar { height: auto; min-height: 66px; padding: 13px 16px; gap: 12px; }.topbar-actions { flex: 1; justify-content: flex-end; }.topbar .search-box { width: 38px; padding: 0 10px; border-color: transparent; background: transparent; }.topbar .search-box input, .topbar .search-key { display: none; }.topbar .search-box:focus-within { border-color: var(--gold); background: var(--white); width: 150px; }.topbar .search-box:focus-within input { display: block; }.topbar .button { padding: 0 10px; font-size: 10px; }.main-content { padding: 28px 16px 50px; }.hero { display: block; margin-bottom: 24px; }.hero-aside { width: auto; margin-top: 22px; }.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.metric-card { min-height: 105px; padding: 14px; }.metric-value { margin-top: 11px; font-size: 26px; }.action-grid, .recent-grid { grid-template-columns: 1fr; }.library-toolbar { align-items: flex-start; display: block; }.toolbar-controls { margin-top: 10px; }.library-grid { grid-template-columns: 1fr; }.swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.type-row { grid-template-columns: 76px 1fr 42px; gap: 8px; }.page-title { font-size: 29px; } }
