/* Console v2 — framed-sheet style (tasteskill app sheet, seed 370553364), brand kept from v1:
   the Homies blue on data and the selected state, the system face. Face chosen: the frame takes one
   low-chroma step of the brand blue; the white sheet holds the work.
   Grid at 1440: sidebar 228 + sheet (1440 - 228 - 8 inset) = 1204; sheet padding 24 -> 1156 content.
   Converse: phone 320 + 24 + trail 468 + 24 + rail 320 = 1156. */
:root {
  --frame: #f2f5f9;          /* the L-frame: one blue-grey step from the brand hue */
  --ground: var(--frame);
  --surface: #ffffff;
  --raised: #f6f8fa;
  --active: #e6ebf1;
  --border: #e6e9ed;
  --rule: #eff1f4;
  --control: #cfd5dc;
  --text: #111113;
  --muted: #5d6168;
  --faint: #6b6f76;
  --accent: #1d5fbf;         /* Homies blue: data, the confirmed path, the selected thing */
  --accent-pale: #eaf1fb;
  --primary: #1d1f20; --primary-ink: #ffffff;
  --positive: #247b50; --negative: #c4242a; --warning: #92400e;
  --pill-positive-bg: #dcfae5; --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb; --pill-warning-ink: #92400e;
  --pill-neutral-bg: #eef0f3; --pill-neutral-ink: #3d4148;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-title: 24px; --fs-section: 16px; --fs-body: 14px; --fs-small: 12px;
  --sidebar: 228px; --pad: 24px; --gap: 24px; --card-pad: 20px;
  --radius-sheet: 16px; --radius-card: 10px; --radius-control: 6px; --radius-chip: 4px;
  --control-height: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--frame); color: var(--text); font: 400 var(--fs-body)/20px var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell: one tinted L-frame, white sheet inset 8px right and bottom ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: 48px 1fr; min-height: 100vh; }
.sidebar { grid-row: 1 / 3; padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; margin-bottom: 4px; text-decoration: none; }
.brand-mark { width: 24px; height: 24px; flex: none; }
.brand-name { font-weight: 600; font-size: 15px; }
.scope { display: flex; flex-direction: column; padding: 6px 8px 14px; color: var(--muted); font-size: 12px; line-height: 16px; }
.scope b { color: var(--text); font-weight: 500; font-size: 13px; }
.nav-group { margin-top: 18px; padding: 0 8px 6px; font-size: 12px; color: var(--faint); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--muted); text-decoration: none; transition: background var(--t, 150ms) var(--ease), color 150ms var(--ease); }
.nav-item svg { width: 16px; height: 16px; flex: none; }
.nav-item:hover { background: var(--active); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 500; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; color: var(--faint); font-size: 12px; line-height: 16px; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 0 16px 0 24px; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-width: 0; white-space: nowrap; }
.crumbs .sep { color: var(--control); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sheet { grid-column: 2; margin: 0 8px 8px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sheet); padding: var(--pad); min-width: 0; }
.menu-toggle { display: none; }

/* ---------- title row ---------- */
.title-row { display: flex; align-items: flex-start; gap: 16px; }
.title-row h1 { margin: 0; font-size: var(--fs-title); line-height: 30px; font-weight: 650; letter-spacing: -0.01em; }
.title-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 22px; max-width: 720px; }
.title-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.stamp { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-height); padding: 0 14px; border-radius: var(--radius-control); border: 1px solid var(--control); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background 150ms var(--ease), transform 120ms var(--ease); }
.btn:hover { background: var(--raised); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:hover { background: #33363a; }
.btn[disabled] { opacity: 1; color: var(--faint); background: var(--raised); cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }
.segmented { display: inline-flex; padding: 2px; gap: 2px; background: var(--raised); border: 1px solid var(--border); border-radius: 8px; }
.segmented button { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; color: var(--muted); font-size: 13px; white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 500; outline: 1px solid var(--border); outline-offset: -1px; }

/* ---------- panels ---------- */
.panel { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); min-width: 0; }
.panel-head { display: flex; align-items: baseline; gap: 12px; padding: 16px var(--card-pad) 0; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: var(--fs-section); line-height: 22px; font-weight: 600; }
.panel-head .meta { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.panel-body { padding: 12px var(--card-pad) var(--card-pad); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; flex: none; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.pill.positive { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.negative { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.warning { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.pill.accent { background: var(--accent-pale); color: #123f80; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--control); }
.dot.accent { background: var(--accent); } .dot.positive { background: var(--positive); } .dot.negative { background: var(--negative); } .dot.warning { background: #c27a12; }
.tag { display: inline-flex; height: 22px; align-items: center; padding: 0 7px; border-radius: var(--radius-chip); background: var(--raised); border: 1px solid var(--border); font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- notice ---------- */
.notice { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid #fde68a; background: #fffbeb; color: #92400e; border-radius: 8px; font-size: 12px; line-height: 16px; }

/* ---------- phone fold ---------- */
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 48px 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 30; background: var(--frame); transform: translateX(-100%); transition: transform 200ms var(--ease); }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 12px 28px rgba(0,0,0,.12); } /* taste-skill-ignore: the open menu floats */
  .menu-toggle { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 8px; cursor: pointer; }
  .menu-toggle svg { width: 18px; height: 18px; }
  .topbar { padding: 0 12px; }
  .sheet { grid-column: 1; margin: 0 8px 8px 8px; }
}
@media (max-width: 640px) {
  :root { --pad: 16px; --card-pad: 16px; }
  .sheet { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .title-row { flex-direction: column; }
  .title-actions { margin-left: 0; flex-wrap: wrap; }
  .title-row h1 { font-size: 22px; }
  .crumbs .crumb-run { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0ms !important; animation-duration: 0ms !important; } }
