:root {
  --bg: #0a0f18;
  --bg-2: #0f1522;
  --surface: rgba(18, 25, 40, 0.9);
  --surface-2: rgba(14, 20, 33, 0.96);
  --surface-3: rgba(26, 35, 56, 0.88);
  --card: rgba(236, 242, 255, 0.04);
  --card-2: rgba(236, 242, 255, 0.075);
  --line: rgba(117, 149, 255, 0.16);
  --line-strong: rgba(117, 149, 255, 0.28);
  --text: #edf3ff;
  --muted: #93a2c2;
  --muted-strong: #cad6ef;
  --blue: #84a7ff;
  --blue-strong: #5f84ff;
  --red: #db556f;
  --red-soft: #ff7d93;
  --white: #f8fbff;
  --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 22px 48px rgba(0, 0, 0, 0.22);
  --shadow-sm: 0 12px 24px rgba(0, 0, 0, 0.18);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(132, 167, 255, 0.4) transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(219, 85, 111, 0.16), transparent 22%),
    radial-gradient(circle at 84% 12%, rgba(132, 167, 255, 0.18), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(95, 132, 255, 0.08), transparent 26%),
    linear-gradient(180deg, #101727 0%, #0a0f18 48%, #070b12 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.18;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 94%);
}

body::after {
  background:
    radial-gradient(circle at 50% 0%, rgba(248, 251, 255, 0.04), transparent 24%),
    linear-gradient(120deg, transparent 36%, rgba(248, 251, 255, 0.025) 50%, transparent 64%);
}

.bg-orb {
  position: fixed;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.2;
}

.orb-a {
  top: -12vw;
  left: -8vw;
  background: rgba(219, 85, 111, 0.88);
}

.orb-b {
  right: -10vw;
  bottom: -14vw;
  background: rgba(132, 167, 255, 0.82);
}

a {
  color: inherit;
}

.app-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 12px;
  width: 100%;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
    linear-gradient(180deg, rgba(21, 29, 46, 0.98), rgba(11, 16, 28, 0.98));
  box-shadow: var(--shadow-xl);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(248, 251, 255, 0.05), transparent 30%),
    radial-gradient(circle at top right, rgba(132, 167, 255, 0.07), transparent 30%);
}

.side-rail {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background:
    radial-gradient(circle at top left, rgba(219, 85, 111, 0.08), transparent 26%),
    radial-gradient(circle at bottom right, rgba(132, 167, 255, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(18, 26, 43, 0.99), rgba(9, 14, 25, 0.98));
}

.rail-brand {
  display: grid;
  gap: 10px;
}

.eyebrow,
.rail-label,
.signal-label,
.hero-stat-label {
  margin: 0;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--red), var(--blue));
  box-shadow: 0 0 0 1px rgba(248, 251, 255, 0.14), 0 10px 24px rgba(95, 132, 255, 0.24);
}

.rail-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.rail-nav {
  display: grid;
  gap: 8px;
}

.rail-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--muted-strong);
  background: rgba(248, 251, 255, 0.03);
  border: 1px solid rgba(248, 251, 255, 0.05);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.rail-link:hover,
.rail-link.is-active {
  transform: translateX(4px);
  color: #101624;
  background: linear-gradient(135deg, var(--blue), #a8bbff);
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(95, 132, 255, 0.22);
}

.rail-card {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(248, 251, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.05), rgba(248, 251, 255, 0.02)),
    rgba(248, 251, 255, 0.025);
  box-shadow: var(--shadow-sm);
}

.rail-card strong {
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
}

.rail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.account-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(248, 251, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.045), rgba(248, 251, 255, 0.02)),
    rgba(248, 251, 255, 0.025);
  box-shadow: var(--shadow-sm);
}

.account-status,
.account-sync {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.rail-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rail-foot span,
.inline-pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.04);
  border: 1px solid rgba(248, 251, 255, 0.07);
  color: var(--muted-strong);
  white-space: nowrap;
}

.app-main {
  min-width: 0;
  min-height: calc(100vh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
}

.app-main .panel {
  padding: 24px;
}

.page-topbar {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(16, 23, 37, 0.98), rgba(12, 18, 31, 0.96));
}

.topbar-copy,
.page-body,
.dashboard-body,
.studio-body,
.projects-body,
.review-body,
.workspace,
.stack-list,
.stats-grid {
  display: grid;
  gap: 18px;
}

.topbar-copy {
  gap: 8px;
}

.page-body {
  min-width: 0;
  min-height: 0;
}

.topbar-actions,
.hero-actions,
.hero-summary,
.inline-pill-row,
.palette-row,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-actions {
  justify-content: flex-end;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 5vw, 5.4rem);
}

h2 {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
}

h3 {
  font-size: clamp(1.14rem, 1.5vw, 1.42rem);
}

h4 {
  font-size: 1.02rem;
}

.page-title {
  max-width: 13ch;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.hero-copy,
.panel-copy,
.section-head p,
.stack-item p,
.metric-card small,
.metric-label,
.stat-label,
.project-meta,
.rail-copy,
.signal-card p,
.hero-stat p,
label,
input,
select,
textarea,
button,
li,
.file-input,
.stats-grid span,
.act-lines,
.bullet-list {
  font-size: 0.97rem;
}

.hero-copy,
.panel-copy,
.section-head p,
.stack-item p,
.metric-card small,
.project-meta,
.signal-card p,
.hero-stat p,
.stats-grid span,
.bullet-list {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.primary-link,
.secondary-link,
.primary-button,
.secondary-button,
.text-link {
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.primary-link,
.secondary-link,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-link,
.primary-button {
  color: #101624;
  border: none;
  background: linear-gradient(135deg, #a4bbff, #84a7ff);
  box-shadow: 0 16px 32px rgba(95, 132, 255, 0.24);
}

.secondary-link,
.secondary-button {
  color: var(--text);
  border: 1px solid rgba(248, 251, 255, 0.08);
  background: rgba(248, 251, 255, 0.045);
}

.primary-link:hover,
.secondary-link:hover,
.primary-button:hover,
.secondary-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.text-link {
  color: var(--blue);
  font-weight: 700;
}

.section-head,
.project-card-head,
.act-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.section-head.compact {
  margin-bottom: 2px;
}

.section-head > div {
  min-width: 0;
}

.dashboard-hero,
.studio-hero,
.review-hero {
  padding: 28px;
  display: grid;
  gap: 22px;
  background:
    radial-gradient(circle at top right, rgba(132, 167, 255, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(219, 85, 111, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(20, 29, 47, 0.99), rgba(10, 15, 26, 0.98));
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: stretch;
  min-height: 360px;
}

.studio-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
}

.dashboard-hero-copy,
.studio-hero-copy {
  display: grid;
  align-content: end;
  gap: 16px;
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-summary-tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stat {
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.06), rgba(248, 251, 255, 0.02)),
    rgba(248, 251, 255, 0.03);
  border: 1px solid rgba(248, 251, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.hero-stat strong {
  display: block;
  margin: 10px 0 8px;
  font-family: "Sora", sans-serif;
  font-size: 1.3rem;
  line-height: 1.08;
}

.hero-stat-wide {
  grid-column: 1 / -1;
}

.dashboard-grid,
.dashboard-grid-split,
.dashboard-grid-thirds,
.feature-grid,
.signal-grid,
.main-grid,
.double-panels,
.triple-panels,
.split-grid,
.triple-grid,
.quad-grid,
.slider-grid,
.check-grid,
.metrics-grid,
.act-cards,
.project-library,
.projects-layout,
.review-content-grid,
.stat-grid {
  display: grid;
  gap: 18px;
}

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

.dashboard-grid-thirds,
.triple-panels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

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

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

.double-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.triple-grid,
.slider-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.act-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signal-card,
.feature-card,
.metric-card,
.stack-item,
.act-card,
.stat-tile,
.project-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.055), rgba(248, 251, 255, 0.02)),
    rgba(248, 251, 255, 0.03);
  border: 1px solid rgba(132, 167, 255, 0.12);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.signal-card::before,
.feature-card::before,
.metric-card::before,
.stack-item::before,
.act-card::before,
.stat-tile::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.05), transparent 32%),
    linear-gradient(90deg, transparent 64%, rgba(219, 85, 111, 0.05));
}

.signal-card:hover,
.feature-card:hover,
.metric-card:hover,
.stack-item:hover,
.act-card:hover,
.stat-tile:hover,
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(132, 167, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.08), rgba(248, 251, 255, 0.03)),
    rgba(248, 251, 255, 0.045);
}

.signal-card strong,
.feature-card strong,
.metric-card strong,
.stack-item strong,
.project-card-head h3,
.hero-stat strong {
  text-wrap: balance;
}

.signal-card strong,
.feature-card strong,
.stack-item strong,
.project-card-head h3 {
  display: block;
  margin-bottom: 8px;
}

.metric-label,
.stat-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-strong);
}

.metric-card strong,
.stat-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.14rem;
}

.controls-panel {
  padding: 24px;
  position: sticky;
  top: 12px;
  align-self: start;
}

.stack-list,
.stats-grid {
  gap: 12px;
}

.panel-heading,
.panel-heading-rich {
  display: grid;
  gap: 12px;
}

.control-stack,
.field {
  display: grid;
  gap: 9px;
}

label {
  color: var(--muted-strong);
  font-weight: 600;
}

input,
select,
textarea,
.file-input {
  width: 100%;
  min-width: 0;
  padding: 14px 15px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(132, 167, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.04), transparent 24%),
    rgba(7, 11, 18, 0.88);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

input:hover,
select:hover,
textarea:hover,
.file-input:hover {
  border-color: rgba(132, 167, 255, 0.24);
}

input:focus,
select:focus,
textarea:focus,
.file-input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(95, 132, 255, 0.12);
  transform: translateY(-1px);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--blue);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: rgba(248, 251, 255, 0.03);
  border: 1px solid rgba(132, 167, 255, 0.1);
}

.check-pill input {
  width: auto;
  margin: 0;
}

.button-row,
.button-row-3 {
  display: grid;
  gap: 12px;
}

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

.button-row-3 {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
}

.primary-button,
.secondary-button {
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.button-inline {
  width: auto;
  margin-top: 10px;
}

.draft-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.draft-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(219, 85, 111, 0.12);
}

.timeline-acts {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.timeline-act {
  min-height: 188px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(248, 251, 255, 0.1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.timeline-act::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.07), transparent 34%);
}

.timeline-act::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(248, 251, 255, 0.82), transparent);
}

.timeline-act strong,
.timeline-act span {
  position: relative;
  z-index: 1;
  display: block;
}

.timeline-act strong {
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
}

.timeline-act span {
  color: rgba(237, 243, 255, 0.88);
  line-height: 1.6;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(132, 167, 255, 0.14);
  border: 1px solid rgba(132, 167, 255, 0.16);
  color: var(--white);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.act-lines {
  display: grid;
  gap: 10px;
}

.act-lines strong,
.bullet-list strong {
  color: var(--white);
}

.bullet-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
}

.palette-row {
  margin-top: 16px;
}

.palette-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 110px;
  padding: 0 14px;
  border-radius: 999px;
  color: #0c1320;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.stats-grid {
  gap: 12px;
}

.export-box {
  min-height: 300px;
  margin-top: 2px;
  line-height: 1.7;
}

.projects-body,
.projects-shell,
.library-panel,
.project-sidebar,
.review-content-grid {
  min-height: 0;
}

.projects-body,
.projects-shell {
  height: 100%;
}

.projects-layout-split {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.52fr);
  height: 100%;
  align-items: stretch;
}

.library-panel {
  padding: 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: auto;
  scrollbar-width: thin;
}

.library-header {
  position: sticky;
  top: 0;
  z-index: 4;
  padding-bottom: 18px;
  background:
    linear-gradient(180deg, rgba(11, 16, 28, 0.98), rgba(11, 16, 28, 0.92) 78%, rgba(11, 16, 28, 0));
}

.library-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.library-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.045);
  border: 1px solid rgba(248, 251, 255, 0.08);
  color: var(--muted-strong);
  font-weight: 700;
  white-space: nowrap;
}

.project-library {
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.project-sidebar,
.review-rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.project-sidebar {
  overflow: auto;
  scrollbar-width: thin;
  padding-right: 2px;
}

body.auth-open {
  overflow: hidden;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(10px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 28px));
  margin: min(10vh, 90px) auto 0;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.auth-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.auth-close,
.auth-tab {
  font: inherit;
  cursor: pointer;
}

.auth-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(248, 251, 255, 0.08);
  border-radius: 999px;
  color: var(--text);
  background: rgba(248, 251, 255, 0.04);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-tab {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(248, 251, 255, 0.08);
  color: var(--muted-strong);
  background: rgba(248, 251, 255, 0.04);
}

.auth-tab.is-active {
  color: #101624;
  border-color: transparent;
  background: linear-gradient(135deg, #a4bbff, #84a7ff);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.auth-message[data-state="error"] {
  color: #ff9aac;
}

.project-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 220px;
}

.project-meta {
  margin: 0;
}

.project-actions {
  margin-top: auto;
}

.review-hero {
  gap: 18px;
}

.empty-state {
  min-height: 160px;
  display: flex;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(132, 167, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.04), rgba(248, 251, 255, 0.02)),
    rgba(248, 251, 255, 0.02);
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: rgba(132, 167, 255, 0.28);
  color: var(--white);
}

@media (max-width: 1400px) {
  .dashboard-hero,
  .studio-hero,
  .dashboard-grid-split,
  .projects-layout-split,
  .review-content-grid,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .hero-summary,
  .hero-summary-tight,
  .signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-sidebar {
    overflow: visible;
  }
}

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
    height: auto;
  }

  .rail-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-main {
    min-height: auto;
  }

  .controls-panel {
    position: static;
  }

  .projects-layout-split,
  .review-content-grid,
  .main-grid,
  .double-panels,
  .triple-panels,
  .metrics-grid,
  .metrics-grid-3,
  .dashboard-grid-thirds,
  .dashboard-grid-split,
  .feature-grid,
  .signal-grid,
  .hero-summary,
  .hero-summary-tight,
  .split-grid,
  .triple-grid,
  .quad-grid,
  .slider-grid,
  .check-grid,
  .act-cards {
    grid-template-columns: 1fr;
  }

  .library-tools {
    grid-template-columns: 1fr;
  }

  .library-panel,
  .project-sidebar {
    overflow: visible;
  }

  .library-header {
    position: static;
    background: transparent;
    padding-bottom: 0;
  }
}

@media (max-width: 760px) {
  .app-frame {
    padding: 10px;
    gap: 12px;
  }

  .page-topbar,
  .side-rail,
  .dashboard-hero,
  .studio-hero,
  .review-hero,
  .controls-panel,
  .library-panel,
  .project-sidebar .panel,
  .section-panel,
  .workspace .panel {
    padding: 18px;
  }

  .page-topbar,
  .section-head,
  .project-card-head,
  .act-head,
  .topbar-actions,
  .hero-actions,
  .project-actions,
  .account-actions,
  .auth-dialog-head {
    flex-direction: column;
    align-items: stretch;
  }

  .rail-nav {
    grid-template-columns: 1fr 1fr;
  }

  .project-library {
    grid-template-columns: 1fr;
  }
}
