@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

:root {
  --font-sans: "Manrope", sans-serif;
  --font-serif: "Source Serif 4", serif;
  --bg: #f3ece1;
  --surface: #fffdf9;
  --surface-soft: #faf5ee;
  --text: #18263b;
  --muted: #617185;
  --line: rgba(24, 38, 59, 0.12);
  --line-strong: rgba(24, 38, 59, 0.2);
  --accent: #1f3c63;
  --accent-strong: #142944;
  --accent-soft: rgba(31, 60, 99, 0.08);
  --warm: #b77934;
  --warm-strong: #955d22;
  --success: #0d7a68;
  --danger: #b24637;
  --shadow: 0 24px 60px rgba(24, 38, 59, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(183, 121, 52, 0.16), transparent 30%),
    linear-gradient(180deg, #f6f0e7 0%, var(--bg) 100%);
}

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

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

button {
  cursor: pointer;
}

.topbar,
.page-shell,
.footer {
  width: min(1120px, calc(100vw - 32px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #305887 100%);
  color: #fff9f1;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.brand-text strong {
  display: block;
  font-size: 15px;
}

.brand-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.topnav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease;
}

.topnav a:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
}

.page-shell {
  padding-bottom: 44px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.workspace-card {
  padding: 32px;
}

.workspace-intro {
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--warm-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.workspace-intro h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.04;
}

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

.workspace-intro .subtle {
  margin-top: 14px;
  max-width: 68ch;
  font-size: 16px;
}

.workflow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.workflow-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.workflow-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff9f1;
}

.workspace-section + .workspace-section {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.finder-row {
  margin-bottom: 18px;
}

.search-shell {
  max-width: 720px;
}

.field-shell {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field-shell span,
.summary-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field-shell input,
.field-shell textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-shell input:focus,
.field-shell textarea:focus {
  outline: none;
  border-color: rgba(31, 60, 99, 0.5);
  box-shadow: 0 0 0 4px rgba(31, 60, 99, 0.08);
}

.field-shell textarea {
  min-height: 160px;
  resize: vertical;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.filter-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.filter-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff9f1;
}

.catalog-grid {
  display: grid;
  gap: 16px;
}

.card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.card.active-card {
  border-color: rgba(183, 121, 52, 0.5);
  background: #fffaf2;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  margin: 0;
  font-size: 18px;
}

.meta-badge,
.tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-badge {
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.meta-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.tag-pill {
  background: var(--accent-soft);
  color: var(--accent);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-actions {
  margin-bottom: 22px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  transform: none;
  cursor: progress;
}

.btn-primary {
  background: var(--accent);
  color: #fff9f1;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  background: #fff;
  border-color: var(--line);
}

.btn-accent {
  background: var(--warm);
  color: #fff9f1;
}

.btn-accent:hover {
  background: var(--warm-strong);
}

.btn-small {
  padding: 9px 13px;
  font-size: 12px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.summary-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.progress {
  width: 100%;
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(24, 38, 59, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--warm) 0%, var(--success) 100%);
  transition: width 180ms ease;
}

.essentials-panel {
  padding: 18px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.essentials-panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.essentials-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.essential-chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(178, 70, 55, 0.12);
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.essential-chip.is-done {
  background: rgba(13, 122, 104, 0.12);
  color: var(--success);
}

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

.field-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.field-section-copy {
  margin-bottom: 16px;
}

.field-section-copy h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 24px;
}

.field-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
}

.field-shell.is-wide {
  grid-column: 1 / -1;
}

.message {
  margin: 18px 2px 0;
  min-height: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}

.message.is-error {
  color: var(--danger);
}

.preview-frame {
  width: 100%;
  min-height: 780px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.empty-state {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer {
  padding: 0 0 34px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .workspace-card {
    padding: 22px;
  }

  .field-section-grid {
    grid-template-columns: 1fr;
  }

  .preview-frame {
    min-height: 560px;
  }
}

@media (max-width: 560px) {
  .topbar,
  .page-shell,
  .footer {
    width: min(100vw - 20px, 100%);
  }

  .workspace-card {
    padding: 18px;
  }

  .workspace-section + .workspace-section {
    margin-top: 26px;
    padding-top: 26px;
  }

  .section-head {
    flex-direction: column;
  }

  .action-row {
    gap: 8px;
  }

  .workflow-strip {
    margin-bottom: 24px;
  }
}
