:root {
  --paper: #f8f6f1;
  --paper-soft: #ffffff;
  --ink: #333333;
  --muted: #758088;
  --line: #e7dfd4;
  --champagne: #dbab6b;
  --gold: #cca36c;
  --gold-deep: #9e7a48;
  --sand: #efe5d8;
  --stone: #7a7a7a;
  --slate: #354c5c;
  --slate-soft: rgba(53, 76, 92, .78);
  --white: #ffffff;
  --danger: #9b3d32;
  --ok: #66735b;
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 26px 70px rgba(117, 96, 65, .16);
  --gold-shadow: 0 0 50px rgba(197, 156, 73, .34);
  color-scheme: light;
  font-family: Intro, Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Intro";
  src: url("/assets/fonts/Intro-Regular-Alt-1.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Intro";
  src: url("/assets/fonts/Intro-Bold-Alt.ttf") format("truetype");
  font-weight: 700;
}

@font-face {
  font-family: "Intro";
  src: url("/assets/fonts/Intro-Light-Alt.ttf") format("truetype");
  font-weight: 300;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 86% 8%, rgba(204, 163, 108, .16), transparent 28%),
    linear-gradient(180deg, #fff 0%, var(--paper) 44%, #fff 100%);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

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

button,
.button-like,
.primary-action {
  border: 1px solid rgba(255, 255, 255, .46);
  background: linear-gradient(135deg, #e1bb82, var(--gold));
  color: var(--white);
  min-height: 42px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: .03em;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

button:hover,
.button-like:hover,
.primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(158, 122, 72, .23);
}

button:disabled,
.primary-action:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.ghost {
  background: rgba(255, 255, 255, .72);
  color: var(--slate);
  border-color: rgba(117, 128, 136, .25);
}

.text-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.left {
  justify-content: flex-start;
}

.wide {
  width: 100%;
}

.compact {
  min-height: 38px;
  padding-inline: 16px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 999px;
  letter-spacing: 0;
  font-family: Intro, sans-serif;
  font-weight: 300;
}

.brand-emblem {
  width: 174px;
  height: 50px;
  display: block;
  background: url("/assets/reference/mb-hero.png") left center / contain no-repeat;
  flex: 0 0 auto;
}

.app-loading,
.login-page {
  min-height: 100vh;
}

.login-page {
  overflow-x: hidden;
}

.boot-card {
  height: 100vh;
  display: grid;
  place-content: center;
  gap: 18px;
  text-align: center;
  color: var(--muted);
}

.login-shell {
  min-height: 100vh;
  background: #211f1b;
}

.login-hero {
  min-height: 100svh;
  padding: clamp(24px, 4vw, 58px) clamp(24px, 5vw, 76px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: clamp(22px, 4vw, 46px);
  background:
    linear-gradient(90deg, rgba(31, 29, 25, .74) 0%, rgba(55, 52, 46, .55) 47%, rgba(239, 229, 216, .10) 100%),
    linear-gradient(180deg, rgba(31, 29, 25, .28) 0%, rgba(31, 29, 25, .07) 42%, rgba(31, 29, 25, .36) 100%),
    url("/assets/reference/mb-project.png") center / cover;
  position: relative;
  overflow: hidden;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(31, 29, 25, .20), transparent 34%, rgba(255, 255, 255, .10));
}

.login-nav,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 15px;
  font-weight: 700;
}

.login-nav {
  position: relative;
  z-index: 1;
  width: fit-content;
}

.login-nav-word {
  padding-left: 4px;
}

.login-copy {
  max-width: 720px;
  min-width: 0;
}

.login-copy h1 {
  color: var(--white);
  font-size: clamp(42px, 5vw, 78px);
  line-height: .96;
  letter-spacing: .015em;
  text-shadow: 2px 3px 22px rgba(33, 31, 27, .34);
}

.login-content {
  position: relative;
  z-index: 1;
  width: min(1340px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: clamp(34px, 7vw, 108px);
  min-width: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 12px;
}

h1,
h2 {
  font-family: Intro, sans-serif;
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.18;
  max-width: 980px;
}

h2 {
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.08;
}

.login-copy p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, .88);
  font-size: 18px;
  line-height: 1.7;
  margin: 28px 0 0;
}

.login-panel {
  width: 100%;
  min-width: 0;
}

.login-card {
  width: 100%;
  min-width: 0;
  padding: clamp(28px, 3.2vw, 44px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .91), rgba(248, 246, 241, .82)),
    rgba(255, 255, 255, .78);
  box-shadow: 0 30px 90px rgba(28, 25, 20, .28);
  backdrop-filter: blur(22px);
}

.login-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.login-card h2 {
  color: #2f3f49;
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: .025em;
}

.login-card p {
  margin: 18px 0 26px;
  color: #63727c;
  font-size: 15px;
  line-height: 1.65;
}

.google-action {
  width: 100%;
  min-height: 56px;
  padding-inline: 22px;
  justify-content: center;
  color: #302c27;
  background: #fff;
  border-color: rgba(158, 122, 72, .32);
  box-shadow: 0 18px 34px rgba(158, 122, 72, .16);
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  text-align: center;
}

.google-action:hover {
  background: #f8f1e7;
  border-color: rgba(158, 122, 72, .5);
}

.google-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #2f3f49;
  background: var(--sand);
  font-weight: 700;
}

.login-assurance {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-assurance span {
  min-height: 32px;
  padding: 8px 12px;
  border: 1px solid rgba(158, 122, 72, .22);
  border-radius: 999px;
  color: #63727c;
  background: rgba(239, 229, 216, .55);
  font-size: 12px;
  font-weight: 700;
}

.login-footer-line {
  position: relative;
  z-index: 1;
  width: min(1340px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.muted,
.hint {
  color: var(--muted);
  line-height: 1.5;
}

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

.sidebar {
  position: sticky;
  top: 22px;
  z-index: 10;
  width: min(1220px, calc(100% - 56px));
  margin: 22px auto 0;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  background: var(--slate-soft);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(53, 76, 92, .18);
  display: flex;
  align-items: center;
  gap: 28px;
}

.sidebar nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.sidebar nav button {
  min-height: 50px;
  justify-content: center;
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, .92);
  padding-inline: 18px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .02em;
}

.sidebar nav button.active {
  color: var(--white);
  border-color: rgba(255, 255, 255, .5);
  background: rgba(219, 171, 107, .84);
}

.sidebar-foot {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, .78);
}

.sidebar-foot small {
  display: none;
}

.main {
  padding: clamp(24px, 4vw, 58px);
  padding-top: 42px;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  min-height: 284px;
  margin-bottom: 34px;
  padding: clamp(34px, 5vw, 62px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(53, 76, 92, .72), rgba(53, 76, 92, .2)),
    url("/assets/reference/mb-project.png") center/cover;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.page-head > div,
.section-title,
.studio-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-head h1 {
  font-size: clamp(30px, 3.4vw, 54px);
  max-width: 980px;
  color: var(--white);
  text-shadow: 2px 3px 20px rgba(96, 55, 0, .34);
}

.page-head .eyebrow {
  color: rgba(255, 255, 255, .82);
}

.page-head .ghost {
  color: var(--white);
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .4);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 0;
  background: transparent;
  margin-bottom: 44px;
  gap: 18px;
}

.metrics article {
  min-height: 150px;
  padding: 24px;
  background: var(--paper-soft);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(204, 163, 108, .24);
  box-shadow: var(--gold-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metrics span {
  font-family: Intro, sans-serif;
  font-size: 42px;
  color: var(--slate);
}

.metrics small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.split-layout,
.detail-grid,
.settings-grid,
.renderer-layout,
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .42fr);
  gap: 28px;
  align-items: start;
}

.project-list,
.render-strip,
.gallery {
  display: grid;
  gap: 16px;
}

.gallery {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.project-row,
.quiet-card,
.table-card,
.render-card,
.studio-surface,
.control-panel,
.result-section {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(53, 76, 92, .08);
}

.project-row {
  padding: 20px;
  display: grid;
  gap: 7px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.project-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--gold-shadow);
}

.project-row small {
  color: var(--muted);
}

.quiet-card {
  padding: clamp(22px, 3vw, 34px);
}

.quiet-card h2 {
  margin-bottom: 24px;
}

.prompt-lock {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(158, 122, 72, .22);
  border-radius: var(--radius-md);
  background: rgba(239, 229, 216, .46);
}

.prompt-lock strong {
  color: var(--slate);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.prompt-lock span {
  color: var(--muted);
  line-height: 1.45;
}

.prompt-settings textarea {
  min-height: 260px;
}

dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px 20px;
  margin: 0 0 24px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

.table-card {
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) 110px 150px 90px 150px;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}

.access-table .table-row {
  grid-template-columns: minmax(260px, 1.2fr) 170px minmax(220px, 1fr) 130px 100px;
}

.table-row:first-child {
  border-top: 0;
}

.table-head {
  background: var(--slate);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

.table-row strong,
.table-row small {
  display: block;
}

.table-row small {
  margin-top: 5px;
  color: var(--muted);
}

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

.row-actions button {
  min-height: 34px;
  padding-inline: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(204, 163, 108, .32);
  color: var(--muted);
  background: rgba(204, 163, 108, .08);
  font-size: 12px;
  border-radius: 999px;
  font-weight: 700;
}

.pill.ok {
  color: var(--ok);
  border-color: rgba(102, 115, 91, .35);
}

.pill.warn {
  color: var(--danger);
  border-color: rgba(155, 61, 50, .3);
}

.renderer-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.studio-surface,
.control-panel,
.result-section {
  padding: clamp(18px, 3vw, 30px);
}

.studio-toolbar {
  margin-bottom: 20px;
}

.studio-toolbar h2,
.studio-toolbar p {
  margin: 0;
}

.studio-toolbar p {
  margin-top: 8px;
  color: var(--muted);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crop-stage {
  min-height: 500px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(158, 122, 72, .52);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255, 255, 255, .78), rgba(255, 255, 255, .78)),
    url("/assets/reference/mb-project.png") center/cover;
  overflow: auto;
}

.crop-stage.has-image {
  background: #171510;
  border-style: solid;
}

.crop-canvas {
  max-width: 100%;
  cursor: crosshair;
  display: block;
}

.empty-capture {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--slate);
  padding: 32px;
}

.empty-capture strong,
.empty-capture span {
  display: block;
}

.source-preview {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.source-preview img {
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
  background: var(--ink);
}

.control-panel {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 16px;
  background: linear-gradient(180deg, #fff, #fbf8f3);
}

label {
  display: grid;
  gap: 8px;
  color: #4f493f;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(117, 128, 136, .22);
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 14px;
}

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

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: var(--muted);
}

.check input {
  min-height: 18px;
  width: 18px;
}

.render-loading {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: var(--sand);
}

.render-loading span {
  height: 2px;
  background: linear-gradient(90deg, var(--champagne), var(--ink), var(--champagne));
  animation: progress 1.3s infinite linear;
}

@keyframes progress {
  from { transform: translateX(-30%); }
  to { transform: translateX(30%); }
}

.result-section {
  margin-top: 28px;
}

.result-grid {
  margin-top: 20px;
}

.result-image {
  width: 100%;
  background: var(--ink);
  display: block;
}

.result-actions {
  display: grid;
  gap: 12px;
}

.mini-chat {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mini-chat p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.render-card {
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.render-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--gold-shadow);
}

.render-card img,
.render-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--sand);
  display: block;
}

.render-card img {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.render-card > div:not(.card-actions) {
  padding: 14px 16px 8px;
  display: grid;
  gap: 4px;
}

.render-card span {
  color: var(--muted);
  font-size: 13px;
}

.card-actions {
  display: flex;
  gap: 12px;
  padding: 0 16px 16px;
}

.card-actions a,
.card-actions button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 13px;
}

.compact-title {
  align-items: center;
}

.compact-title h2 {
  font-size: 26px;
}

.access-list {
  display: grid;
  gap: 10px;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.access-row:first-child {
  border-top: 0;
}

.access-row strong,
.access-row small {
  display: block;
}

.access-row small {
  margin-top: 4px;
  color: var(--muted);
}

.project-checks {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(239, 229, 216, .32);
}

.project-checks > span {
  color: #4f493f;
  font-size: 13px;
}

.empty-state {
  padding: 28px;
  border: 1px dashed rgba(204, 163, 108, .5);
  color: var(--muted);
  background: rgba(255, 255, 255, .6);
  border-radius: var(--radius-lg);
}

.section-block {
  margin-top: 34px;
}

.section-title {
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 30px;
}

.alert,
.toast {
  border: 1px solid rgba(155, 61, 50, .28);
  color: var(--danger);
  background: #fff6f2;
  padding: 12px 14px;
  margin: 12px 0;
}

.toast {
  position: fixed;
  z-index: 20;
  top: 18px;
  right: 18px;
  box-shadow: var(--shadow);
}

.toast.success {
  color: var(--ok);
  border-color: rgba(102, 115, 91, .28);
  background: #f4f7ef;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(33, 31, 27, .38);
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-card {
  width: min(680px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: grid;
  gap: 16px;
}

@media (max-width: 1180px) {
  .sidebar {
    position: static;
    height: auto;
    width: calc(100% - 32px);
    border-radius: 34px;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
  }

  .sidebar nav {
    display: flex;
    min-width: max-content;
  }

  .sidebar-foot {
    margin: 0 0 0 auto;
  }

  .renderer-layout,
  .split-layout,
  .detail-grid,
  .settings-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .login-hero {
    width: 100%;
    max-width: 100vw;
    min-height: 100svh;
    padding: 24px;
    align-items: start;
    gap: 26px;
    background-position: center top;
    overflow: hidden;
  }

  .login-nav {
    gap: 10px;
  }

  .login-nav .brand-emblem {
    width: 174px;
    height: 48px;
  }

  .login-content {
    grid-template-columns: 1fr;
    gap: 28px;
    width: 100%;
    max-width: calc(100vw - 48px);
    min-width: 0;
  }

  .login-copy,
  .login-panel {
    width: 100%;
    max-width: calc(100vw - 48px);
  }

  .login-copy h1 {
    width: 100%;
    max-width: calc(100vw - 48px);
    font-size: clamp(28px, 8.5vw, 34px);
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .login-copy p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1.58;
    margin-top: 20px;
  }

  .login-copy .eyebrow {
    margin-bottom: 12px;
    letter-spacing: .18em;
    font-size: 10px;
  }

  .login-panel {
    place-items: stretch;
  }

  .login-card {
    width: 100%;
    max-width: calc(100vw - 48px);
    padding: 28px 24px;
    border-radius: 28px;
    overflow: hidden;
  }

  .login-card h2 {
    width: 100%;
    font-size: 25px;
    line-height: 1.05;
    letter-spacing: 0;
    overflow-wrap: break-word;
  }

  .google-action {
    min-height: 58px;
    padding: 12px 16px;
    gap: 10px;
    font-size: 14px;
  }

  .google-action span:last-child {
    min-width: 0;
    line-height: 1.2;
  }

  .login-assurance {
    gap: 7px;
  }

  .login-assurance span {
    font-size: 11px;
    padding-inline: 10px;
  }

  .login-footer-line {
    flex-direction: column;
    gap: 8px;
    letter-spacing: .12em;
    font-size: 10px;
  }

  @media (max-width: 520px) {
    .login-content,
    .login-copy,
    .login-panel,
    .login-card,
    .login-copy h1 {
      max-width: min(100%, 360px);
    }

    .login-content {
      margin: 0;
    }

    .login-copy h1 {
      font-size: clamp(32px, 11vw, 40px);
    }
  }

  .main {
    padding: 22px 16px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    padding: 18px 16px;
    border-radius: 28px;
  }

  .sidebar nav {
    width: 100%;
    min-width: 0;
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }

  .sidebar nav button {
    min-width: max-content;
  }

  .sidebar-foot {
    display: none;
  }

  .page-head > div,
  .section-title,
  .studio-toolbar {
    display: grid;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

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

  .access-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .table-row {
    min-width: 880px;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .crop-stage {
    min-height: 330px;
  }

  h1,
  .page-head h1 {
    font-size: 30px;
    line-height: 1.28;
  }
}
