:root {
  --paper: #fbfaf4;
  --paper-deep: #f0eee4;
  --ink: #17211f;
  --muted: #5e6964;
  --line: #d9d4c8;
  --green: #245f4b;
  --teal: #527f78;
  --gold: #c58b32;
  --clay: #9b5f4d;
  --plum: #66506b;
  --night: #111a18;
  --white: #ffffff;
  --shadow: 0 18px 54px rgba(23, 33, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: var(--green);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(251, 250, 244, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--green);
  color: var(--green);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  font-size: 14px;
}

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

.workspace {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 470px);
  align-items: center;
  gap: clamp(28px, 7vw, 92px);
  padding: clamp(42px, 8vw, 88px) clamp(18px, 5vw, 74px);
  background:
    linear-gradient(135deg, rgba(36, 95, 75, 0.10), rgba(197, 139, 50, 0.13) 46%, rgba(102, 80, 107, 0.08)),
    var(--paper);
}

.workspace-copy {
  max-width: 740px;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0 0 18px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

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

.lede,
.section-copy {
  margin: 0;
  max-width: 700px;
  color: var(--muted);
}

.lede {
  font-size: clamp(18px, 2vw, 22px);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.quick-actions.compact {
  margin-top: 22px;
}

.button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.button {
  padding: 0 18px;
}

.button.ghost,
.small-button {
  background: transparent;
  color: var(--green);
}

.small-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.phone-stage {
  display: grid;
  justify-items: center;
}

.phone {
  width: min(100%, 400px);
  min-height: 610px;
  padding: 18px;
  color: var(--white);
  background:
    radial-gradient(circle at 54% 25%, rgba(197, 139, 50, 0.20), transparent 26%),
    var(--night);
  border: 1px solid #31423d;
  box-shadow: var(--shadow);
}

.phone-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  color: #bac3bf;
  border-bottom: 1px solid #2c3a36;
  font-size: 12px;
}

.sms {
  width: fit-content;
  max-width: 92%;
  padding: 12px 13px;
  margin: 12px 0;
  color: #eef6f2;
  background: #1e2b28;
  border: 1px solid #32433e;
}

.sms.user {
  margin-left: auto;
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.sms.reply.glow {
  color: #fff8e6;
  border-color: rgba(197, 139, 50, 0.75);
  box-shadow: 0 0 34px rgba(197, 139, 50, 0.46);
}

.sms span {
  color: #cfddd7;
  font-size: 12px;
}

.band {
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 74px);
  background: var(--paper);
}

.band.alt {
  background: var(--paper-deep);
}

.inner {
  max-width: 1180px;
  margin: 0 auto;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(310px, 1.12fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}

.studio-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

select {
  min-height: 44px;
  padding: 0 10px;
}

.prompt-panel {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(23, 33, 31, 0.07);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

textarea {
  min-height: 360px;
  resize: vertical;
  padding: 14px;
  line-height: 1.45;
}

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

.story-grid,
.script-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.story-card,
.script-card,
.calendar-card {
  min-height: 180px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
}

.story-card {
  display: grid;
  gap: 14px;
}

.story-meta,
.script-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: var(--green);
  background: rgba(36, 95, 75, 0.09);
  border: 1px solid rgba(36, 95, 75, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.story-card p,
.script-card p,
.calendar-card p {
  margin: 0;
  color: var(--muted);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.calendar-card {
  min-height: 150px;
  padding: 16px;
}

.day {
  color: var(--clay);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}

.calendar-card h3 {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.2;
}

.calendar-card p {
  margin-top: 8px;
  font-size: 14px;
}

.script-card {
  display: grid;
  gap: 12px;
}

.script-text {
  white-space: pre-wrap;
  color: var(--ink);
  font-weight: 700;
}

.canon-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.8fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}

.check-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.check-list li {
  padding-left: 22px;
  position: relative;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--gold);
}

.source-shot {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.source-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.notice-band {
  background: linear-gradient(135deg, rgba(36, 95, 75, 0.10), rgba(155, 95, 77, 0.10)), var(--paper);
}

.notice-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.75fr);
  gap: 24px;
  align-items: center;
}

.notice-box {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
}

.notice-box p {
  margin: 0 0 14px;
  color: var(--ink);
  font-weight: 800;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px clamp(18px, 5vw, 74px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 980px) {
  .workspace,
  .two-col,
  .canon-layout,
  .notice-layout {
    grid-template-columns: 1fr;
  }

  .phone-stage {
    justify-items: start;
  }

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

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

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

  nav {
    justify-content: flex-start;
  }

  .workspace {
    min-height: auto;
  }

  .studio-form,
  .story-grid,
  .script-grid,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .phone {
    min-height: 520px;
  }
}
