:root {
  --cream: #f6efe6;
  --brown: #7a4e3d;
  --gold: #d4a637;
  --ink: #1e1e1e;
  --peach: #f8d1a6;
  --paper: #fffaf5;
  --line: #e6d9cc;
  --muted: #766b63;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--brown);
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}

nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  font-size: 14px;
}

.shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.flowbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.flowbar a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
  font-weight: 700;
}

.flowbar span,
.step-card span,
.tiny-label {
  color: var(--brown);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.flowbar span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  flex: 0 0 auto;
}

.app-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #1e1e1e;
  color: white;
}

.app-intro h1 {
  margin: 4px 0 8px;
  color: white;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1;
}

.app-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.app-intro .tiny-label {
  color: var(--peach);
}

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

.step-card {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper);
}

.step-card strong {
  display: block;
  margin-top: 26px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
}

.step-card p,
.easy-panel p {
  margin: 9px 0 0;
  color: var(--muted);
}

.easy-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.easy-panel h1 {
  margin-bottom: 0;
}

.guide-panel {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 18px;
}

.guide-panel h1 {
  margin: 4px 0 0;
}

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

.guide-grid p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--muted);
}

.guide-grid strong {
  color: var(--ink);
}

.small-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 8px 12px;
  color: white;
  background: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

section {
  margin-bottom: 24px;
}

h1 {
  font-size: 20px;
  margin: 0 0 14px;
}

h2 {
  font-size: 15px;
  margin: 0 0 10px;
}

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

.metric,
.panel,
.brain-list article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric span {
  display: block;
  font-size: 34px;
  font-weight: 700;
}

.metric label {
  color: var(--muted);
  font-size: 13px;
}

.metric.danger span {
  color: #8c2f24;
}

.toolbar,
.inline-form,
.section-head,
.filters,
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.action-panel {
  display: grid;
  gap: 14px;
}

.render-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preview-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

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

.preview-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
}

.preview-card-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.preview-card-head span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-weight: 800;
}

.preview-card-head strong {
  display: block;
  font-size: 16px;
}

.preview-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.preview-media {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
}

.preview-media img,
.preview-media video {
  display: block;
  width: 100%;
  max-height: 360px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.preview-media audio {
  width: calc(100% - 20px);
}

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

.job-row {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.error {
  color: #8c2f24;
  word-break: break-word;
}

.section-head {
  justify-content: space-between;
}

.two-col,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #fbf5ee;
}

tr:last-child td {
  border-bottom: 0;
}

button,
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
  background: white;
}

button {
  background: var(--ink);
  color: white;
  cursor: pointer;
  border-color: var(--ink);
}

button:hover {
  background: var(--brown);
  border-color: var(--brown);
}

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

.script-box {
  min-height: 240px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.form-grid textarea {
  grid-column: span 2;
}

.form-grid button {
  grid-column: span 4;
}

.form-grid.compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.form-grid.compact button {
  grid-column: span 2;
}

.editor {
  display: grid;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.editor label {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-block;
  background: #eadbca;
  color: var(--brown);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.score {
  font-weight: 700;
}

.list {
  display: grid;
  gap: 8px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.flash {
  border: 1px solid var(--gold);
  background: #fff7df;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.flash p {
  margin: 0;
}

.issues,
.notes {
  padding-left: 18px;
}

.brain-list {
  display: grid;
  gap: 12px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  color: var(--muted);
}

.landing-page {
  background: #fffaf5;
}

.landing-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 52px);
  color: white;
  background: linear-gradient(rgba(20, 17, 15, 0.58), rgba(20, 17, 15, 0));
}

.landing-logo {
  color: white;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1;
}

.landing-nav nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
}

.landing-nav nav a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.landing-hero {
  min-height: 84vh;
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  padding: clamp(100px, 12vw, 148px) clamp(18px, 5vw, 72px) clamp(28px, 6vw, 68px);
  color: white;
  background-image:
    linear-gradient(90deg, rgba(20, 17, 15, 0.84) 0%, rgba(20, 17, 15, 0.42) 44%, rgba(20, 17, 15, 0.08) 100%),
    var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-copy {
  max-width: 710px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--peach);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--brown);
}

.landing-hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(74px, 15vw, 180px);
  font-weight: 400;
  line-height: 0.86;
}

.hero-line {
  margin: 18px 0 0;
  max-width: 700px;
  font-size: clamp(27px, 5vw, 68px);
  font-weight: 700;
  line-height: 0.96;
}

.hero-body {
  max-width: 530px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: 700;
}

.button.primary {
  color: var(--ink);
  background: var(--peach);
}

.button.ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
}

.hero-proof {
  justify-self: end;
  width: min(100%, 340px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 18px;
  background: rgba(30, 30, 30, 0.48);
  backdrop-filter: blur(10px);
}

.hero-proof span,
.hero-proof strong {
  display: block;
}

.hero-proof span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.hero-proof strong {
  margin-top: 6px;
  color: white;
  font-size: 27px;
  line-height: 1.05;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.trust-strip div {
  min-height: 132px;
  padding: 28px clamp(18px, 4vw, 44px);
  border-right: 1px solid var(--line);
}

.trust-strip div:last-child {
  border-right: 0;
}

.trust-strip span {
  display: block;
  margin-bottom: 12px;
  color: var(--brown);
  font-size: 12px;
  font-weight: 800;
}

.trust-strip strong {
  display: block;
  font-size: 20px;
}

.trust-strip p {
  max-width: 320px;
  margin: 8px 0 0;
  color: var(--muted);
}

.landing-section {
  margin: 0;
  padding: clamp(54px, 7vw, 96px) clamp(18px, 5vw, 72px);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.landing-section h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(33px, 5vw, 68px);
  line-height: 0.98;
}

.format-grid,
.product-list,
.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.format-grid article,
.product-list article,
.latest-grid a {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
}

.format-grid span,
.product-list span,
.latest-grid span {
  display: block;
  margin-bottom: 22px;
  color: var(--brown);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.format-grid h3,
.product-list h3 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
}

.format-grid p,
.product-list p,
.latest-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}

.product-band {
  background: #f2e6da;
}

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

.product-list article {
  display: flex;
  flex-direction: column;
}

.product-list strong {
  margin-top: auto;
  color: var(--ink);
}

.dark-band {
  color: white;
  background: #1e1e1e;
}

.dark-band h2 {
  color: white;
}

.rule-list {
  display: grid;
  gap: 12px;
}

.rule-list p {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0 0 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 2.6vw, 30px);
  line-height: 1.22;
}

.latest-section {
  background: var(--paper);
}

.latest-grid a {
  color: var(--ink);
}

.latest-grid strong {
  display: block;
  font-size: 21px;
  line-height: 1.16;
}

@media (max-width: 860px) {
  .dashboard-grid,
  .flowbar,
  .step-grid,
  .preview-grid,
  .guide-panel,
  .guide-grid,
  .two-col,
  .detail-grid,
  .form-grid,
  .form-grid.compact {
    grid-template-columns: 1fr;
  }

  .form-grid textarea,
  .form-grid button,
  .form-grid.compact button {
    grid-column: auto;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .app-intro,
  .easy-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 18px;
  }

  .landing-nav nav {
    gap: 12px;
    width: 100%;
    overflow-x: auto;
  }

  .landing-hero {
    min-height: 78vh;
    grid-template-columns: 1fr;
    background-position: 61% center;
  }

  .hero-copy {
    max-width: 560px;
  }

  .hero-proof {
    justify-self: stretch;
  }

  .trust-strip,
  .split-section,
  .format-grid,
  .product-list,
  .latest-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
}
