:root {
  --bg: #f4efe6;
  --surface: rgba(255, 251, 245, 0.88);
  --surface-strong: #fffdf8;
  --ink: #1d2433;
  --muted: #667085;
  --line: rgba(29, 36, 51, 0.1);
  --accent: #b04a2f;
  --accent-dark: #7f2f1d;
  --accent-soft: #f6ded2;
  --danger: #a12828;
  --shadow: 0 24px 60px rgba(46, 35, 20, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(176, 74, 47, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(55, 94, 76, 0.16), transparent 28%),
    linear-gradient(180deg, #fbf6ee, #efe4d3 65%, #eadcc8);
  min-height: 100vh;
}


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

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px;
}

.topbar,
.page-header,
.editor-hero,
.toolbar,
.panel,
.hero {
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(255, 251, 245, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.topnav,
.action-row,
.hero-actions,
.stats-strip,
.section-actions,
.view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.topnav a,
.muted,
.eyebrow {
  color: var(--muted);
}

.page {
  display: grid;
  gap: 24px;
}

.hero,
.editor-hero,
.panel,
.auth-card,
.toolbar {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero {
  padding: 56px;
  min-height: 58vh;
  display: grid;
  align-items: center;
}

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

h1,
h2,
strong,
.brand {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.95;
}

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

.lede {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(29, 36, 51, 0.8);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}

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

.button-primary {
  background: var(--accent);
  color: #fffaf4;
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary,
.button-ghost {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--line);
}

.button-danger {
  background: #fff1f1;
  color: var(--danger);
  border-color: rgba(161, 40, 40, 0.18);
}

.auth-card,
.form-panel.narrow {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px;
}

.stack-form,
.stack-field,
.reset-list,
.section-stack {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

input,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(29, 36, 51, 0.12);
  background: rgba(255, 255, 255, 0.85);
  padding: 12px 14px;
  font: inherit;
  color: inherit;
}

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

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.inline-check input {
  width: auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.compact {
  align-items: start;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.panel {
  padding: 24px;
}

.talk-card {
  display: grid;
  gap: 20px;
}

.talk-card-header,
.section-card-header,
.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.stats-grid,
.section-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats-grid div,
.stat-box {
  background: rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  padding: 14px;
}

dt,
.stat-box span {
  font-size: 0.85rem;
  color: var(--muted);
}

dd,
.stat-box strong {
  margin: 6px 0 0;
  font-size: 1.15rem;
}

.toolbar {
  padding: 18px;
}

.editor-hero {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.stats-strip {
  justify-content: space-between;
}

.stats-strip div {
  min-width: 160px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(29, 36, 51, 0.08);
  border-radius: 18px;
  padding: 14px 16px;
}

.stats-strip span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.stats-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
}

.section-card {
  display: grid;
  gap: 18px;
}

.section-order-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(176, 74, 47, 0.1);
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.section-card-changed,
.prompt-panel-changed {
  box-shadow:
    var(--shadow),
    0 0 0 2px rgba(176, 74, 47, 0.18);
}

.section-card-moved {
  box-shadow:
    var(--shadow),
    0 0 0 3px rgba(41, 122, 82, 0.22);
}

.global-prompt-panel {
  display: grid;
  gap: 8px;
}

.prompt-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.prompt-status-pending {
  background: rgba(176, 74, 47, 0.12);
  color: var(--accent-dark);
}

.prompt-status-applied {
  background: rgba(41, 122, 82, 0.12);
  color: #20583d;
}

.prompt-status-empty {
  background: rgba(29, 36, 51, 0.06);
  color: var(--muted);
}

.chip {
  display: inline-flex;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 0.85rem;
}

.flash-stack {
  display: grid;
  gap: 10px;
}

.flash {
  border-radius: 16px;
  padding: 14px 16px;
}

.flash-success { background: #ecfbf0; color: #17613a; }
.flash-danger { background: #fff1f1; color: #8f2323; }
.flash-warning { background: #fff6de; color: #7f6010; }
.flash-info { background: #edf5ff; color: #23517d; }

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

table {
  width: 100%;
  border-collapse: collapse;
}

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

.reset-item,
.empty-panel,
.print-view {
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(29, 36, 51, 0.06);
  border-radius: 18px;
  padding: 18px;
}

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

.view-body {
  line-height: 1.75;
  font-size: 1.05rem;
}

.muted-link {
  margin-top: 16px;
}

code {
  background: rgba(29, 36, 51, 0.06);
  border-radius: 8px;
  padding: 2px 6px;
}


@media (max-width: 900px) {
  .grid-two,
  .stats-grid,
  .section-meta-grid {
    grid-template-columns: 1fr;
  }

  .page-header,
  .section-card-header,
  .section-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .shell {
    padding: 16px;
  }

  .hero {
    padding: 28px;
    min-height: auto;
  }
}
