:root {
  --bg: #fcfaf6;
  --surface: #f6f1e8;
  --surface-strong: #efe7db;
  --text: #2f2a26;
  --text-muted: #6e655e;
  --border: #ddd4c7;
  --accent: #7f988e;
  --accent-strong: #687f76;
  --clay: #c98e79;
  --lavender: #a79bc8;
  --success: #7b9b7a;
  --shadow: rgba(54, 42, 33, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

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

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

textarea {
  resize: vertical;
}

.site-shell {
  min-height: 100vh;
}

form {
  margin: 0;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(252, 250, 246, 0.88);
  border-bottom: 1px solid rgba(221, 212, 199, 0.6);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--accent-strong);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.25rem;
}

.brand-name {
  font-size: 1rem;
  letter-spacing: 0;
}

.site-nav,
.header-actions,
.hero-actions,
.cta-actions,
.inline-fields {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav a,
.link-button {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-nav a.active-link {
  color: var(--text);
}

.primary-button,
.secondary-button,
.quiet-button,
.link-button,
.ghost-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  transition: 180ms ease;
}

.primary-button {
  background: var(--accent);
  color: #f8f4ee;
  border: 1px solid var(--accent);
}

.primary-button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.secondary-button,
.ghost-chip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.secondary-button:hover,
.ghost-chip:hover {
  background: rgba(239, 231, 219, 0.6);
}

.quiet-button {
  min-height: 40px;
  padding: 0 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
}

.quiet-button:hover {
  color: var(--text);
  background: rgba(239, 231, 219, 0.35);
}

.link-button:hover,
.site-nav a:hover {
  color: var(--text);
}

.app-user {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-band,
.section-band {
  padding: 88px 0;
}

.hero-band {
  padding-top: 56px;
}

.hero-grid,
.preview-layout,
.trust-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

.hero-copy h1,
.section-heading h2,
.audience-card h3,
.step-card h3,
.workspace-topbar h3,
.cta-layout h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(3rem, 6vw, 5.1rem);
  line-height: 0.95;
  max-width: 11ch;
  margin-bottom: 22px;
}

.hero-text,
.section-text {
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.eyebrow,
.section-kicker,
.panel-label,
.preview-label,
.note-type,
.step-index {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-points,
.feature-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.hero-points li,
.feature-list li {
  position: relative;
  padding-left: 18px;
  margin-top: 12px;
  color: var(--text-muted);
}

.hero-points li::before,
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--clay);
}

.hero-visual {
  position: relative;
}

.hero-image-frame {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 26px 60px var(--shadow);
}

.hero-image-frame img {
  width: 100%;
  height: 640px;
  object-fit: cover;
}

.hero-preview,
.workspace-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(252, 250, 246, 0.92);
  box-shadow: 0 16px 40px rgba(54, 42, 33, 0.06);
}

.hero-preview {
  width: min(430px, calc(100% - 24px));
  padding: 20px;
  margin: -96px 0 0 auto;
  position: relative;
}

.preview-book {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.book-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.book-cover {
  width: 88px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(201, 142, 121, 0.92), rgba(127, 152, 142, 0.88));
  display: grid;
  place-items: end start;
  padding: 12px;
  color: #fff8f2;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.05rem;
  line-height: 0.95;
}

.book-row h2 {
  font-size: 1.5rem;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
}

.book-row p,
.note-item p,
.question-item p,
.step-card p,
.trust-points p,
.workspace-column p,
.submission-item p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.preview-note-list,
.submission-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.note-item,
.question-item,
.submission-item,
.composer-card,
.question-card,
.audience-card,
.step-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.note-item,
.question-item,
.submission-item,
.question-card,
.composer-card,
.step-card,
.audience-card {
  padding: 18px;
}

.split-intro,
.cta-layout,
.workspace-topbar,
.workspace-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.audience-grid,
.steps-grid {
  display: grid;
  gap: 18px;
}

.audience-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 32px;
}

.steps-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.section-heading {
  max-width: 42rem;
}

.section-heading h2,
.cta-layout h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.workspace-panel {
  padding: 24px;
  background: linear-gradient(180deg, rgba(246, 241, 232, 0.95), rgba(252, 250, 246, 0.98));
}

.workspace-topbar {
  align-items: center;
  margin-bottom: 24px;
}

.workspace-grid {
  align-items: start;
}

.workspace-column {
  flex: 1 1 0;
}

.field-stack {
  margin-top: 16px;
}

.field-stack label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.field-box,
.response-choice {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(252, 250, 246, 0.88);
  min-height: 46px;
  padding: 12px 14px;
  color: var(--text);
}

.field-box.multiline {
  min-height: 120px;
}

.field-pill,
.tag-pill {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  background: rgba(252, 250, 246, 0.85);
  font-size: 0.9rem;
}

.field-pill.is-active {
  background: rgba(127, 152, 142, 0.14);
  color: var(--accent-strong);
  border-color: rgba(127, 152, 142, 0.35);
}

.tag-pill {
  background: rgba(201, 142, 121, 0.1);
  color: #936857;
  border-color: rgba(201, 142, 121, 0.24);
}

.trust-layout {
  align-items: end;
}

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

.trust-points article {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.trust-points h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cta-band {
  border-top: 1px solid rgba(221, 212, 199, 0.8);
}

.cta-layout {
  align-items: center;
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(167, 155, 200, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(127, 152, 142, 0.12), transparent 30%),
    var(--bg);
}

.legal-footer {
  border-top: 1px solid rgba(221, 212, 199, 0.85);
  background: rgba(252, 250, 246, 0.95);
}

.legal-footer-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 0;
}

.legal-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-nav a {
  color: var(--text-muted);
  font-size: 0.93rem;
}

.legal-nav a:hover {
  color: var(--text);
}

.auth-header {
  position: static;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.auth-main {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: 48px 16px 72px;
}

.auth-card,
.empty-state,
.stat-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(252, 250, 246, 0.92);
  box-shadow: 0 16px 40px rgba(54, 42, 33, 0.06);
}

.auth-card {
  width: min(560px, 100%);
  padding: 32px;
}

.auth-copy h1,
.dashboard-hero h1,
.empty-state h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  line-height: 1;
  margin: 0;
}

.auth-copy h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 12px;
}

.flash-banner,
.form-error-banner {
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 18px;
}

.flash-banner {
  background: rgba(127, 152, 142, 0.12);
  border: 1px solid rgba(127, 152, 142, 0.24);
  color: var(--accent-strong);
}

.form-error-banner,
.field-error {
  color: #9d544c;
}

.form-error-banner {
  background: rgba(185, 110, 99, 0.09);
  border: 1px solid rgba(185, 110, 99, 0.2);
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  border-top: 1px solid var(--border);
}

.auth-divider span {
  position: relative;
  background: var(--bg);
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.google-button,
.wide-button {
  width: 100%;
}

.google-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fffdf8;
}

.google-button:hover {
  background: #f8f4ee;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-actions-stack {
  display: grid;
  gap: 12px;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(252, 250, 246, 0.95);
  padding: 0 14px;
  color: var(--text);
}

.auth-form input:focus {
  outline: 2px solid rgba(127, 152, 142, 0.26);
  outline-offset: 1px;
  border-color: rgba(127, 152, 142, 0.45);
}

.field-error,
.auth-meta {
  margin: 8px 0 0;
  font-size: 0.92rem;
}

.auth-meta {
  color: var(--text-muted);
  margin-top: 20px;
}

.auth-meta a {
  color: var(--accent-strong);
}

.app-shell,
.app-main {
  min-height: 100vh;
}

.app-main {
  padding: 56px 0 96px;
}

.app-layout {
  display: grid;
  gap: 24px;
}

.narrow-layout {
  max-width: 820px;
}

.dashboard-hero,
.empty-state {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.dashboard-hero {
  align-items: end;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(246, 241, 232, 0.94), rgba(252, 250, 246, 0.98));
}

.dashboard-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 12px;
}

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

.stat-card {
  padding: 24px;
}

.stat-card strong {
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1;
  margin: 16px 0 8px;
}

.stat-card span {
  color: var(--text-muted);
}

.empty-state {
  flex-direction: column;
}

.empty-state h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.page-intro h1,
.book-card h3 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
}

.page-intro h1 {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1;
  margin-bottom: 12px;
}

.form-panel,
.book-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(252, 250, 246, 0.92);
  box-shadow: 0 16px 40px rgba(54, 42, 33, 0.06);
}

.form-panel {
  padding: 28px;
}

.legal-panel h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.02;
  margin: 0 0 12px;
}

.legal-copy {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.legal-copy p {
  margin: 0;
  color: var(--text-muted);
}

.legal-copy a {
  color: var(--accent-strong);
}

.book-form {
  display: grid;
  gap: 18px;
}

.book-form input,
.book-form select,
.book-form textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(252, 250, 246, 0.95);
  padding: 12px 14px;
  color: var(--text);
}

.book-form input {
  min-height: 46px;
}

.book-form select {
  min-height: 46px;
}

.book-form textarea {
  min-height: 144px;
}

.book-form input:focus,
.book-form select:focus,
.book-form textarea:focus {
  outline: 2px solid rgba(127, 152, 142, 0.26);
  outline-offset: 1px;
  border-color: rgba(127, 152, 142, 0.45);
}

.optional-copy,
.muted-meta,
.book-card-head p,
.book-card-description.is-muted {
  color: var(--text-muted);
}

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

.compact-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.books-section,
.book-list {
  display: grid;
  gap: 18px;
}

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

.book-card {
  padding: 20px;
}

.book-card-head {
  display: flex;
  gap: 16px;
  align-items: start;
}

.book-card-cover {
  width: 82px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(201, 142, 121, 0.92), rgba(127, 152, 142, 0.88));
  display: grid;
  place-items: end start;
  padding: 10px;
  color: #fff8f2;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1rem;
  line-height: 0.95;
}

.book-card h3 {
  font-size: 1.7rem;
}

.book-card-head p,
.book-card-description {
  margin: 6px 0 0;
}

.book-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(127, 152, 142, 0.12);
  border: 1px solid rgba(127, 152, 142, 0.26);
  color: var(--accent-strong);
  text-transform: capitalize;
  font-size: 0.88rem;
}

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

.question-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.submitted-groups {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.submitted-group {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.submitted-group h3 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
}

.list-item-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.draft-panel {
  background: rgba(252, 250, 246, 0.96);
}

.draft-note-card {
  background: rgba(252, 250, 246, 0.96);
}

.submitted-note-card {
  background: rgba(246, 241, 232, 0.6);
  border-color: rgba(221, 212, 199, 0.9);
}

.note-anchor {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-style: italic;
}

.list-item-card p,
.empty-copy {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.list-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.invite-link-box {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(252, 250, 246, 0.95);
  padding: 14px 16px;
  overflow-wrap: anywhere;
  color: var(--text);
}

.invite-result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.response-form,
.response-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(221, 212, 199, 0.7);
}

.response-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reaction-button.is-active,
.reaction-pill {
  background: rgba(127, 152, 142, 0.12);
  border-color: rgba(127, 152, 142, 0.28);
  color: var(--accent-strong);
}

.reaction-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(252, 250, 246, 0.92);
  color: var(--text-muted);
  transition: 180ms ease;
}

.reaction-chip:hover {
  background: rgba(239, 231, 219, 0.5);
  color: var(--text);
}

.reaction-chip.is-active {
  background: rgba(127, 152, 142, 0.12);
  border-color: rgba(127, 152, 142, 0.28);
  color: var(--accent-strong);
}

.respond-disclosure {
  display: inline-block;
}

.respond-trigger {
  cursor: pointer;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.94rem;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.respond-trigger::-webkit-details-marker {
  display: none;
}

.respond-disclosure[open] .respond-trigger {
  color: var(--text);
}

.compact-response-form {
  margin-top: 12px;
  min-width: min(420px, 100%);
}

.compact-field {
  margin-top: 0;
}

.compact-response-form textarea {
  min-height: 92px;
}

.compact-actions {
  margin-top: 10px;
}

.compact-primary {
  min-height: 38px;
  padding: 0 14px;
}

.reaction-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(127, 152, 142, 0.28);
  border-radius: 999px;
  font-size: 0.88rem;
}

.author-comment {
  margin: 6px 0 0;
  color: var(--text);
}

.author-response-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(252, 250, 246, 0.82);
  border: 1px solid rgba(221, 212, 199, 0.8);
}

.author-response-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1080px) {
  .hero-grid,
  .preview-layout,
  .trust-layout,
  .audience-grid,
  .steps-grid,
  .trust-points {
    grid-template-columns: 1fr;
  }

  .workspace-grid,
  .split-intro,
  .cta-layout,
  .dashboard-hero,
  .legal-footer-row {
    flex-direction: column;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }

  .hero-preview {
    width: 100%;
    margin-top: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .book-list {
    grid-template-columns: 1fr;
  }

  .workspace-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 32px, 1200px);
  }

  .header-row,
  .site-nav,
  .header-actions,
  .hero-actions {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    padding-bottom: 12px;
  }

  .hero-band,
  .section-band {
    padding: 72px 0;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .hero-image-frame img {
    height: 420px;
  }

  .book-row {
    align-items: start;
  }
}
