  :root {
    color-scheme: light;
    --canvas: #faf6f0;
    --canvas-deep: #f3ebe0;
    --paper: #ffffff;
    --ink: #1a1410;
    --ink-soft: #3a322c;
    --ink-mute: #6b605a;
    --ink-faint: #a89e96;
    --hairline: #ece3d6;
    --hairline-strong: #d9cdba;
    --brand: #e85a1f;
    --brand-deep: #c04510;
    --brand-soft: #fde2d4;
    --coral: #ff7849;
    --magenta: #c8347c;
    --magenta-soft: #fce0ed;
    --teal: #0e9f8b;
    --teal-soft: #d3f1ec;
    --amber: #f5a524;
    --amber-soft: #fdecc8;
    --rose: #e2455d;
    --rose-soft: #fbdee3;
    --canvas-raised: #ffffff;
    --border: #ece3d6;
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-feature-settings: "ss01", "cv11";
  }
  a { color: inherit; text-decoration: none; }
  code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; background: var(--canvas-deep); padding: 1px 6px; border-radius: 4px; color: var(--ink-soft); }
  button { font-family: inherit; }
  *:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

  /* ====== Shell ====== */
  .shell { display: flex; height: 100vh; }
  aside.sidebar {
    width: 256px;
    flex-shrink: 0;
    background: var(--ink);
    color: #fff;
    display: flex;
    flex-direction: column;
  }
  .sidebar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .sidebar .brand .logo {
    width: 36px; height: 36px; border-radius: 12px;
    background: var(--brand);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px -8px rgba(232,90,31,0.6);
  }
  .sidebar .brand .logo svg { width: 20px; height: 20px; color: #fff; }
  .sidebar .brand .wordmark { font-family: "Caveat", cursive; font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.5px; }
  .sidebar .brand .eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-top: 2px; }

  .nav { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 12px; }
  .nav .nav-section { padding: 0 12px 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.35); }
  .nav .nav-section:not(:first-child) { margin-top: 16px; }
  .nav a {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    transition: background 120ms, color 120ms;
    margin-bottom: 2px;
  }
  .nav a:hover { background: rgba(255,255,255,0.05); color: #fff; }
  .nav a.active { background: rgba(255,255,255,0.1); color: #fff; }
  .nav a.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--brand); border-radius: 2px; }
  .nav a svg { width: 16px; height: 16px; color: rgba(255,255,255,0.55); flex-shrink: 0; }
  .nav a.active svg { color: var(--brand); }
  .sidebar-foot { flex-shrink: 0; border-top: 1px solid rgba(255,255,255,0.1); padding: 12px; }
  .sidebar-foot a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: rgba(255,255,255,0.65); cursor: pointer; }
  .sidebar-foot a:hover { background: rgba(255,255,255,0.05); color: #fff; }
  .sidebar-foot a svg { width: 16px; height: 16px; }
  .sidebar-foot .status {
    padding: 12px; background: rgba(255,255,255,0.05); border-radius: 12px; font-size: 12px; color: rgba(255,255,255,0.55);
  }
  .sidebar-foot .status .row { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.75); margin-bottom: 4px; font-weight: 500; }
  .sidebar-foot .status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse 2s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

  .stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
      radial-gradient(1200px 600px at 100% -10%, rgba(232, 90, 31, 0.06), transparent 60%),
      radial-gradient(900px 500px at -10% 110%, rgba(200, 52, 124, 0.05), transparent 60%),
      var(--canvas);
  }
  header.topbar {
    position: relative;
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hairline);
  }
  header.topbar::after {
    content: ""; position: absolute; inset-inline: 24px; bottom: -1px; height: 1px; opacity: 0.35;
    background: linear-gradient(90deg, transparent, var(--brand) 20%, var(--magenta) 50%, var(--teal) 80%, transparent);
  }
  header.topbar .title { font-size: 14px; font-weight: 600; color: var(--ink); }
  header.topbar .version { display: inline-block; margin-left: 8px; background: var(--canvas-deep); color: var(--ink-mute); border-radius: 999px; padding: 2px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
  header.topbar .who { display: flex; align-items: center; gap: 12px; }
  header.topbar .who .name { font-size: 14px; font-weight: 500; color: var(--ink); }
  header.topbar .who .email { font-size: 12px; color: var(--ink-mute); }
  .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; box-shadow: 0 6px 16px -8px rgba(232,90,31,0.7); }
  .signout-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--hairline); background: #fff; border-radius: 8px; font-size: 12px; color: var(--ink-soft); cursor: pointer; }
  .signout-btn:hover { border-color: var(--hairline-strong); color: var(--ink); }
  .signout-btn svg { width: 14px; height: 14px; }

  main.content { flex: 1; overflow-y: auto; padding: 32px; }
  .wrap { max-width: 1200px; margin: 0 auto; }

  /* ====== Page header ====== */
  .page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
  .page-head .eyebrow { font-family: "Caveat", cursive; font-size: 30px; font-weight: 700; color: var(--brand); line-height: 1; }
  .page-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 4px 0 0; }
  .page-head .desc { font-size: 14px; color: var(--ink-mute); margin-top: 4px; max-width: 640px; }
  .page-head .right { display: flex; align-items: center; gap: 8px; }

  /* ====== Range picker ====== */
  .range {
    display: inline-flex; align-items: center;
    background: #fff; border: 1px solid var(--hairline); border-radius: 10px;
    padding: 2px;
  }
  .range button {
    background: none; border: 0; padding: 6px 12px;
    font-size: 12px; font-weight: 500; color: var(--ink-mute);
    border-radius: 6px; cursor: pointer;
  }
  .range button:hover { color: var(--ink); }
  .range button.active { background: var(--ink); color: #fff; }

  /* ====== Sub-nav (in-page section tabs, e.g. Claude) ====== */
  .subnav {
    display: flex; align-items: center; gap: 4px;
    border-bottom: 1px solid var(--hairline);
    margin: 0 0 24px;
  }
  .subnav a {
    position: relative;
    padding: 9px 14px; margin-bottom: -1px;
    font-size: 13px; font-weight: 500; color: var(--ink-mute);
    text-decoration: none; border-bottom: 2px solid transparent;
    transition: color 120ms;
  }
  .subnav a:hover { color: var(--ink); }
  .subnav a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }

  /* ====== Search bar ====== */
  .search {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--hairline);
    border-radius: 8px; padding: 6px 12px;
  }
  .search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,90,31,0.12); }
  .search input { border: 0; outline: 0; background: transparent; font-size: 13px; width: 220px; color: var(--ink); }
  .search input::placeholder { color: var(--ink-faint); }
  .search svg { width: 14px; height: 14px; color: var(--ink-faint); }
  .search .clear { background: none; border: 0; color: var(--ink-faint); cursor: pointer; padding: 0; }
  .search .clear:hover { color: var(--ink-soft); }

  /* ====== Card ====== */
  .card {
    background: #fff;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(26,20,16,0.02), 0 8px 24px -12px rgba(26,20,16,0.08);
  }
  .card .pad { padding: 20px; }
  .section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
  .section-head .accent { display: inline-block; width: 4px; height: 20px; border-radius: 2px; margin-top: 6px; }
  .section-head .accent.brand { background: var(--brand); }
  .section-head .accent.magenta { background: var(--magenta); }
  .section-head .accent.teal { background: var(--teal); }
  .section-head .accent.amber { background: var(--amber); }
  .section-head .heading { display: flex; align-items: start; gap: 12px; }
  .section-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
  .section-head .sub { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
  .section-head .pill { background: var(--canvas-deep); color: var(--ink-mute); border-radius: 999px; padding: 2px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
  .section-head .link { font-size: 12px; font-weight: 500; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
  .section-head .link.teal { color: var(--teal); }
  .section-head .link.ink { color: var(--ink-soft); }

  /* ====== Stat cards ====== */
  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
  .stats.three { grid-template-columns: repeat(3, 1fr); }
  .stat {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--hairline); border-radius: 14px; padding: 20px;
    box-shadow: 0 1px 0 rgba(26,20,16,0.02), 0 8px 24px -12px rgba(26,20,16,0.08);
  }
  .stat .top-stroke { position: absolute; inset: 0 0 auto 0; height: 2px; }
  .stat .label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); min-width: 0; }
  .stat .icon-wrap { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .stat .icon-wrap svg { width: 14px; height: 14px; }
  .stat .value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin-top: 6px; }
  .stat .hint { font-size: 12px; color: var(--ink-mute); margin-top: 6px; }
  .stat .row-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .stat .row-bot { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
  .stat.brand .icon-wrap { background: var(--brand-soft); color: var(--brand-deep); }
  .stat.magenta .icon-wrap { background: var(--magenta-soft); color: var(--magenta); }
  .stat.teal .icon-wrap { background: var(--teal-soft); color: var(--teal); }
  .stat.amber .icon-wrap { background: var(--amber-soft); color: var(--amber); }
  .stat.rose .icon-wrap { background: var(--rose-soft); color: var(--rose); }
  .stat.brand .top-stroke { background: linear-gradient(90deg, var(--brand), transparent); }
  .stat.magenta .top-stroke { background: linear-gradient(90deg, var(--magenta), transparent); }
  .stat.teal .top-stroke { background: linear-gradient(90deg, var(--teal), transparent); }
  .stat.amber .top-stroke { background: linear-gradient(90deg, var(--amber), transparent); }
  .stat.rose .top-stroke { background: linear-gradient(90deg, var(--rose), transparent); }

  /* ====== Grid ====== */
  .grid { display: grid; gap: 20px; }
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
  .grid .span-3 { grid-column: span 3; }
  .grid .span-2 { grid-column: span 2; }

  /* ====== Bar chart ====== */
  .bar-list { display: flex; flex-direction: column; gap: 10px; }
  .bar-row .row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
  .bar-row .label { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bar-row .value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--ink-mute); }
  .bar-track { height: 8px; background: var(--canvas-deep); border-radius: 999px; overflow: hidden; }
  .bar-fill { height: 100%; border-radius: 999px; transition: width 500ms; }

  /* ====== Donut legend ====== */
  .donut-wrap { display: flex; align-items: center; gap: 20px; }
  .donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; flex: 1; }
  .donut-legend li { display: flex; align-items: center; gap: 8px; }
  .donut-legend .sw { width: 10px; height: 10px; border-radius: 3px; }
  .donut-legend .label { color: var(--ink-soft); }
  .donut-legend .value { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-mute); }

  /* ====== Tables ====== */
  .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .data-table thead th {
    text-align: left; padding: 12px 20px;
    background: rgba(243,235,224,0.6); border-bottom: 1px solid var(--hairline);
    font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute);
  }
  .data-table tbody td { padding: 12px 20px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
  .data-table tbody tr:last-child td { border-bottom: 0; }
  .data-table tbody tr { transition: background 120ms; }
  .data-table tbody tr:hover { background: rgba(243,235,224,0.4); }
  .data-table .nowrap { white-space: nowrap; }
  .data-table .right { text-align: right; }
  .table-wrap { background: #fff; border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 rgba(26,20,16,0.02), 0 8px 24px -12px rgba(26,20,16,0.08); }
  .table-cap { padding: 10px 20px; border-top: 1px solid var(--hairline); background: rgba(243,235,224,0.4); font-size: 12px; color: var(--ink-mute); }

  /* ====== Chips & badges ====== */
  .chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
  .chip.ink { background: var(--canvas-deep); color: var(--ink-soft); }
  .chip.brand { background: var(--brand-soft); color: var(--brand-deep); }
  .chip.magenta { background: var(--magenta-soft); color: var(--magenta); }
  .chip.teal { background: var(--teal-soft); color: var(--teal); }
  .chip.amber { background: var(--amber-soft); color: var(--amber); }
  .chip.rose { background: var(--rose-soft); color: var(--rose); }
  .chips { display: flex; flex-wrap: wrap; gap: 4px; }

  .user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--canvas-deep); color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; margin-right: 10px; vertical-align: middle; }

  .muted { color: var(--ink-faint); }

  /* ====== Recent activity feed ====== */
  .feed { list-style: none; padding: 0; margin: 0 -8px; }
  .feed li { display: flex; gap: 12px; padding: 8px; border-radius: 8px; transition: background 120ms; align-items: start; }
  .feed li:hover { background: rgba(243,235,224,0.6); }
  .feed .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex-shrink: 0; }
  .feed .body { flex: 1; min-width: 0; }
  .feed .top-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
  .feed .skill { font-weight: 500; color: var(--ink); }
  .feed .who { font-size: 12px; color: var(--ink-mute); }
  .feed .dot-sep { color: var(--ink-faint); font-size: 11px; }
  .feed .summary { font-size: 12px; color: var(--ink-mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .feed .ago { font-size: 12px; color: var(--ink-faint); flex-shrink: 0; }

  /* ====== Skill catalog cards ====== */
  .skill-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
  .skill-card { background: #fff; border: 1px solid var(--hairline); border-radius: 14px; padding: 16px; cursor: pointer; transition: border-color 120ms, transform 120ms, box-shadow 120ms; display: flex; flex-direction: column; gap: 10px; text-align: left; }
  .skill-card:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(26,20,16,0.18); }
  .skill-card .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .skill-card .name { font-size: 14px; font-weight: 600; color: var(--ink); word-break: break-word; }
  .skill-card .desc { font-size: 12px; line-height: 1.5; color: var(--ink-mute); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .skill-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--ink-faint); margin-top: auto; }
  .skill-card .foot .events { color: var(--ink-soft); font-weight: 500; }
  .skill-card.silent { opacity: 0.78; }

  /* ====== Skill drawer ====== */
  .drawer-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(26, 20, 16, 0); transition: background 180ms ease;
    display: flex; justify-content: flex-end;
  }
  .drawer-overlay.open { background: rgba(26, 20, 16, 0.42); }
  .drawer {
    position: relative;
    width: min(640px, 100%); height: 100%; background: var(--canvas);
    border-left: 1px solid var(--hairline);
    box-shadow: -24px 0 60px -30px rgba(26, 20, 16, 0.35);
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 200ms ease;
    overflow-y: auto;
  }
  .drawer-overlay.open .drawer { transform: translateX(0); }
  .drawer-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 8px;
    background: #fff; border: 1px solid var(--hairline);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--ink-soft);
  }
  .drawer-close:hover { color: var(--ink); border-color: var(--hairline-strong); }
  .drawer-close svg { width: 14px; height: 14px; }
  .drawer-head { padding: 28px 28px 20px; border-bottom: 1px solid var(--hairline); background: #fff; }
  .drawer-head .eyebrow { font-family: "Caveat", cursive; font-size: 22px; color: var(--brand); line-height: 1; }
  .drawer-head .title-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
  .drawer-head h2 { margin: 0; font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; word-break: break-word; }
  .drawer-head .desc { font-size: 13px; line-height: 1.55; color: var(--ink-mute); margin: 10px 0 0; }
  .drawer-head .drawer-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
  .drawer-section { padding: 20px 28px; border-bottom: 1px solid var(--hairline); }
  .drawer-section:last-child { border-bottom: 0; }
  .drawer-section h3 { margin: 0 0 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
  .scripts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .scripts-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: #fff; border: 1px solid var(--hairline); border-radius: 8px; font-size: 13px; }
  .scripts-list li code { background: transparent; padding: 0; font-size: 12px; color: var(--ink); }
  .scripts-list li .muted { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
  .skill-md {
    margin: 0; padding: 16px 18px;
    background: #fff; border: 1px solid var(--hairline); border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
    line-height: 1.55; color: var(--ink-soft);
    white-space: pre-wrap; word-break: break-word;
    max-height: 560px; overflow-y: auto;
  }

  /* ====== Empty state ====== */
  .empty { display: flex; flex-direction: column; align-items: center; padding: 28px 20px; text-align: center; }
  .empty .bar { width: 40px; height: 6px; background: var(--hairline-strong); border-radius: 999px; margin-bottom: 10px; }
  .empty .title { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
  .empty .hint { font-size: 12px; color: var(--ink-mute); margin-top: 4px; max-width: 360px; }

  /* ====== Sign-in & forbidden ====== */
  .center {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background:
      radial-gradient(1200px 600px at 50% -10%, rgba(232, 90, 31, 0.12), transparent 60%),
      radial-gradient(900px 500px at 50% 110%, rgba(200, 52, 124, 0.08), transparent 60%),
      var(--canvas);
  }
  .panel {
    background: #fff; border: 1px solid var(--hairline); border-radius: 18px;
    box-shadow: 0 1px 0 rgba(26,20,16,0.02), 0 20px 60px -20px rgba(26,20,16,0.15);
    padding: 36px; max-width: 420px; width: 100%; text-align: center;
  }
  .panel .logo-big {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px;
    background: var(--brand); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px -10px rgba(232,90,31,0.6);
  }
  .panel .logo-big svg { width: 28px; height: 28px; color: #fff; }
  .panel .wordmark { font-family: "Caveat", cursive; font-size: 38px; font-weight: 700; line-height: 1; color: var(--ink); }
  .panel .eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute); margin: 4px 0 16px; }
  .panel h1 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--ink); }
  .panel p { color: var(--ink-mute); font-size: 13px; margin: 0 0 22px; }
  .btn-primary { padding: 11px 22px; background: var(--ink); color: #fff; border: 0; border-radius: 10px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 120ms; }
  .btn-primary:hover { background: var(--brand); }
  .btn-primary:disabled { opacity: 0.6; cursor: progress; }
  .btn-ghost { background: #fff; color: var(--ink-soft); border: 1px solid var(--hairline); padding: 9px 18px; border-radius: 10px; font-size: 13px; cursor: pointer; }
  .btn-sm { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 12px; font-weight: 500; background: #fff; color: var(--ink-soft); border: 1px solid var(--hairline); border-radius: 7px; cursor: pointer; transition: border-color 120ms, color 120ms; }
  .btn-sm:hover { border-color: var(--hairline-strong); color: var(--ink); }
  .btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }
  .dl-group { display: inline-flex; gap: 6px; }
  .dl-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 12px; font-weight: 500; white-space: nowrap; transition: color 120ms, border-color 120ms; }
  .dl-btn svg { width: 14px; height: 14px; }
  .dl-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }
  .dl-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .err { background: var(--rose-soft); color: var(--rose); padding: 10px 14px; border-radius: 8px; font-size: 12px; margin-top: 14px; }

  .loading { padding: 32px; text-align: center; font-size: 13px; color: var(--ink-mute); }

  /* ===== Plugins page ===== */
  .install-block { display: flex; flex-direction: column; gap: 8px; }
  .install-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 10px; }
  .install-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
  .install-value { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .install-code { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink); background: var(--canvas-deep); border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .copy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 12px; }
  .copy-btn svg { width: 14px; height: 14px; }
  .copy-btn.copied { color: var(--teal); border-color: var(--teal); }

  .plugin-card .pad { padding: 22px 24px; }
  .plugin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
  .plugin-title { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
  .plugin-title .icon-wrap { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--brand-soft, rgba(232,90,31,0.12)); color: var(--brand); flex-shrink: 0; }
  .plugin-title .icon-wrap svg { width: 22px; height: 22px; }
  .plugin-title .name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .plugin-title h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
  .plugin-title .desc { margin: 4px 0 0; font-size: 13px; color: var(--ink-mute); line-height: 1.5; }
  .plugin-head .btn-ghost { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 7px 12px; white-space: nowrap; }
  .plugin-head .btn-ghost svg { width: 14px; height: 14px; }

  .plugin-skill-grid { display: flex; flex-direction: column; gap: 6px; }
  .plugin-skill-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--hairline); border-radius: 10px; text-align: left; cursor: pointer; transition: border-color 120ms, background 120ms; font: inherit; color: inherit; }
  .plugin-skill-row:hover { border-color: var(--brand); background: var(--canvas-deep); }
  .plugin-skill-row .row-main { min-width: 0; flex: 1; }
  .plugin-skill-row .name { font-size: 13px; font-weight: 600; color: var(--ink); }
  .plugin-skill-row .sub { font-size: 12px; color: var(--ink-mute); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .plugin-skill-row .row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .plugin-skill-row .events { font-size: 11px; color: var(--ink-faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
  .plugin-skill-row .arrow { display: inline-flex; color: var(--ink-faint); }
  .plugin-skill-row .arrow svg { width: 14px; height: 14px; }

  .plugin-mcp-list { display: flex; flex-direction: column; gap: 10px; }
  .plugin-mcp-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--hairline); border-radius: 12px; }
  .plugin-mcp-row .row-main { min-width: 0; flex: 1; }
  .plugin-mcp-row .name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  .plugin-mcp-row .name { font-size: 14px; font-weight: 600; color: var(--ink); }
  .plugin-mcp-row .url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--ink-mute); background: var(--canvas-deep); border-radius: 6px; padding: 4px 8px; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .plugin-mcp-row .row-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
  .plugin-mcp-row .metric { text-align: center; }
  .plugin-mcp-row .metric .v { font-size: 16px; font-weight: 700; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
  .plugin-mcp-row .metric .v.rose { color: var(--rose); }
  .plugin-mcp-row .metric .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin-top: 2px; }
  .plugin-mcp-row .btn-ghost { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 7px 12px; }
  .plugin-mcp-row .btn-ghost svg { width: 14px; height: 14px; }

  @media (max-width: 720px) {
    .install-row { grid-template-columns: 1fr; }
    .plugin-head { flex-direction: column; }
    .plugin-mcp-row { flex-direction: column; }
    .plugin-mcp-row .row-right { width: 100%; justify-content: space-between; }
  }

  @media (max-width: 920px) {
    .stats, .stats.three { grid-template-columns: 1fr 1fr; }
    .grid.cols-2, .grid.cols-5 { grid-template-columns: 1fr; }
    .grid .span-3, .grid .span-2 { grid-column: span 1; }
    aside.sidebar { display: none; }
    main.content { padding: 20px; }
  }

  /* ============ Time-saved hero ============ */
  .hero-saved {
    margin-bottom: 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--magenta) 100%);
    color: #fff8f0;
    box-shadow: 0 8px 24px -12px rgba(232, 90, 31, 0.5);
    overflow: hidden;
  }
  .hero-saved-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    padding: 28px 32px;
    align-items: center;
  }
  .hero-saved-main .eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 248, 240, 0.78);
    margin: 0 0 8px 0;
  }
  .hero-saved-value {
    font-family: "Caveat", ui-rounded, system-ui, sans-serif;
    font-size: 88px;
    line-height: 0.95;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
  }
  .hero-saved-sub {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: rgba(255, 248, 240, 0.88);
  }
  .hero-saved-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(2px);
  }
  .hero-saved-side-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 13px;
  }
  .hero-saved-side-row .label {
    color: rgba(255, 248, 240, 0.72);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.12em;
    font-weight: 600;
  }
  .hero-saved-side-row .v {
    color: #fff;
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
  }
  @media (max-width: 720px) {
    .hero-saved-inner { grid-template-columns: 1fr; padding: 22px 22px; }
    .hero-saved-value { font-size: 72px; }
  }

  /* ============ Leaderboard ============ */
  ol.leaderboard {
    list-style: none;
    margin: 4px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  ol.leaderboard li {
    display: grid;
    grid-template-columns: 28px 32px 1.2fr 2fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--hairline);
  }
  ol.leaderboard li:last-child { border-bottom: none; }
  ol.leaderboard .rank {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: var(--ink-faint);
    font-weight: 600;
  }
  ol.leaderboard li:nth-child(1) .rank { color: var(--brand); }
  ol.leaderboard li:nth-child(2) .rank { color: var(--magenta); }
  ol.leaderboard li:nth-child(3) .rank { color: var(--teal); }
  ol.leaderboard .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }
  ol.leaderboard li:nth-child(2n) .avatar { background: var(--magenta-soft); color: var(--magenta); }
  ol.leaderboard .who .name { font-size: 14px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  ol.leaderboard .who .email { font-size: 11px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  ol.leaderboard .bar-wrap {
    height: 8px;
    background: var(--hairline);
    border-radius: 999px;
    overflow: hidden;
  }
  ol.leaderboard .bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand) 0%, var(--magenta) 100%);
    border-radius: 999px;
    transition: width 240ms ease-out;
  }
  ol.leaderboard .saved { text-align: right; min-width: 84px; }
  ol.leaderboard .saved .amt { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
  ol.leaderboard .saved .runs { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
  @media (max-width: 720px) {
    ol.leaderboard li { grid-template-columns: 24px 28px 1fr auto; }
    ol.leaderboard .bar-wrap { display: none; }
  }

/* ============ Docs ============ */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  align-items: start;
  min-height: calc(100vh - 120px);
}
.docs-nav {
  position: sticky;
  top: 24px;
  padding: 8px 0 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs-nav-item {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  text-decoration: none;
  transition: background 120ms, color 120ms;
  border-left: 2px solid transparent;
}
.docs-nav-item:hover { background: var(--canvas-deep); color: var(--ink); }
.docs-nav-item.active { background: var(--brand-soft); color: var(--brand-deep); border-left-color: var(--brand); font-weight: 600; }
.docs-content {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 36px 40px 48px;
  max-width: 780px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.docs-content h1 { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 4px; letter-spacing: -0.02em; }
.docs-content h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 28px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hairline); }
.docs-content h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 20px 0 6px; }
.docs-content h4 { font-size: 13px; font-weight: 600; color: var(--ink-mute); margin: 16px 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.docs-content p { margin: 0 0 12px; }
.docs-content ul, .docs-content ol { margin: 0 0 12px; padding-left: 22px; }
.docs-content li { margin-bottom: 4px; }
.docs-content li + li { margin-top: 2px; }
.docs-content blockquote {
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  padding: 10px 16px;
  color: var(--ink-mute);
  font-size: 13px;
}
.docs-content hr { border: none; border-top: 1px solid var(--hairline); margin: 24px 0; }
.docs-content strong { font-weight: 600; color: var(--ink); }
.docs-content em { font-style: italic; }
.docs-code {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--brand-deep);
}
.docs-pre {
  background: var(--ink);
  color: var(--canvas);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 0;
  overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
}
.docs-pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.docs-table-wrap { overflow-x: auto; margin: 16px 0; }
.docs-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.docs-table th {
  background: var(--canvas);
  color: var(--ink-mute);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
}
.docs-table td { padding: 8px 12px; border-bottom: 1px solid var(--hairline); color: var(--ink); }
.docs-table tr:last-child td { border-bottom: none; }
.docs-table tr:nth-child(even) td { background: var(--canvas); }
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; padding: 0 0 16px; }
  .docs-content { padding: 24px; }
}
