:root {
  --navy: #01204c;
  --gold: #fcce3f;
  --white: #ffffff;
  --ink: #01204c;
  --muted-white: rgba(255, 255, 255, 0.8);
  --line: rgba(255, 255, 255, 0.24);
  --focus: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--navy);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--white);
  background: var(--navy);
  font-family: "Lora", Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.button,
.eyebrow,
label,
th,
.count-label,
.pagination,
.site-footer {
  font-family: "Poppins", Arial, sans-serif;
}

h1,
h2 {
  line-height: 1.08;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-page {
  min-height: 100vh;
  padding: 40px max(30px, calc((100vw - 1260px) / 2)) 24px;
  background: var(--navy);
}

.homepage-page {
  display: flex;
  justify-content: center;
  align-items: center;
}

.temporary-home {
  width: min(100%, 820px);
  padding: 32px 0;
  text-align: center;
}

.temporary-home h1 {
  margin-bottom: 24px;
  font-size: clamp(2rem, 5.6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.temporary-home .author {
  margin-bottom: 32px;
  font-size: 1.125rem;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 640px);
  justify-content: center;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  min-height: calc(100vh - 112px);
}

.book-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  isolation: isolate;
  align-self: center;
}

.book-visual::before {
  content: "";
  position: absolute;
  inset: 12% 4%;
  z-index: -1;
  background: radial-gradient(
    ellipse,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05) 48%,
    transparent 72%
  );
  filter: blur(28px);
  pointer-events: none;
}

.book-cover {
  width: min(100%, 440px);
  height: auto;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(14px 20px 20px rgba(0, 0, 0, 0.28));
}

.book-content {
  max-width: 640px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  line-height: 1.2;
}

.book-content h1 {
  max-width: 640px;
  margin-bottom: 13px;
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.book-content h1 span {
  color: var(--gold);
}

.subtitle {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  font-weight: 600;
  line-height: 1.45;
}

.author {
  margin-bottom: 18px;
  color: var(--muted-white);
  font-size: 1rem;
}

.content-rule {
  width: 54px;
  height: 2px;
  margin-bottom: 20px;
  background: var(--gold);
}

.description,
.resources {
  max-width: 640px;
  color: var(--muted-white);
  font-size: 1rem;
}

.description {
  margin-bottom: 12px;
}

.resources {
  margin-bottom: 30px;
}

.companion-resources {
  max-width: 100%;
  margin: 24px 0 0;
  padding: 0 0 24px;
}

.companion-resources h2 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.resources-intro {
  margin-bottom: 12px;
  color: var(--muted-white);
  font-size: 0.9375rem;
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 8px 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.resource-item {
  padding: 0;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.55;
}

.resource-item h3 {
  display: inline;
  color: var(--gold);
  font-size: 0.875rem;
  line-height: inherit;
  margin: 0;
  font-weight: 600;
}

.resource-item h3::after {
  content: ": ";
}

.resource-item p {
  display: inline;
  color: var(--muted-white);
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

.resources-video {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 14px;
  margin: 18px 0 0;
  color: var(--white);
  font-size: 0.875rem;
}

.waitlist-panel {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.waitlist-panel h2 {
  max-width: 430px;
  margin-bottom: 19px;
  color: var(--white);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

#waitlist-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.field-group {
  min-width: 0;
}

.field-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  line-height: 1.2;
  text-transform: uppercase;
}

.field-group input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 2px;
  font-family: "Lora", Georgia, serif;
  font-size: 16px;
  line-height: 1.35;
}

.field-group input:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(252, 206, 63, 0.38);
  outline-offset: 2px;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.consent {
  grid-column: 1 / -1;
  margin: 1px 0 1px;
  color: var(--muted-white);
  font-size: 0.75rem;
  line-height: 1.55;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 19px;
  border: 2px solid transparent;
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.button-gold {
  color: var(--navy);
  background: var(--gold);
}

.button-gold:hover:not(:disabled) {
  color: var(--navy);
  background: var(--white);
}

.button-outline {
  color: var(--white);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.72);
}

.button-outline:hover:not(:disabled) {
  color: var(--navy);
  background: var(--white);
  border-color: var(--white);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

#waitlist-form .button {
  justify-self: start;
  grid-column: 1 / -1;
}

.form-status {
  display: none;
  grid-column: 1 / -1;
  margin: 1px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.form-status:not(:empty) {
  display: block;
}

.form-status.is-success {
  color: var(--gold);
}

.form-status.is-error {
  color: var(--white);
}

.site-footer {
  padding-top: 24px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
}

.private-page {
  min-height: 100vh;
  color: var(--white);
  background: var(--navy);
}

.login-page,
.not-found-page {
  display: grid;
  place-items: center;
  padding: 30px;
}

.login-shell {
  width: min(100%, 440px);
}

.private-card,
.table-card,
.dashboard-summary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.private-card {
  padding: clamp(30px, 6vw, 50px);
}

.private-card h1,
.dashboard-header h1,
.not-found-shell h1 {
  margin-bottom: 26px;
  color: var(--white);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

#login-form {
  display: grid;
  gap: 18px;
}

#login-form .button {
  justify-self: start;
}

.dashboard-page {
  padding: clamp(30px, 5vw, 64px) max(24px, calc((100vw - 1180px) / 2));
}

.dashboard-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-header h1 {
  margin-bottom: 0;
}

.dashboard-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 23px 26px;
  margin-bottom: 22px;
}

.count-label {
  margin: 0;
  color: var(--muted-white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signup-count {
  margin: 0;
  color: var(--gold);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.export-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.table-card {
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  color: var(--white);
  text-align: left;
}

th,
td {
  padding: 17px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

th {
  color: var(--gold);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

td {
  font-size: 0.92rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  color: var(--muted-white);
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.pagination-link {
  color: var(--gold);
  text-decoration: none;
}

.pagination-link:hover {
  color: var(--white);
}

.pagination-link.is-disabled {
  color: rgba(255, 255, 255, 0.38);
}

.page-indicator {
  color: var(--muted-white);
}

.not-found-shell {
  text-align: center;
}

.not-found-shell h1 {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .site-page {
    padding-top: 38px;
  }

  .book-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    min-height: 0;
  }

  .book-cover {
    width: min(100%, 260px);
  }

  .book-content {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .site-page {
    padding: 26px 22px 18px;
  }

  .book-layout {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 19px;
  }

  .book-visual {
    justify-content: center;
    position: static;
    align-self: auto;
  }

  .book-cover {
    width: 180px;
  }

  .companion-resources {
    margin-top: 20px;
    padding-bottom: 20px;
  }

  .companion-resources h2 {
    font-size: 1.2rem;
  }

  .resources-intro,
  .resources-video {
    font-size: 0.9375rem;
  }

  .resource-item {
    padding: 0;
  }

  .book-content {
    max-width: none;
  }

  .waitlist-panel {
    margin-bottom: 20px;
  }

  .eyebrow {
    margin-bottom: 7px;
    font-size: 0.68rem;
  }

  .book-content h1 {
    margin-bottom: 7px;
    font-size: 1.875rem;
    letter-spacing: -0.04em;
  }

  .subtitle {
    margin-bottom: 5px;
    font-size: 1rem;
  }

  .author {
    margin-bottom: 13px;
    font-size: 0.9rem;
  }

  .content-rule {
    width: 39px;
    margin-bottom: 13px;
  }

  .description,
  .resources {
    font-size: 0.9rem;
    line-height: 1.52;
  }

  .description {
    margin-bottom: 8px;
  }

  .resources {
    margin-bottom: 17px;
  }

  .waitlist-panel {
    padding-top: 17px;
  }

  .waitlist-panel h2 {
    margin-bottom: 13px;
    font-size: 1.16rem;
  }

  #waitlist-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .consent,
  #waitlist-form .button,
  .form-status {
    grid-column: auto;
  }

  .consent {
    margin-top: 1px;
    font-size: 0.8125rem;
  }

  #waitlist-form .button {
    width: 100%;
    min-height: 46px;
    margin-top: 1px;
  }

  .site-footer {
    padding-top: 18px;
    font-size: 0.61rem;
  }

  .login-page,
  .not-found-page {
    padding: 20px;
  }

  .dashboard-page {
    padding: 24px 16px;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
  }

  .dashboard-header .button {
    width: 100%;
  }

  .dashboard-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
    padding: 19px;
  }

  .export-links {
    grid-column: 1 / -1;
    margin: 6px 0 0;
  }

  .export-links .button {
    flex: 1 1 160px;
  }

  th,
  td {
    padding: 14px 16px;
  }

  .pagination {
    gap: 10px;
    padding: 15px 16px;
    font-size: 0.68rem;
  }
}

@media (max-width: 520px) {
  .resource-list {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
