:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-soft: #f9f7f1;
  --text: #382110;
  --muted: #6f6659;
  --border: #e6ddce;
  --accent: #409d69;
  --accent-dark: #2f7a52;
  --shadow: 0 10px 25px rgba(56, 33, 16, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.site-body {
  margin: 0;
  font-family: "Sora", "Open Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  background: rgba(249, 247, 241, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.site-nav {
  max-width: 1200px;
}

.nav-logo {
  filter: invert(14%) sepia(17%) saturate(996%) hue-rotate(356deg) brightness(95%) contrast(88%);
}

.contact-button {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  transition: transform 0.2s ease, background 0.2s ease;
}

.contact-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.hero-title {
  font-family: "Hahmlet", Georgia, serif;
  color: var(--text);
}

.hero-subtitle,
.hero-copy {
  color: var(--muted);
}

.hero-contact-line {
  display: block;
  margin-top: 0.35rem;
}

.inline-link,
.contribute-link {
  color: #00635d;
  text-decoration: none;
  font-weight: 600;
}

.inline-link:hover,
.contribute-link:hover {
  text-decoration: underline;
}

.suggestion-section {
  margin-bottom: 2rem;
}

.suggestion-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.suggestion-title {
  margin: 0;
  font-family: "Hahmlet", Georgia, serif;
  font-size: 1.5rem;
}

.suggestion-copy {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
}

.submission-tracker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin: 0.5rem 0 1rem;
}

.submission-tracker-label {
  font-size: 0.88rem;
  color: var(--muted);
  margin-right: 0.25rem;
}

.submission-tracker-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.submission-tracker-link:hover {
  text-decoration: underline;
}

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

.field-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.field-label input,
.field-label select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  background: #fff;
  color: var(--text);
  font-size: 0.95rem;
}

.field-label input:focus,
.field-label select:focus {
  outline: 2px solid rgba(64, 157, 105, 0.2);
  border-color: var(--accent);
}

.suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.suggestion-submit {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.suggestion-submit {
  color: #fff;
  background: var(--accent);
}

.suggestion-submit:hover {
  background: var(--accent-dark);
}

.suggestion-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.suggestion-feedback {
  min-height: 1.2rem;
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.gauntlet-tabs {
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.gauntlet-tabs-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gauntlet-tab {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.gauntlet-tab:hover {
  background: #fff;
  border-color: #d5cab7;
}

.gauntlet-tab.w--current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.w-tab-pane {
  display: none;
}

.w-tab-pane.w--tab-active {
  display: block;
}

.category-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
  gap: 0.65rem 0.8rem;
  margin-bottom: 0.9rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.category-control-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.category-control-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.34rem 0.68rem;
  font-size: 0.88rem;
  color: var(--text);
  background: #fff;
}

.category-filter-reset {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.48rem 0.8rem;
  cursor: pointer;
}

.category-filter-reset:hover {
  background: #fff;
}

.reading-dashboard {
  margin-top: 0.65rem;
  margin-bottom: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.reading-dashboard-collapsible {
  display: block;
}

.reading-dashboard-toggle {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem 0.75rem;
  cursor: pointer;
  list-style: none;
  padding: 0.8rem 0.9rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}

.reading-dashboard-toggle::-webkit-details-marker {
  display: none;
}

.reading-dashboard-toggle::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
  margin-left: auto;
}

.reading-dashboard-collapsible:not([open]) .reading-dashboard-toggle::after {
  transform: rotate(-90deg);
}

.reading-dashboard-body {
  padding: 0.75rem 0.8rem 0.85rem;
}

.reading-dashboard-title {
  margin: 0;
  font-family: "Hahmlet", Georgia, serif;
  font-size: 0.98rem;
}

.reading-dashboard-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.track-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e9dfd0;
  overflow: hidden;
}

.track-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.reading-list-preview {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.reading-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbf9f5;
  overflow: hidden;
}

.reading-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  padding: 0.45rem 0.6rem;
  font-size: 0.79rem;
  color: var(--text);
  font-weight: 600;
}

.reading-section-summary::-webkit-details-marker {
  display: none;
}

.reading-section-summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.76rem;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.reading-section:not([open]) .reading-section-summary::after {
  transform: rotate(-90deg);
}

.reading-section-name {
  min-width: 0;
}

.reading-section-count {
  color: var(--muted);
  font-size: 0.74rem;
}

.reading-section-progress {
  padding: 0 0.6rem 0.45rem;
}

.reading-list-items {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.reading-section-empty {
  margin: 0.15rem 0.6rem 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.reading-list-empty {
  color: var(--muted);
  font-size: 0.8rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: #fbf9f5;
}

.reading-list-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: var(--surface-soft);
}

.reading-list-item-main {
  min-width: 0;
}

.reading-list-item-link {
  display: block;
  color: #166b4c;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
}

.reading-list-item-link:hover {
  text-decoration: underline;
}

.reading-list-item-meta {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.reading-list-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.reading-list-status-select,
.reading-list-remove {
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.76rem;
  padding: 0.23rem 0.55rem;
  background: #fff;
}

.reading-list-remove {
  cursor: pointer;
}

.category-intro {
  margin-bottom: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.category-intro-title {
  margin: 0 0 0.35rem;
  font-family: "Hahmlet", Georgia, serif;
  font-size: 1.06rem;
  color: var(--text);
}

.category-intro-summary {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.45;
}

.category-intro-audience {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.gauntlet-wrapper {
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.hypothesis.book {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hypothesis.book:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #d9ccb8;
}

.resource-card {
  cursor: default;
}

.resource-card.is-saved {
  border-color: #9dc9ae;
  background: #fbfffc;
}

.book-rank {
  min-width: 2.4rem;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

.book-cover {
  width: 52px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #d7ccbb;
  background: linear-gradient(145deg, #f7f3ea, #eee6d8);
}

.resource-cover-link {
  display: block;
  text-decoration: none;
}

.resource-cover-link:hover {
  border-color: #c2b29a;
}

.book-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-image.is-logo {
  object-fit: contain;
  padding: 6px;
  background: #fff;
}

.cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Hahmlet", Georgia, serif;
  font-size: 1.15rem;
  color: #7d6c57;
}

.book-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.idea-header.book {
  margin: 0;
  font-family: "Hahmlet", Georgia, serif;
  font-size: 1.04rem;
  line-height: 1.3;
}

.resource-title-link {
  color: inherit;
  text-decoration: none;
}

.resource-title-link:hover .idea-header.book {
  text-decoration: underline;
}

.author {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-summary {
  margin: 0;
  color: #5e564b;
  font-size: 0.83rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.resource-save-button,
.resource-progress-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.26rem 0.58rem;
}

.resource-save-button {
  cursor: pointer;
}

.resource-save-button.is-saved {
  border-color: #8cb9a0;
  background: #eef8f1;
  color: #2f7a52;
}

.source-pill,
.page-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 0.2rem 0.55rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.status-pill {
  border-color: #b5d6bf;
  background: #eef8f1;
  color: #2f7a52;
}

.page-pill.is-hidden {
  display: none;
}

.year-pill.is-hidden {
  display: none;
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.resource-open-link {
  margin-left: auto;
}

.link-icon {
  transform: rotateZ(45deg);
  max-height: 16px;
  filter: invert(37%) sepia(40%) saturate(615%) hue-rotate(99deg) brightness(92%) contrast(89%);
}

.hypothesis.book.suggestion-card {
  border-style: dashed;
  border-color: #98c2a8;
  background: #f5fcf8;
}

.resource-empty-state {
  border: 1px dashed #cebda5;
  border-radius: 12px;
  background: #faf7f2;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.resource-empty-state-title {
  margin: 0 0 0.35rem;
  font-family: "Hahmlet", Georgia, serif;
  font-size: 0.98rem;
  color: var(--text);
}

.resource-empty-state-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.section-3 {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer-note {
  background: #ece4d7;
  border-top: 1px solid #dfd1bd;
}

.site-footer-note p {
  color: #5f574c;
}

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

@media (max-width: 767px) {
  .gauntlet-tabs {
    flex-direction: column;
  }

  .gauntlet-tabs-menu,
  .w-tab-content {
    width: 100%;
  }

  .hypothesis.book {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .book-rank {
    min-width: auto;
  }

  .open-link {
    margin-left: 0;
  }

  .category-controls {
    grid-template-columns: 1fr 1fr;
    position: sticky;
    top: 72px;
    z-index: 30;
    box-shadow: 0 6px 14px rgba(56, 33, 16, 0.08);
  }

  .category-filter-reset {
    grid-column: 1 / -1;
    width: 100%;
  }

  .reading-dashboard {
    margin-top: 0.55rem;
  }

  .reading-dashboard-toggle {
    padding: 0.7rem 0.75rem;
  }

  .reading-dashboard-body {
    padding: 0.65rem 0.7rem 0.75rem;
  }

  .reading-list-item-actions,
  .resource-actions {
    width: 100%;
    align-items: stretch;
  }

  .reading-list-item-actions {
    flex-direction: column;
  }

  .resource-actions {
    flex-direction: column;
  }

  .resource-open-link {
    margin-left: auto;
  }

  .resource-save-button,
  .resource-progress-select,
  .reading-list-status-select,
  .reading-list-remove {
    width: 100%;
  }
}
