@font-face {
  font-family: Inter;
  src: url("/dashboard.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #0a0a0a;
  --panel: #0a0a0a;
  --raised: #141414;
  --hover: #1a1a1a;
  --border: #262626;
  --border-strong: #363636;
  --text: #ededed;
  --muted: #a1a1a1;
  --subtle: #8f8f8f;
  --accent: #ededed;
  --accent-hover: #cfcfcf;
  --on-accent: #0a0a0a;
  --link: #52a8ff;
  --success: #45c08a;
  --danger: #ff6166;
  --danger-solid: #d93036;
  --warning: #f0b44c;
  --rail: 17rem;
  --topbar: 3.43rem;
  --radius: 6px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font: 14px/1.5 Inter, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01";
  color: var(--text);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--canvas); -webkit-font-smoothing: antialiased; }
body, h1, h2, h3, p, ol, ul, dl, dd, fieldset { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.icon { flex: 0 0 auto; width: 1rem; height: 1rem; }

/* Type */
h1, h2, h3 { color: var(--text); font-weight: 600; letter-spacing: -.011em; }
h1 { font-size: 1.43rem; line-height: 1.3; overflow-wrap: anywhere; }
h2 { font-size: 1rem; line-height: 1.4; }
h3 { font-size: .93rem; line-height: 1.4; }
code, .mono { font-family: var(--mono); font-size: .86em; overflow-wrap: anywhere; }
code { padding: .05rem .3rem; border: 1px solid var(--border); border-radius: 4px; background: var(--raised); }
p, dd, label { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.align-end { text-align: right; }
.hint { color: var(--muted); font-size: .86rem; }

/* Buttons */
button, .button {
  display: inline-flex;
  min-height: 2.29rem;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: .43rem;
  padding: .36rem .86rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  font-size: .93rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease;
}
.button:hover { text-decoration: none; }
.secondary { border-color: var(--border-strong); background: var(--raised); color: var(--text); }
.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.small { min-height: 2rem; padding: .25rem .64rem; font-size: .86rem; }
.danger { background: var(--danger-solid); color: #fff; }
.icon-button {
  min-height: 1.86rem;
  width: 1.86rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.danger-outline { border-color: #6b3330; background: transparent; color: var(--danger); }
.text-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .86rem; font-weight: 500; }
.text-link .icon { width: .86rem; height: .86rem; }

.skip-link {
  position: absolute;
  z-index: 3;
  top: .5rem;
  left: .5rem;
  padding: .43rem .71rem;
  border-radius: var(--radius);
  background: var(--raised);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* Top bar (inside the main column) */
.main-column { display: flex; min-width: 0; flex-direction: column; }
.topbar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  height: var(--topbar);
  align-items: center;
  gap: 1rem;
  padding: 0 1.71rem;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}
.topbar-crumb { display: flex; min-width: 0; align-items: center; gap: .43rem; color: var(--subtle); font-size: .93rem; }
.topbar-crumb a { color: var(--muted); }
.topbar-title { overflow: hidden; font-size: .93rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; justify-content: flex-end; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .57rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { display: block; border-radius: 4px; }
.brand-divider { color: var(--border-strong); font-weight: 400; }
.brand-product { color: var(--muted); font-weight: 500; }
.account { display: flex; min-width: 0; align-items: center; gap: .57rem; font-size: .86rem; }
.account-name { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.account form { flex: 0 0 auto; }

/* Layout */
.layout { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: .57rem;
  overflow-y: auto;
  padding: 0 .57rem;
  border-right: 1px solid var(--border);
}
.rail-top { display: flex; min-height: var(--topbar); align-items: center; padding: 0 .57rem; }
.rail-find {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-left: .64rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--raised);
  color: var(--subtle);
}
.rail-find:focus-within { border-color: var(--border-strong); }
.rail-find input {
  min-height: 2.14rem !important;
  padding-left: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
}
.rail-user {
  display: flex;
  align-items: center;
  gap: .57rem;
  margin: auto -.57rem 0;
  padding: .71rem 1.14rem;
  border-top: 1px solid var(--border);
  font-size: .93rem;
  font-weight: 500;
}
.rail-user-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar, .project-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 1.71rem;
  height: 1.71rem;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--raised);
  color: var(--text);
  font-size: .79rem;
  font-weight: 600;
  line-height: 1;
}
.avatar { background: linear-gradient(135deg, #2b2b2b, #4a4a4a); }
.workspace-nav, .rail-list { display: grid; gap: 1px; }
.workspace-nav a, .rail-list a {
  display: flex;
  min-width: 0;
  min-height: 2.14rem;
  align-items: center;
  gap: .57rem;
  padding: .29rem .57rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .93rem;
  font-weight: 500;
}
.workspace-nav a:hover, .rail-list a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.workspace-nav a[aria-current], .rail-list a[aria-current] { background: var(--raised); color: var(--text); }
.rail-list a > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-shortcuts { padding-top: .57rem; border-top: 1px solid var(--border); }
.rail-caption {
  padding: .29rem .57rem;
  color: var(--subtle);
  font-size: .79rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dot { flex: 0 0 auto; width: .5rem; height: .5rem; border-radius: 50%; background: var(--subtle); }
.dot.live { background: var(--success); }
.dot.failed { background: var(--danger); }
.dot.running { background: var(--warning); }
.dot.idle { background: transparent; box-shadow: inset 0 0 0 1.5px var(--subtle); }

.workspace {
  display: grid;
  width: min(100%, 120rem);
  align-content: start;
  gap: 1.43rem;
  margin-inline: auto;
  padding: 1.71rem clamp(1.14rem, 3vw, 2.29rem) 3rem;
}
.page-heading { display: grid; gap: .21rem; }
.page-heading p, .summary { color: var(--muted); font-size: .93rem; }
.section { display: grid; gap: .64rem; min-width: 0; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.section-heading a { font-size: .86rem; font-weight: 500; }

/* Panels */
.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .71rem 1rem;
  padding: 1rem 1.14rem;
}
.panel-header p { margin-top: .21rem; color: var(--muted); font-size: .93rem; }
.panel-header > div { min-width: 0; flex: 1 1 18rem; }
.panel-actions { display: flex; flex: 0 0 auto !important; flex-wrap: wrap; gap: .5rem; align-items: center; }
.panel-body { padding: 0 1.14rem 1.14rem; }
.panel-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .57rem;
  padding: .71rem 1.14rem;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--raised);
}
.table-panel { overflow: hidden; }
.empty {
  display: grid;
  justify-items: center;
  gap: .43rem;
  padding: 2.57rem 1.14rem;
  text-align: center;
}
.empty p { color: var(--muted); }
.empty .button, .empty .actions { margin-top: .57rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: .93rem; }
.data-table th {
  padding: .5rem 1.14rem;
  border-bottom: 1px solid var(--border);
  background: var(--raised);
  color: var(--subtle);
  font-size: .79rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td {
  max-width: 22rem;
  padding: .71rem 1.14rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--hover); }
.data-table td a { color: var(--text); }
.data-table td a:hover { color: var(--link); }
.data-table .mono { font-size: .82rem; }
.data-table th.align-end, .data-table td.align-end { text-align: right; }
.strong-link { font-weight: 600; }
.cell-stack { display: grid; min-width: 0; gap: .07rem; }
.cell-stack > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-table { table-layout: fixed; }
.project-table th:nth-child(1) { width: 26%; }
.project-table th:nth-child(2) { width: 26%; }
.project-table th:nth-child(4) { width: 9.5rem; }
.project-table tbody tr { position: relative; }
.row-link::after { position: absolute; inset: 0; content: ""; }
.activity-table th:nth-child(4), .builds th:nth-child(4) { width: 8.5rem; }
.releases code, .data-table code { padding: 0 .25rem; }
.table-empty { padding: 1.71rem 1.14rem; color: var(--muted); text-align: center; }
.releases form { display: inline-flex; }

/* Status: dot + text, never color alone */
.status, .build-status {
  display: inline-flex;
  align-items: center;
  gap: .43rem;
  width: fit-content;
  max-width: 100%;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.status::before, .build-status::before {
  width: .5rem;
  height: .5rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--subtle);
  content: "";
}
.status.ready, .build-status.succeeded, .build-status.passed { color: var(--text); }
.status.ready::before, .build-status.succeeded::before, .build-status.passed::before { background: var(--success); }
.build-status.failed { color: var(--danger); }
.build-status.failed::before { background: var(--danger); }
.build-status.running, .build-status.queued { color: var(--text); }
.build-status.running::before, .build-status.queued::before { background: var(--warning); animation: pulse 1.4s ease-in-out infinite; }
.status.waiting::before, .build-status.pending::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--subtle); }
.build-status.skipped { color: var(--subtle); }
.build-status.skipped::before { width: .5rem; height: 1.5px; border-radius: 1px; }
@keyframes pulse { 50% { opacity: .35; } }

/* Projects overview */
.hue-0 { --c1: #3b82f6; --c2: #8b5cf6; }
.hue-1 { --c1: #14b8a6; --c2: #3b82f6; }
.hue-2 { --c1: #f59e0b; --c2: #ef4444; }
.hue-3 { --c1: #f43f5e; --c2: #a855f7; }
.hue-4 { --c1: #22c55e; --c2: #14b8a6; }
.hue-5 { --c1: #06b6d4; --c2: #6366f1; }
.hue-6 { --c1: #8b5cf6; --c2: #ec4899; }
.hue-7 { --c1: #f97316; --c2: #eab308; }
.project-avatar[class*="hue-"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  text-shadow: 0 1px 2px rgb(0 0 0 / .35);
}

.dash-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 1.71rem;
  overflow: hidden;
  padding: 1.71rem 1.71rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    radial-gradient(60% 120% at 0% 0%, rgb(82 168 255 / .10), transparent 70%),
    radial-gradient(40% 90% at 100% 0%, rgb(168 85 247 / .08), transparent 70%),
    #0c0c0c;
}
.dash-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  content: "";
}
.eyebrow { color: var(--link); font-size: .79rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.dash-hero h1 { margin-top: .29rem; font-size: 2rem; letter-spacing: -.03em; }
.dash-intro { margin-top: .29rem; color: var(--muted); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 -1.71rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  background: rgb(10 10 10 / .6);
}
.stat { display: grid; gap: .43rem; min-width: 0; padding: 1.14rem 1.71rem 1.29rem; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat-label { color: var(--subtle); font-size: .79rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.stat-value { font-size: 1.86rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-note { color: var(--muted); font-size: .86rem; }
.health { display: flex; gap: 3px; height: 4px; }
.health i { flex: 1; border-radius: 2px; background: #262626; }
.health i.live { background: var(--success); }
.health i.running { background: var(--warning); }
.health i.failed { background: var(--danger); }
.health i.idle { background: #5a5a5a; }

.catalogue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  align-items: start;
  gap: 1.71rem;
}
.catalogue-side { min-width: 0; }
.catalogue-main { min-width: 0; }
.catalogue-layout h2 { display: flex; align-items: center; gap: .5rem; font-size: .93rem; font-weight: 500; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 1.14rem;
  padding: 0;
  list-style: none;
}
.project-card {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--c1) 35%, transparent);
  transform: translateY(-2px);
}
.project-card:focus-within { border-color: var(--muted); }
.project-card-body { display: grid; gap: .29rem; padding: 1rem 1.14rem 1.14rem; }
.site-cover {
  position: relative;
  height: 8.6rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--c1) 40%, transparent), transparent 65%),
    radial-gradient(80% 110% at 100% 100%, color-mix(in srgb, var(--c2) 38%, transparent), transparent 65%),
    #0d0d0d;
}
.site-cover::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / .16) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: linear-gradient(90deg, transparent, #000 70%);
  opacity: .5;
  content: "";
}
.cover-window {
  position: absolute;
  inset: 1.29rem 1.43rem -1px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / .12);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgb(10 10 10 / .82);
  box-shadow: 0 -8px 30px rgb(0 0 0 / .35);
  transition: transform .2s ease;
}
.project-card:hover .cover-window { transform: translateY(-3px); }
.cover-bar { display: flex; align-items: center; gap: .57rem; padding: .36rem .57rem; border-bottom: 1px solid rgb(255 255 255 / .07); }
.cover-dots { display: flex; gap: 4px; }
.cover-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgb(255 255 255 / .18); }
.cover-url {
  min-width: 0;
  overflow: hidden;
  padding: .07rem .5rem;
  border-radius: 4px;
  background: rgb(255 255 255 / .05);
  color: var(--subtle);
  font-size: .71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cover-page { display: grid; align-content: start; gap: .5rem; padding: .57rem .71rem; }
.cover-page i { display: block; height: 5px; border-radius: 3px; background: rgb(255 255 255 / .09); }
.sketch-nav, .sketch-cards { display: flex; gap: .43rem; }
.sketch-nav i { width: 1.4rem; }
.sketch-nav i:first-child { width: 2.6rem; margin-right: auto; background: rgb(255 255 255 / .16); }
.sketch-hero { display: grid; gap: .36rem; padding-top: .21rem; }
.sketch-hero i:first-child { width: 62%; height: 8px; background: linear-gradient(90deg, var(--c1), var(--c2)); opacity: .85; }
.sketch-hero i:last-child { width: 44%; }
.sketch-cards i { flex: 1; height: 1.6rem; border: 1px solid rgb(255 255 255 / .06); background: rgb(255 255 255 / .04); }
.cover-page:has(.cover-shot) { padding: 0; }
.cover-shot { display: block; width: 100%; height: auto; background: #fff; }
.sketch-empty {
  display: grid;
  height: 3.4rem;
  place-items: center;
  border: 1px dashed rgb(255 255 255 / .16);
  border-radius: 6px;
  color: var(--subtle);
  font-size: .79rem;
}
.project-card-top { display: flex; align-items: center; gap: .71rem; min-width: 0; margin-bottom: .43rem; }
.project-card .project-avatar { width: 2.14rem; height: 2.14rem; margin-top: -2.14rem; border: 3px solid var(--panel); font-size: .86rem; box-sizing: content-box; }
.project-card-name { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.project-card-name a { color: var(--text); font-weight: 600; }
.project-card-name a:hover { text-decoration: none; }
.project-card-name a:focus-visible { outline: 0; }
.project-card-name span { overflow: hidden; color: var(--muted); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.card-line { display: flex; min-width: 0; align-items: center; gap: .43rem; font-size: .9rem; }
.card-line span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-line .icon { width: .93rem; height: .93rem; color: var(--muted); }
.card-line.commit { font-weight: 500; }
.project-card .status, .project-card .build-status { position: relative; z-index: 1; align-self: flex-start; font-size: .82rem; }
.row-link::after { position: absolute; inset: 0; border-radius: inherit; content: ""; }

.timeline { position: relative; padding: .29rem 0; list-style: none; }
.timeline::before { position: absolute; top: 1.43rem; bottom: 1.43rem; left: 1.36rem; width: 1px; background: var(--border); content: ""; }
.timeline-item { position: relative; padding: .71rem 1rem .71rem 2.57rem; }
.timeline-item:hover { background: var(--hover); }
.timeline-dot {
  position: absolute;
  top: 1.05rem;
  left: 1.05rem;
  width: .64rem;
  height: .64rem;
  border-radius: 50%;
  background: var(--subtle);
  box-shadow: 0 0 0 3px var(--panel);
}
.timeline-item.succeeded .timeline-dot { background: var(--success); }
.timeline-item.failed .timeline-dot { background: var(--danger); }
.timeline-item.running .timeline-dot, .timeline-item.queued .timeline-dot {
  background: var(--warning);
  box-shadow: 0 0 0 3px var(--panel), 0 0 0 6px rgb(240 180 76 / .18);
}
.timeline-body { display: grid; gap: .14rem; min-width: 0; }
.timeline-head { display: flex; min-width: 0; align-items: baseline; gap: .5rem; font-size: .93rem; }
.timeline-head a { flex: 0 0 auto; color: var(--text); }
.timeline-head .mono { font-size: .79rem; }
.timeline-subject { overflow: hidden; color: var(--muted); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.timeline-subject:hover { color: var(--text); }
.timeline-meta { display: flex; align-items: center; gap: .43rem; margin-top: .21rem; color: var(--subtle); font-size: .82rem; }
.timeline-meta .build-status { font-size: .82rem; }
.empty-hero { padding-block: 3.43rem; }
.empty-glyph {
  width: 2.86rem;
  height: 2.86rem;
  margin-bottom: .43rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

/* Project header */
.project-header { display: grid; gap: .86rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .43rem; color: var(--subtle); font-size: .86rem; }
.breadcrumb a { color: var(--muted); }
.heading-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .86rem; }
.project-title { display: flex; min-width: 0; align-items: center; gap: .86rem; }
.project-title > div { min-width: 0; }
.project-title .project-avatar { width: 2.57rem; height: 2.57rem; font-size: 1rem; }
.project-title p { font-size: .93rem; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.project-actions .icon { width: .86rem; height: .86rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 1.43rem; margin-top: .29rem; border-bottom: 1px solid var(--border); }
.tabs a {
  display: inline-flex;
  min-height: 2.43rem;
  align-items: center;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .93rem;
  font-weight: 500;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current] { border-color: var(--text); color: var(--text); }

/* Overview */
.properties {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}
.properties > div {
  display: grid;
  align-content: start;
  gap: .21rem;
  min-width: 0;
  padding: .86rem 1.14rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.properties > div:nth-child(3n) { border-right: 0; }
.properties > div:nth-last-child(-n + 3) { border-bottom: 0; }
.properties dt { color: var(--subtle); font-size: .79rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
.properties dd { overflow: hidden; font-size: .93rem; text-overflow: ellipsis; white-space: nowrap; }
.properties dd a { color: var(--text); }

.production { display: grid; grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr); overflow: hidden; }
.production .site-cover { height: auto; min-height: 13rem; border-right: 1px solid var(--border); border-bottom: 0; }
.production .cover-window { inset: 1.71rem 1.71rem -1px; }
.production-main { display: grid; align-content: space-between; min-width: 0; }
.production .properties { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.trigger { display: inline-flex; align-items: center; gap: .29rem; color: var(--subtle); font-size: .79rem; }
.trigger .icon { width: .79rem; height: .79rem; }
.timeline-meta .trigger::before { margin-right: .14rem; content: "·"; }
.auto-deploy {
  display: flex;
  align-items: baseline;
  gap: .57rem;
  padding: .64rem .86rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .86rem;
}
.auto-deploy .dot { flex: 0 0 auto; transform: translateY(-1px); }
.auto-deploy strong { font-weight: 500; }
.auto-deploy.on { border-color: #1f4a37; background: #0f1a14; color: var(--text); }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2.29rem; min-width: 0; }
.settings-sections { position: sticky; top: calc(var(--topbar) + 1rem); align-self: start; display: grid; gap: 1px; }
.settings-sections a {
  padding: .36rem .57rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .93rem;
  font-weight: 500;
}
.settings-sections a { display: flex; align-items: center; gap: .57rem; }
.settings-sections a .icon { color: var(--subtle); }
.settings-sections a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.settings-sections a:hover .icon { color: var(--text); }
.settings-sections .danger-link:hover { color: var(--danger); }
.settings-sections .danger-link:hover .icon { color: var(--danger); }

.setting-row {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr);
  gap: 1.14rem 2.29rem;
  padding: 1.43rem 1.14rem;
  border-top: 1px solid var(--border);
}
.setting-info { display: flex; align-items: flex-start; gap: .86rem; }
.setting-info h3 { font-size: .93rem; }
.setting-info p { margin-top: .21rem; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.setting-icon, .deploy-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.14rem;
  height: 2.14rem;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, #1c1c1c, #111);
  color: var(--text);
}
.setting-fields { display: grid; align-content: start; gap: 1rem; min-width: 0; max-width: 36rem; }
.setting-fields.two { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.setting-fields .hint { margin-top: .07rem; font-size: .82rem; }
.input-group .addon-start {
  order: -1;
  border-right: 1px solid var(--border);
  border-left: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.input-group .addon-icon { padding: 0 .64rem; color: var(--subtle); }
.input-group input { font-family: var(--mono); font-size: .86rem; }
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: .86rem;
  padding: .86rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--raised);
  cursor: pointer;
  font-weight: 400;
}
.switch-row > span { display: grid; gap: .14rem; }
.switch-row strong { font-weight: 500; }
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 2.29rem;
  height: 1.29rem;
  margin: .07rem 0 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #2a2a2a;
  cursor: pointer;
  appearance: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.29rem - 6px);
  height: calc(1.29rem - 6px);
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: transform .15s ease, background-color .15s ease;
}
.switch:checked { border-color: var(--success); background: color-mix(in srgb, var(--success) 70%, #000); }
.switch:checked::after { background: #fff; transform: translateX(1rem); }

.deploy-card { overflow: hidden; background: radial-gradient(70% 140% at 100% 0%, rgb(82 168 255 / .08), transparent 70%), var(--panel); }
.deploy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.14rem; }
.deploy-row > div { flex: 1 1 18rem; min-width: 0; }
.deploy-row p { margin-top: .21rem; color: var(--muted); font-size: .9rem; }
.deploy-row .mono { color: var(--text); }
.deploy-icon { width: 2.57rem; height: 2.57rem; color: var(--link); }
.settings-content { display: grid; gap: 1.43rem; min-width: 0; }
.settings-card { scroll-margin-top: calc(var(--topbar) + 1rem); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .86rem 1rem; }
.field { display: grid; align-content: start; gap: .36rem; min-width: 0; }
.field.repository { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; font-weight: 400; }
.check input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.connection {
  display: grid;
  justify-items: start;
  gap: .71rem;
  padding-top: 1.14rem;
  border-top: 1px solid var(--border);
}
.connection p { margin-top: .21rem; color: var(--muted); font-size: .93rem; }
.count-badge {
  flex: 0 0 auto;
  padding: .14rem .57rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 500;
}
.variables { padding: 0; list-style: none; border-top: 1px solid var(--border); }
.variable { border-bottom: 1px solid var(--border); }
.variable:has(.variable-edit-form:target) { background: var(--raised); }
.variable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: .86rem;
  min-height: 3.14rem;
  padding: .43rem 1.14rem;
  font-size: .86rem;
}
.variable-name { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variable-value { color: var(--subtle); letter-spacing: .12em; }
.variable-actions { display: flex; align-items: center; gap: .36rem; }
.variable-edit-form { display: none; gap: .5rem; padding: 0 1.14rem 1rem; }
.variable-edit-form:target { display: grid; }
.variable-edit-form textarea { min-height: 3.5rem; }
.variables-empty { padding: 1rem 1.14rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .93rem; }
.variable-add h3 { margin: 1rem 0 .71rem; }
.variable-add .panel-footer { justify-content: space-between; }
.variable-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: .86rem 1rem; }
.mono-input { font-family: var(--mono); font-size: .86rem; }
.actions.start { justify-content: flex-start; }
.danger-card { border-color: #4d2a28; overflow: hidden; }
.danger-header { border-bottom: 1px solid #3a2321; background: #160d0c; }
.danger-header h2 { color: var(--danger); }
.danger-row summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.14rem;
  cursor: pointer;
}
.danger-row summary > span:first-child { display: grid; flex: 1 1 18rem; gap: .14rem; }
.danger-row summary strong { font-weight: 500; }
.danger-row[open] summary .button { visibility: hidden; }
.danger-confirm { display: grid; gap: .5rem; max-width: none !important; margin: 0 !important; padding: 0 1.14rem 1.14rem; }
.danger-confirm-row { display: flex; flex-wrap: wrap; gap: .57rem; }
.danger-confirm-row input { flex: 1 1 14rem; max-width: 22rem; }
.danger-card summary { list-style: none; }
.danger-card summary::-webkit-details-marker { display: none; }
.danger-card form { max-width: 26rem; margin-top: 1rem; }
.stack { display: grid; gap: .5rem; }
.stack > button { margin-top: .29rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; }

/* Forms */
label { color: var(--text); font-size: .86rem; font-weight: 500; }
input:not([type="checkbox"], [type="radio"]), select, textarea {
  min-height: 2.29rem;
  width: 100%;
  min-width: 0;
  padding: .36rem .71rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--text);
}
input:not([type="checkbox"], [type="radio"]):focus-visible, textarea:focus-visible {
  border-color: var(--link);
  outline: 2px solid rgb(106 168 240 / .25);
  outline-offset: 0;
}
input::placeholder, textarea::placeholder { color: var(--subtle); }
textarea { min-height: 2.29rem; resize: vertical; font-family: var(--mono); font-size: .86rem; }
input[readonly] { color: var(--muted); }
.input-group {
  display: flex;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--canvas);
}
.input-group:focus-within { border-color: var(--link); }
.input-group input { flex: 1 1 6rem; border: 0 !important; outline: 0 !important; background: transparent !important; }
.input-group span {
  display: flex;
  align-items: center;
  padding: 0 .71rem;
  border-left: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--raised);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .82rem;
  white-space: nowrap;
}

.notice {
  padding: .57rem .86rem;
  border: 1px solid #24503d;
  border-left: 3px solid var(--success);
  border-radius: var(--radius);
  background: #15211b;
  color: var(--text);
  font-size: .93rem;
}
.notice.error { border-color: #5a2b29; border-left-color: var(--danger); background: #241716; }
.notice label { display: block; margin-bottom: .43rem; }
.token input { font-family: var(--mono); font-size: .86rem; }

/* Toolbar / search */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: -.57rem; }
.search-field {
  display: flex;
  flex: 1 1 16rem;
  min-width: 0;
  align-items: center;
  gap: .5rem;
  padding-left: .71rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--subtle);
}
.search-field:focus-within { border-color: var(--link); }
.search-field input { border: 0 !important; outline: 0 !important; padding-left: 0 !important; background: transparent !important; }

/* Build details */
.native-build { overflow: hidden; }
.build-summary { border-bottom: 1px solid var(--border); }
.back-link { display: inline-flex; align-items: center; gap: .14rem; margin: 0 0 .43rem -.21rem; color: var(--muted); font-size: .86rem; }
.back-link .icon { width: .93rem; height: .93rem; }
.build-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .36rem;
  color: var(--muted);
  font-size: .86rem;
}
.build-meta .icon { width: .86rem; height: .86rem; }
.commit-message { margin-top: .57rem !important; color: var(--text) !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.build-columns { display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
.build-stages { display: grid; align-content: start; padding: .57rem; list-style: none; border-right: 1px solid var(--border); }
.build-stages li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .43rem;
  padding: .5rem .57rem;
  border-radius: var(--radius);
  font-size: .93rem;
}
.build-stages li:has(.running) { background: var(--raised); }
.build-output { min-width: 0; padding: .86rem 1.14rem 1.14rem; }
.build-output header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .57rem; }
.build-output pre {
  min-height: 22rem;
  max-height: 38rem;
  overflow: auto;
  margin: 0;
  padding: .86rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0b0c0e;
  color: #d6d8db;
  font: .86rem/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Import */
.import-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 1fr); align-items: start; gap: 1.14rem; }
.repo-picker { padding: 0; }
.repo-picker legend { float: left; width: 100%; font-weight: 600; }
.repo-search { clear: both; padding: 0 1.14rem .71rem; }
.repo-search:has(input[hidden]) { display: none; }
.repo-list { display: grid; max-height: min(30rem, 58vh); overflow: auto; border-top: 1px solid var(--border); }
.repo-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: .71rem;
  padding: .64rem 1.14rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-weight: 400;
}
.repo-option:last-child { border-bottom: 0; }
.repo-option:hover { background: var(--hover); }
.repo-option:has(input:checked) { background: var(--raised); box-shadow: inset 2px 0 0 var(--link); }
.repo-option:has(input:disabled) { cursor: default; opacity: .6; }
.repo-option input { margin: 0; accent-color: var(--accent); }
.repo-icon { display: grid; color: var(--subtle); }
.repo-meta { display: grid; min-width: 0; gap: .07rem; overflow-wrap: anywhere; }
.repo-meta strong { font-weight: 500; }
.repo-meta > span { color: var(--muted); font-size: .82rem; }
.repo-empty { padding: 1.14rem; color: var(--muted); text-align: center; }
.import-details .panel-footer .button { min-height: 2.29rem; }

/* Import: repository list */
.import-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.import-panel { overflow: hidden; }
.import-toolbar { display: grid; gap: .71rem; padding: 1rem 1.14rem; border-bottom: 1px solid var(--border); }
.import-toolbar .search-field input { min-height: 2.57rem; font-size: 1rem; }
.chip-filters { display: flex; flex-wrap: wrap; gap: .36rem; }
.chip-filter {
  min-height: 1.86rem;
  padding: 0 .71rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
}
.chip-filter[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--canvas); }
.repo-rows { max-height: min(40rem, 64vh); overflow-y: auto; padding: 0; list-style: none; }
.repo-row {
  display: flex;
  align-items: center;
  gap: .86rem;
  padding: .71rem 1.14rem;
  border-bottom: 1px solid var(--border);
}
.repo-row:last-child { border-bottom: 0; }
.repo-row:hover { background: var(--hover); }
.repo-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--c1, #333), var(--c2, #555));
  color: #fff;
  font-size: .86rem;
  font-weight: 600;
}
.repo-text { flex: 1; min-width: 0; }
.repo-text p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-text strong { font-weight: 600; }
.repo-meta-line { margin-top: .07rem; color: var(--subtle); font-size: .82rem; }
.repo-meta-line .mono { font-size: .79rem; }
.badge {
  display: inline-block;
  margin-left: .29rem;
  padding: 0 .43rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: .71rem;
  font-weight: 500;
  vertical-align: 1px;
}
.muted-badge { margin: 0; }

/* Import: configure */
.configure-page { display: grid; gap: 1.43rem; width: min(100%, 48rem); margin-inline: auto; }
.configure { display: grid; gap: 1.14rem; }
.env-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.env-file { cursor: pointer; }
.env-field textarea { min-height: 8rem; }
.env-field textarea.dropping { border-color: var(--link); background: #0b1420; }
[data-env-count] { color: var(--text); }
.env-import { border-top: 1px solid var(--border); }
.env-import summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .86rem 1.14rem;
  color: var(--muted);
  cursor: pointer;
  font-size: .93rem;
  font-weight: 500;
}
.env-import summary:hover { color: var(--text); }
.env-import[open] summary { color: var(--text); }
.env-import .panel-body { display: grid; gap: .86rem; }
.configure-source { display: flex; flex-wrap: wrap; align-items: center; gap: .86rem; padding: 1rem 1.14rem; }
.configure-source > div { flex: 1; min-width: 10rem; }
.configure-source .muted { font-size: .82rem; }
.detected {
  display: inline-flex;
  align-items: center;
  gap: .43rem;
  padding: .29rem .71rem;
  border: 1px solid #1f4a37;
  border-radius: 999px;
  background: #0f1a14;
  color: var(--text);
  font-size: .82rem;
}
.configure-body { display: grid; gap: 1.43rem; padding: 1.29rem 1.14rem; }
.kind-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .71rem; padding: 0; border: 0; }
.kind-choice legend { margin-bottom: .5rem; font-size: .86rem; font-weight: 500; }
.kind-card {
  display: flex;
  align-items: flex-start;
  gap: .71rem;
  padding: .86rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 400;
}
.kind-card > span { display: grid; gap: .21rem; }
.kind-card strong { font-weight: 600; }
.kind-card input { margin-top: .21rem; accent-color: var(--text); }
.kind-card:has(input:checked) { border-color: var(--text); background: var(--raised); }
.kind-card:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.configure-advanced { border-top: 1px solid var(--border); padding-top: 1rem; }
.configure-advanced summary { cursor: pointer; font-weight: 500; }
.configure-advanced[open] summary { margin-bottom: .86rem; }
.configure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .86rem 1rem; }
select {
  min-height: 2.29rem;
  width: 100%;
  padding: .36rem .71rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--text);
}
.configure:has(#kind-static:checked) .app-only, .configure:has(#kind-app:checked) .static-only { display: none; }
.configure .panel-footer { justify-content: space-between; }
.deploy-button { min-width: 8rem; }

/* App runtime */
.app-detail { margin: 0 1.14rem 1.14rem; }
.setting-fields .field.start { grid-column: 1 / -1; }
.restart-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .86rem;
  padding-top: 1.14rem;
  border-top: 1px solid var(--border);
}
.restart-row p { margin-top: .14rem; }
.app-logs { overflow: hidden; }
.app-logs .panel-actions { gap: .86rem; }
.check.follow { margin: 0; font-size: .86rem; }
.app-logs pre {
  min-height: 26rem;
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  padding: 1rem 1.14rem;
  border-top: 1px solid var(--border);
  background: #070708;
  color: #d6d8db;
  font: .82rem/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Error page */
.login { min-height: 100vh; }
.auth { display: grid; justify-items: center; gap: 1.71rem; width: min(100% - 2rem, 26rem); margin-inline: auto; padding-top: clamp(3rem, 18vh, 10rem); }
.auth-card { display: grid; justify-items: start; gap: .71rem; width: 100%; padding: 1.43rem; }
.auth-card p { color: var(--muted); }
.auth-card .button { margin-top: .43rem; }

/* Sign-in (shared with TwinCore Workspace) */
.sign-in {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(24px, 5vh, 48px);
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px 16px;
  color: #fafafa;
  background: #222 url("/dashboard-sign-in.webp") center / cover no-repeat;
}
.sign-in-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #e4e4e4;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 450;
  line-height: 1.2;
  letter-spacing: .085em;
  text-transform: uppercase;
}
.sign-in-header img { flex: none; }
.sign-in-main {
  width: min(100%, 544px);
  padding: clamp(24px, 5vw, 48px);
  border-top: 4px solid #06c;
  background: #25272b;
  box-shadow: 0 8px 18px #0006, 0 2px 4px #0005;
}
.sign-in-main h1 { font-size: clamp(24px, 4vw, 28px); font-weight: 550; line-height: 1.22; letter-spacing: -.035em; }
.sign-in-intro { margin-top: 12px; color: #cdced1; font-size: 16px; line-height: 1.55; }
.sign-in-main .notice { margin-top: 20px; }
.sign-in-action.button {
  display: flex;
  width: 100%;
  min-height: 44px;
  margin-top: 28px;
  border-radius: 3px;
  background: #06c;
  color: #fff;
  font-size: 16px;
}
.sign-in-action.button:focus-visible { outline: 2px solid #9fcdff; outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  button:hover, .button:hover { background: var(--accent-hover); }
  .secondary:hover { border-color: #4a4d54; background: var(--hover); }
  .ghost:hover, .icon-button:hover { background: var(--hover); color: var(--text); }
  .danger:hover { background: #a92e26; }
  .danger-outline:hover { border-color: var(--danger); background: #241716; }
  .sign-in-action.button:hover { background: #0056ae; }
}

@media (max-width: 1100px) {
  .production { grid-template-columns: minmax(0, 1fr); }
  .production .site-cover { min-height: 10rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .properties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .properties > div { border-bottom: 1px solid var(--border) !important; border-right: 1px solid var(--border) !important; }
  .properties > div:nth-child(2n) { border-right: 0 !important; }
  .properties > div:nth-last-child(-n + 2) { border-bottom: 0 !important; }
  .build-columns { grid-template-columns: 12.5rem minmax(0, 1fr); }
}

@media (max-width: 1180px) {
  .catalogue-layout { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 1080px) {
  .setting-row { grid-template-columns: minmax(0, 1fr); }
  .setting-fields { max-width: none; }
}

@media (max-width: 860px) {
  .import-layout, .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-sections { position: static; display: flex; flex-wrap: wrap; }
  .build-columns { grid-template-columns: minmax(0, 1fr); }
  .build-stages { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (max-width: 760px) {
  .layout { display: block; }
  .rail {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    gap: .43rem;
    overflow: visible;
    padding: 0 1rem .57rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .rail-top { min-height: 3rem; padding: 0; }
  .rail-user { grid-area: 1 / 2; margin: 0; padding: 0; border: 0; }
  .rail-user-name { display: none; }
  .rail-find, .workspace-nav, .project-shortcuts { grid-column: 1 / -1; }
  .workspace-nav, .rail-list { display: flex; overflow-x: auto; }
  .project-shortcuts { padding-top: .43rem; }
  .rail-caption { display: none; }
  .workspace-nav a, .rail-list a { flex: 0 0 auto; white-space: nowrap; }
  .topbar { position: static; grid-template-columns: minmax(0, 1fr) auto; padding: 0 1rem; }
  .topbar-crumb { display: none; }
  .workspace { padding-inline: 1rem; }
  .dash-hero { padding: 1.14rem 1.14rem 0; }
  .dash-hero h1 { font-size: 1.57rem; }
  .stat-grid { margin-inline: -1.14rem; }
  .stat { padding: .86rem 1.14rem 1rem; }
  .stat-value { font-size: 1.5rem; }

  /* Tables become stacked rows */
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: auto; max-width: none; }
  .data-table thead { display: none; }
  .data-table tr { padding: .71rem 1rem; border-bottom: 1px solid var(--border); }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table td {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: .71rem;
    padding: .21rem 0;
    border: 0;
    text-align: left !important;
  }
  .data-table td::before { color: var(--subtle); font-size: .82rem; content: attr(data-label); }
  .data-table td.truncate { white-space: normal; }
  .settings-grid, .variable-form, .setting-fields.two, .configure-grid, .kind-choice { grid-template-columns: minmax(0, 1fr); }
  .properties, .production .properties { grid-template-columns: minmax(0, 1fr); }
  .properties > div { border-right: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .properties > div:last-child { border-bottom: 0 !important; }
}

@media (max-width: 520px) {
  .variable-row { grid-template-columns: minmax(0, 1fr) auto; }
  .variable-value { display: none; }
}

@media (max-width: 390px) {
  .brand-divider, .brand-product { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
