/* Hazel Sellote — portfolio app shell
   Palette: matcha #84B067 / white #FFFFFF */

:root {
  /* Every colour below is an alias onto a Haze Design System role, so the
     portfolio inherits the system's palette, its contrast floor and its
     light/dark swap. Nothing here holds a literal colour any more. */
  --green: var(--role-accent-border);
  --green-ink: var(--role-accent);
  --green-deep: var(--role-accent-hover);
  --ink: var(--role-text);
  --body: var(--role-text-secondary);
  --muted: var(--role-text-muted);
  --faint: var(--role-text-muted);
  --white: #FFFFFF;
  --panel: var(--role-surface);
  --tint: var(--role-surface-sunken);
  --tint-2: var(--role-surface-sunken);
  --line: var(--role-border);
  --line-soft: var(--role-border);
  --dot: var(--role-border);
  --hover: var(--role-accent);
  --bg: var(--role-bg);
  --canvas: var(--role-bg);
  --top-bg: var(--role-bg);
  --ink-2: var(--role-text);
  --ink-3: var(--role-text-secondary);
  --line-strong: var(--role-border-strong);
  --sel: var(--role-accent-subtle);
  --scroll: var(--role-border-strong);
  --on-accent: var(--role-on-accent);
  --hover-ink: var(--role-on-accent);
  --slab: var(--role-surface-inverse);
  --on-slab: var(--role-text-inverse);
  --slab-meta: var(--role-text-muted);
  --sans: var(--font-sans);
  --display: var(--font-display);
  --mono: var(--font-mono);
  --script: var(--font-script);
  --r: 16px;
}



* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}


a { color: var(--green-ink); text-decoration: none; }
a:hover { color: var(--green-deep); }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
.mono { font-family: var(--mono); letter-spacing: 0.11em; text-transform: uppercase; }
.accent { color: var(--green-ink); }
.script { font-family: var(--script); font-size: 14px; letter-spacing: 0.02em; color: var(--green-ink); }
/* only used on the accent slab, so it takes that slab's foreground */
.script--lg { font-size: 15px; color: var(--on-accent); }
.body { font-size: 14px; line-height: 1.65; color: var(--body); text-wrap: pretty; }
.lead { font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.4; margin: 14px 0; text-wrap: pretty; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 8px; border: 3px solid var(--bg); }

/* ---------- shell ---------- */

.app {
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 232px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 100%);
  overflow: hidden;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 16px 16px;
  background: var(--tint);
  border-right: 1px solid var(--line);
  overflow: hidden;
  min-width: 0;
}

.side__id { display: flex; align-items: center; gap: 11px; }
.side__mark {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px; object-fit: cover; display: block;
}
.side__who { min-width: 0; }
.side__name { font-family: var(--display); font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__role { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.side__group { display: flex; flex-direction: column; gap: 2px; }
.side__group--files { flex: 1 1 auto; min-height: 0; }
.side__group--files.is-collapsed { flex: none; }
.side__toggle {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: none; border-radius: 9px;
  background: transparent; text-align: left;
}
.side__toggle-label { flex: 1; }
.side__toggle:hover { background: var(--hover); color: var(--hover-ink); }
.side__chev { width: 10px; flex: none; font-size: 10px; line-height: 1; transition: transform 0.18s ease; }
.is-collapsed .side__chev { transform: rotate(-90deg); }
.side__label { font-size: 9.5px; letter-spacing: 0.15em; color: var(--faint); }
.nav .side__label, .rail .side__label { padding: 0 10px 8px; }

.nav, .rail { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.rail { overflow-y: auto; min-height: 0; }
.rail[hidden] { display: none; }

.nav__item, .rail__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border: none; border-radius: 9px;
  background: transparent; color: var(--ink-2);
  font-family: var(--sans); font-size: 13px; text-align: left;
}
.nav__item:hover, .rail__item:hover { background: var(--hover); color: var(--hover-ink); }
.nav__item.is-on { background: var(--green-ink); color: var(--on-accent); font-weight: 500; }
.nav__num { font-family: var(--mono); font-size: 9.5px; opacity: 0.55; width: 16px; }
.nav__label, .rail__label { flex: 1; }
.nav__count { font-family: var(--mono); font-size: 9.5px; opacity: 0.45; }
.rail__item { font-size: 12.5px; }
.rail__item.is-on { background: var(--sel); font-weight: 500; }
.rail__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex: none; }

.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 11px;
}
.badge .mono { font-size: 9.5px; color: var(--ink-3); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot--live { background: var(--green); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }

.btn-resume {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; border: 1px solid var(--ink); border-radius: 11px;
  color: var(--ink); font-size: 12.5px; font-weight: 500;
}
.btn-resume:hover { background: var(--ink); color: var(--bg); }
.btn-resume .mono { font-size: 10px; }

.shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }

.top {
  display: flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--top-bg);
  backdrop-filter: blur(8px);
}
.top__crumb { display: flex; align-items: center; gap: 9px; min-width: 0; }
.top__root { font-size: 10px; color: var(--faint); }
.top__view { font-family: var(--display); font-weight: 500; font-size: 14px; white-space: nowrap; }
.top__count { font-size: 9.5px; color: var(--faint); padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; }
.top__search {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  padding: 7px 10px 7px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 9px;
  color: var(--muted); font-family: var(--sans); font-size: 12.5px;
  flex: none; white-space: nowrap;
}
.top__search:hover { border-color: var(--line-strong); color: var(--body); }
.top__search kbd { font-size: 9.5px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--tint-2); }
.top__theme {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--ink-3); font-size: 14px; line-height: 1;
  transition: border-color 0.16s, color 0.16s;
}
.top__theme:hover { border-color: var(--green-ink); color: var(--green-ink); }
.top__cta { padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 9px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.top__cta:hover { background: var(--green-ink); color: var(--on-accent); }

/* drawer trigger + backdrop: mobile-only, hidden until the breakpoint */
.top__burger {
  display: none;
  width: 34px; height: 34px; flex: none;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); color: var(--ink-3);
  font-size: 15px; line-height: 1;
}
.top__burger:hover { border-color: var(--green-ink); color: var(--green-ink); }
.nav-scrim { display: none; }

.canvas {
  overflow-y: auto; overflow-x: hidden;
  padding: 24px 20px 40px;
  background-color: var(--canvas);
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.1px);
  background-size: 18px 18px;
  background-position: -9px -9px;
}
.stack { width: 100%; display: flex; flex-direction: column; gap: 22px; }

.view { display: flex; flex-direction: column; gap: 14px; }
.view[hidden] { display: none; }
.view--split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; min-width: 0; }
.card .body + .body { margin-top: 14px; }

/* ---------- overview ---------- */

.hero { display: flex; flex-direction: column; gap: 18px; padding: 36px; }
.hero__eyebrow { font-size: 11px; letter-spacing: 0.15em; color: var(--faint); }
.hero__title { font-weight: 600; font-size: clamp(30px, 4.6vw, 56px); line-height: 1.12; letter-spacing: -0.02em; text-wrap: pretty; }
.caret { color: var(--green-ink); opacity: 0.5; }
.hero__sub { font-size: 17px; line-height: 1.6; color: var(--body); max-width: 58ch; text-wrap: pretty; }
.stats { margin-top: 4px; padding-top: 20px; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
/* fluid: the widest value (GMT+8) must not clip in a ~79px column at 320px */
.stat__v { font-family: var(--display); font-weight: 600; font-size: clamp(21px, calc(2.6vw + 13px), 30px); }
.stat__k { font-size: 10px; letter-spacing: 0.12em; color: var(--faint); margin-top: 2px; }



/* ---------- work ---------- */

.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.head h2 { font-weight: 600; font-size: 19px; }
.head__meta { font-size: 9.5px; letter-spacing: 0.13em; color: var(--faint); }
.head--flush { margin-bottom: 18px; }

.filters { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.filter { padding: 5px 11px; border-radius: 20px; font-family: var(--sans); font-size: 12px; background: var(--panel); color: var(--ink-3); border: 1px solid var(--line); }
.filter.is-on { background: var(--green-ink); color: var(--on-accent); border-color: var(--green-ink); }

.work { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.work__empty { grid-column: 1 / -1; }
.case {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.18s, transform 0.18s; min-width: 0; text-align: left;
}
.case:hover { border-color: var(--green-ink); transform: translateY(-2px); }
.case__shot { height: 150px; border-radius: 11px; overflow: hidden; background: var(--tint); margin: 0; display: flex; align-items: center; justify-content: center; }
.case__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
/* certificates sit on a constant light mat so dark documents stay legible in both themes */
.case__shot--fit { background: #EEF4E8; padding: 8px; }
.case__shot--fit img { object-fit: contain; object-position: center; }
.case__ph { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.case__row { display: flex; align-items: center; gap: 8px; }
.case__row h3 { font-weight: 600; font-size: 16px; }
.case__mode { margin-left: auto; font-family: var(--mono); font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: var(--tint); color: var(--muted); }
.case__sum { font-size: 13.5px; line-height: 1.55; color: var(--body); text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.tag { font-size: 11px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-3); }
.case__foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line-soft); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.case__open { color: var(--green-ink); }

/* ---------- about ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 12.5px; padding: 5px 10px; background: var(--tint-2); border-radius: 8px; color: var(--ink-2); }
.meters { margin-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.meter__row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.meter__row .mono { font-size: 10px; color: var(--faint); text-transform: none; }
.meter__track { height: 5px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.meter__track i { display: block; height: 100%; background: var(--ink); }
.meter__track .i--accent { background: var(--green); }
.edu { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.edu .side__label { margin-bottom: 6px; display: block; }

/* ---------- experience ---------- */

.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.row__date { font-size: 10px; letter-spacing: 0.1em; color: var(--faint); }
.row__date--now { color: var(--green-ink); }
.row h3 { font-weight: 500; font-size: 15px; margin-bottom: 5px; }

/* ---------- writing ---------- */

.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.post { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 9px; color: var(--ink); }
.post:hover { border-color: var(--green-ink); color: var(--ink); }
.post h3 { font-weight: 500; font-size: 15.5px; line-height: 1.35; text-wrap: pretty; }
.post__meta { font-size: 9.5px; letter-spacing: 0.12em; color: var(--faint); }
.post__more { margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--green-ink); }

/* ---------- contact ---------- */

.contact { background: var(--green-ink); color: var(--on-accent); border-radius: var(--r); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.contact__title { font-weight: 600; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.02em; text-wrap: pretty; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.contact__mail { padding: 11px 16px; background: var(--on-accent); color: var(--green-ink); border-radius: 10px; font-size: 14px; font-weight: 500; }
.contact__mail:hover { background: var(--green-deep); color: var(--on-accent); }
.contact__ghost { padding: 11px 16px; border: 1px solid color-mix(in srgb, var(--on-accent) 45%, transparent); color: var(--on-accent); border-radius: 10px; font-size: 14px; }
.contact__ghost:hover { border-color: var(--on-accent); color: var(--on-accent); }
.contact__meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--on-accent) 22%, transparent); font-size: 9.5px; color: color-mix(in srgb, var(--on-accent) 72%, transparent); }

/* ---------- status bar ---------- */

.status {
  display: flex; align-items: center; gap: 16px;
  height: 32px; padding: 0 16px;
  border-top: 1px solid var(--line); background: var(--tint);
  font-size: 9.5px; color: var(--muted); overflow: hidden;
}
.status > span { white-space: nowrap; }
.status__live { display: flex; align-items: center; gap: 6px; }
.status__live .dot { width: 6px; height: 6px; }
.status__hint { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- case-file pane ---------- */

.pane { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; }
.pane[hidden] { display: none; }
.pane__scrim { position: absolute; inset: 0; background: rgba(27, 36, 21, 0.32); backdrop-filter: blur(2px); }
.pane__sheet {
  position: relative; width: min(560px, 100%); height: 100%;
  background: var(--panel); border-left: 1px solid var(--line-strong);
  box-shadow: -24px 0 60px rgba(27, 36, 21, 0.16);
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  animation: slide 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.pane__top { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pane__name { font-family: var(--display); font-weight: 500; font-size: 14px; }
.pane__x { margin-left: auto; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--tint-2); color: var(--ink-3); font-size: 13px; }
.pane__x:hover { border-color: var(--ink); }
.pane__body { overflow-y: auto; padding: 20px 18px 32px; display: flex; flex-direction: column; gap: 16px; }
.pane__shot { flex: none; height: 190px; border-radius: 14px; overflow: hidden; background: var(--tint); margin: 0; display: flex; align-items: center; justify-content: center; }
.pane__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.pane__role { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-ink); margin-bottom: 6px; }
.pane__title { font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin-bottom: 8px; }
.pane__sum { font-size: 14.5px; line-height: 1.6; color: var(--body); text-wrap: pretty; }
.pane__body .tags { margin-top: 0; }
.did { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.did__list { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.did__item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.did__item span:first-child { color: var(--green-ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.kpi__v { font-family: var(--display); font-weight: 600; font-size: 19px; }
.kpi__k { font-family: var(--mono); font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }
.pane__link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; background: var(--tint-2); border: 1px solid var(--line); border-radius: 11px; color: var(--ink-2); font-size: 13.5px; }
.pane__link:hover { border-color: var(--ink); color: var(--ink); }
.pane__link .mono { font-size: 11px; letter-spacing: 0.04em; text-transform: none; }
.pane__link b { color: var(--green-ink); font-weight: 500; }
.pane__ask { padding: 12px; text-align: center; background: var(--ink); color: var(--bg); border-radius: 11px; font-size: 13.5px; font-weight: 500; }
.pane__ask:hover { background: var(--green-ink); color: var(--on-accent); }

/* ---------- personal work preview ---------- */

.preview { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 26px 20px; }
.preview[hidden] { display: none; }
.preview__scrim { position: absolute; inset: 0; background: rgba(27, 36, 21, 0.46); backdrop-filter: blur(2px); }
.preview__sheet {
  position: relative; width: min(1100px, 100%); height: 100%;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 30px 70px rgba(27, 36, 21, 0.28); overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  animation: pop 0.18s ease-out;
}
.preview__top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.preview__name { font-family: var(--display); font-weight: 500; font-size: 14px; white-space: nowrap; }
.preview__meta { font-size: 9.5px; color: var(--faint); }
.preview__count { margin-left: auto; font-size: 9.5px; color: var(--faint); }
.preview__nav { width: 28px; height: 28px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--tint-2); color: var(--ink-3); font-size: 14px; line-height: 1; }
.preview__nav:hover { border-color: var(--ink); }
.preview__body { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: var(--tint-2); }
.preview__sum { font-size: 14px; line-height: 1.6; color: var(--body); text-wrap: pretty; }
.preview__shots { display: flex; flex-direction: column; gap: 14px; }
.preview__shots--grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
.preview__img { width: 100%; display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.preview__foot { display: flex; align-items: center; justify-content: flex-end; padding: 11px 18px; border-top: 1px solid var(--line-soft); font-size: 10px; letter-spacing: 0.08em; }
.preview__foot a { color: var(--green-ink); }
.preview__foot a:hover { color: var(--green-deep); }

/* ---------- command palette ---------- */

.palette { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.palette[hidden] { display: none; }
.palette__scrim { position: absolute; inset: 0; background: rgba(27, 36, 21, 0.34); }
.palette__box {
  position: relative; width: min(520px, 92%);
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 30px 70px rgba(27, 36, 21, 0.24); overflow: hidden;
  animation: pop 0.18s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.palette__input { width: 100%; padding: 16px 18px; border: none; border-bottom: 1px solid var(--line-soft); background: var(--panel); font-family: var(--sans); font-size: 15px; color: var(--ink); outline: none; }
.palette__list { max-height: 320px; overflow-y: auto; padding: 8px; }
.cmd { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: none; border-radius: 10px; background: transparent; text-align: left; }
.cmd:hover, .cmd.is-on { background: var(--tint-2); }
.cmd__kind { font-family: var(--mono); font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--faint); width: 64px; flex: none; }
.cmd__label { flex: 1; font-size: 14px; }
.cmd__key { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.palette__foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line-soft); background: var(--tint-2); font-size: 9px; color: var(--faint); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 500; white-space: nowrap; text-decoration: none;
  border: 1px solid transparent; border-radius: 9px;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.btn--xs { height: 28px; padding: 0 10px; font-size: 11px; border-radius: 7px; gap: 6px; }
.btn--s  { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 8px; gap: 7px; }
.btn--m  { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 9px; }
.btn--l  { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 11px; gap: 9px; }

.btn--primary { background: var(--green-ink); color: var(--on-accent); }
.btn--primary:hover { background: var(--green-deep); color: var(--on-accent); }

.btn--secondary { background: var(--panel); color: var(--green-ink); border-color: var(--green-ink); }
.btn--secondary:hover { background: var(--hover); border-color: var(--hover); color: var(--hover-ink); }

.btn:disabled, .btn.is-disabled { opacity: 0.42; pointer-events: none; }

.fab {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; flex: none;
  border: none; border-radius: 50%;
  background: var(--green-ink); color: var(--on-accent);
  font-family: var(--sans); font-size: 22px; line-height: 1;
  box-shadow: 0 10px 24px rgba(27, 36, 21, 0.26);
  transition: background 0.16s, transform 0.16s;
}
.fab:hover { background: var(--green-deep); color: var(--on-accent); transform: translateY(-2px); }
.fab--mini { width: 40px; height: 40px; font-size: 17px; }
.fab--extended { width: auto; padding: 0 22px; border-radius: 28px; font-size: 15px; font-weight: 500; gap: 9px; }

button { cursor: pointer; }

/* ---------- narrow screens ---------- */

/* tight widths above the drawer breakpoint: shed optional top-bar chrome */
@media (max-width: 900px) {
  .top__root { display: none; }
  .top__cta { display: none; }
}

@media (max-width: 720px) {
  /* the shell stops being a fixed-height two-column grid; the page itself scrolls */
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
  /* the implicit column would otherwise size to content and overflow the viewport */
  .shell { height: auto; grid-template-rows: auto auto auto; grid-template-columns: minmax(0, 1fr); overflow: visible; }

  /* the sidebar becomes an off-canvas drawer instead of a wrapping strip */
  .side {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 60;
    width: min(84vw, 300px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform 0.26s ease;
  }
  body.nav-open .side { transform: translateX(0); }

  .nav-scrim {
    display: block;
    position: fixed; inset: 0; z-index: 50;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0; pointer-events: none;
    transition: opacity 0.26s ease;
  }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

  /* lock the page behind the open drawer */
  body.nav-open { overflow: hidden; }
  html:has(body.nav-open) { overflow: hidden; }

  /* top bar: drawer trigger in, desktop-only affordances out */
  .top {
    position: sticky; top: 0; z-index: 40;
    gap: 10px; padding: 0 12px;
  }
  .top__burger { display: flex; }
  .top__root, .top__count, .top__cta { display: none; }
  .top__search { margin-left: auto; }
  .top__search kbd { display: none; }

  .status__hint { display: none; }

  .canvas { overflow: visible; min-width: 0; padding: 16px 14px 32px; }
  .hero { padding: 24px 18px; }
  .preview { padding: 0; }
  .preview__sheet { border: none; border-radius: 0; }
  .preview__body { padding: 12px; }
  .preview__shots--grid { grid-template-columns: repeat(2, 1fr); }
}

/* phones: anything multi-column collapses to a single column */
@media (max-width: 520px) {
  .work, .posts, .view--split { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview__shots--grid { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 8px; }
}
