:root {
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #f2f3f6; --side: #fafbfc; --text: #15161b; --muted: #636674; --faint: #979aa7;
  --border: #e4e6eb; --border-strong: #d0d3db;
  --brand-1: #26c4ad; --brand-2: #0a8478;
  --accent: #0b7f75; --accent-soft: #e0f6f2; --accent-text: #ffffff; --code: #f6f7f9;
  --good: #16803c; --good-soft: #e3f6e9; --warn: #a15c00; --warn-soft: #fff3dc; --bad: #d1343b; --bad-soft: #ffe9e9;
  --tip: #2a64d6; --tip-soft: #e3edff; --gold: #b07a00;
  --heat-0: #ebecf0; --heat-1: #a7e9df; --heat-2: #5ccfbf; --heat-3: #14a594; --heat-4: #0b6f66;
  --shadow: 0 1px 2px rgba(16, 18, 28, .04), 0 1px 3px rgba(16, 18, 28, .06);
  --shadow-lg: 0 14px 36px rgba(16, 18, 28, .12), 0 2px 6px rgba(16, 18, 28, .06);
  /* A hairline of light along the top of raised surfaces. */
  --lift: inset 0 1px 0 rgba(255, 255, 255, .7);
  --radius: 16px; --radius-sm: 10px;
  /* Tones for icon tiles and tool cards: [ink, wash]. */
  --teal: #0b8f82; --teal-soft: #dcf5f1; --blue: #2563d8; --blue-soft: #e1ebff; --violet: #7048e8; --violet-soft: #ece6ff;
  --amber: #b26a00; --amber-soft: #fff1d6; --rose: #d6336c; --rose-soft: #ffe3ec; --green: #2b8a3e; --green-soft: #e1f5e5;
  --slate: #4c5566; --slate-soft: #eaedf2;
  /* Primary buttons: the accent, lit from above, with a soft glow under it (follows the theme's accent). */
  --accent-grad: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent));
  --accent-glow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b0f; --panel: #121419; --panel-2: #191c23; --side: #0d0e13; --text: #eceef3; --muted: #9a9fb0; --faint: #686d7c;
    --border: #23262f; --border-strong: #323643;
    --accent: #2fd4bd; --accent-soft: #10302c; --accent-text: #0b0b0f; --code: #0f1116;
    --good: #4ac77a; --good-soft: #12261a; --warn: #e0a83a; --warn-soft: #2a2110; --bad: #ff6b6b; --bad-soft: #2e1517;
    --tip: #6aa1ff; --tip-soft: #142340; --gold: #e8bb4a;
    --heat-0: #21242c; --heat-1: #12443f; --heat-2: #1b7c70; --heat-3: #2fbfa9; --heat-4: #9cefe0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
    --lift: inset 0 1px 0 rgba(255, 255, 255, .035);
    --teal: #3ad8c2; --teal-soft: #0f2f2b; --blue: #7aa7ff; --blue-soft: #15223d; --violet: #a68bff; --violet-soft: #221a3d;
    --amber: #f0b44c; --amber-soft: #2b2110; --rose: #ff7aa2; --rose-soft: #331522; --green: #5fd38a; --green-soft: #12281a;
    --slate: #aab2c3; --slate-soft: #1e222b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b0f; --panel: #121419; --panel-2: #191c23; --side: #0d0e13; --text: #eceef3; --muted: #9a9fb0; --faint: #686d7c;
  --border: #23262f; --border-strong: #323643;
  --accent: #2fd4bd; --accent-soft: #10302c; --accent-text: #0b0b0f; --code: #0f1116;
  --good: #4ac77a; --good-soft: #12261a; --warn: #e0a83a; --warn-soft: #2a2110; --bad: #ff6b6b; --bad-soft: #2e1517;
  --tip: #6aa1ff; --tip-soft: #142340; --gold: #e8bb4a;
  --heat-0: #21242c; --heat-1: #12443f; --heat-2: #1b7c70; --heat-3: #2fbfa9; --heat-4: #9cefe0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
  --lift: inset 0 1px 0 rgba(255, 255, 255, .035);
  --teal: #3ad8c2; --teal-soft: #0f2f2b; --blue: #7aa7ff; --blue-soft: #15223d; --violet: #a68bff; --violet-soft: #221a3d;
  --amber: #f0b44c; --amber-soft: #2b2110; --rose: #ff7aa2; --rose-soft: #331522; --green: #5fd38a; --green-soft: #12281a;
  --slate: #aab2c3; --slate-soft: #1e222b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
img { max-width: 100%; }
a { color: var(--tip); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 24px; margin: 0; letter-spacing: -0.025em; font-weight: 700; }
h2 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.02em; }
h3 { font-size: 14px; margin: 0 0 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
h3 > .icon { color: var(--muted); }
.lead { color: var(--muted); margin: 0 0 20px; max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; display: inline-block; vertical-align: -0.15em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.kbd, kbd { font: 500 11px/1 var(--mono); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; background: var(--panel); color: var(--muted); }

/* ---- The app shell: a sidebar on wide screens, a top bar with scrolling tabs on small ones ---- */
.shell { min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
/* The logo is a 12×12 pixel grid: 24px inside the tile keeps every cell exactly 2px (4px on retina). */
.logo { flex: none; width: 32px; height: 32px; padding: 4px; border-radius: 9px; background: linear-gradient(160deg, var(--brand-1), var(--brand-2)); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--brand-2) 35%, transparent); }
.brand-text { display: grid; min-width: 0; }
.brand-text b { font-size: 16px; letter-spacing: -0.02em; }
#tagline { display: none; }
.side-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.side-toggle { border: 0; background: transparent; padding: 6px; color: var(--muted); border-radius: 8px; display: grid; place-items: center; }
.side-toggle:hover { background: var(--panel-2); color: var(--text); }
.side-search { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; text-align: left; box-shadow: var(--shadow); }
.side-search .label { flex: 1; }
.side-search:hover { border-color: var(--border-strong); color: var(--text); }
.toolbar { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
/* Language, theme, motion, help and GitHub fit on one line at the foot of the sidebar. */
.side-foot.toolbar { gap: 2px; flex-wrap: nowrap; }
.side-foot .btn.icon-only { padding: 5px; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 4px 9px; border-radius: 6px; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.icon-btn { border: 1px solid var(--border); background: var(--panel); border-radius: 8px; padding: 5px 10px; font-size: 14px; text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 6px; }

.nav-group { display: grid; gap: 2px; }
.nav-head { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 0 10px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 13.5px; transition: background .12s, color .12s; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.nav-item[aria-current="page"] .icon { color: var(--accent); }
@media (min-width: 960px) {
  .nav-item[aria-current="page"]::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
}
.nav-item .label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font: 600 11px/18px var(--mono); background: var(--bad); color: #fff; border-radius: 99px; padding: 0 6px; min-width: 18px; text-align: center; }
.nav-cta { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--text); background: linear-gradient(160deg, var(--accent-soft), var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.nav-cta .icon { color: var(--accent); }
.nav-cta .label { display: grid; font-size: 13px; line-height: 1.35; }
.nav-cta small { color: var(--muted); font-size: 11.5px; }
.nav-cta[aria-current="page"] { border-color: var(--accent); }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); transition: grid-template-columns .18s ease; }
  .shell.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 16px 12px 14px; border-right: 1px solid var(--border); background: var(--side); overflow: hidden auto; }
  nav.tabs { flex: 1; display: flex; }
  nav.tabs .inner { flex: 1; display: flex; flex-direction: column; gap: 18px; }
  .nav-group.bottom { margin-top: auto; }
  .side-foot { padding: 0 2px; }
  main { padding: 32px 40px 40px; }
  .collapsed .brand-text, .collapsed .nav-head, .collapsed .nav-item .label, .collapsed .side-search .label, .collapsed .side-search .kbd,
  .collapsed .nav-cta .label, .collapsed .side-foot .seg { display: none; }
  .collapsed .side-top { flex-direction: column; }
  .collapsed .nav-item, .collapsed .side-search, .collapsed .nav-cta { justify-content: center; padding: 9px 0; }
  .collapsed .badge { position: absolute; top: 2px; right: 6px; font-size: 10px; line-height: 15px; min-width: 15px; padding: 0 4px; }
  .collapsed .side-foot { flex-direction: column; }
}
@media (max-width: 959px) {
  .side { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px 16px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .side-toggle { display: none; }
  .side-search { width: auto; grid-column: 2; grid-row: 1; padding: 6px 8px; }
  .side-search .label, .side-search .kbd { display: none; }
  .side-foot { grid-column: 3; grid-row: 1; }
  nav.tabs { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px; }
  nav.tabs::-webkit-scrollbar { display: none; }
  nav.tabs .inner { display: flex; gap: 2px; }
  .nav-group { display: flex; gap: 2px; }
  .nav-head { display: none; }
  .nav-item { flex: none; border-radius: 0; padding: 9px 10px 11px; border-bottom: 2px solid transparent; }
  .nav-item[aria-current="page"] { background: transparent; box-shadow: none; border-bottom-color: var(--accent); }
  .nav-cta { flex: none; padding: 6px 10px; margin: 4px 0 6px; }
  .nav-cta small { display: none; }
}
/* The desktop app on macOS draws its own title bar: leave room for the window buttons. */
.os-darwin.mode-desktop .side { -webkit-app-region: drag; }
.os-darwin.mode-desktop .side a, .os-darwin.mode-desktop .side button, .os-darwin.mode-desktop .side input { -webkit-app-region: no-drag; }
@media (min-width: 960px) { .os-darwin.mode-desktop .side { padding-top: 44px; } }

main { max-width: 1240px; margin: 0 auto; padding: 24px 16px 40px; }
.view { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view, .toast, .pop, .wobble, .pet-card, .spin, .shell { animation: none !important; transition: none !important; } }
footer { color: var(--faint); font-size: 12px; text-align: center; padding: 8px 16px 40px; }
footer a { color: inherit; }

/* Building blocks */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow), var(--lift); min-width: 0; }
.panel + .panel { margin-top: 16px; }
.stack > .panel + .panel { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 880px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
input, select, button, textarea { font: inherit; color: inherit; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; min-width: 0; width: 100%;
}
input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 0; }
button { cursor: pointer; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); padding: 8px 13px; transition: transform .06s, background .15s, border-color .15s; }
button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent-grad); color: var(--accent-text); border-color: transparent; font-weight: 600; box-shadow: var(--accent-glow); }
button.primary:hover { filter: brightness(1.06); }
button.ghost { background: transparent; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.chip { padding: 3px 11px; border-radius: 999px; font-size: 13px; }
.chip:hover { background: var(--panel-2); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
label.field, div.field { display: grid; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.fields > .wide { grid-column: 1 / -1; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.status { min-height: 1.5em; color: var(--muted); font-size: 14px; }
.status.bad { color: var(--bad); }
details { font-size: 13px; color: var(--muted); }
details summary { cursor: pointer; }
.kbd { font: 11.5px var(--mono); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--panel-2); }

/* Pet pictures */
.card-img { width: 100%; max-width: 520px; height: auto; display: block; aspect-ratio: 520 / 256; }
.mini-img { width: 160px; max-width: 100%; height: auto; display: block; aspect-ratio: 160 / 192; }
.badge-img { height: 28px; width: auto; display: block; }
/* A moving picture is the SVG inline (site/motion.js): it clips to its corners like an <img>. */
span[role="img"]:is(.card-img, .mini-img, .park-img) { overflow: hidden; }
.shots { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 13px; }

/* Hatch */
.hero { text-align: center; padding: 8px 0 18px; }
.hero h2 { font-size: clamp(26px, 4.8vw, 38px); letter-spacing: -0.03em; background: linear-gradient(100deg, var(--text) 35%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 2px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 3px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); }
/* The repo box: one wide search bar with the button inside it. */
form.hatch { display: flex; gap: 8px; align-items: center; max-width: 620px; margin: 18px auto 0; padding: 6px 6px 6px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); transition: border-color .15s, box-shadow .15s; }
form.hatch:focus-within { border-color: var(--accent); box-shadow: var(--shadow-lg), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
form.hatch > .icon { color: var(--muted); }
form.hatch input { font-family: var(--mono); font-size: 14.5px; border: 0; background: transparent; padding: 8px 4px; }
form.hatch input:focus { outline: none; }
form.hatch button { flex: none; white-space: nowrap; padding: 10px 20px; border-radius: 10px; }
.examples { margin: 12px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; align-items: center; }
.hero details { max-width: 580px; margin: 12px auto 0; text-align: left; }
.hero details input { margin: 6px 0; }
.hero .status { text-align: center; margin-top: 12px; }

ul.checkup { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
ul.checkup li { display: flex; gap: 10px; align-items: flex-start; }
ul.checkup .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }
.good .dot { background: var(--good); } .warn .dot { background: var(--warn); } .bad .dot { background: var(--bad); } .tip .dot { background: var(--tip); }

/* Meters, quest bars, scores */
.meter { height: 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.meter.good > i { background: var(--good); }
.quest { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.quest:last-child { border-bottom: 0; }
.quest .em { font-size: 20px; text-align: center; }
.quest .meter { grid-column: 2 / 4; }
.quest.done .txt { text-decoration: line-through; color: var(--muted); }
.new-tag { display: inline-block; margin-left: 6px; font-size: 14px; } /* inline-block keeps the strike-through off the badge */
.quest .n { font: 600 13px var(--mono); color: var(--muted); }
.quest.done .n { color: var(--good); }
.scores { display: grid; gap: 10px; }
.score { display: grid; grid-template-columns: 120px minmax(0, 1fr) 42px; gap: 10px; align-items: center; font-size: 14px; }
.score b { font: 600 12px var(--mono); text-align: right; color: var(--muted); }
.score.lead { margin: 0; max-width: none; } /* .lead is also the page-intro class: drop its margin here */
.score.lead b, .score.lead span { color: var(--text); font-weight: 700; }

/* Simulator */
.sim-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.day-pill { font: 700 15px var(--mono); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; }
.stage { display: grid; gap: 12px; }
.stage .pics { display: flex; justify-content: center; position: relative; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions .grow { flex: 1; }
.big-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.big-actions button { font-size: 15px; padding: 10px 6px; }
.timeline { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .timeline { grid-template-columns: 1fr 1fr; } .timeline .wide { grid-column: 1 / -1; } }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; }
.ctl { display: grid; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.ctl .head { display: flex; justify-content: space-between; gap: 8px; }
.ctl .head b { color: var(--text); font: 600 13px var(--mono); }
.ctl .seg { display: flex; }
.ctl .seg button { flex: 1; padding: 5px 4px; white-space: nowrap; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .vital { padding: 6px 8px; font-size: 11px; } .vital b { font-size: 16px; } }
.vital { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.vital b { display: block; font: 700 18px var(--mono); color: var(--text); }
.vital .delta { font: 600 11px var(--mono); margin-left: 4px; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.subtabs button { font-size: 13px; padding: 5px 10px; border-radius: 8px; background: transparent; }
.subtabs button[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.diary { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 420px; overflow: auto; font-size: 13.5px; }
.diary li { padding: 8px 10px; background: var(--panel-2); border-radius: 9px; border: 1px solid var(--border); }
.diary li b { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.strip { font-size: 18px; letter-spacing: 2px; overflow-wrap: anywhere; }

/* Item and codex grids */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 10px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); font-size: 13px; position: relative; min-width: 0; }
button.tile { cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
button.tile:not(:disabled):hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-lg); }
/* Pets scrolled out of view are neither drawn nor animated until they come back. */
.tiles .tile { content-visibility: auto; contain-intrinsic-size: auto 190px; }
.tile .em { font-size: 26px; line-height: 1.1; }
.tile .name { font-weight: 600; }
.tile .hint { color: var(--muted); font-size: 12px; }
.tile.locked { opacity: .62; }
.tile.locked .em { filter: grayscale(1); }
.tile.on { border-color: var(--accent); background: var(--accent-soft); }
.tile .tag { position: absolute; top: 6px; right: 6px; font-size: 11px; color: var(--accent); font-weight: 700; }
.tile img { width: 112px; height: auto; aspect-ratio: 160 / 192; }
.tile.new { animation: pop .6s ease-out; }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.codex-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; position: sticky; top: var(--nav-h, 44px); z-index: 5; background: var(--bg); padding: 8px 0; border-bottom: 1px solid var(--border); }
.codex-sec { scroll-margin-top: calc(var(--nav-h, 44px) + 64px); }
.codex-sec + .codex-sec { margin-top: 26px; }
.ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.rank { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--panel); border-left: 5px solid var(--c); }
.rank b { display: block; }

/* Code blocks and steps */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step { display: grid; gap: 6px; min-width: 0; }
.step h3 { margin: 0; font-size: 15px; }
.step h3::before { counter-increment: step; content: counter(step) ". "; color: var(--accent); }
.step p { margin: 0; color: var(--muted); font-size: 13px; }
.code { position: relative; min-width: 0; }
pre { margin: 0; background: var(--code); border: 1px solid var(--border); border-radius: 9px; padding: 12px; overflow-x: auto; font: 12.5px/1.5 var(--mono); white-space: pre; }
.code > pre { padding-right: 76px; white-space: pre-wrap; overflow-wrap: anywhere; } /* wrap, so nothing hides under the Copy button */
.code > button { position: absolute; top: 6px; right: 6px; font-size: 12px; padding: 3px 9px; background: var(--panel); }
details.manual { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--border); }
details.manual summary { font-size: 14px; }
details.manual[open] summary { margin-bottom: 12px; }
.alt { display: grid; gap: 14px; }
.alt-step { display: grid; gap: 6px; min-width: 0; }
.alt-step h4 { margin: 0; font-size: 14px; color: var(--text); }
.alt-step p { margin: 0; font-size: 13px; }
details.panel.more { font-size: 15px; color: var(--text); }
details.panel.more > summary { font-weight: 600; }
details.panel.more[open] > summary { margin-bottom: 14px; }
.tiles.compact { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.tiles.compact .tile { padding: 7px 6px; gap: 2px; }
.tiles.compact .tile .em { font-size: 20px; }
.tiles.compact .tile .hint { font-size: 11px; }
.or { text-align: center; color: var(--muted); font-size: 13px; }
a.button { display: inline-flex; justify-self: start; align-items: center; gap: 8px; border-radius: 9px; padding: 8px 13px; text-decoration: none; font-size: 14px; border: 1px solid var(--border); background: var(--panel); color: var(--text); }
a.button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
a.button.primary { background: var(--accent-grad); color: var(--accent-text); border-color: transparent; font-weight: 600; box-shadow: var(--accent-glow); }
a.button.primary:hover { filter: brightness(1.06); }
.step a.button.primary { border-radius: 10px; padding: 11px 18px; font-size: 16px; }
a.button[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Park */
.park-list { display: flex; flex-wrap: wrap; gap: 6px; }
.park-list .chip { display: inline-flex; gap: 6px; align-items: center; background: var(--panel-2); border: 1px solid var(--border); }
.park-list .chip button { border: 0; background: none; padding: 0 2px; font-size: 14px; line-height: 1; color: var(--muted); }
.park-img { width: 100%; height: auto; display: block; aspect-ratio: 840 / 280; }
.park-list:empty, .stack > .status:empty { display: none; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px; border: 2px dashed var(--border); border-radius: var(--radius); }

/* /pet console */
.console { display: grid; gap: 10px; }
.reply { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 14px; overflow-wrap: anywhere; max-height: 460px; overflow: auto; }
.reply h3, .reply h4 { margin: 4px 0 8px; font-size: 15px; }
.reply blockquote { margin: 6px 0; padding: 2px 12px; border-left: 3px solid var(--border); color: var(--text); }
.reply ul { margin: 6px 0; padding-left: 20px; }
.reply code { font: 12.5px var(--mono); background: var(--panel); border: 1px solid var(--border); border-radius: 5px; padding: 0 4px; }
.reply table { border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.reply td, .reply th { border: 1px solid var(--border); padding: 3px 8px; }
.reply sub { font-size: 12px; color: var(--muted); }
.reply p { margin: 6px 0; }
.reply img { display: block; margin: 6px 0; }
.cmd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cmd-chips button { font: 12px var(--mono); padding: 3px 8px; border-radius: 7px; }

/* Repo picker: every repo of an owner (or every repo a token can see), one click to hatch or adopt. */
.picker { max-width: 860px; margin: 0 auto 16px; }
.picker-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.picker-head h3 { margin: 0; }
.picker-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.picker-tools input[type=text] { flex: 1 1 200px; width: auto; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 460px; overflow-y: auto; }
.pick-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.pick-main { min-width: 0; display: grid; gap: 2px; }
.pick-main .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-name { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pick-tag { font-size: 11px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.pick-tag.pet { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pick-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pick-actions button, .pick-actions a.button { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.pick-actions a.button:not(.primary) { border: 1px solid var(--border); color: var(--text); }
@media (max-width: 560px) { .pick-row { flex-direction: column; align-items: stretch; } .pick-actions { justify-content: flex-end; } }

/* Toasts */
.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: grid; gap: 8px; justify-items: end; max-width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-lg); font-size: 13px; animation: toast .22s ease-out; cursor: pointer; }
.toast .icon { margin-top: 2px; color: var(--tip); }
.toast-action { flex: none; align-self: center; margin-left: 2px; padding: 3px 9px; border: 0; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.toast-action:hover { filter: brightness(1.05); }
.toast.gold .icon { color: var(--gold); }
.toast.good .icon { color: var(--good); }
.toast.bad .icon { color: var(--bad); }
@keyframes toast { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---- Components: buttons, page headers, menus, tabs ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); padding: 7px 12px; font-size: 13px; font-weight: 500; line-height: 1.2; text-decoration: none; box-shadow: var(--shadow); white-space: nowrap; }
.btn:hover { border-color: var(--border-strong); background: var(--panel-2); }
.btn .icon { color: var(--muted); }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: var(--accent-text); box-shadow: var(--accent-glow); }
.btn.primary .icon { color: inherit; }
.btn.primary:hover { background: var(--accent-grad); filter: brightness(1.07); }
.btn.sm { padding: 5px 9px; font-size: 12.5px; gap: 5px; border-radius: 7px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.btn.danger .icon { color: var(--bad); }
.btn.big { font-size: 14.5px; padding: 10px 18px; border-radius: 10px; }
.btn.icon-only { padding: 7px; }
.btn.icon-only .icon { color: inherit; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
button.big, a.button.big { font-size: 15px; padding: 11px 20px; border-radius: 10px; }
input[type=search] { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; width: 100%; min-width: 0; }
input[type=search]:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 0; }
p.ok { color: var(--good); font-weight: 600; margin: 0; display: flex; gap: 6px; align-items: center; }
.warn-text { color: var(--warn); display: flex; gap: 6px; align-items: center; }
.callout { border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.callout.bad { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--border)); }
.callout pre { background: transparent; border: 0; padding: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-sub { color: var(--muted); margin: 4px 0 0; }
/* A page's title with its icon tile: the Tools pages and the dashboard's greeting. */
.page-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-title > div { min-width: 0; }
.page-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--accent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--accent-soft)); box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.page-head.hello h1 { font-size: 26px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }

.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; padding: 5px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); display: grid; }
.menu-item { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 13px; text-align: left; text-decoration: none; box-shadow: none; }
.menu-item .icon { color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--panel-2); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 2px; }

.tabs-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 18px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 9px 12px 10px; margin-bottom: -1px; color: var(--muted); font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab[aria-selected="true"] .icon { color: var(--accent); }

/* ---- Overview: stat tiles, the activity calendar, ranked bars ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, calc(50% - 6px)), 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow), var(--lift); min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--panel-2); color: var(--muted); }
.stat.tone-teal .stat-icon { background: var(--teal-soft); color: var(--teal); }
.stat.tone-blue .stat-icon { background: var(--blue-soft); color: var(--blue); }
.stat.tone-violet .stat-icon { background: var(--violet-soft); color: var(--violet); }
.stat.tone-amber .stat-icon { background: var(--amber-soft); color: var(--amber); }
.stat.tone-rose .stat-icon { background: var(--rose-soft); color: var(--rose); }
.stat.tone-green .stat-icon { background: var(--green-soft); color: var(--green); }
.stat-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.stat-text { min-width: 0; }
.stat-value { font-size: 25px; font-weight: 680; letter-spacing: -0.025em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.spark { flex: none; width: 110px; height: 32px; overflow: visible; }
.spark rect { transition: opacity .12s; }
.spark-bar { fill: color-mix(in srgb, var(--accent) 55%, transparent); }
.spark-now { fill: var(--accent); }
.spark-zero { fill: var(--border-strong); }
.spark rect:hover { opacity: .7; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub.up { color: var(--good); }
.stat-sub.down { color: var(--bad); }
.overview { display: grid; gap: 12px; margin-bottom: 12px; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: stretch; }
.overview > .panel, .side-col, .top-panel { min-height: 100%; }
.side-col { display: grid; }
@media (max-width: 1100px) { .overview { grid-template-columns: minmax(0, 1fr); } }
.notes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 20px; }
.note-panel h3 > .icon { color: var(--warn); }
.mini-list a { display: flex; align-items: center; gap: 10px; }
.mini-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.mini-text > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat-scroll { overflow-x: auto; scrollbar-width: thin; }
.heatmap { display: block; min-width: 640px; width: 100%; height: auto; }
.heatmap .axis { font: 9.5px ui-sans-serif, system-ui, sans-serif; fill: var(--muted); }
.heatmap rect:hover { stroke: var(--text); stroke-width: 1.2; }
.h0 { fill: var(--heat-0); } .h1 { fill: var(--heat-1); } .h2 { fill: var(--heat-2); } .h3 { fill: var(--heat-3); } .h4 { fill: var(--heat-4); }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.heat-legend span { margin: 0 4px; }
.chart-tip { position: fixed; z-index: 80; pointer-events: none; background: var(--text); color: var(--bg); border-radius: 7px; padding: 6px 9px; font-size: 12px; display: grid; gap: 1px; box-shadow: var(--shadow-lg); }
.chart-tip b { font-weight: 650; }
.chart-tip span { opacity: .75; }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 12px; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; color: inherit; text-decoration: none; }
.heat-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.heat-fact { display: grid; gap: 1px; }
.heat-fact b { font-size: 15px; font-weight: 650; }
a.bar-row:hover { background: var(--panel-2); }
.bar-head { display: grid; min-width: 0; line-height: 1.3; }
.bar-label { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { display: flex; align-items: center; gap: 8px; }
.bar-track i { display: block; height: 8px; background: var(--accent); border-radius: 0 4px 4px 0; }
.bar-value { font: 600 12px var(--mono); color: var(--muted); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini-list a { padding: 7px 8px; margin: 0 -8px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 13px; }
.mini-list a:hover { background: var(--panel-2); }

/* ---- My pets: toolbar, cards and the list ---- */
.toolbar-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search-box { flex: 1 1 240px; position: relative; display: flex; align-items: center; }
.search-box .icon { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.search-box input { padding-left: 32px; }
.toolbar-end { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.toolbar-end select { width: auto; padding: 6px 10px; }
.view-seg button { padding: 5px 7px; }
.filters { flex-wrap: wrap; }
.filters .count { display: inline-block; font: 600 11px/1.6 var(--mono); color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 99px; padding: 0 6px; }
.filters button[aria-pressed="true"] .count { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pet-card { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .12s, border-color .12s, box-shadow .12s; }
.pet-card:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.pet-card { content-visibility: auto; contain-intrinsic-size: auto 132px; }
.pet-card.warn { box-shadow: var(--shadow), inset 3px 0 0 var(--warn); }
.pet-card.bad { box-shadow: var(--shadow), inset 3px 0 0 var(--bad); }
.pet-card.broken { grid-template-columns: 1fr; opacity: .7; }
.scene { aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--panel-2); flex: none; }
.scene img { display: block; width: 108.11%; max-width: none; height: auto; aspect-ratio: 160 / 192; margin: -4.054% 0 0 -4.054%; }
.pet-stage { align-self: start; }
.pet-info { min-width: 0; display: grid; gap: 4px; align-content: start; }
.pet-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pet-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv { flex: none; font: 600 11px var(--mono); color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 5px; }
.btn.pin { margin-left: auto; padding: 3px; opacity: 0; color: var(--muted); }
.pet-card:hover .btn.pin, .btn.pin.on, .btn.pin:focus-visible { opacity: 1; }
.btn.pin.on { color: var(--accent); }
.pet-repo { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-mood { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-when { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 4px 0; }
.bar { display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: center; gap: 5px; color: var(--muted); }
.bar .meter { height: 5px; border: 0; background: var(--panel-2); }
.meter.low > i { background: var(--bad); } .meter.mid > i { background: var(--warn); } .meter.ok > i { background: var(--good); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.7; padding: 0 7px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; background: var(--panel); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pill.live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--accent-soft); }
.pill.live .dot { background: var(--accent); }
.pill.waiting, .pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); background: var(--warn-soft); }
.pill.waiting .dot { background: var(--warn); }
.pill.flame { color: #d9480f; border-color: color-mix(in srgb, #d9480f 30%, var(--border)); }

.pet-table { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pet-row { display: grid; grid-template-columns: 40px minmax(160px, 1.6fr) minmax(110px, 1fr) minmax(130px, 1fr) minmax(100px, .8fr) minmax(150px, 1.2fr) 18px; gap: 14px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.pet-row.head { border-top: 0; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 7px; padding-bottom: 7px; }
a.pet-row:hover { background: var(--panel-2); }
.pet-row.warn { box-shadow: inset 3px 0 0 var(--warn); }
.pet-row.bad { box-shadow: inset 3px 0 0 var(--bad); }
.row-pet { width: 40px; border-radius: 8px; }
.row-main { min-width: 0; }
.row-mood { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-vitals .bars { margin: 0; }
.row-go { color: var(--faint); }
.pinned-mark { color: var(--accent); }
@media (max-width: 900px) {
  .pet-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .pet-row > :nth-child(3), .pet-row > :nth-child(4), .pet-row > :nth-child(5), .pet-row.head { display: none; }
  .pet-row .pills { grid-column: 2 / 4; }
}

.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 14px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); margin-bottom: 14px; font-weight: 600; }
.banner > .icon { color: var(--accent); }
.banner > span { flex: 1; }

/* ---- Onboarding ---- */
.onboard, .get-hero { max-width: 660px; margin: 0 auto; text-align: center; }
.onboard .panel { text-align: left; margin-top: 4px; }
.onboard-pets { display: flex; justify-content: center; gap: 4px; margin-bottom: 12px; }
.onboard-pets img { width: 92px; border-radius: 10px; box-shadow: var(--shadow); }
.onboard-pets img:nth-child(2) { transform: translateY(-8px); }
.onboard h1, .get-hero h1 { font-size: clamp(24px, 4vw, 30px); }
.onboard .lead, .get-hero .lead { margin: 8px auto 0; }
ul.privacy { list-style: none; padding: 0; margin: 18px auto 22px; display: grid; gap: 6px; justify-content: center; text-align: left; }
ul.privacy li { display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 7px 12px; font-size: 13.5px; }
ul.privacy li .icon { color: var(--good); }
ul.privacy.compact { margin: 0; justify-content: stretch; }
ul.privacy.compact li { background: var(--panel-2); }
.folder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.folder-list li { padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); }
.folder-list .icon { color: var(--muted); }
.folder-list .mono { overflow-wrap: anywhere; font-size: 12.5px; }
.folder-list .pick-tag { margin-left: auto; }
.folder-list label.check { width: 100%; }
.folder-row { flex-wrap: nowrap; }
.folder-row .mono { flex: 1; min-width: 0; }
.scanning { display: grid; justify-items: center; gap: 10px; padding: 80px 16px; color: var(--muted); text-align: center; }
.scanning img { width: 120px; }
.wobble { animation: wobble 1.2s ease-in-out infinite; transform-origin: 50% 85%; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }

/* ---- One pet ---- */
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .icon { color: var(--faint); }
.detail-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-title > div:nth-child(2) { flex: 1; min-width: 240px; }
.detail-avatar { width: 60px; border-radius: 12px; box-shadow: var(--shadow); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 4px; color: var(--muted); font-size: 13px; }
.detail-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; text-decoration: none; color: var(--muted); font-size: 13px; }
.detail .card-img { max-width: none; border-radius: 10px; }
.stage .vitals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vital { display: grid; gap: 4px; }
.vital-name { display: flex; align-items: center; gap: 5px; }
.vital .meter { height: 4px; border: 0; background: var(--border); }
.care-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.github-panel { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.github-panel p { margin: 0 0 10px; }
.commit-list { list-style: none; margin: 0; padding: 0; display: grid; }
.commit-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--border); }
.commit-list li:first-child { border-top: 0; padding-top: 0; }
.sha { font: 11.5px var(--mono); color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; margin-top: 1px; }
.commit-main { display: grid; min-width: 0; }
.commit-subject { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commit-link { color: var(--muted); }
.progress-line { display: flex; gap: 6px; align-items: center; }
.ok-icon { color: var(--good); } .bad-icon { color: var(--bad); }

dialog.sheet { border: 1px solid var(--border); border-radius: 14px; padding: 22px; width: min(540px, calc(100vw - 32px)); background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.sheet::backdrop { background: rgba(10, 10, 16, .45); backdrop-filter: blur(3px); }
dialog.sheet > * + * { margin-top: 12px; }
dialog.sheet h2 { margin: 0 28px 0 0; font-size: 19px; }
dialog.sheet p { margin-bottom: 0; }
dialog .close { position: absolute; top: 12px; right: 12px; }
ul.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul.files li { padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
ul.files li > .icon { color: var(--muted); }
ul.files code { font: 12.5px var(--mono); }
ul.files.scroll { max-height: 300px; overflow: auto; }

/* ---- The command palette ---- */
dialog.palette { margin: 12vh auto auto; padding: 0; width: min(620px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.palette::backdrop { background: rgba(10, 10, 16, .4); backdrop-filter: blur(2px); }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.palette-search .icon { color: var(--muted); }
.palette-search input { flex: 1; border: 0; background: transparent; font-size: 15px; padding: 4px 0; outline: none; }
.palette-list { max-height: min(420px, 55vh); overflow-y: auto; padding: 6px; }
.palette-head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 10px 4px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.palette-item .icon { color: var(--muted); }
.palette-item[aria-selected="true"] { background: var(--accent-soft); }
.palette-item[aria-selected="true"] .icon { color: var(--accent); }
.palette-label { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-hint { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.palette-empty { padding: 24px; text-align: center; color: var(--muted); }
.palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; background: var(--panel-2); }

/* ---- Switches, settings ---- */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; width: 36px; height: 21px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(15px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings { display: grid; gap: 14px; max-width: 820px; }
.setting h3 { font-size: 15px; }
.version { text-align: center; color: var(--faint); }

/* ---- The download page ---- */
.get-hero { padding: 4px 0 24px; }
.dl { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.dl > b { display: flex; align-items: center; gap: 7px; }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.point { display: flex; gap: 12px; align-items: flex-start; }
.point-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.note-panel .mini-list { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); column-gap: 20px; }
.note-panel .mini-list a { margin: 0; }

/* ---- Customize: coat colors, wardrobe, live preview ---- */
.stack.tight > h3, .stack.tight > .panel-head { margin-bottom: 0; }
.input-row { display: flex; gap: 6px; align-items: center; }
.input-row > input { flex: 1 1 auto; }
.input-row > .btn { flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch { --sw: #c8c8d0; position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid var(--panel); background: var(--sw); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; color: #fff; }
button.swatch:hover, .swatch:hover { border-color: var(--panel); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, var(--border)); }
.swatch[aria-pressed="true"], .swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.swatch[aria-pressed="true"]::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); }
.swatch.own::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 1.5px dashed rgba(0, 0, 0, .35); }
.swatch.custom { background: conic-gradient(#ff5d5d, #ffd23f, #5fe07e, #4cc9f0, #8a5cf0, #ff5fa2, #ff5d5d); }
.swatch.custom.on { background: var(--sw); }
.swatch.custom .icon { pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.swatch.custom input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.swatch:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.slot + .slot { margin-top: 6px; }
.slot-head { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
button.tile:disabled { cursor: not-allowed; }
@media (min-width: 881px) { .sticky-col { position: sticky; top: 16px; } }
@media (max-width: 880px) { .customize .sticky-col { order: -1; } }

/* ---- Notes, sync, notification options ---- */
textarea.notes { display: block; margin: 0; resize: vertical; min-height: 96px; line-height: 1.5; }
.sub-settings { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.checks { display: grid; gap: 7px; }
.checks label.check { font-size: 13.5px; }

/* ---- A soft glow at the top of every page ---- */
.content { position: relative; isolation: isolate; min-width: 0; }
.content::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 460px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 100% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%),
    radial-gradient(35% 70% at 88% 0%, color-mix(in srgb, var(--tip) 8%, transparent), transparent 70%);
}

/* ---- The three steps: hatch, make it yours, adopt ---- */
.journey { display: flex; align-items: stretch; gap: 6px; margin: 0 0 22px; }
.journey-step { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--panel) 85%, transparent); color: var(--muted); text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.journey-step:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-1px); }
.journey-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 12.5px var(--mono); background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.journey-text { display: grid; min-width: 0; line-height: 1.3; }
.journey-text b { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey-text small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey-step.done .journey-num { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 40%, var(--border)); color: var(--good); }
.journey-step.current { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--accent-soft); }
.journey-step.current .journey-num { background: var(--accent-grad); border-color: transparent; color: var(--accent-text); box-shadow: var(--accent-glow); }
.journey-arrow { flex: none; align-self: center; color: var(--faint); }
@media (max-width: 640px) {
  .journey { gap: 4px; }
  .journey-step { padding: 7px 8px; gap: 7px; }
  .journey-text b { white-space: normal; line-height: 1.2; }
  .journey-text small, .journey-arrow { display: none; }
}

/* ---- The pet on a little stage, link rows and download rows ---- */
.spot { display: grid; place-items: center; padding: 14px; border-radius: 12px; border: 1px solid var(--border);
  background: radial-gradient(80% 90% at 50% 35%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 75%), var(--panel-2); }
.spot > img { margin: 0 auto; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quick-label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.quick-label .pill { text-transform: none; letter-spacing: 0; }
.result-block:not(:empty) { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.result-actions { margin-top: 14px; }
.gh-links { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }

/* ---- Look: header with "Surprise me", swatches in the grid ---- */
.look-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.look-head h3 { margin: 0; }
.look-head .row { gap: 6px; }
.look .swatches { gap: 7px; }
.look .swatch { width: 26px; height: 26px; }

/* ---- Recent repos ---- */
.recent-box:empty { display: none; }
.examples.recent { margin-top: 12px; }
.recent-label { display: inline-flex; align-items: center; gap: 5px; }
.panel .examples.recent { justify-content: flex-start; margin: 0; }
.chip.ghost { padding: 3px 7px; display: inline-grid; place-items: center; }
.park-list .chip a { color: inherit; text-decoration: none; }
.park-list .chip a:hover { color: var(--accent); text-decoration: underline; }

/* ---- Codex search ---- */
.codex-nav { align-items: center; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(8px); }
.codex-nav .search-box { flex: 0 1 260px; margin-right: 4px; }
.codex-nav .count { display: inline-block; margin-left: 5px; font: 600 11px/1.6 var(--mono); color: var(--muted); background: var(--panel-2); border-radius: 99px; padding: 0 6px; }
.codex-sec h3 { font-size: 15px; }

/* ---- Shortcuts & help ---- */
dialog.sheet.wide { width: min(640px, calc(100vw - 32px)); }
dialog.sheet h3 { margin: 18px 0 8px; }
.help-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.help-steps a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); color: inherit; text-decoration: none; }
.help-steps a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.help-steps .journey-text { flex: 1; }
.keys-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; align-items: center; margin: 0; font-size: 13px; }
.keys-list dt { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.keys-list dd { margin: 0; color: var(--muted); }
@media (max-width: 959px) { .hide-sm { display: none !important; } }

/* =====================================================================================
   Tools, Insights, Code, the inbox and the focus timer
   ===================================================================================== */
.tight-top { margin: 10px 0 0; }
.grid2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.grid2 > .panel + .panel { margin-top: 0; }
@media (max-width: 880px) { .grid2.even { grid-template-columns: minmax(0, 1fr); } }
.grid2 + .grid2, .stack > .grid2 { margin-top: 0; }
.stack > .kpis { margin-bottom: 0; }
.loading-row { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 22px 4px; justify-content: center; }
.count-pill { display: inline-block; margin-left: 2px; font: 600 11px/1.6 var(--mono); color: var(--muted); background: var(--panel-2); border: 1px solid var(--border); border-radius: 99px; padding: 0 7px; }
h3 .count-pill { font-weight: 600; }
.score-pill { font: 700 12px/1.7 var(--mono); color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 0 9px; }
.label-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.field.inline { display: inline-flex; align-items: center; gap: 8px; }
.field.inline select, .field.inline input { width: auto; }
.muted.icon, .icon.muted { color: var(--faint); }
.clean-state { display: flex; align-items: center; gap: 12px; padding: 6px 2px; }
.clean-state > .icon { flex: none; color: var(--good); background: var(--good-soft); border-radius: 12px; padding: 9px; width: 40px; height: 40px; }
.clean-state > div { display: grid; gap: 2px; }

/* Tone washes for icon tiles (tool cards, shortcuts, export rows). */
.tool-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--panel-2); color: var(--muted); }
.tool-icon.small { width: 32px; height: 32px; border-radius: 10px; }
.tone-teal .tool-icon, .tool-icon.tone-teal { background: var(--teal-soft); color: var(--teal); }
.tone-blue .tool-icon, .tool-icon.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-violet .tool-icon, .tool-icon.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-amber .tool-icon, .tool-icon.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-rose .tool-icon, .tool-icon.tone-rose { background: var(--rose-soft); color: var(--rose); }
.tone-green .tool-icon, .tool-icon.tone-green { background: var(--green-soft); color: var(--green); }
.tone-slate .tool-icon, .tool-icon.tone-slate { background: var(--slate-soft); color: var(--slate); }

/* ---- The Tools hub ---- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.tool-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow), var(--lift);
  color: inherit; text-decoration: none; transition: transform .14s, border-color .14s, box-shadow .14s; }
.tool-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.tool-card .row-go { margin-top: 4px; transition: transform .14s; }
.tool-card:hover .row-go { transform: translateX(3px); color: var(--accent); }
.tool-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tool-text b { font-size: 15px; letter-spacing: -0.01em; }
.tool-meta { font-size: 12px; font-weight: 600; color: var(--accent); }
.tool-meta:empty { display: none; }
.tool-card.locked { opacity: .7; }
.tool-card.locked .tool-icon { filter: grayscale(.6); }

/* ---- The dashboard: shortcuts to the tools, "do this next" ---- */
.shortcuts { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.shortcut { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel);
  color: inherit; text-decoration: none; font-size: 13px; font-weight: 550; box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
.shortcut:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.todo-panel { margin-bottom: 12px; }
.todo-panel.calm { padding: 12px 16px; }
.todo-now { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.todo-now li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); }
.todo-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--panel); color: var(--muted); }
.todo-now .tone-bad .todo-icon { background: var(--bad-soft); color: var(--bad); }
.todo-now .tone-warn .todo-icon { background: var(--amber-soft); color: var(--amber); }
.todo-now .tone-violet .todo-icon { background: var(--violet-soft); color: var(--violet); }
.todo-now .tone-blue .todo-icon { background: var(--blue-soft); color: var(--blue); }
.todo-text { flex: 1; min-width: 0; display: grid; gap: 1px; color: inherit; text-decoration: none; }
.todo-text b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-text:hover b { color: var(--accent); }
.todo-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 640px) { .todo-now li { flex-wrap: wrap; } .todo-actions { width: 100%; justify-content: flex-end; } }

/* ---- Charts: punch card, stacked bar ---- */
.punch { display: block; width: 100%; min-width: 520px; height: auto; }
.punch .axis { font: 9.5px ui-sans-serif, system-ui, sans-serif; fill: var(--muted); }
.punch-grid { fill: var(--border-strong); }
.punch-dot { fill: var(--accent); fill-opacity: .82; transition: fill-opacity .12s; }
.punch-dot:hover { fill-opacity: 1; stroke: var(--text); stroke-width: 1.2; }
.stack-wrap { display: grid; gap: 12px; }
.stack-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--panel-2); gap: 2px; }
.stack-bar i { display: block; height: 100%; min-width: 3px; }
.stack-bar i:hover { filter: brightness(1.12); }
.stack-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; font-size: 13px; }
.stack-legend li { display: flex; align-items: center; gap: 7px; min-width: 0; }
.stack-dot { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.stack-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-share { font: 600 12px var(--mono); color: var(--muted); }

/* ---- Insights: health checklist, file lists ---- */
.health-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 14px; }
.health-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.health-list li > div { display: grid; gap: 1px; }
.health-list .ok .icon { color: var(--good); margin-top: 2px; }
.health-list .missing .icon { color: var(--faint); margin-top: 2px; }
.health-list .missing b { color: var(--muted); font-weight: 600; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.file-list li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 0; border-top: 1px solid var(--border); }
.file-list li:first-child { border-top: 0; }
.file-list li > .small.muted.mono { margin-left: auto; flex: none; }
.file-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 2px 4px; margin: 0 -4px; border: 0; border-radius: 6px; background: transparent; color: inherit; text-align: left; font-size: 12.5px; box-shadow: none; }
.file-link:hover { background: var(--panel-2); color: var(--accent); }
.file-link .mono, .file-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.file-link .icon { color: var(--muted); }
.file-list.changes { max-height: 420px; overflow: auto; }
.change-mark { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font: 700 11px var(--mono); background: var(--panel-2); color: var(--muted); }
.change-mark.modified, .change-chip.modified b { color: var(--amber); background: var(--amber-soft); }
.change-mark.added, .change-chip.added b, .change-mark.untracked, .change-chip.untracked b { color: var(--green); background: var(--green-soft); }
.change-mark.deleted, .change-chip.deleted b, .change-mark.conflict, .change-chip.conflict b { color: var(--bad); background: var(--bad-soft); }
.change-mark.renamed, .change-chip.renamed b { color: var(--blue); background: var(--blue-soft); }
.kind-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.change-chip, .kind-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 3px; border-radius: 99px; border: 1px solid var(--border); background: var(--panel); font-size: 12px; }
.change-chip b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 99px; font: 700 10.5px var(--mono); }
.kind-chip { padding: 2px 10px; border-color: color-mix(in srgb, var(--k, var(--accent)) 35%, var(--border)); }
button.kind-chip { cursor: pointer; }
button.kind-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--k, var(--accent)) 16%, var(--panel)); border-color: var(--k, var(--accent)); font-weight: 600; }
.kind-chips.toggles { margin: 10px 0 0; }
.kind-chips.toggles:empty { display: none; }

/* ---- Code: branches, tags ---- */
.branch-list { list-style: none; margin: 0; padding: 0; display: grid; }
.branch-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); }
.branch-list li:first-child { border-top: 0; padding-top: 2px; }
.branch-list li > .icon { margin-top: 3px; }
.branch-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.branch-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.branch-main .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; font: 12px var(--mono); padding: 2px 9px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--border); }
.mini-list.plain li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.mini-list.plain li:first-child { border-top: 0; }

/* ---- TODOs ---- */
.todo-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.todo-tools .search-box { flex: 1 1 200px; }
.todo-seg .count { margin-left: 4px; font: 600 10.5px var(--mono); color: var(--muted); }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 560px; overflow: auto; }
.todo-list li { display: flex; gap: 10px; align-items: flex-start; }
.todo-tag { flex: none; margin-top: 4px; font: 700 10px/1.8 var(--mono); padding: 0 6px; border-radius: 5px; background: var(--tip-soft); color: var(--tip); }
.todo-tag.fixme { background: var(--bad-soft); color: var(--bad); }
.todo-tag.hack, .todo-tag.xxx { background: var(--amber-soft); color: var(--amber); }
.todo-main { flex: 1; display: grid !important; gap: 1px; padding: 4px 6px !important; }
.todo-text { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-main .mono { font-size: 11.5px; }
.bar-row.as-button { width: 100%; border: 0; background: transparent; text-align: left; box-shadow: none; cursor: pointer; }
.bar-row.as-button:hover { background: var(--panel-2); }

/* ---- Work report and timeline ---- */
.control-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; }
.control-row .field > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.report-controls, .tl-controls { display: grid; gap: 12px; margin-bottom: 14px; }
.custom-range { gap: 14px; }
.report-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.report-summary { display: grid; gap: 8px; }
.report-summary .kind-chips { margin: 0; }
.report-out { display: grid; gap: 12px; }
.report-group { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow), var(--lift); }
.report-group h3 { margin-bottom: 8px; }
.commit-list.tight li { grid-template-columns: auto minmax(0, 1fr) auto; padding: 7px 0; align-items: center; }
.kind-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 14px; background: color-mix(in srgb, var(--k, var(--accent)) 16%, var(--panel)); }
.toolbar-row.tight { margin: 0; }
.tl-day + .tl-day { margin-top: 18px; }
.tl-head { position: sticky; top: var(--nav-h, 0px); z-index: 2; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); padding: 6px 0; margin: 0 0 6px; }
.tl-items { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; }
.tl-item { position: relative; display: grid; grid-template-columns: 64px 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px 7px 0; border-radius: 10px; }
.tl-item:hover { background: var(--panel); }
.tl-item::before { content: ''; position: absolute; left: 87px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item:first-child::before { top: 50%; }
.tl-item:last-child::before { bottom: 50%; }
.tl-time { font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.tl-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; background: color-mix(in srgb, var(--k) 18%, var(--panel)); box-shadow: 0 0 0 3px var(--bg), inset 0 0 0 1px color-mix(in srgb, var(--k) 45%, transparent); }
.tl-main { display: grid; gap: 1px; min-width: 0; }
.tl-main code { font: 11px var(--mono); }
.tl-project { color: var(--accent); text-decoration: none; font-weight: 600; }
.tl-project:hover { text-decoration: underline; }

/* ---- Git board ---- */
.git-row { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(70px, .6fr)) minmax(100px, .8fr) auto; gap: 12px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--border); }
.git-row.head { border-top: 0; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 7px; padding-bottom: 7px; }
.git-row:not(.head):hover { background: var(--panel-2); }
.git-name { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.git-name .row-main { display: grid; gap: 1px; }
.git-name b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-name:hover b { color: var(--accent); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
@media (max-width: 900px) {
  .git-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .git-row > :nth-child(5), .git-row.head { display: none; }
  .git-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---- Export ---- */
.export-list { display: grid; gap: 0; padding: 6px 18px; }
.export-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.export-item:first-child { border-top: 0; }
.export-item > div:nth-child(2) { flex: 1 1 240px; min-width: 0; }
.export-item select { width: auto; }

/* ---- Commit composer ---- */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.type-chip { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 8px; align-items: center; text-align: left; padding: 7px 10px; border-radius: 11px; }
.type-chip .type-emoji { grid-row: 1 / 3; font-size: 18px; }
.type-chip b { font-size: 13px; }
.type-chip .small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-chip[aria-checked="true"] { border-color: var(--k); background: color-mix(in srgb, var(--k) 14%, var(--panel)); box-shadow: 0 0 0 1px var(--k); }
.commit-preview, .commit-cmd { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 46px; }
.commit-preview { font-size: 13px; }
.counter.warn { color: var(--warn); } .counter.bad { color: var(--bad); }
.lint-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.lint-list li { display: flex; gap: 7px; align-items: flex-start; }
.lint-list li.warn .icon { color: var(--warn); margin-top: 2px; }
.lint-list li.ok .icon { color: var(--good); margin-top: 2px; }
.meal { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px dashed var(--border-strong); }
.meal > div { display: grid; gap: 1px; }
.meal-emoji { font-size: 26px; }

/* ---- Focus timer ---- */
.focus-grid { align-items: start; }
.focus-stage { display: grid; justify-items: center; gap: 18px; padding: 26px 18px; }
.focus-dial { position: relative; width: min(270px, 70vw); aspect-ratio: 1; }
.focus-ring { --p: 0; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--ring, var(--accent)) calc(var(--p) * 360deg), var(--panel-2) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px)); mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px)); }
.focus-ring[data-phase="break"] { --ring: var(--blue); }
.focus-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; }
.focus-phase { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.focus-clock { font-size: clamp(40px, 9vw, 58px); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.focus-controls { justify-content: center; }
.focus-pet { display: grid; justify-items: center; gap: 6px; text-align: center; }
.focus-pet img { width: 96px; border-radius: 14px; box-shadow: var(--shadow); }
.focus-today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.focus-stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); min-width: 0; }
.focus-stat b { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-chip { position: fixed; z-index: 55; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px;
  background: var(--panel); color: var(--text); text-decoration: none; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 600; }
.focus-chip .icon { color: var(--accent); }
.focus-chip[data-phase="break"] .icon { color: var(--blue); }
.focus-chip[data-phase="paused"] { opacity: .75; }
.focus-chip-label { color: var(--muted); font-weight: 500; }
@media (min-width: 960px) { .focus-chip { left: 256px; } .shell.collapsed ~ .focus-chip { left: 80px; } }

/* ---- The inbox ---- */
.bell-wrap { position: relative; display: inline-flex; }
.dot-badge { position: absolute; top: 0; right: 0; transform: translate(25%, -15%); font-size: 9.5px; line-height: 15px; min-width: 15px; padding: 0 4px; pointer-events: none; }
.inbox { display: grid; gap: 14px; max-height: min(60vh, 520px); overflow: auto; margin-right: -8px; padding-right: 8px; }
.inbox h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.inbox-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.inbox-list a { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 13.5px; border: 1px solid transparent; }
.inbox-list a:hover { background: var(--panel-2); }
.inbox-list li.unread a { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.inbox-list li.urgent .inbox-icon { color: var(--bad); background: var(--bad-soft); }
.inbox-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--panel-2); color: var(--accent); }

/* ---- Detail tabs: a count next to "Code" ---- */
.tab .count-pill { margin-left: 4px; font-size: 10px; padding: 0 6px; }
.code-tab { align-items: start; }
