/* app.css — the Kutija studio. No framework, no build step.
   ---------------------------------------------------------------------------
   Two layers:
   1. the studio's own look, driven by --s-* custom properties (light + dark
      follow `prefers-color-scheme`);
   2. a preview/project layer driven by --k-* custom properties — the SAME names
      the renderer writes on a published page (SPEC.md §5), so a palette picked
      in the design panel paints the project card and the swatches exactly as a
      visitor will see them.

   Layout is a CSS grid; every interactive element is a real button/label/input
   so keyboard and screen readers work without extra ARIA. */

/* =========================================================== studio tokens */
:root {
  --s-bg: #f6f7f9;
  --s-bg-soft: #eef0f4;
  --s-surface: #ffffff;
  --s-surface-2: #fafbfc;
  --s-text: #14171c;
  --s-muted: #626b7a;
  --s-faint: #8a93a3;
  --s-border: #e2e6ec;
  --s-border-strong: #cfd6df;
  --s-accent: #4f46e5;
  --s-accent-text: #ffffff;
  --s-accent-soft: #eceafe;
  --s-ok: #15803d;
  --s-ok-soft: #e8f7ee;
  --s-warn: #b45309;
  --s-warn-soft: #fdf3e3;
  --s-danger: #b91c1c;
  --s-danger-soft: #fdecec;
  --s-info: #0369a1;
  --s-info-soft: #e6f4fb;
  --s-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px -12px rgba(16, 24, 40, 0.18);
  --s-shadow-lg: 0 24px 60px -24px rgba(16, 24, 40, 0.35);
  --s-radius: 12px;
  --s-radius-sm: 8px;
  --s-radius-lg: 20px;
  --s-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --s-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --s-maxw: 1240px;
  --s-topbar: 56px;
  --s-sidebar: 236px;
  --s-rail: 46px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --s-bg: #0c0e12;
    --s-bg-soft: #12151b;
    --s-surface: #151920;
    --s-surface-2: #1a1f27;
    --s-text: #e8ecf2;
    --s-muted: #9aa4b4;
    --s-faint: #7b8595;
    --s-border: #262c36;
    --s-border-strong: #333a46;
    --s-accent: #8b8cf9;
    --s-accent-text: #10112a;
    --s-accent-soft: #1e2044;
    --s-ok: #4ade80;
    --s-ok-soft: #12291c;
    --s-warn: #fbbf24;
    --s-warn-soft: #2c2109;
    --s-danger: #f87171;
    --s-danger-soft: #2c1414;
    --s-info: #7dd3fc;
    --s-info-soft: #0d2534;
    --s-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
    --s-shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

/* ============================================================== reset/base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--s-bg);
  color: var(--s-text);
  font-family: var(--s-font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

a {
  color: var(--s-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--s-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  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: 8px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius-sm);
  box-shadow: var(--s-shadow);
  transition: top 0.15s;
}

.skip-link:focus {
  top: 8px;
}

/* ================================================================== buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--s-border-strong);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface);
  color: var(--s-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, transform 0.06s, box-shadow 0.14s;
}

.btn:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--s-surface-2);
  border-color: var(--s-muted);
}

.btn:active:not(:disabled):not([aria-disabled="true"]) {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--s-accent);
  border-color: var(--s-accent);
  color: var(--s-accent-text);
}

.btn-primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: color-mix(in oklab, var(--s-accent) 86%, black);
  border-color: color-mix(in oklab, var(--s-accent) 86%, black);
}

.btn-danger {
  background: var(--s-danger);
  border-color: var(--s-danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: color-mix(in oklab, var(--s-danger) 86%, black);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--s-muted);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--s-bg-soft);
  color: var(--s-text);
}

.btn-sm {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
}

.btn-icon {
  min-height: 32px;
  min-width: 32px;
  padding: 6px;
  font-size: 15px;
  line-height: 1;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn .spin {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================== fields */
.field {
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.field-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--s-text);
}

.field-type {
  font-size: 11px;
  color: var(--s-faint);
  font-family: var(--s-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-hint {
  margin-top: 5px;
  font-size: 12px;
  color: var(--s-muted);
}

.field-error {
  margin-top: 5px;
  font-size: 12px;
  color: var(--s-danger);
  font-weight: 600;
}

.input,
.textarea,
.select {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  background: var(--s-surface);
  border: 1px solid var(--s-border-strong);
  border-radius: var(--s-radius-sm);
  font-size: 14px;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--s-accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--s-accent) 22%, transparent);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--s-danger);
}

.textarea {
  resize: vertical;
  line-height: 1.5;
}

.code-input,
.mono {
  font-family: var(--s-mono);
  font-size: 12.5px;
  line-height: 1.55;
  tab-size: 2;
}

.select {
  appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--s-muted) 50%),
    linear-gradient(135deg, var(--s-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch .track {
  position: relative;
  width: 40px;
  height: 23px;
  flex: none;
  border-radius: 999px;
  background: var(--s-border-strong);
  transition: background 0.15s;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}

.switch input:checked + .track {
  background: var(--s-accent);
}

.switch input:checked + .track::after {
  transform: translateX(17px);
}

.switch input:focus-visible + .track {
  outline: 2px solid var(--s-accent);
  outline-offset: 2px;
}

/* segmented control */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--s-bg-soft);
  border: 1px solid var(--s-border);
  border-radius: 999px;
}

.seg button {
  border: 0;
  background: transparent;
  color: var(--s-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--s-surface);
  color: var(--s-text);
  box-shadow: var(--s-shadow);
}

/* tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--s-border-strong);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px 2px 9px;
  background: var(--s-accent-soft);
  color: var(--s-text);
  border-radius: 999px;
  font-size: 12.5px;
}

.tag button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--s-muted);
  font-size: 14px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 50%;
}

.tag button:hover {
  background: color-mix(in oklab, var(--s-danger) 20%, transparent);
  color: var(--s-danger);
}

.tags input {
  flex: 1 1 130px;
  min-width: 110px;
  border: 0;
  background: transparent;
  padding: 4px 6px;
  font-size: 13px;
}

.tags input:focus {
  outline: none;
}

/* colour */
.color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

input[type="color"] {
  width: 44px;
  height: 38px;
  padding: 3px;
  border: 1px solid var(--s-border-strong);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface);
  cursor: pointer;
}

/* ============================================================== drop zone */
.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 108px;
  padding: 18px;
  border: 2px dashed var(--s-border-strong);
  border-radius: var(--s-radius);
  background: var(--s-surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.drop:hover,
.drop.is-over {
  border-color: var(--s-accent);
  background: var(--s-accent-soft);
}

.drop.is-busy {
  cursor: progress;
}

.drop-icon {
  font-size: 22px;
}

.drop-title {
  font-weight: 650;
  font-size: 14px;
}

.drop-hint {
  font-size: 12px;
  color: var(--s-muted);
}

.drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop input[type="file"]:focus-visible {
  outline: 2px solid var(--s-accent);
  outline-offset: 3px;
}

.progress {
  width: 100%;
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--s-bg-soft);
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--s-accent);
  border-radius: 999px;
  transition: width 0.2s;
}

/* ============================================================ asset lists */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.asset {
  position: relative;
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius-sm);
  overflow: hidden;
  background: var(--s-surface-2);
}

.asset img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: cover;
  background: var(--s-bg-soft);
}

.asset-name {
  display: block;
  padding: 5px 7px;
  font-size: 11.5px;
  color: var(--s-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset .asset-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(15, 18, 24, 0.72);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.file-list {
  list-style: none;
  margin: 9px 0 0;
  padding: 0;
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius-sm);
  overflow: hidden;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--s-border);
  background: var(--s-surface);
}

.file-list li:last-child {
  border-bottom: 0;
}

.file-list .fname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--s-mono);
  font-size: 12px;
}

.file-list .fsize {
  color: var(--s-faint);
  font-size: 11.5px;
  flex: none;
}

/* ================================================================== cards */
.card {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius);
  box-shadow: var(--s-shadow);
}

.card-pad {
  padding: 16px;
}

.card + .card {
  margin-top: 14px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--s-border);
}

.card-head h2,
.card-head h3 {
  font-size: 15px;
  font-weight: 700;
}

.card-body {
  padding: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 0;
}

.muted {
  color: var(--s-muted);
}

.faint {
  color: var(--s-faint);
}

.small {
  font-size: 12.5px;
}

.nowrap {
  white-space: nowrap;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* ============================================================ pills/badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill-draft {
  background: var(--s-bg-soft);
  color: var(--s-muted);
  border-color: var(--s-border);
}

.pill-published {
  background: var(--s-ok-soft);
  color: var(--s-ok);
  border-color: color-mix(in oklab, var(--s-ok) 30%, transparent);
}

.pill-blocked {
  background: var(--s-danger-soft);
  color: var(--s-danger);
  border-color: color-mix(in oklab, var(--s-danger) 30%, transparent);
}

.pill-pending {
  background: var(--s-warn-soft);
  color: var(--s-warn);
  border-color: color-mix(in oklab, var(--s-warn) 30%, transparent);
}

.pill-active {
  background: var(--s-ok-soft);
  color: var(--s-ok);
  border-color: color-mix(in oklab, var(--s-ok) 30%, transparent);
}

.pill-info {
  background: var(--s-info-soft);
  color: var(--s-info);
  border-color: color-mix(in oklab, var(--s-info) 30%, transparent);
}

.pill-accent {
  background: var(--s-accent-soft);
  color: var(--s-accent);
  border-color: color-mix(in oklab, var(--s-accent) 30%, transparent);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--s-border-strong);
  border-radius: 999px;
  background: var(--s-surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--s-muted);
}

.chip[aria-pressed="true"] {
  background: var(--s-accent-soft);
  border-color: var(--s-accent);
  color: var(--s-accent);
}

/* ================================================================ topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--s-topbar);
  padding: 0 14px;
  background: color-mix(in oklab, var(--s-surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--s-border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--s-text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--s-accent), color-mix(in oklab, var(--s-accent) 45%, #d946ef));
  color: #fff;
  font-size: 14px;
}

.topbar .spacer {
  flex: 1;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--s-radius-sm);
  background: transparent;
  color: var(--s-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.icon-btn:hover {
  background: var(--s-bg-soft);
  color: var(--s-text);
}

.quota-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--s-border);
  background: var(--s-surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--s-muted);
  cursor: pointer;
}

.quota-chip.is-low {
  border-color: color-mix(in oklab, var(--s-warn) 40%, transparent);
  background: var(--s-warn-soft);
  color: var(--s-warn);
}

.quota-chip.is-out {
  border-color: color-mix(in oklab, var(--s-danger) 40%, transparent);
  background: var(--s-danger-soft);
  color: var(--s-danger);
}

/* ============================================================== app shell */
.app {
  display: grid;
  grid-template-columns: var(--s-sidebar) minmax(0, 1fr);
  min-height: calc(100vh - var(--s-topbar));
}

.sidebar {
  position: sticky;
  top: var(--s-topbar);
  align-self: start;
  height: calc(100vh - var(--s-topbar));
  padding: 14px 10px;
  border-right: 1px solid var(--s-border);
  background: var(--s-surface);
  overflow-y: auto;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav a,
.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 11px;
  border: 0;
  border-radius: var(--s-radius-sm);
  background: transparent;
  color: var(--s-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav a:hover,
.nav button:hover {
  background: var(--s-bg-soft);
  color: var(--s-text);
}

.nav a[aria-current="page"],
.nav button[aria-current="page"] {
  background: var(--s-accent-soft);
  color: var(--s-accent);
}

.nav .ni {
  width: 20px;
  text-align: center;
  font-size: 15px;
  flex: none;
}

.nav-sep {
  margin: 10px 11px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--s-faint);
  font-weight: 700;
}

.main {
  min-width: 0;
  padding: 22px clamp(14px, 3vw, 32px) 72px;
}

.main-narrow {
  max-width: 900px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head h1 {
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.02em;
}

.page-head p {
  color: var(--s-muted);
  font-size: 14px;
  max-width: 62ch;
}

/* ============================================================= dashboard */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi {
  padding: 13px 15px;
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius);
}

.kpi .k {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--s-faint);
  font-weight: 700;
}

.kpi .v {
  font-size: 21px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.kpi .m {
  font-size: 12px;
  color: var(--s-muted);
}

.kpi .bar {
  height: 4px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--s-bg-soft);
  overflow: hidden;
}

.kpi .bar > i {
  display: block;
  height: 100%;
  background: var(--s-accent);
  border-radius: 999px;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}

.proj {
  display: flex;
  flex-direction: column;
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius);
  overflow: hidden;
  box-shadow: var(--s-shadow);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.proj:hover {
  transform: translateY(-2px);
  border-color: var(--s-border-strong);
  box-shadow: var(--s-shadow-lg);
}

/* The thumb paints the PROJECT'S own palette: --k-* are set inline per card. */
.proj-thumb {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  height: 116px;
  background: var(--k-bg, var(--s-bg-soft));
  border-bottom: 1px solid var(--k-border, var(--s-border));
  overflow: hidden;
}

.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-thumb .th-emoji {
  font-size: 27px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.proj-thumb .th-title {
  max-width: 88%;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--k-text, var(--s-text));
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}

.proj-thumb .th-rule {
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--k-accent, var(--s-accent));
}

.proj-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 14px 14px;
  flex: 1;
}

.proj-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  word-break: break-word;
}

.proj-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--s-muted);
}

.proj-kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--s-muted);
  font-weight: 600;
}

.proj-acts {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 3px;
  border-top: 1px solid var(--s-border);
  padding-top: 10px;
}

.proj-acts .btn {
  flex: 1;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.toolbar .input,
.toolbar .select {
  width: auto;
  min-width: 150px;
  flex: 0 1 auto;
}

.toolbar .search {
  flex: 1 1 200px;
  min-width: 160px;
}

/* ================================================================= editor */
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 42%);
  gap: 16px;
  align-items: start;
}

.editor > .panes {
  min-width: 0;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ed-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--s-bg-soft);
  border: 1px solid var(--s-border);
  border-radius: 999px;
  overflow-x: auto;
  max-width: 100%;
}

.ed-tabs button {
  border: 0;
  background: transparent;
  color: var(--s-muted);
  font-size: 13px;
  font-weight: 650;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.ed-tabs button[aria-selected="true"] {
  background: var(--s-surface);
  color: var(--s-text);
  box-shadow: var(--s-shadow);
}

.preview-pane {
  position: sticky;
  top: calc(var(--s-topbar) + 14px);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.preview-frame {
  position: relative;
  height: min(72vh, 720px);
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius);
  overflow: hidden;
  background: var(--s-surface-2);
  box-shadow: var(--s-shadow);
}

.preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.preview-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 20px;
  text-align: center;
  color: var(--s-muted);
  font-size: 13px;
}

.preview-url {
  font-family: var(--s-mono);
  font-size: 11.5px;
  color: var(--s-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* blocks editor */
.blocks {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.block {
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface-2);
  overflow: hidden;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  background: var(--s-bg-soft);
  border-bottom: 1px solid var(--s-border);
}

.block-head .bt {
  font-size: 12px;
  font-weight: 700;
  color: var(--s-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-left: 4px;
}

.block-head .bf {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--s-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-body {
  padding: 10px;
}

.block-body .field:last-child {
  margin-bottom: 0;
}

.block-body .textarea,
.block-body .input,
.block-body .select {
  background: var(--s-surface);
}

/* list editor */
.list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.list-item {
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface-2);
}

.list-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.list-item.is-open .list-item-head {
  border-bottom-color: var(--s-border);
}

.list-item-head .li-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-head .li-n {
  font-size: 11px;
  color: var(--s-faint);
  font-family: var(--s-mono);
  flex: none;
}

.list-item-body {
  padding: 10px;
}

.nested {
  margin-top: 6px;
  padding: 9px;
  border: 1px dashed var(--s-border-strong);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface);
}

/* ============================================================== AI panel */
.ai-panel {
  border: 1px solid color-mix(in oklab, var(--s-accent) 34%, var(--s-border));
  background: linear-gradient(180deg, var(--s-accent-soft), transparent 120px);
  border-radius: var(--s-radius);
  padding: 14px;
}

.ai-steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ai-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--s-muted);
}

.ai-steps li[data-state="done"] {
  color: var(--s-text);
}

.ai-steps li[data-state="active"] {
  color: var(--s-accent);
  font-weight: 650;
}

.ai-steps .dot {
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--s-border-strong);
  display: grid;
  place-items: center;
  font-size: 9px;
  color: transparent;
}

.ai-steps li[data-state="done"] .dot {
  background: var(--s-ok);
  border-color: var(--s-ok);
  color: #fff;
}

.ai-steps li[data-state="active"] .dot {
  border-color: var(--s-accent);
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

.ai-scan {
  height: 4px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--s-bg-soft);
  overflow: hidden;
  position: relative;
}

.ai-scan::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 38%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--s-accent), transparent);
  animation: scan 1.25s ease-in-out infinite;
}

@keyframes scan {
  0% {
    transform: translateX(-40%);
  }
  100% {
    transform: translateX(300%);
  }
}

.notes {
  margin-top: 12px;
  border: 1px solid var(--s-border);
  border-left: 3px solid var(--s-accent);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface);
  padding: 11px 13px;
}

.notes h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--s-faint);
  margin-bottom: 6px;
}

.notes ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.notes li {
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-disabled {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border: 1px solid color-mix(in oklab, var(--s-warn) 35%, var(--s-border));
  background: var(--s-warn-soft);
  color: var(--s-warn);
  border-radius: var(--s-radius-sm);
  font-size: 13px;
  font-weight: 600;
}

/* ============================================================ theme picker */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  gap: 9px;
}

.swatch {
  padding: 0;
  border: 2px solid var(--s-border);
  border-radius: var(--s-radius-sm);
  overflow: hidden;
  background: var(--s-surface);
  cursor: pointer;
  text-align: left;
}

.swatch[aria-pressed="true"] {
  border-color: var(--s-accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--s-accent) 20%, transparent);
}

.swatch .sw-top {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 9px;
}

.swatch .sw-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex: none;
}

.swatch .sw-a {
  height: 9px;
  flex: 1;
  border-radius: 3px;
}

.swatch .sw-name {
  display: block;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 650;
}

.thumb-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thumb-choice {
  border: 2px solid var(--s-border);
  border-radius: var(--s-radius-sm);
  background: var(--s-surface);
  cursor: pointer;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
}

.thumb-choice[aria-pressed="true"] {
  border-color: var(--s-accent);
  background: var(--s-accent-soft);
}

/* ================================================================= stats */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 156px;
  padding: 12px 2px 0;
  border-bottom: 1px solid var(--s-border);
}

.chart .bar {
  flex: 1;
  min-width: 3px;
  background: linear-gradient(180deg, var(--s-accent), color-mix(in oklab, var(--s-accent) 55%, transparent));
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  position: relative;
  transition: filter 0.12s;
}

.chart .bar:hover {
  filter: brightness(1.15);
}

.chart .bar[data-zero="true"] {
  background: var(--s-border);
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--s-faint);
  padding-top: 5px;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data th,
table.data td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--s-border);
  vertical-align: middle;
}

table.data th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--s-faint);
  font-weight: 700;
  white-space: nowrap;
}

table.data tbody tr:hover {
  background: var(--s-surface-2);
}

table.data td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow-x: auto;
}

/* ================================================================= empty */
.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 46px 20px;
  text-align: center;
  border: 1px dashed var(--s-border-strong);
  border-radius: var(--s-radius);
  background: var(--s-surface-2);
}

.empty .e-icon {
  font-size: 30px;
}

.empty h3 {
  font-size: 16px;
}

.empty p {
  color: var(--s-muted);
  font-size: 13.5px;
  max-width: 46ch;
}

.skeleton {
  border-radius: var(--s-radius);
  background: linear-gradient(90deg, var(--s-bg-soft), var(--s-border), var(--s-bg-soft));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  min-height: 116px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ================================================================ notices */
.toasts {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 28px));
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: var(--s-radius-sm);
  border: 1px solid var(--s-border);
  background: var(--s-surface);
  box-shadow: var(--s-shadow-lg);
  font-size: 13.5px;
  animation: slide-in 0.16s ease-out;
}

.toast[data-kind="ok"] {
  border-left: 3px solid var(--s-ok);
}

.toast[data-kind="err"] {
  border-left: 3px solid var(--s-danger);
}

.toast[data-kind="warn"] {
  border-left: 3px solid var(--s-warn);
}

.toast[data-kind="info"] {
  border-left: 3px solid var(--s-info);
}

.toast .t-body {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.toast button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--s-muted);
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: var(--s-radius-sm);
  border: 1px solid var(--s-border);
  background: var(--s-surface-2);
  font-size: 13.5px;
}

.banner-info {
  background: var(--s-info-soft);
  border-color: color-mix(in oklab, var(--s-info) 30%, transparent);
}

.banner-warn {
  background: var(--s-warn-soft);
  border-color: color-mix(in oklab, var(--s-warn) 30%, transparent);
  color: color-mix(in oklab, var(--s-warn) 85%, var(--s-text));
}

.banner-danger {
  background: var(--s-danger-soft);
  border-color: color-mix(in oklab, var(--s-danger) 30%, transparent);
  color: color-mix(in oklab, var(--s-danger) 85%, var(--s-text));
}

.banner-ok {
  background: var(--s-ok-soft);
  border-color: color-mix(in oklab, var(--s-ok) 30%, transparent);
  color: color-mix(in oklab, var(--s-ok) 85%, var(--s-text));
}

.banner .b-title {
  font-weight: 700;
  display: block;
}

/* ================================================================= dialogs */
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(560px, calc(100vw - 28px));
  width: 100%;
}

dialog::backdrop {
  background: rgba(8, 10, 14, 0.55);
  backdrop-filter: blur(2px);
}

.dlg {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius-lg);
  box-shadow: var(--s-shadow-lg);
  overflow: hidden;
}

.dlg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--s-border);
}

.dlg-head h2 {
  font-size: 16px;
}

.dlg-body {
  padding: 17px;
  max-height: min(66vh, 620px);
  overflow-y: auto;
}

.dlg-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 17px;
  border-top: 1px solid var(--s-border);
  background: var(--s-surface-2);
}

/* ============================================================ landing page */
.landing {
  display: block;
}

.l-wrap {
  max-width: var(--s-maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.l-section {
  padding: clamp(44px, 7vw, 88px) 0;
  border-top: 1px solid var(--s-border);
}

.l-section:first-of-type {
  border-top: 0;
}

.l-hero {
  padding: clamp(48px, 8vw, 104px) 0 clamp(34px, 5vw, 60px);
  background: radial-gradient(
      1100px 420px at 12% -12%,
      color-mix(in oklab, var(--s-accent) 22%, transparent),
      transparent 70%
    ),
    radial-gradient(760px 380px at 92% 6%, color-mix(in oklab, #d946ef 16%, transparent), transparent 72%);
}

.l-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--s-border);
  background: var(--s-surface);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--s-muted);
  margin-bottom: 18px;
}

.l-hero h1 {
  font-size: clamp(30px, 5.4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 20ch;
  font-weight: 820;
}

.l-hero .lede {
  margin-top: 18px;
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.6;
  color: var(--s-muted);
  max-width: 66ch;
}

.l-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 26px;
}

.btn-xl {
  min-height: 50px;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 14px;
}

.l-note {
  margin-top: 13px;
  font-size: 13px;
  color: var(--s-muted);
}

h2.l-h2 {
  font-size: clamp(23px, 3vw, 34px);
  letter-spacing: -0.025em;
  font-weight: 800;
}

p.l-lede {
  margin-top: 12px;
  color: var(--s-muted);
  font-size: clamp(14.5px, 1.5vw, 17px);
  line-height: 1.6;
  max-width: 68ch;
}

.kind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 13px;
  margin-top: 28px;
}

.kind-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius);
  box-shadow: var(--s-shadow);
  transition: transform 0.12s, border-color 0.12s;
}

.kind-card:hover {
  transform: translateY(-2px);
  border-color: var(--s-border-strong);
}

.kind-icon {
  font-size: 24px;
  line-height: 1;
}

.kind-card h3 {
  font-size: 15.5px;
  font-weight: 720;
}

.kind-card p {
  font-size: 13.5px;
  color: var(--s-muted);
  line-height: 1.5;
  flex: 1;
}

.kind-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.feature {
  padding: 19px;
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius);
  background: var(--s-surface);
}

.feature .f-icon {
  font-size: 21px;
}

.feature h3 {
  margin-top: 9px;
  font-size: 16px;
}

.feature p {
  margin-top: 7px;
  color: var(--s-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
  margin-top: 28px;
  align-items: start;
}

.price {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 21px;
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius-lg);
  box-shadow: var(--s-shadow);
  position: relative;
}

.price.is-featured {
  border-color: var(--s-accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--s-accent) 16%, transparent), var(--s-shadow-lg);
}

.price .p-tag {
  position: absolute;
  top: -11px;
  left: 21px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--s-accent);
  color: var(--s-accent-text);
  font-size: 11.5px;
  font-weight: 750;
}

.price h3 {
  font-size: 16px;
}

.price .amount {
  font-size: 33px;
  font-weight: 820;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.price .amount small {
  font-size: 14px;
  font-weight: 600;
  color: var(--s-muted);
  letter-spacing: 0;
}

.price .p-note {
  font-size: 13px;
  color: var(--s-muted);
  min-height: 20px;
}

.price ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13.5px;
}

.price li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.price li .ck {
  color: var(--s-ok);
  flex: none;
  font-weight: 700;
}

.price li .no {
  color: var(--s-faint);
  flex: none;
}

.faq {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.faq details {
  border: 1px solid var(--s-border);
  border-radius: var(--s-radius);
  background: var(--s-surface);
  overflow: hidden;
}

.faq summary {
  padding: 14px 17px;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 19px;
  color: var(--s-muted);
  flex: none;
}

.faq details[open] summary::after {
  content: "–";
}

.faq .a {
  padding: 0 17px 15px;
  color: var(--s-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 78ch;
}

.l-footer {
  padding: 34px 0;
  border-top: 1px solid var(--s-border);
  background: var(--s-surface);
  color: var(--s-muted);
  font-size: 13.5px;
}

.l-footer .l-wrap {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.l-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ================================================================== legal */
.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 32px) 80px;
}

.legal h1 {
  font-size: clamp(25px, 4vw, 36px);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.legal h2 {
  font-size: 19px;
  margin: 30px 0 9px;
  letter-spacing: -0.01em;
}

.legal h3 {
  font-size: 15.5px;
  margin: 20px 0 6px;
}

.legal p,
.legal li {
  color: color-mix(in oklab, var(--s-text) 88%, var(--s-muted));
  line-height: 1.65;
  font-size: 14.5px;
}

.legal ul {
  padding-left: 21px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.legal .updated {
  color: var(--s-faint);
  font-size: 13px;
  margin-bottom: 22px;
}

.legal .box {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: var(--s-radius);
  border: 1px solid var(--s-border);
  background: var(--s-surface-2);
}

.legal .callout {
  border-left: 3px solid var(--s-accent);
}

.legal hr {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid var(--s-border);
}

/* The language switch on a legal page toggles the `hidden` attribute and
   nothing else — one switch, or a second one silently wins. */

/* ============================================================= responsive */
@media (max-width: 1080px) {
  .editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-pane {
    position: static;
  }

  .preview-frame {
    height: 62vh;
  }
}

@media (max-width: 860px) {
  :root {
    --s-sidebar: 0px;
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: var(--s-topbar);
    left: 0;
    z-index: 40;
    width: 268px;
    transform: translateX(-102%);
    transition: transform 0.18s ease-out;
    box-shadow: var(--s-shadow-lg);
  }

  body.nav-open .sidebar {
    transform: none;
  }

  .nav-scrim {
    position: fixed;
    inset: var(--s-topbar) 0 0;
    z-index: 35;
    background: rgba(8, 10, 14, 0.45);
    border: 0;
    display: none;
  }

  body.nav-open .nav-scrim {
    display: block;
  }

  .main {
    padding-bottom: 60px;
  }
}

@media (min-width: 861px) {
  .only-mobile {
    display: none !important;
  }
}

@media (max-width: 620px) {
  .proj-grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  }

  .toolbar .input,
  .toolbar .select,
  .toolbar .search {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  .l-hero h1 {
    max-width: none;
  }

  .toasts {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

@media print {
  .topbar,
  .sidebar,
  .toasts,
  .preview-pane {
    display: none !important;
  }
}
