:root {
  --ink: #2c2416;
  --ink-soft: #5c5346;
  --paper: #f6efe2;
  --paper-deep: #efe4d0;
  --rule: #d4c4a8;
  --green: #3d5a3a;
  --green-deep: #2b3f29;
  --gold: #b08a4a;
  --terra: #c45c2a;
  --white: #fbf7ef;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background:
    radial-gradient(1200px 800px at 50% 10%, #3a3228 0%, #1c1814 55%, #100e0c 100%);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

#gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #161310;
  color: var(--paper);
  text-align: center;
  padding: 32px;
}

#gate.hidden { display: none; }

#gate .inner { max-width: 420px; }

#gate h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 42px;
  letter-spacing: 0.02em;
}

#gate p {
  margin: 14px 0 28px;
  color: #d8cbb4;
  font-size: 16px;
  line-height: 1.5;
}

#gate button, .nav button, .mute {
  font-family: "Source Sans 3", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid #c9b48a;
  background: transparent;
  color: #f3e7d0;
  padding: 12px 22px;
  cursor: pointer;
  font-size: 12px;
}

#gate button:hover { background: #c9b48a; color: #1c1814; }

.chrome {
  width: min(1100px, 96vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #d8cbb4;
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.chrome .nav { display: flex; gap: 8px; align-items: center; }
.chrome button { padding: 8px 12px; }
.chrome button:hover { background: rgba(201,180,138,.2); }

#book {
  width: min(1100px, 96vw);
  height: min(720px, 78vh);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

.page {
  background: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(90,60,20,.06), transparent 28px),
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.35), transparent 50%);
  color: var(--ink);
  overflow: hidden;
}

.page-inner {
  height: 100%;
  padding: 42px 46px 36px;
  display: flex;
  flex-direction: column;
}

.cover {
  background:
    linear-gradient(180deg, #f3ead8 0%, #e8d7b8 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.cover .ornament {
  color: var(--green);
  letter-spacing: .4em;
  font-size: 12px;
}

.cover h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 54px;
  font-weight: 500;
  line-height: 0.95;
  color: var(--green-deep);
}

.cover .sub {
  margin-top: 16px;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 18px;
}

.cover .author {
  font-family: "Source Sans 3", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
}

.kicker {
  font-family: "Source Sans 3", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--green);
  margin-bottom: 10px;
}

h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
  color: var(--green-deep);
}

.lede {
  margin: 14px 0 18px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}

p { font-size: 15.5px; line-height: 1.6; margin-bottom: 12px; }

ol, ul { margin: 8px 0 14px 18px; font-size: 15.5px; line-height: 1.55; }
li { margin-bottom: 8px; }

.step-num {
  font-family: "Cormorant Garamond", serif;
  font-size: 64px;
  color: var(--green);
  line-height: 0.8;
  opacity: 0.85;
}

.practice {
  border-top: 1px solid var(--rule);
  margin-top: auto;
  padding-top: 14px;
}

.box {
  border: 1px solid var(--rule);
  background: rgba(255,255,255,.35);
  padding: 12px 14px;
  margin: 10px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0 14px;
  font-family: "Source Sans 3", sans-serif;
}

th {
  background: var(--green-deep);
  color: #f6efe2;
  font-weight: 600;
  text-align: left;
  padding: 7px 8px;
}

td {
  border: 1px solid var(--rule);
  padding: 8px;
  height: 28px;
}

.write-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0 14px;
  font-size: 16px;
}

.write-line span:first-child {
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
  min-width: 72px;
}

.write-line .rule {
  flex: 1;
  border-bottom: 1px solid var(--ink);
  min-height: 22px;
}

.action-table th.done,
.action-table td.done {
  width: 52px;
  text-align: center;
}

.action-table td {
  height: 42px;
}

.footer-line {
  margin-top: auto;
  font-style: italic;
  color: var(--terra);
  font-size: 16px;
}

.small {
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.spread-note {
  color: var(--terra);
  font-style: italic;
}

@media (max-width: 820px) {
  .page-inner { padding: 28px 22px 22px; }
  .cover h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  .step-num { font-size: 44px; }
}
