@font-face {
  font-family: "FiraCode Maya";
  src: url("https://static.tildacdn.com/tild3937-6530-4731-b634-316266353536/FiraCode.woff") format("woff");
  font-weight: 400;
}

@font-face {
  font-family: "FiraCode Maya";
  src: url("https://static.tildacdn.com/tild6163-3030-4830-a265-353563616335/FiraCode-SemiBold.woff") format("woff");
  font-weight: 600;
}

@font-face {
  font-family: "Suisse Maya";
  src: url("https://static.tildacdn.com/tild6430-3061-4833-b831-326361653239/SuisseIntl-Book.woff") format("woff");
  font-weight: 400;
}

@font-face {
  font-family: "Suisse Maya";
  src: url("https://static.tildacdn.com/tild6634-3330-4131-b630-366331666331/SuisseIntl-Medium.woff") format("woff");
  font-weight: 500;
}

:root {
  --bg: #f5f5f5;
  --ink: #12100c;
  --muted: rgba(18, 16, 12, .62);
  --soft: #ebebeb;
  --line: #e2e2e2;
  --card: #fff;
  --orange: #ff8562;
  --orange-2: #fa876b;
  --blue: #003cff;
  --focus: #2015ff;
  --danger: #c82929;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Suisse Maya", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.text-link {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.text-link:hover {
  color: var(--ink);
}

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

button,
.choice,
.submission-row {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--line);
  height: 100vh;
  padding: 30px 20px;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.brand {
  font-family: "FiraCode Maya", monospace;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
}

.step-list,
.admin-nav {
  display: grid;
  gap: 8px;
  margin-top: 58px;
}

.step-item,
.admin-nav span {
  border: 0;
  background: transparent;
  min-height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  text-align: left;
}

.step-item {
  cursor: pointer;
}

.step-item strong {
  font-family: "FiraCode Maya", monospace;
  font-size: 12px;
  font-weight: 400;
}

.step-item.is-active,
.admin-nav .active {
  color: var(--ink);
  background: var(--line);
}

.sidebar-note {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 40px;
  font-family: "FiraCode Maya", monospace;
  font-size: 12px;
}

.topbar a {
  text-decoration: none;
  border-radius: 30px;
}

.public-layout {
  display: grid;
  grid-template-columns: minmax(520px, .95fr) minmax(360px, .9fr);
  gap: 42px;
  padding: 46px 44px 44px;
  align-items: stretch;
}

.intro-panel {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 26px;
  color: var(--orange);
  font-family: "FiraCode Maya", monospace;
  font-size: 14px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: "FiraCode Maya", monospace;
  font-size: clamp(42px, 5.2vw, 86px);
  line-height: .98;
  font-weight: 400;
  letter-spacing: 0;
}

.lead {
  max-width: 640px;
  margin: 28px 0 0;
  font-size: 20px;
  line-height: 1.35;
}

.wizard {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

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

.question-head h2 {
  margin: 0;
  max-width: 640px;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 500;
}

.counter {
  color: var(--muted);
  font-family: "FiraCode Maya", monospace;
  font-size: 14px;
  white-space: nowrap;
}

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

.choice {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  min-height: 104px;
  padding: 18px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.choice:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.choice.is-selected {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.choice-code,
.choice-meta {
  color: var(--muted);
  font-family: "FiraCode Maya", monospace;
  font-size: 12px;
}

.choice-title {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 500;
}

.choice-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.field,
.check {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field span,
.check span {
  font-size: 14px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 46px;
  padding: 11px 13px;
}

.field textarea {
  resize: vertical;
  line-height: 1.45;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

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

.one-pager-fields .field:last-child {
  grid-column: 1 / -1;
}

.primary-material textarea {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px rgba(255, 133, 98, .2);
}

.upload-field input[type="file"] {
  padding: 10px;
  border-style: dashed;
  background: rgba(255, 255, 255, .65);
}

.upload-field input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 30px;
  background: var(--ink);
  color: #fff;
  min-height: 34px;
  padding: 0 14px;
  margin-right: 12px;
  cursor: pointer;
}

.field-hint,
.field-error,
.action-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.field-error {
  color: var(--danger);
  min-height: 18px;
}

.check {
  grid-template-columns: auto 1fr;
  align-items: start;
  line-height: 1.35;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--blue);
}

.check.compact {
  margin-top: 28px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 20px;
  line-height: 1.5;
}

.wizard-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.button {
  border: 0;
  border-radius: 30px;
  min-height: 46px;
  padding: 0 22px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.button.secondary {
  background: var(--line);
  color: var(--ink);
}

.button.decision-button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.decision-button:hover {
  border-color: var(--blue);
}

.button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.action-hint {
  max-width: 440px;
  margin: 0;
}

.is-hidden {
  display: none !important;
}

.visual-panel {
  border-left: 1px solid var(--line);
  padding-left: 36px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  min-width: 0;
}

.visual-art {
  border-radius: 12px;
  background: var(--soft);
  min-height: 450px;
  overflow: hidden;
}

.visual-art img {
  width: 130%;
  height: 100%;
  object-fit: cover;
  object-position: 53% 50%;
  display: block;
  transform: translateX(-12%);
}

.visual-note {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.visual-note strong {
  color: var(--ink);
  font-family: "FiraCode Maya", monospace;
  font-weight: 400;
}

.success-panel {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  max-width: 700px;
}

.success-panel h2,
.empty-detail h2 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 500;
}

.success-panel p,
.empty-detail p {
  color: var(--muted);
  line-height: 1.5;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(460px, .9fr) minmax(460px, 1.1fr);
  gap: 1px;
  background: var(--line);
  min-height: calc(100vh - 70px);
}

.admin-list-panel,
.admin-detail-panel {
  background: var(--bg);
  padding: 36px;
  min-width: 0;
}

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

.admin-title h1 {
  font-size: 54px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}

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

.submission-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  cursor: pointer;
  text-align: left;
}

.submission-row.is-active {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.row-name {
  font-size: 18px;
  font-weight: 500;
}

.pill {
  border-radius: 30px;
  background: var(--soft);
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.row-meta,
.detail-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.detail-card {
  display: grid;
  gap: 22px;
}

.detail-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.detail-header h2 {
  margin: 0 0 12px;
  font-size: 38px;
  line-height: 1.08;
}

.detail-section {
  display: grid;
  gap: 8px;
}

.detail-section h3 {
  margin: 0;
  font-family: "FiraCode Maya", monospace;
  font-size: 14px;
  font-weight: 400;
  color: var(--orange);
}

.detail-section p {
  margin: 0;
  line-height: 1.5;
}

.one-pager-review,
.ai-review {
  display: grid;
  gap: 10px;
}

.one-pager-review-item,
.ai-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.one-pager-review-item strong {
  display: block;
  margin-bottom: 6px;
  font-family: "FiraCode Maya", monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--orange);
}

.ai-review dl {
  display: grid;
  grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.ai-review dt {
  color: var(--muted);
}

.ai-review dd {
  margin: 0;
}

.decision-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.comment-list,
.history-list {
  display: grid;
  gap: 8px;
}

.comment,
.history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  line-height: 1.45;
}

.admin-form {
  display: grid;
  gap: 12px;
}

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
  }

  .step-list,
  .admin-nav {
    margin-top: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .sidebar-note {
    display: none;
  }

  .public-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .public-layout {
    padding: 34px 24px;
  }

  .visual-panel {
    border-left: 0;
    padding-left: 0;
  }

  .admin-layout {
    gap: 0;
  }

  .admin-detail-panel {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 62px;
    padding: 0 18px;
  }

  .step-list,
  .admin-nav {
    grid-template-columns: 1fr;
  }

  .public-layout,
  .admin-list-panel,
  .admin-detail-panel {
    padding: 28px 18px;
  }

  h1,
  .admin-title h1 {
    font-size: 40px;
  }

  .lead {
    font-size: 17px;
  }

  .question-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .choice-grid,
  .one-pager-fields,
  .field-row,
  .filters {
    grid-template-columns: 1fr;
  }

  .one-pager-fields .field:last-child {
    grid-column: auto;
  }

  .visual-art {
    min-height: 260px;
  }

  .visual-note {
    grid-template-columns: 1fr;
  }
}
