:root {
  --bg: #f6efe4;
  --bg-deep: #ead5bb;
  --paper: #fffdf9;
  --surface: rgba(255, 250, 243, 0.8);
  --surface-strong: rgba(255, 250, 243, 0.94);
  --ink: #223036;
  --muted: #5d676d;
  --line: rgba(34, 48, 54, 0.12);
  --table-line: rgba(34, 48, 54, 0.22);
  --accent: #b55d32;
  --accent-deep: #8f421d;
  --sage: #537162;
  --sage-deep: #365344;
  --gold: #ddb267;
  --shadow: 0 28px 70px rgba(32, 34, 33, 0.14);
  font-family: "Manrope", "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(221, 178, 103, 0.28), transparent 34%),
    radial-gradient(circle at bottom right, rgba(83, 113, 98, 0.16), transparent 32%),
    linear-gradient(180deg, #faf5ec 0%, #f4ecdf 42%, #f0e5d7 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-glow {
  position: fixed;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
  opacity: 0.72;
  z-index: 0;
}

.page-glow-left {
  top: -6rem;
  left: -6rem;
  background: radial-gradient(circle, rgba(181, 93, 50, 0.28), rgba(181, 93, 50, 0));
}

.page-glow-right {
  right: -7rem;
  bottom: 2rem;
  background: radial-gradient(circle, rgba(83, 113, 98, 0.24), rgba(83, 113, 98, 0));
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1460px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 2rem) 3rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.hero-copy,
.panel,
.preview-toolbar,
.report-sheet {
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: var(--shadow);
}

.hero-copy,
.panel,
.preview-toolbar {
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 32px;
}

.eyebrow,
.panel-kicker,
.report-kicker,
.meta-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 800;
}

.eyebrow,
.panel-kicker,
.report-kicker {
  color: var(--accent-deep);
}

.hero h1,
.panel h2,
.preview-toolbar h2,
.report-title,
.day-card h3 {
  margin: 0;
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  line-height: 1.03;
}

.hero h1 {
  margin-top: 0.55rem;
  font-size: clamp(2.8rem, 7vw, 5rem);
  max-width: 11ch;
}

.hero-note,
.panel-note,
.preview-note,
.draft-status,
.report-footer,
.summary-copy,
.field-helper,
.day-card-date {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.hero-note {
  margin-top: 1rem;
  max-width: 56rem;
  font-size: 1rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.editor-form {
  display: grid;
  gap: 1rem;
}

.panel {
  padding: 1.2rem;
  border-radius: 28px;
}

.panel-heading,
.preview-toolbar,
.action-row,
.report-header,
.report-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.panel-heading h2,
.preview-toolbar h2 {
  margin-top: 0.4rem;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span,
.field-label {
  font-size: 0.95rem;
  font-weight: 700;
}

.field-helper {
  font-size: 0.8rem;
}

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

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.9rem 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

textarea {
  min-height: 5.2rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(83, 113, 98, 0.72);
  box-shadow: 0 0 0 4px rgba(83, 113, 98, 0.12);
}

input[readonly] {
  background: rgba(244, 236, 220, 0.86);
}

.daily-editors {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.day-card {
  padding: 1rem;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 243, 0.9));
  border: 1px solid rgba(34, 48, 54, 0.08);
  display: grid;
  gap: 0.9rem;
}

.day-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.day-card h3 {
  font-size: 1.4rem;
}

.day-card-date {
  font-size: 0.9rem;
  font-weight: 700;
}

.action-row {
  flex-wrap: wrap;
}

.button {
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff7f2;
}

.button-secondary {
  background: linear-gradient(135deg, rgba(221, 178, 103, 0.96), rgba(181, 93, 50, 0.76));
  color: #332315;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border: 1px solid rgba(34, 48, 54, 0.08);
}

.draft-status[data-tone="warn"] {
  color: var(--accent-deep);
}

.preview-panel {
  position: sticky;
  top: 1rem;
}

.preview-toolbar {
  padding: 1rem 1.2rem;
  border-radius: 26px;
  margin-bottom: 1rem;
}

.report-sheet {
  background: var(--paper);
  border-radius: 34px;
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.report-title {
  margin-top: 0.45rem;
  font-size: clamp(2rem, 3vw, 2.45rem);
}

.report-range {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-weight: 700;
}

.report-badge {
  padding: 0.75rem 0.9rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(83, 113, 98, 0.12), rgba(221, 178, 103, 0.18));
  color: var(--sage-deep);
  font-weight: 800;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.summary-card {
  min-height: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(34, 48, 54, 0.09);
  background: #ffffff;
}

.summary-copy {
  margin-top: 0.5rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.summary-card-wide {
  background:
    linear-gradient(120deg, rgba(221, 178, 103, 0.12), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.table-wrap {
  overflow-x: auto;
}

.intention-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.intention-table th,
.intention-table td {
  border: 1px solid var(--table-line);
  padding: 0.55rem;
  vertical-align: top;
}

.intention-table thead th {
  background: rgba(246, 239, 228, 0.84);
}

.row-heading,
.section-heading {
  width: 18%;
}

.day-heading {
  text-align: left;
}

.day-heading strong,
.section-heading-title {
  display: block;
  font-size: 0.92rem;
}

.day-heading-date,
.section-heading-helper {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.section-heading {
  background: rgba(250, 245, 236, 0.78);
}

.cell-copy {
  min-height: 4.2rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  font-size: 0.93rem;
}

.section-tall .cell-copy {
  min-height: 6.2rem;
}

.placeholder {
  color: #7d888d;
}

.report-footer {
  border-top: 1px solid rgba(34, 48, 54, 0.08);
  padding-top: 0.8rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

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

  .preview-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 1rem 0.8rem 2rem;
  }

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

  .panel-heading,
  .preview-toolbar,
  .day-card-header,
  .report-header,
  .report-footer {
    flex-direction: column;
  }

  .report-sheet {
    border-radius: 26px;
  }
}

@page {
  size: letter landscape;
  margin: 0.5in;
}

@media print {
  :root {
    background: #ffffff;
  }

  body {
    background: #ffffff;
  }

  .page-glow,
  .hero,
  .editor-panel,
  .preview-toolbar,
  .report-badge {
    display: none !important;
  }

  .app-shell {
    max-width: none;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .preview-panel {
    position: static;
  }

  .report-sheet {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    gap: 0.35rem;
  }

  .report-title {
    font-size: 20pt;
  }

  .report-range,
  .summary-copy,
  .report-footer,
  .cell-copy,
  .day-heading strong,
  .section-heading-title {
    font-size: 8pt;
  }

  .eyebrow,
  .panel-kicker,
  .report-kicker,
  .meta-label,
  .day-heading-date,
  .section-heading-helper {
    font-size: 6.5pt;
  }

  .summary-grid {
    gap: 0.25rem;
  }

  .summary-card {
    border-radius: 12px;
    padding: 0.3rem 0.4rem;
  }

  .intention-table th,
  .intention-table td {
    padding: 0.2rem 0.24rem;
  }

  .cell-copy {
    min-height: 0.56in;
    line-height: 1.18;
  }

  .section-tall .cell-copy {
    min-height: 0.95in;
  }

  .section-heading-helper {
    display: none;
  }

  .placeholder {
    color: transparent;
  }

  .table-wrap {
    overflow: visible;
  }
}
