/* ============================================================
   site.css — Foundations + Dashboard chrome
   ============================================================ */

/* ---- shared controls: segmented toggle + neon swatches (ControlBar + floating panel) ---- */
.ctl-bar { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ctl-group { display: flex; align-items: center; gap: 9px; }
.ctl-lbl { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.seg { display: inline-flex; background: var(--secondary); border-radius: var(--radius-md); padding: 3px; gap: 2px; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--ui-font); font-size: 12.5px; font-weight: 600; color: var(--muted-foreground); background: transparent; border: none; padding: 6px 11px; border-radius: var(--radius); cursor: pointer; transition: .14s ease; }
.seg-btn .ic { font-size: 15px; }
.seg-btn:hover { color: var(--foreground); }
.seg-btn[data-active="true"] { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }
.neon-row { display: inline-flex; gap: 7px; align-items: center; }
.neon-div { width: 1px; height: 18px; background: var(--border-strong); margin: 0 3px; flex: none; }
.neon-sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0; transition: transform .12s ease, box-shadow .12s ease; }
.neon-sw[data-primary="true"] { width: 24px; height: 24px; }
.neon-sw:hover { transform: scale(1.12); }
.neon-sw[data-active="true"] { box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--foreground); }

/* ---- level switch in sidebar ---- */
.nav-group-label { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); padding: 15px 12px 5px; }
.ds-group-head { display: flex; align-items: center; gap: 12px; padding: 44px 0 4px; }
.ds-group-head > span:first-child { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.ds-group-count { font-size: 11px; font-weight: 600; color: var(--muted-foreground); background: var(--secondary); border-radius: 99px; padding: 2px 9px; }
.ds-group-head::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.level-switch { display: flex; flex-direction: column; gap: 1px; padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.level-btn { display: flex; align-items: center; gap: 10px; text-align: left; font-family: var(--ui-font); font-size: 14px; font-weight: 600; color: var(--muted-foreground); background: transparent; border: none; padding: 10px 12px; border-radius: var(--radius); cursor: pointer; transition: .12s ease; }
.level-btn .ic { font-size: 16px; }
.level-btn:hover { background: var(--accent); color: var(--foreground); }
.level-btn[data-active="true"] { background: var(--brand-tint); color: var(--brand); }
.level-link { text-decoration: none; }

/* ============================================================
   DASHBOARD APP SHELL (standalone product, own sidebar)
   ============================================================ */
.dash-app { display: grid; grid-template-columns: 244px 1fr; height: 100vh; background: var(--background); color: var(--foreground); }
.dapp-side { position: sticky; top: 0; align-self: start; height: 100vh; border-right: 1px solid var(--border); background: var(--card); display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.dapp-head { flex: 0 0 auto; padding: 18px 14px 0; }
.dapp-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 14px; }
.dapp-ws { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 12px; cursor: pointer; }
.dapp-ws .ws-name { font-size: 13px; font-weight: 600; }
.dapp-ws .ws-plan { font-size: 11px; color: var(--muted-foreground); }
.dapp-ws .ic:last-child { margin-left: auto; font-size: 16px; color: var(--muted-foreground); }
.dapp-navlabel { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); padding: 12px 12px 6px; }
.dapp-nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px; }
.dapp-nav { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.dapp-nav::-webkit-scrollbar { width: 8px; }
.dapp-nav::-webkit-scrollbar-track { background: transparent; }
.dapp-nav::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--foreground) 18%, transparent); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
.dapp-nav::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--brand) 55%, transparent); background-clip: padding-box; }
.dapp-navitem { display: flex; align-items: center; gap: 11px; font-family: var(--ui-font); font-size: 14px; font-weight: 500; color: var(--muted-foreground); padding: 10px 12px; border-radius: var(--radius); cursor: pointer; border: none; background: transparent; text-align: left; transition: .12s ease; }
.dapp-navitem .ic { font-size: 18px; }
.dapp-navitem:hover { background: var(--accent); color: var(--foreground); }
.dapp-navitem[data-active="true"] { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.dapp-navitem .nav-badge { margin-left: auto; }
.dapp-foot { flex: 0 0 auto; border-top: 1px solid var(--border); padding: 10px 14px 14px; }
.dapp-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); cursor: pointer; }
.dapp-user:hover { background: var(--accent); }
.dapp-user .nm { font-size: 13px; font-weight: 600; }
.dapp-user .rl { font-size: 11px; color: var(--muted-foreground); }
.dapp-user .ic { margin-left: auto; color: var(--muted-foreground); }
.back-link { font-size: 12px; color: var(--muted-foreground); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--radius); }
.back-link:hover { background: var(--accent); color: var(--foreground); }
.back-link .ic { font-size: 14px; }

.dapp-main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.dapp-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 28px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 88%, transparent); backdrop-filter: blur(8px); flex-wrap: wrap; }
.dapp-top-left { display: flex; align-items: center; gap: 14px; }
.dapp-scroll { overflow-y: auto; flex: 1; }
.dapp-search { width: 280px; max-width: 38vw; }
.command-trigger { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; background: var(--background); border: var(--border-weight) solid var(--input); border-radius: var(--radius); color: var(--muted-foreground); font-family: var(--ui-font); font-size: 14px; cursor: pointer; transition: border-color .14s ease; }
.command-trigger .ic { font-size: 16px; }
.command-trigger span { flex: 1; text-align: left; }
.command-trigger kbd { font-size: 11px; font-weight: 600; border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; }
.command-trigger:hover { border-color: var(--border-strong); }

.sol-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.sol-metric { display: flex; flex-direction: column; gap: 2px; }
.sol-metric .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sol-metric .k { font-size: 12px; color: var(--muted-foreground); }
.empty { text-align: center; padding: 70px 20px; color: var(--muted-foreground); }
.empty .ic { font-size: 40px; opacity: .5; }
.empty h3 { font-size: 18px; color: var(--foreground); margin: 16px 0 6px; }

@media (max-width: 1040px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
  .sol-card-grid { grid-template-columns: 1fr; }
}
.dash-period { width: 200px; }
@media (max-width: 820px) { .dapp-side { display: none; } .dash-app { grid-template-columns: 1fr; } }

/* ---- floating theme/accent control ---- */
.fab-theme { position: fixed; bottom: 24px; right: 24px; z-index: 95; }
.fab-btn { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--foreground); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease, color .16s ease; }
.fab-btn .ic { font-size: 22px; }
.fab-btn:hover { color: var(--brand); transform: translateY(-1px); }
.fab-btn[data-open="true"] { color: var(--brand); box-shadow: var(--shadow), 0 0 0 3px var(--brand-tint); }
.fab-panel { position: absolute; bottom: calc(100% + 12px); right: 0; width: 250px; background: var(--popover); color: var(--popover-foreground); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px 18px; animation: pop .16s cubic-bezier(.4,0,.2,1); }
.fab-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fab-lbl { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.fab-sep { height: 1px; background: var(--border); margin: 14px 0; }

/* ============================================================
   FOUNDATIONS
   ============================================================ */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.swatch { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--card); }
.swatch-chip { height: 92px; display: flex; align-items: flex-end; padding: 10px; }
.swatch-meta { padding: 12px 14px; }
.swatch-name { font-size: 13.5px; font-weight: 600; }
.swatch-hex { font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; text-transform: uppercase; margin-top: 2px; }
.swatch-token { font-size: 11px; color: var(--muted-foreground); margin-top: 6px; }
.chip-tag { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: var(--radius-pill); background: rgba(255,255,255,.85); color: #081A1F; }
.chip-tag.dark { background: rgba(8,26,31,.7); color: #fff; }

/* type ramp */
.type-ramp { display: flex; flex-direction: column; }
.type-row { display: grid; grid-template-columns: 132px 1fr; gap: 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--border); }
.type-row:last-child { border-bottom: none; }
.type-spec { display: flex; flex-direction: column; gap: 3px; }
.type-spec .nm { font-size: 13px; font-weight: 600; }
.type-spec .dt { font-size: 11.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.type-sample { color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.weight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.weight-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; background: var(--card); }
.weight-card .glyph { font-size: 34px; line-height: 1; }
.weight-card .lbl { font-size: 12px; color: var(--muted-foreground); margin-top: 10px; }

/* spec rows (spacing / radius) */
.spec-list { display: flex; flex-direction: column; gap: 10px; }
.spacing-row { display: flex; align-items: center; gap: 18px; }
.spacing-bar { height: 16px; background: var(--brand); border-radius: 3px; }
.spacing-row .lbl { width: 96px; font-size: 13px; font-weight: 600; }
.spacing-row .val { font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.radius-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.radius-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; background: var(--card); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.radius-demo { width: 84px; height: 64px; background: var(--brand-tint); border: 1.5px solid var(--brand); }
.radius-card .lbl { font-size: 12.5px; font-weight: 600; }
.radius-card .val { font-size: 11.5px; color: var(--muted-foreground); }

/* elevation */
.elev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.elev-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; background: var(--card); text-align: center; font-size: 13px; }
.elev-tile { height: 64px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); margin-bottom: 16px; }
.elev-tile.soft { box-shadow: var(--shadow); }
.elev-tile.glow { box-shadow: 0 0 24px color-mix(in srgb, var(--brand) 50%, transparent), 0 0 64px color-mix(in srgb, var(--brand) 22%, transparent); border-color: var(--brand); }

/* icon grid */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 10px; }
.icon-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.icon-cell .ic { font-size: 22px; color: var(--foreground); }
.icon-cell .nm { font-size: 10.5px; color: var(--muted-foreground); }

/* logo lockups */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.logo-tile { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 36px 28px; display: flex; align-items: center; justify-content: center; min-height: 120px; }
.logo-tile.on-light { background: #fff; }
.logo-tile.on-dark { background: #081A1F; }
.logo-tile.on-cyan { background: #00FFD4; }
.logo-cap { font-size: 11px; color: var(--muted-foreground); margin-top: 8px; text-align: center; }
.logo-cap .mono { color: color-mix(in srgb, var(--muted-foreground) 80%, transparent); }

/* brand statement */
.brand-statement { display: flex; gap: 32px; align-items: center; padding: 8px 4px 28px; }
.brand-statement-mark { flex: 0 0 auto; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.brand-statement-body { flex: 1; min-width: 0; }
.brand-tagline { font-size: 38px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 14px; line-height: 1.05; }
.brand-statement-text { font-size: 16px; font-weight: 300; line-height: 1.8; letter-spacing: .02em; color: var(--foreground); max-width: 60ch; margin: 0; }
.brand-statement-text strong { font-weight: 600; }
.brand-kicker-line { margin-top: 16px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); }
@media (max-width: 760px) { .brand-statement { flex-direction: column; align-items: flex-start; gap: 20px; } .brand-tagline { font-size: 30px; } }

/* brand voice */
.brand-voice { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.voice-card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); padding: 16px 18px; }
.voice-t { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.voice-d { font-size: 13px; color: var(--muted-foreground); line-height: 1.5; }

/* do / don't */
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dd-col { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); padding: 18px 20px; }
.dd-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }
.dd-head .ic { font-size: 18px; }
.dd-head.ok { color: var(--success); }
.dd-head.no { color: var(--destructive); }
.dd-col ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.dd-col li { font-size: 13.5px; color: var(--foreground); line-height: 1.5; }
@media (max-width: 760px) { .dodont { grid-template-columns: 1fr; } }

.brand-copyline { margin-top: 22px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-foreground); text-align: center; }

/* color application logic */
.color-logic { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.logic-card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); padding: 20px; position: relative; }
.logic-num { font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--brand); font-variant-numeric: tabular-nums; }
.logic-t { font-size: 17px; font-weight: 600; margin: 8px 0 8px; }
.logic-card p { font-size: 13.5px; color: var(--muted-foreground); line-height: 1.6; margin: 0; }
.logic-card p strong { color: var(--foreground); font-weight: 600; }
.logic-card p code, .conv-desc code, .dd-col li code { font-family: var(--ui-mono); font-size: .9em; background: var(--secondary); padding: 1px 5px; border-radius: 5px; color: var(--foreground); }

/* conventions */
.conv-list { display: flex; flex-direction: column; }
.conv-row { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--border); }
.conv-row:last-child { border-bottom: none; }
.conv-code { font-family: var(--ui-mono); font-size: 12.5px; font-weight: 600; color: var(--brand); background: var(--brand-tint); padding: 3px 8px; border-radius: 6px; display: inline-block; word-break: break-word; }
.conv-desc { font-size: 13.5px; color: var(--muted-foreground); line-height: 1.5; }
.conv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.conv-cell { display: flex; flex-direction: column; gap: 7px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); padding: 14px 16px; }
.conv-cell .conv-code { align-self: flex-start; }
@media (max-width: 720px) { .conv-row { grid-template-columns: 1fr; gap: 6px; } }

/* typography roles */
.type-roles { display: flex; flex-direction: column; }
.role-row { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--border); }
.role-row:last-child { border-bottom: none; }
.role-sample { font-size: 26px; line-height: 1.1; color: var(--foreground); }
.role-spec { font-size: 12px; font-weight: 600; color: var(--brand); letter-spacing: .04em; margin-bottom: 5px; }
.role-d { font-size: 13.5px; color: var(--muted-foreground); line-height: 1.6; margin: 0; max-width: 52ch; }
@media (max-width: 760px) { .role-row { grid-template-columns: 1fr; gap: 8px; } }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash { padding: 28px 32px 80px; max-width: 1240px; margin: 0 auto; }
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 4px; }
.dash-head p { font-size: 14px; color: var(--muted-foreground); margin: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px; }
.kpi { padding: 20px 22px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-ic { width: 38px; height: 38px; border-radius: var(--radius); background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.kpi-ic .ic { font-size: 19px; }
.kpi-val { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 14px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-lbl { font-size: 13px; color: var(--muted-foreground); }
.kpi-delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--destructive); }

.dash-cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-bottom: 18px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 0; }
.chart-wrap { padding: 14px 14px 18px; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted-foreground); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 2px; }

.sol-list { display: flex; flex-direction: column; }
.sol-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.sol-item:last-child { border-bottom: none; }
.sol-ic { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex: none; }
.sol-ic .ic { font-size: 18px; }
.sol-name { font-size: 14px; font-weight: 600; }
.sol-meta { font-size: 12px; color: var(--muted-foreground); }
.sol-right { margin-left: auto; text-align: right; }

@media (max-width: 1040px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
}
.dash-period { width: 200px; }
