:root {
  color-scheme: light;
  --ink: #181818;
  --muted: #66645f;
  --line: #dfddd5;
  --panel: #ffffff;
  --field: #f8f7f3;
  --paper: #f3f1ea;
  --accent: #245f73;
  --accent-2: #9a3f34;
  --showcase: #2f7653;
  --studio: #80623a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(243, 241, 234, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: white;
  background: var(--accent);
  border-radius: 7px;
}

.nav {
  color: var(--muted);
  font-size: 0.94rem;
}

.nav form {
  margin: 0;
}

.link-button {
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(24px, 6vw, 72px);
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: clamp(28px, 6vw, 76px);
}

.auth-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: 1.15rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.02rem;
}

h4 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.auth-copy p:not(.eyebrow),
.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.workspace {
  padding: clamp(22px, 4vw, 52px);
}

.narrow-workspace {
  max-width: 980px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.page-head h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 4rem);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

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

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

.bottom-grid {
  margin-top: 18px;
}

.specimen-panel {
  margin-top: 18px;
}

.material-section {
  margin-top: 18px;
}

.workbench-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.asset-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
}

.asset-stage {
  display: grid;
  place-items: center;
  min-height: 360px;
}

.asset-stage img {
  max-width: min(100%, 680px);
  max-height: 72vh;
  object-fit: contain;
  background: #f7f6f1;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

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

.rail-heading,
.section-title-row {
  display: grid;
  gap: 4px;
}

.rail-heading {
  padding: 4px 2px 2px;
}

.rail-heading h2,
.section-title-row h2 {
  margin-bottom: 0;
}

.rail-heading p {
  margin-bottom: 0;
  line-height: 1.45;
}

.panel,
.project-card,
.empty,
.center-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(39, 35, 26, 0.06);
}

.panel {
  padding: 22px;
}

.auth-form {
  align-self: stretch;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--field);
}

textarea {
  resize: vertical;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  color: white;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

.button.secondary {
  color: var(--accent);
  background: transparent;
}

.button.full {
  width: 100%;
}

.button.compact {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.8rem;
}

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

.project-form {
  display: grid;
  gap: 4px;
}

.project-list {
  display: grid;
  gap: 14px;
  align-content: start;
}

.project-card {
  display: block;
  padding: 18px;
}

.card-action {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
}

.project-card p,
.item p,
.guidance p {
  color: var(--muted);
  line-height: 1.5;
}

.showcase-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.showcase-asset {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.showcase-preview-grid img {
  width: 100%;
  aspect-ratio: 13 / 16;
  object-fit: contain;
  background: #f7f6f1;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.showcase-asset span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.status {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  color: white;
  background: var(--studio);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status.showcase {
  background: var(--showcase);
}

.empty {
  padding: 24px;
  color: var(--muted);
}

.alert {
  padding: 12px 14px;
  color: #7f241b;
  background: #fae7e2;
  border: 1px solid #edc4bc;
  border-radius: 7px;
}

.notice {
  padding: 12px 14px;
  color: #255c45;
  background: #e5f3ec;
  border: 1px solid #bedfcd;
  border-radius: 7px;
  font-weight: 800;
}

.stack {
  display: grid;
  gap: 12px;
}

.specimen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.glyph-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.glyph-card img {
  width: 100%;
  aspect-ratio: 13 / 16;
  object-fit: contain;
  background: #f7f6f1;
  border-radius: 5px;
}

.glyph-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.asset-review {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.comment-form {
  display: grid;
  gap: 8px;
}

.comment-form textarea {
  min-height: 58px;
  padding: 8px;
  font-size: 0.82rem;
}

.comment-list {
  display: grid;
  gap: 6px;
}

.compact-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.asset-comment {
  margin: 0;
  padding: 8px;
  color: var(--ink);
  background: #ece9de;
  border: 1px solid #d8d3c6;
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.asset-history-link,
.asset-title-link {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-attachment {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.comment-attachment img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  background: #f7f6f1;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.refinement-preview {
  display: block;
  width: min(100%, 220px);
  aspect-ratio: 13 / 16;
  object-fit: contain;
  background: #f7f6f1;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.item {
  padding: 15px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.item-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.material-preview {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  margin: 8px 0 10px;
  border-radius: 6px;
}

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

.guidance {
  display: grid;
  gap: 12px;
}

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

.guidance-loop h4 {
  margin-bottom: 0;
}

.list-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.next-action {
  padding: 14px;
  background: #e9f2f0;
  border: 1px solid #cfe2dd;
  border-radius: 7px;
  font-weight: 800;
}

.center-panel {
  margin: 10vh auto;
  max-width: 460px;
  padding: 32px;
  text-align: center;
}

@media (max-width: 900px) {
  .auth-shell,
  .grid.two,
  .asset-detail-grid,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .page-head,
  .section-head,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }
}
