@import url("lebotworld-tokens.css");

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--lw-ink); background: var(--lw-canvas); font-family: var(--lw-font-sans); -webkit-font-smoothing: antialiased; }
button, a { color: inherit; font: inherit; }
a { text-decoration: none; }
button { cursor: pointer; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: var(--lw-icon-md); height: var(--lw-icon-md); fill: none; stroke: currentColor; stroke-width: var(--lw-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }

.ds-sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 250px; display: flex; flex-direction: column; padding: 24px 18px; border-right: 1px solid var(--lw-border); background: rgba(250, 250, 254, .94); backdrop-filter: blur(18px); }
.ds-brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 22px; border-bottom: 1px solid var(--lw-divider); }
.ds-brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--lw-brand-gradient); box-shadow: 0 9px 20px rgba(104,87,245,.25); font-size: 11px; font-weight: 800; }
.ds-brand-copy { display: grid; gap: 1px; }
.ds-brand-copy b { font-size: 17px; line-height: 21px; }
.ds-brand-copy small { color: var(--lw-muted); font-size: 10px; line-height: 14px; letter-spacing: .08em; }
.ds-index { display: grid; gap: 5px; margin-top: 22px; }
.ds-index span { margin: 10px 10px 4px; color: var(--lw-muted); font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: .08em; }
.ds-index a { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border-radius: 12px; color: var(--lw-text); font-size: 14px; line-height: 20px; font-weight: 650; transition: color var(--lw-motion-fast), background var(--lw-motion-fast), transform var(--lw-motion-fast); }
.ds-index a:hover, .ds-index a:focus-visible { color: var(--lw-brand-500); background: var(--lw-surface-purple); transform: translateX(2px); outline: none; }
.ds-index .icon { width: 17px; height: 17px; }
.ds-sidebar-footer { margin-top: auto; display: grid; gap: 9px; }
.ds-sidebar-footer a { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--lw-border); border-radius: var(--lw-radius-control); color: var(--lw-brand-700); background: rgba(255,255,255,.78); font-size: 13px; font-weight: 700; }

.ds-main { margin-left: 250px; }
.ds-hero { position: relative; padding: 64px 44px 56px; color: #fff; background: radial-gradient(circle at 75% 22%, rgba(92,145,246,.24), transparent 26%), radial-gradient(circle at 35% 64%, rgba(102,87,244,.2), transparent 30%), linear-gradient(120deg, var(--lw-obsidian-900), var(--lw-obsidian-700)); overflow: hidden; }
.ds-hero::after { content: "SYSTEM"; position: absolute; right: 24px; bottom: -25px; color: transparent; opacity: .24; font-size: clamp(88px, 12vw, 180px); line-height: 1; font-weight: 900; letter-spacing: -.08em; -webkit-text-stroke: 1px rgba(210,207,255,.34); }
.ds-hero-inner { position: relative; z-index: 2; width: min(1100px, 100%); margin: 0 auto; }
.ds-kicker { display: inline-flex; align-items: center; gap: 10px; color: #c9beff; font-size: var(--lw-type-eyebrow); line-height: 16px; font-weight: 800; letter-spacing: .16em; }
.ds-kicker::before { content: ""; width: 30px; height: 2px; border-radius: 2px; background: currentColor; }
.ds-hero h1 { max-width: 800px; margin: 16px 0 0; font-size: clamp(42px, 5vw, 64px); line-height: 1.06; letter-spacing: -.055em; }
.ds-hero p { max-width: 700px; margin: 18px 0 0; color: var(--lw-text-on-dark-muted); font-size: 16px; line-height: 28px; }
.ds-version { display: inline-flex; align-items: center; gap: 8px; margin-top: 27px; padding: 7px 12px; border: 1px solid rgba(218,212,255,.18); border-radius: var(--lw-radius-pill); color: #ddd8ff; background: rgba(255,255,255,.06); font-size: 12px; line-height: 18px; }
.ds-version i { width: 7px; height: 7px; border-radius: 50%; background: #68d6b3; box-shadow: 0 0 0 5px rgba(104,214,179,.12); }

.ds-content { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 54px 0 72px; }
.ds-section { scroll-margin-top: 24px; padding: 32px; border: 1px solid var(--lw-border); border-radius: var(--lw-radius-card-lg); background: rgba(255,255,255,.84); box-shadow: var(--lw-shadow-lg), inset 0 1px 0 #fff; backdrop-filter: blur(16px); }
.ds-section + .ds-section { margin-top: 24px; }
.ds-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--lw-divider); }
.ds-section-head > div { max-width: 720px; }
.ds-section-index { display: block; margin-bottom: 5px; color: var(--lw-brand-500); font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: .14em; }
.ds-section h2 { margin: 0; font-size: 30px; line-height: 38px; letter-spacing: -.04em; }
.ds-section-head p { margin: 8px 0 0; color: var(--lw-text); font-size: 14px; line-height: 23px; }
.ds-note { padding: 7px 11px; border-radius: var(--lw-radius-pill); color: var(--lw-brand-700); background: var(--lw-surface-purple); font-size: 12px; line-height: 18px; font-weight: 700; white-space: nowrap; }

.color-group + .color-group { margin-top: 25px; }
.color-group h3, .component-group h3 { margin: 0 0 13px; color: #414258; font-size: 16px; line-height: 24px; }
.swatch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }
.swatch { overflow: hidden; border: 1px solid var(--lw-border); border-radius: 16px; background: #fff; }
.swatch-color { height: 82px; background: var(--swatch); }
.swatch-meta { display: grid; gap: 2px; padding: 11px 12px 12px; }
.swatch-meta b { font-size: 13px; line-height: 19px; }
.swatch-meta code { color: var(--lw-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 17px; }
.gradient-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.gradient-card { min-height: 118px; display: flex; flex-direction: column; justify-content: flex-end; padding: 17px; border-radius: 19px; color: #fff; background: var(--gradient); box-shadow: var(--lw-shadow-sm); }
.gradient-card b { font-size: 15px; }
.gradient-card code { margin-top: 5px; color: rgba(255,255,255,.74); font-size: 10px; line-height: 16px; }

.type-table { display: grid; }
.type-row { display: grid; grid-template-columns: 170px minmax(0,1fr) 160px; align-items: center; gap: 22px; min-height: 84px; padding: 15px 0; border-bottom: 1px solid var(--lw-divider); }
.type-row:last-child { border-bottom: 0; }
.type-role b, .type-role small { display: block; }
.type-role b { font-size: 13px; line-height: 20px; }
.type-role small, .type-size { color: var(--lw-muted); font-size: 12px; line-height: 18px; }
.type-size { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-align: right; }
.sample-display { font-size: 48px; line-height: 1.06; font-weight: 800; letter-spacing: -.055em; }
.sample-page { font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -.05em; }
.sample-section { font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -.045em; }
.sample-card { font-size: 24px; line-height: 32px; font-weight: 750; letter-spacing: -.025em; }
.sample-module { font-size: 20px; line-height: 28px; font-weight: 750; }
.sample-body-lg { color: var(--lw-text); font-size: 16px; line-height: 26px; }
.sample-body { color: var(--lw-text); font-size: 14px; line-height: 22px; }
.sample-nav-top { font-size: var(--lw-type-nav-top); line-height: 24px; font-weight: 700; }
.sample-nav-side { font-size: var(--lw-type-nav-side); line-height: 22px; font-weight: 650; }
.sample-caption { color: var(--lw-muted); font-size: 12px; line-height: 18px; }
.sample-eyebrow { color: var(--lw-brand-500); font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: .14em; }

.token-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.token-card { min-height: 125px; padding: 17px; border: 1px solid var(--lw-border); border-radius: var(--lw-radius-card-sm); background: var(--lw-canvas-soft); }
.token-card b { display: block; font-size: 14px; }
.token-card p { margin: 6px 0 0; color: var(--lw-text); font-size: 12px; line-height: 19px; }
.spacing-scale { display: flex; align-items: flex-end; gap: 13px; margin-top: 18px; overflow-x: auto; padding-bottom: 5px; }
.space-token { min-width: 58px; display: grid; justify-items: center; gap: 8px; color: var(--lw-muted); font-size: 11px; }
.space-token i { width: var(--space); height: var(--space); min-width: 4px; min-height: 4px; border-radius: 4px; background: var(--lw-brand-500); opacity: .82; }
.radius-preview { height: 54px; margin-top: 14px; border: 1px solid rgba(102,87,244,.16); background: var(--lw-surface-purple); border-radius: var(--radius); }
.shadow-preview { height: 54px; margin-top: 14px; border: 1px solid var(--lw-border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }

.component-group + .component-group { margin-top: 27px; padding-top: 24px; border-top: 1px solid var(--lw-divider); }
.component-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 22px; border-radius: var(--lw-radius-button); font-size: 16px; line-height: 24px; font-weight: 700; transition: transform var(--lw-motion-normal), box-shadow var(--lw-motion-normal), filter var(--lw-motion-normal); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { border: 0; color: #fff; background: var(--lw-brand-gradient); box-shadow: 0 13px 28px rgba(86,73,222,.25); }
.btn-primary:hover, .btn-primary:focus-visible { filter: brightness(1.04); box-shadow: 0 17px 34px rgba(86,73,222,.31); transform: translateY(-2px); outline: none; }
.btn-secondary { border: 1px solid rgba(102,87,244,.18); color: var(--lw-brand-700); background: rgba(255,255,255,.82); box-shadow: inset 0 1px 0 #fff; }
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: rgba(102,87,244,.32); background: #fff; transform: translateY(-1px); outline: none; }
.btn-text { min-height: 44px; padding: 0 4px; border: 0; color: var(--lw-brand-500); background: transparent; font-size: 15px; line-height: 22px; font-weight: 700; }
.btn-danger { min-height: 44px; padding: 0 17px; border: 1px solid rgba(213,73,101,.14); border-radius: 13px; color: var(--lw-danger); background: #fff2f4; font-size: 14px; font-weight: 700; }
.btn:disabled, .btn-disabled { -webkit-appearance: none; appearance: none; color: #9b9cab; border: 0; background: #efeff3; box-shadow: none; cursor: not-allowed; transform: none; filter: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: var(--lw-radius-control); color: var(--lw-text); background: transparent; }
.icon-btn:hover, .icon-btn:focus-visible, .icon-btn.active { color: var(--lw-brand-500); border-color: rgba(102,87,244,.14); background: var(--lw-surface-purple); outline: none; }

.icon-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; }
.icon-cell { min-height: 88px; display: grid; place-items: center; gap: 7px; padding: 12px; border: 1px solid var(--lw-border); border-radius: 15px; color: var(--lw-brand-500); background: var(--lw-canvas-soft); }
.icon-cell .icon { width: 24px; height: 24px; }
.icon-cell small { color: var(--lw-muted); font-size: 11px; line-height: 16px; }
.icon-rules { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 15px; }
.icon-rule { padding: 14px; border-radius: 14px; color: var(--lw-text); background: var(--lw-canvas-soft); font-size: 12px; line-height: 19px; }
.icon-rule b { color: var(--lw-ink); }

.primitive-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.primitive { min-height: 170px; padding: 19px; border: 1px solid var(--lw-border); border-radius: 20px; background: var(--lw-canvas-soft); }
.primitive > small { display: block; margin-bottom: 14px; color: var(--lw-muted); font-size: 11px; line-height: 16px; font-weight: 750; letter-spacing: .08em; }
.nav-demo { display: grid; gap: 7px; max-width: 280px; }
.nav-item { min-height: 47px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 13px; color: var(--lw-text); font-size: 15px; font-weight: 650; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item.active { color: var(--lw-brand-500); background: var(--lw-surface-purple); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 28px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: var(--lw-radius-pill); font-size: 12px; line-height: 18px; font-weight: 700; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-brand { color: var(--lw-brand-500); background: #efedff; }
.chip-success { color: #258e6e; background: #eaf8f3; }
.chip-warning { color: #a8720c; background: #fff5d9; }
.chip-danger { color: #bd4059; background: #fff0f3; }
.surface-demo { display: grid; gap: 9px; }
.surface { min-height: 58px; display: flex; align-items: center; padding: 0 15px; border: 1px solid var(--lw-border); background: #fff; font-size: 13px; font-weight: 700; }
.surface.small { border-radius: var(--lw-radius-card-sm); }
.surface.standard { border-radius: var(--lw-radius-card); box-shadow: var(--lw-shadow-sm); }
.surface.feature { border-radius: var(--lw-radius-card-lg); background: linear-gradient(125deg,#fff,#f4f2ff 48%,#eaf3ff); box-shadow: var(--lw-shadow-lg); }
.menu-demo { width: 190px; display: grid; gap: 4px; padding: 7px; border: 1px solid var(--lw-border); border-radius: 16px; background: #fff; box-shadow: var(--lw-shadow-md); }
.menu-demo span { min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 11px; border-radius: 10px; color: var(--lw-text); font-size: 13px; }
.menu-demo span.active { color: var(--lw-brand-500); background: var(--lw-surface-purple); font-weight: 700; }

.rule-table { width: 100%; border-collapse: collapse; overflow: hidden; font-size: 13px; line-height: 21px; }
.rule-table th, .rule-table td { padding: 14px 15px; border-bottom: 1px solid var(--lw-divider); text-align: left; vertical-align: top; }
.rule-table th { color: #56586d; background: var(--lw-canvas-soft); font-weight: 750; }
.rule-table td { color: var(--lw-text); }
.rule-table tr:last-child td { border-bottom: 0; }
.rule-table b { color: var(--lw-ink); }
.do { color: #258e6e; font-weight: 750; }
.dont { color: #bd4059; font-weight: 750; }

.code-panel { margin-top: 18px; overflow: auto; padding: 18px; border-radius: 16px; color: #d9d7ef; background: var(--lw-obsidian-800); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 21px; white-space: pre; }
.ds-footer { margin-top: 24px; padding: 24px 0 0; border-top: 1px solid var(--lw-divider); color: var(--lw-muted); font-size: 12px; line-height: 19px; }

@media (max-width: 1100px) {
  .swatch-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .icon-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .type-row { grid-template-columns: 140px minmax(0,1fr) 130px; }
}

@media (max-width: 820px) {
  .ds-sidebar { position: static; width: 100%; padding: 15px; }
  .ds-brand { padding-bottom: 14px; }
  .ds-index { grid-template-columns: repeat(3,1fr); margin-top: 13px; }
  .ds-index span, .ds-sidebar-footer { display: none; }
  .ds-index a { justify-content: center; padding: 0 6px; }
  .ds-index .icon { display: none; }
  .ds-main { margin-left: 0; }
  .ds-hero { padding: 46px 22px; }
  .ds-content { width: calc(100% - 28px); padding-top: 28px; }
  .ds-section { padding: 23px; border-radius: 26px; }
  .swatch-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gradient-grid, .token-row, .primitive-grid, .icon-rules { grid-template-columns: 1fr; }
  .type-row { grid-template-columns: 1fr; gap: 7px; }
  .type-size { text-align: left; }
  .icon-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ds-section-head { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
