/* ==========================================================================
   Harrow & Wren — owner studio workspace
   Design system tokens from the site style guide, layout from the
   studio dashboard design reference.
   ========================================================================== */

:root {
  --color-ink: #222222;
  --color-ink-soft: #4a4642;
  --color-muted: #7d766e;
  --color-base: #f4f1ea;
  --color-base-deep: #eae5db;
  --color-surface: #fffdfa;
  --color-line: #d9d2c6;
  --color-accent: #8a2b1f;
  --color-accent-deep: #661d14;
  --color-accent-wash: #f0e2dd;
  --color-ink-block: #1b1a18;
  --color-invert-ink: #f7f4ef;

  --font-display: "Playfair Display", "Iowan Old Style", "Palatino Linotype",
    "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.25rem, 0.4vw + 1.15rem, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.1vw + 1.25rem, 2.05rem);
  --fs-2xl: clamp(1.85rem, 2.2vw + 1.2rem, 2.85rem);
  --fs-3xl: clamp(2.25rem, 3.6vw + 1.1rem, 3.6rem);
  --fs-display: clamp(2.75rem, 7vw + 1rem, 6.5rem);

  --lh-tight: 1.04;
  --lh-snug: 1.22;
  --lh-normal: 1.5;
  --lh-loose: 1.72;

  --tracking-display: -0.03em;
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.09em;
  --tracking-wider: 0.18em;

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  --rail-w: 254px;
  --gutter: clamp(16px, 2.4vw, 40px);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-base);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

h1, h2, h3 { text-wrap: balance; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -80px;
  z-index: 200;
  background: var(--color-ink-block);
  color: var(--color-invert-ink);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: top 0.3s var(--ease-out);
}
.skip-link:focus { top: var(--space-sm); }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  margin: 0;
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}

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

.app { display: flex; min-height: 100vh; }

.workspace {
  flex: 1;
  min-width: 0;
  margin-left: var(--rail-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Rail / sidebar ------------------------------------------- */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: 22px 18px 20px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-line);
  overflow-y: auto;
  transition: transform 0.42s var(--ease-out), box-shadow 0.42s var(--ease-out);
}

.rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand em {
  font-style: italic;
  color: var(--color-accent);
  padding: 0 0.08em;
}
.brand:hover em { color: var(--color-accent-deep); }

.rail__close {
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-ink-soft);
  cursor: pointer;
}

.rail-feature {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 14px 16px;
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-invert-ink);
  background: linear-gradient(104deg, var(--color-accent) 0%, var(--color-accent-deep) 96%);
  box-shadow: 0 16px 30px -22px rgba(102, 29, 20, 0.95);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.rail-feature::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -54px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 253, 250, 0.34), rgba(255, 253, 250, 0) 68%);
  pointer-events: none;
}
.rail-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 34px -22px rgba(102, 29, 20, 0.95);
}
.rail-feature__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--color-invert-ink);
  color: var(--color-accent-deep);
}
.rail-feature__text { display: flex; flex-direction: column; gap: 1px; }
.rail-feature__text strong { font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.01em; }
.rail-feature__text small { font-size: var(--fs-xs); opacity: 0.82; }

.rail-nav { display: flex; flex-direction: column; }

.rail-group {
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--color-line);
}
.rail-group + .rail-group { padding-top: 0.5rem; }
.rail-group:last-child { border-bottom: 0; padding-bottom: 0; }

.rail-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--color-ink-soft);
  text-decoration: none;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out),
    transform 0.25s var(--ease-out);
}
.rail-link:hover {
  background: var(--color-base);
  color: var(--color-ink);
  transform: translateX(2px);
}
.rail-link.is-current {
  background: var(--color-base);
  color: var(--color-ink);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--color-line);
}
.rail-link.is-current .icon { color: var(--color-accent); }
.rail-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  line-height: 1.5;
  padding: 0 0.42rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-invert-ink);
}

.rail__foot {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.rail-foot__mark {
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}
.rail-foot__link {
  font-size: var(--fs-xs);
  color: var(--color-ink-soft);
  text-decoration: none;
}
.rail-foot__link:hover { color: var(--color-accent); }

.rail-scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  border: 0;
  padding: 0;
  background: rgba(27, 26, 24, 0.42);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.35s var(--ease-out);
}
.rail-scrim.is-open { opacity: 1; pointer-events: auto; }

/* ---------- Top bar -------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1vw, 1.1rem);
  padding: 12px var(--gutter);
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-line);
  transition: box-shadow 0.3s var(--ease-out);
}
.topbar.is-stuck { box-shadow: 0 14px 30px -28px rgba(34, 34, 34, 0.9); }

.topbar__menu {
  display: none;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
}

.topbar__title {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.publish-status {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--color-accent-deep);
  max-width: 22ch;
}

.pill {
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  white-space: nowrap;
}
.pill--quiet { background: var(--color-base); border-color: transparent; color: var(--color-ink-soft); }

.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
  color: var(--color-ink-soft);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}
.link-quiet:hover { color: var(--color-accent); }
.link-quiet .icon { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out); }
.link-quiet:hover .icon { transform: translateX(3px); }

/* ---------- Buttons -------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.72rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--color-ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.28s var(--ease-out), color 0.28s var(--ease-out),
    border-color 0.28s var(--ease-out), transform 0.28s var(--ease-out),
    box-shadow 0.28s var(--ease-out);
}
.btn--primary {
  background: var(--color-accent-deep);
  color: var(--color-invert-ink);
  padding: 0.9rem 1.55rem;
}
.btn--primary:hover {
  background: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 18px 32px -20px rgba(102, 29, 20, 0.9);
}
.btn--primary:active { transform: translateY(0); }
.btn--wash {
  background: var(--color-accent-wash);
  color: var(--color-accent-deep);
  border-color: #e6d0c9;
}
.btn--wash:hover { background: #e9d5ce; }
.btn--ghost {
  background: var(--color-surface);
  border-color: var(--color-line);
  color: var(--color-ink-soft);
}
.btn--ghost:hover {
  border-color: var(--color-ink);
  color: var(--color-ink);
  transform: translateY(-1px);
}
.icon--arrow { transition: transform 0.3s var(--ease-out); }
.btn:hover .icon--arrow { transform: translateX(3px); }

/* ---------- Main + sections ------------------------------------------ */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.6vw, 24px);
  padding: clamp(18px, 2.4vw, 38px) var(--gutter) clamp(26px, 3vw, 48px);
}

.section {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.2vw, 36px);
  box-shadow: 0 24px 48px -44px rgba(34, 34, 34, 0.7);
  scroll-margin-top: 90px;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(16px, 1.8vw, 26px);
}
.section__head-text { max-width: 62ch; }
.section__head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-snug);
  margin: 0.15rem 0 0.4rem;
}
.section__lede {
  margin: 0;
  max-width: 58ch;
  font-size: 0.95rem;
  color: var(--color-muted);
}
.section__lede--aside { max-width: 34ch; font-size: var(--fs-sm); }
.section__head-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ---------- Hero ----------------------------------------------------- */

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
  gap: clamp(20px, 3vw, 60px);
  align-items: start;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  margin: 0.45rem 0 0.3rem;
}
.hero__sub {
  margin: 0 0 0.9rem;
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
  font-weight: 500;
  color: var(--color-ink-soft);
}
.hero__note {
  margin: 0 0 1.7rem;
  max-width: 54ch;
  font-size: 0.95rem;
  color: var(--color-muted);
}
.hero__actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.hero__aside {
  padding-left: clamp(14px, 1.6vw, 22px);
  border-left: 1px solid var(--color-line);
  font-size: var(--fs-sm);
  line-height: 1.68;
  color: var(--color-muted);
}
.hero__aside p { margin: 0 0 0.8rem; }
.hero__aside p:last-child { margin-bottom: 0; }
.hero__aside-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-ink);
  margin-bottom: 0.5rem;
}

/* ---------- Signals -------------------------------------------------- */

.signals__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.signal {
  padding: 0 clamp(12px, 1.6vw, 30px);
  border-left: 1px solid var(--color-line);
}
.signal:first-child { border-left: 0; padding-left: 0; }
.signal__label {
  margin: 0;
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}
.signal__value {
  margin: 0.3rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.3vw, 2.5rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.signal__meta {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-ink-soft);
}
.dots { display: flex; gap: 6px; margin-top: 1rem; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-line);
  display: inline-block;
}
.dots .dot {
  transform: scale(0.45);
  transition: transform 0.5s var(--ease-out), background 0.5s var(--ease-out);
}
.dots .dot.is-on { background: var(--color-accent); }
.reveal.is-visible .dots .dot {
  transform: scale(1);
  transition-delay: calc(var(--i, 0) * 60ms + 180ms);
}

/* ---------- Editor (text + image) ------------------------------------ */

.editor__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 0.94fr) minmax(0, 1.3fr);
  gap: clamp(14px, 1.3vw, 20px);
  align-items: stretch;
}
.editor__col {
  display: grid;
  gap: clamp(14px, 1.3vw, 20px);
  align-content: start;
  min-width: 0;
}
.editor__col--wide { display: block; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: clamp(16px, 1.5vw, 22px);
  box-shadow: 0 20px 40px -30px rgba(34, 34, 34, 0.55);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out);
}
.card:hover {
  --shift: -3px;
  border-color: #cdc4b5;
  box-shadow: 0 26px 44px -34px rgba(34, 34, 34, 0.65);
}
.card--flush { padding: 0; overflow: hidden; }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.card__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
}
.card__foot {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-line);
}
.swatch-bar {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #222222 0 30%,
    #8a2b1f 30% 58%,
    #eae5db 58% 78%,
    #f0e2dd 78% 100%
  );
}
.card__foot-note { font-size: var(--fs-xs); color: var(--color-muted); }

.media-card { position: relative; }
.media-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  z-index: 1;
  background: linear-gradient(to top, rgba(27, 26, 24, 0.66), rgba(27, 26, 24, 0));
  pointer-events: none;
}
.media-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.media-card__caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--color-invert-ink);
}
.media-card__label {
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  opacity: 0.86;
}
.media-card__title { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.1rem;
  border-top: 1px solid var(--color-line);
}
.row:first-child { border-top: 0; padding-top: 0.3rem; }
.row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.row__title { font-size: var(--fs-sm); font-weight: 500; }
.row__desc { font-size: var(--fs-xs); color: var(--color-muted); line-height: 1.45; }
.row__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: var(--color-base);
  color: var(--color-ink-soft);
}
.row__ghost {
  font-size: var(--fs-xs);
  color: var(--color-muted);
  white-space: nowrap;
}
.row__go {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  border: 1px solid transparent;
  color: var(--color-muted);
  text-decoration: none;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.row__go .icon { width: 16px; height: 16px; }
.row__go:hover {
  background: var(--color-base);
  border-color: var(--color-line);
  color: var(--color-accent);
  transform: translateX(2px);
}

.status {
  font-size: 0.625rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status--live { background: var(--color-accent-wash); color: var(--color-accent-deep); }
.status--draft { background: var(--color-base-deep); color: var(--color-ink-soft); }

.tokens { list-style: none; margin: 0; padding: 0; }
.token {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.15rem 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--color-line);
}
.token:first-child { border-top: 0; padding-top: 0.1rem; }
.token__label { font-size: var(--fs-sm); }
.token__value {
  font-family: var(--font-display);
  font-size: 1.02rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.token__note { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--color-muted); }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
}
.mini {
  background: var(--color-base);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 14px 16px;
}
.mini--wash { background: var(--color-accent-wash); border-color: #e6d1ca; }
.mini__label {
  margin: 0 0 0.4rem;
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}
.mini__value { margin: 0 0 0.3rem; font-family: var(--font-display); font-size: 1.1rem; }
.mini__note { margin: 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--color-ink-soft); }

.preview {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.06;
  margin: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-base-deep);
}
.preview__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s var(--ease-out);
}
.preview:hover .preview__img { transform: scale(1.02); }

.preview__panel {
  position: absolute;
  top: 18px;
  left: 18px;
  width: min(262px, 54%);
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.87);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 253, 250, 0.75);
  box-shadow: 0 22px 44px -34px rgba(34, 34, 34, 0.9);
}
.preview__panel-title {
  margin: 0 0 0.65rem;
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}
.legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.legend-row { display: flex; align-items: center; gap: 0.55rem; font-size: var(--fs-xs); }
.swatch {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(34, 34, 34, 0.16);
}
.legend-row__name { color: var(--color-ink); }
.legend-row__hex { margin-left: auto; color: var(--color-muted); font-variant-numeric: tabular-nums; }

.preview__note {
  position: absolute;
  top: 22px;
  right: 22px;
  width: min(310px, 46%);
  text-align: right;
  color: var(--color-ink-soft);
}
.preview__note-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--color-ink);
}
.preview__note p { margin: 0; font-size: var(--fs-sm); line-height: 1.6; }

/* ---------- Moodboard (gallery) -------------------------------------- */

.moodboard__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
  align-items: start;
}
.tile {
  grid-column: span 2;
  margin: 0;
  --tilt: -1.3deg;
  --shift: 0px;
  border-radius: 14px;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  overflow: hidden;
  box-shadow: 0 20px 38px -34px rgba(34, 34, 34, 0.8);
  transition: box-shadow 0.45s var(--ease-out);
}
.tile:nth-child(even) { --tilt: 1.2deg; --shift: 16px; }
.tile:nth-child(3n) { --shift: -8px; }
.tile:hover {
  --tilt: 0deg;
  --shift: -10px;
  box-shadow: 0 28px 46px -30px rgba(34, 34, 34, 0.6);
}
.tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.tile--tall img { aspect-ratio: 3 / 4; }
.tile--wide { grid-column: span 2; }
.tile__caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.6rem 0.75rem 0.75rem;
}
.tile__caption span:first-child { font-size: var(--fs-sm); font-weight: 500; }
.tile__caption span:last-child {
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ---------- Uploads / filmstrip -------------------------------------- */

.filmstrip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.1vw, 16px);
}
.film { min-width: 0; }
.filmstrip.is-dragging { cursor: grabbing; }
.filmstrip.is-dragging .film img { transition: none; }
.filmstrip { scrollbar-width: thin; scrollbar-color: var(--color-line) transparent; }
.filmstrip::-webkit-scrollbar { height: 6px; }
.filmstrip::-webkit-scrollbar-thumb { background: var(--color-line); border-radius: 999px; }
.filmstrip::-webkit-scrollbar-track { background: transparent; }
.film figure { margin: 0; }
.film img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--color-line);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.film:hover img {
  transform: translateY(-5px);
  box-shadow: 0 22px 36px -26px rgba(34, 34, 34, 0.8);
}
.film__caption { display: flex; flex-direction: column; gap: 2px; padding-top: 0.55rem; }
.film__title { font-family: var(--font-display); font-size: 1.02rem; }
.film__sub {
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}

.filmstrip__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(14px, 1.6vw, 22px);
  padding-top: 1rem;
  border-top: 1px solid var(--color-line);
}
.pager { display: flex; align-items: center; gap: 6px; margin-inline: auto; }
.pager__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-line); transition: all 0.3s var(--ease-out); }
.pager__dot.is-on { width: 20px; border-radius: 999px; background: var(--color-accent); }
.filmstrip__tools { display: flex; align-items: center; gap: 1rem; }
.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--fs-xs);
  color: var(--color-ink-soft);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}
.tool .icon { width: 14px; height: 14px; }
.tool:hover { color: var(--color-accent); }

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

.brief__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(22px, 3vw, 58px);
  align-items: start;
}
.brief__grid h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-snug);
  margin: 0.15rem 0 0.5rem;
}
.brief__lede { margin: 0; font-size: 0.95rem; color: var(--color-muted); max-width: 46ch; }

.facts { margin: 1.6rem 0 0; max-width: 46ch; }
.fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  border-top: 1px solid var(--color-line);
}
.fact dt {
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}
.fact dd { margin: 0; font-size: var(--fs-sm); color: var(--color-ink-soft); text-align: right; }
.fact dd a { color: var(--color-accent-deep); }

.brief__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  padding: clamp(18px, 2vw, 28px);
  background: var(--color-base);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  width: 100%;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 108px; }
.field input::placeholder,
.field textarea::placeholder { color: #a9a29a; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-wash);
}
.brief__submit { align-items: flex-start; gap: 0.8rem; }
.form-note { margin: 0; font-size: var(--fs-xs); color: var(--color-muted); }

/* ---------- Bottom bar ----------------------------------------------- */

.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 14px var(--gutter) 20px;
  border-top: 1px solid var(--color-line);
  font-size: var(--fs-xs);
  color: var(--color-muted);
}
.bottombar__legend { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.legend { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend .dot { width: 6px; height: 6px; }
.legend .dot--live { background: var(--color-accent); animation: pulse 2.6s var(--ease-out) infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(138, 43, 31, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(138, 43, 31, 0); }
}
.bottombar__links { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.bottombar__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-ink-soft);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}
.bottombar__links a:hover { color: var(--color-accent); }
.bottombar__links .icon { width: 14px; height: 14px; }

/* ---------- Motion --------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translate3d(0, calc(18px + var(--shift, 0px)), 0) rotate(var(--tilt, 0deg));
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, var(--shift, 0px), 0) rotate(var(--tilt, 0deg));
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .dots .dot { transform: scale(1); }
  .pager__dot.is-on { width: 20px; }
}

/* ---------- Responsive ----------------------------------------------- */

@media (max-width: 1280px) {
  .editor__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor__col--wide { grid-column: 1 / -1; }
  .preview { aspect-ratio: 16 / 10; }
}

@media (max-width: 1024px) {
  .rail {
    width: min(304px, 86vw);
    transform: translateX(-104%);
    box-shadow: none;
  }
  .rail.is-open {
    transform: none;
    box-shadow: 0 34px 60px -30px rgba(27, 26, 24, 0.55);
  }
  .rail__close { display: grid; }
  .workspace { margin-left: 0; }
  .topbar__menu { display: grid; }
  .topbar__title { font-size: var(--fs-xs); }

  .editor__grid { grid-template-columns: minmax(0, 1fr); }
  .editor__col--wide { grid-column: auto; }
  .preview { aspect-ratio: 16 / 9; }

  .filmstrip {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 1fr);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  .film { scroll-snap-align: start; }
  .filmstrip { cursor: grab; }
}

@media (max-width: 860px) {
  .moodboard__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile,
  .tile--wide { grid-column: span 1; }
  .tile:nth-child(even) { --shift: 10px; }
  .brief__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__aside {
    padding: var(--space-sm) 0 0;
    border-left: 0;
    border-top: 1px solid var(--color-line);
  }
  .signals__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .signal { padding: 0; border-left: 0; }
  .section { padding: 20px 16px; border-radius: var(--radius-md); }
  .preview__note {
    position: static;
    width: auto;
    text-align: left;
    margin: 0;
    padding: 14px 16px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-line);
  }
  .preview { aspect-ratio: auto; height: auto; }
  .preview__img { position: static; height: clamp(240px, 62vw, 360px); }
  .preview__panel { position: static; width: auto; margin: 0; border-radius: 0; border: 0; background: var(--color-base); padding: 14px 16px; box-shadow: none; }
}

@media (max-width: 560px) {
  .signals__grid { grid-template-columns: minmax(0, 1fr); gap: 1.35rem; }
  .brief__form { grid-template-columns: minmax(0, 1fr); }
  .mini-grid { grid-template-columns: minmax(0, 1fr); }
  .moodboard__grid { grid-template-columns: minmax(0, 1fr); }
  .tile:nth-child(even) { --shift: 0px; }
  .pager { margin-inline: 0; }
  .topbar__actions .link-quiet { display: none; }
  .bottombar { flex-direction: column; align-items: flex-start; }
}
/* studio-chrome:canonical */
.hidden { display: none !important; }

  /* ---------- Gate (sign in) ---------- */
  .gate {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--space-xl) var(--gutter);
    background: var(--color-base);
  }
  .gate__card {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: clamp(24px, 3vw, 42px);
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    box-shadow: 0 34px 64px -52px rgba(34, 34, 34, 0.9);
  }
  .gate__title {
    margin: 0.25rem 0 0;
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    font-weight: 500;
    letter-spacing: var(--tracking-tight);
  }
  .gate__lede { margin: 0 0 0.4rem; font-size: var(--fs-sm); color: var(--color-muted); }
  .gate__field { display: flex; flex-direction: column; gap: 0.4rem; }
  .gate__field span {
    font-size: 0.6875rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-muted);
  }
  .gate__field input {
    font: inherit;
    font-size: 0.95rem;
    color: var(--color-ink);
    background: var(--color-base);
    border: 1px solid var(--color-line);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    width: 100%;
    transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  }
  .gate__field input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-wash);
  }
  .gate__error {
    margin: 0;
    min-height: 1.1em;
    font-size: var(--fs-xs);
    color: var(--color-accent-deep);
  }
  .gate__loading {
    margin: 0;
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-muted);
  }

  /* ---------- Coming-soon nav items ---------- */
  .is-soon { opacity: 0.62; cursor: default; pointer-events: none; }
  .rail-link.is-soon:hover { background: transparent; color: var(--color-ink-soft); transform: none; }
  .rail-feature.is-soon { cursor: default; }
  .rail-feature.is-soon:hover { transform: none; }
  .rail-badge--soon { background: var(--color-base-deep); color: var(--color-muted); }

  /* ---------- Overview ---------- */
  .studio-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, 350px);
    gap: clamp(20px, 3vw, 54px);
    align-items: start;
  }
  .studio-hero__title {
    margin: 0.4rem 0 0.4rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-display);
  }
  .studio-hero__sub {
    margin: 0 0 1.1rem;
    max-width: 52ch;
    font-size: var(--fs-md);
    color: var(--color-ink-soft);
  }
  .studio-hero__live {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    font-size: var(--fs-sm);
    color: var(--color-ink-soft);
  }
  .studio-hero__actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

  .studio-brand-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: clamp(14px, 1.4vw, 18px);
  }
  .brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 13px;
    background: var(--color-ink-block);
    color: var(--color-invert-ink);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.02em;
  }
  .studio-brand-card__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .studio-brand-card__name { font-family: var(--font-display); font-size: 1.1rem; }
  .studio-brand-card__domain {
    font-size: var(--fs-xs);
    color: var(--color-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .publish-strip {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 16px 18px;
    background: var(--color-base);
    border: 1px solid var(--color-line);
    border-radius: 14px;
  }
  .publish-strip__label {
    margin: 0 0 0.2rem;
    font-size: 0.6875rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-muted);
  }
  .publish-strip__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    font-size: var(--fs-sm);
  }
  .publish-strip__row span:last-child { color: var(--color-ink); font-variant-numeric: tabular-nums; }

  /* ---------- Attention ---------- */
  .attention__grid {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: clamp(14px, 1.6vw, 22px);
    align-items: start;
  }
  .meter-card { display: flex; flex-direction: column; }
  .meter-card__label {
    margin: 0;
    font-size: 0.6875rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-muted);
  }
  .meter__value {
    margin: 0.35rem 0 0.2rem;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.1rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .meter {
    height: 10px;
    margin: 0.9rem 0 0.6rem;
    border-radius: 999px;
    background: var(--color-base-deep);
    overflow: hidden;
  }
  .meter__fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-deep));
    transition: width 0.9s var(--ease-out);
  }
  .meter-card__note { margin: 0; font-size: var(--fs-sm); color: var(--color-ink-soft); }
  .attention__empty {
    padding: 22px;
    border: 1px dashed var(--color-line);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--color-muted);
    font-size: var(--fs-sm);
  }
  .attention__empty strong {
    display: block;
    margin-bottom: 0.3rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-ink);
  }

  /* ---------- Section tiles ---------- */
  .section-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
    gap: clamp(12px, 1.4vw, 18px);
  }
  .section-tile {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 18px 18px 16px;
    color: inherit;
    text-decoration: none;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -34px rgba(34, 34, 34, 0.6);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
      border-color 0.35s var(--ease-out);
  }
  .section-tile:hover {
    transform: translateY(-3px);
    border-color: #cdc4b5;
    box-shadow: 0 28px 44px -30px rgba(34, 34, 34, 0.6);
  }
  .section-tile__count {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .section-tile__label { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; }
  .section-tile__unit {
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-muted);
  }
  .section-tile__go {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    font-size: var(--fs-xs);
    color: var(--color-accent-deep);
  }
  .section-tile__go .icon { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out); }
  .section-tile:hover .section-tile__go .icon { transform: translateX(3px); }

  /* ---------- Shortcuts ---------- */
  .shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 1.4vw, 18px);
  }
  .shortcut {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 178px;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    background: var(--color-base);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
      box-shadow 0.35s var(--ease-out);
  }
  .shortcut:hover {
    transform: translateY(-3px);
    border-color: #cdc4b5;
    box-shadow: 0 28px 44px -32px rgba(34, 34, 34, 0.65);
  }
  .shortcut__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.16;
    transition: transform 0.8s var(--ease-out), opacity 0.4s var(--ease-out);
  }
  .shortcut:hover .shortcut__img { transform: scale(1.05); opacity: 0.22; }
  .shortcut__meta {
    position: relative;
    z-index: 1;
    font-size: 0.6875rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-accent-deep);
  }
  .shortcut__body { position: relative; z-index: 1; margin-top: auto; display: flex; flex-direction: column; gap: 0.25rem; }
  .shortcut__label { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.15; }
  .shortcut__desc { font-size: var(--fs-sm); color: var(--color-ink-soft); }
  .shortcut__go {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    font-size: var(--fs-xs);
    color: var(--color-ink-soft);
  }
  .shortcut__go .icon { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out); }
  .shortcut:hover .shortcut__go .icon { transform: translateX(3px); }

  /* ---------- Footer account strip ---------- */
  .bottombar__account {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
  }
  .bottombar__signed { color: var(--color-muted); }
  .bottombar__soon {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--color-ink-soft);
    opacity: 0.62;
    cursor: default;
  }
  .bottombar__soon .rail-badge { pointer-events: none; }

  .app-note {
    padding: 12px 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
    background: var(--color-accent-wash);
    color: var(--color-accent-deep);
    font-size: var(--fs-sm);
  }

  @media (max-width: 1024px) {
    .studio-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .attention__grid { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 760px) {
    .shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) {
    .shortcut-grid { grid-template-columns: minmax(0, 1fr); }
  }

/*studio-kit*/
:root{--st-bg:#faf7f2;--st-surface:#fff;--st-text:#1c1917;--st-muted:#6b7280;--st-border:rgba(0,0,0,.12);--st-accent:#b45309;--st-radius:12px;--st-font:inherit;--st-mono:ui-monospace,SFMono-Regular,Menlo,monospace;}
[data-studio-app],[data-studio-gate]{font-family:var(--st-font);color:var(--st-text);}
/* Every primitive sets its OWN colour explicitly (not inherited), so a page's colour on the region
   container can never bleed in and make the module unreadable (#studio-kit contrast). */
[data-studio],[data-studio] *{color:var(--st-text);}
.st-state{padding:22px;border:1px dashed var(--st-border);border-radius:var(--st-radius);color:var(--st-muted);text-align:center;font-size:14px;}
.st-summary{display:flex;gap:14px;flex-wrap:wrap;}
.st-metric{flex:1;min-width:140px;background:var(--st-surface);border:1px solid var(--st-border);border-radius:var(--st-radius);padding:16px 18px;color:var(--st-text);}
.st-metric__n{font-size:26px;font-weight:700;letter-spacing:-.01em;color:var(--st-text);}
.st-metric__l{margin-top:2px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--st-muted);}
.st-group{margin-top:16px;}
.st-group__h{display:flex;justify-content:space-between;font-weight:600;font-size:14px;padding:6px 0;border-bottom:1px solid var(--st-border);color:var(--st-text);}
.st-count{color:var(--st-muted);font-family:var(--st-mono);font-size:12px;}
.st-row{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--st-border);color:var(--st-text);}
.st-row__l{flex:0 0 38%;font-size:13px;color:var(--st-muted);}
.st-input{flex:1;font:inherit;font-size:14px;padding:8px 10px;border:1px solid var(--st-border);border-radius:9px;background:var(--st-surface);color:var(--st-text);}
.st-input[data-ph]{border-style:dashed;}
.st-btn{font:inherit;font-weight:600;font-size:14px;padding:10px 18px;border-radius:999px;border:1px solid var(--st-border);background:var(--st-surface);color:var(--st-text);cursor:pointer;}
.st-btn--primary{margin-top:16px;background:var(--st-accent);border-color:var(--st-accent);color:#fff;}
.st-btn:disabled{opacity:.6;cursor:default;}
.st-list{margin-top:6px;color:var(--st-text);}
.st-msg{padding:12px 0;border-bottom:1px solid var(--st-border);color:var(--st-text);}
.st-msg.is-new{border-left:3px solid var(--st-accent);padding-left:12px;}
.st-msg__h{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:4px;color:var(--st-text);}
.st-msg__h strong{color:var(--st-text);}
.st-when{font-size:12px;color:var(--st-muted);}
.st-kv{font-size:13px;margin:2px 0;color:var(--st-text);}
.st-kv span{color:var(--st-muted);}
