/* ETHERSEA · Operations Manual - print-grade, foldout */

.page-manual { background: var(--abyss); }
.page-manual .deck { padding: 110px 0 40px; }

.manual-shell {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
  padding: 0 24px;
}

/* A page */
.page {
  position: relative;
  aspect-ratio: 1 / 1.414;
  background: #f4f1e8;
  color: #0b1620;
  padding: 64px 72px 56px;
  box-shadow:
    0 30px 60px rgba(0,0,0,0.55),
    0 0 0 1px rgba(0,0,0,0.4);
  font-family: var(--inter);
  font-size: 12.5px;
  line-height: 1.55;
  overflow: hidden;
}
/* paper grain */
.page::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(85, 65, 30, 0.08), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(85, 65, 30, 0.06), transparent 60%);
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Rust corners */
.rust-corner {
  position: absolute;
  width: 80px; height: 80px;
  background:
    radial-gradient(circle at 20% 20%, rgba(180, 70, 25, 0.6), transparent 60%),
    radial-gradient(circle at 60% 30%, rgba(140, 50, 18, 0.4), transparent 70%);
  filter: blur(0.5px);
  pointer-events: none;
}
.rc-tl { top: -10px; left: -10px; }
.rc-tr { top: -10px; right: -10px; transform: scaleX(-1); }
.rc-bl { bottom: -10px; left: -10px; transform: scaleY(-1); }
.rc-br { bottom: -10px; right: -10px; transform: scale(-1); }

/* Folio (page number) */
.folio {
  position: absolute;
  bottom: 28px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: #5a4b30;
}
.page:nth-child(odd) .folio { right: 60px; }
.page:nth-child(even) .folio { left: 60px; }

/* Running heads */
.page-head {
  position: absolute;
  top: 28px; left: 60px; right: 60px;
  display: flex; justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: #5a4b30;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 0.5px solid #6a5b40;
}

/* Cover */
.cover {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 24px;
  background:
    radial-gradient(ellipse at 50% 30%, #e6e0c8 0%, #d8d1b3 60%, #a89c70 100%);
  padding: 56px 64px 48px;
  color: #1a1308;
}
.cover-head {
  display: flex; justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: #5a4b30;
  text-transform: uppercase;
}
.cover-mark {
  display: flex; justify-content: center;
  margin-top: 6vh;
  filter: invert(0.8) sepia(1) hue-rotate(165deg) saturate(0.6);
}
.cover-title {
  font-family: var(--captain);
  font-variant: small-caps;
  font-size: clamp(36px, 4.6vw, 56px);
  font-style: italic;
  text-align: center;
  letter-spacing: 0.04em;
  color: #0e1b27;
  margin: 12px 0 8px;
  line-height: 1.05;
}
.cover-title i { color: #0c5a78; }
.cover-sub {
  text-align: center;
  font-family: var(--captain);
  font-style: italic;
  font-size: 18px;
  color: #3a3220;
  margin: 0 0 24px;
}
.cover-foot {
  border-top: 0.5px solid #6a5b40;
  padding-top: 16px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.cover-foot .kv {
  grid-template-columns: 110px 1fr;
  gap: 4px 12px;
  font-size: 10px;
  color: #3a3220;
}
.cover-foot dt { color: #5a4b30; }
.cover-foot dd { color: #1a1308; }
.cover-foot .motto {
  font-family: var(--captain);
  font-style: italic;
  font-size: 18px;
  color: #0c5a78;
  text-align: right;
}

/* Chapter pages */
.chapter-intro, .chapter-content, .colophon, .foldout {
  background:
    radial-gradient(ellipse at 30% 0%, #fbf8ef, #f0ead7 60%, #d9cea4 100%);
}

.ch-num {
  font-size: 60px;
  letter-spacing: 0.06em;
  color: #c64619;
  line-height: 1;
  margin: 22px 0 6px;
  font-weight: 700;
  position: relative;
}
.ch-num::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  border-top: 1.4px solid #c64619;
}
.ch-title {
  font-family: var(--captain);
  font-variant: small-caps;
  font-style: italic;
  font-size: clamp(28px, 3.6vw, 44px);
  margin: 22px 0 18px;
  letter-spacing: 0.02em;
  color: #0e1b27;
  line-height: 1.05;
  max-width: 26ch;
}

.chapter-intro p, .chapter-content p, .colophon p {
  margin: 0 0 12px;
  max-width: 64ch;
  color: #1a1308;
}
.chapter-content em, .chapter-intro em, .colophon em { color: #0c5a78; font-style: italic; }
.chapter-content strong { color: #0c5a78; }

.dropcap .dc {
  float: left;
  font-family: var(--captain);
  font-size: 64px;
  line-height: 0.85;
  padding: 4px 8px 0 0;
  color: #c64619;
  font-style: italic;
}

.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
  margin-top: 12px;
}
.col-diagram { padding-top: 60px; }
.side-title {
  font-family: var(--captain);
  font-style: italic;
  font-variant: small-caps;
  font-size: 14px;
  color: #0c5a78;
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}
.bell-diagram, .vessel-mini { width: 100%; height: auto; }

.sub {
  font-family: var(--captain);
  font-variant: small-caps;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #0c5a78;
  margin: 16px 0 6px;
}

table.bells {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 10px;
  margin: 12px 0 16px;
  letter-spacing: 0.04em;
}
table.bells th, table.bells td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 0.5px solid #8c7d5a;
}
table.bells th {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #5a4b30;
  text-transform: uppercase;
  border-bottom: 1px solid #5a4b30;
}
table.bells tr.hl td {
  background: rgba(12, 90, 120, 0.08);
  color: #0c5a78;
  font-weight: 700;
}

.prose-list {
  padding-left: 18px;
  margin: 8px 0 12px;
}
.prose-list li {
  margin-bottom: 8px;
  max-width: 60ch;
}

/* Foldout */
.foldout {
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.foldout-intro { padding-bottom: 16px; }
.foldout-stage {
  display: grid;
  place-items: stretch;
  align-content: stretch;
}
.foldout-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0.6px solid #5a4b30;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  overflow: hidden;
}
.fc-thumb {
  position: relative;
  display: grid;
  place-content: center;
  text-align: center;
  height: 100%;
  padding: 40px;
  gap: 14px;
  background:
    repeating-linear-gradient(45deg, transparent 0 24px, rgba(12,90,120,0.04) 24px 25px),
    linear-gradient(180deg, #f3eed7, #d9cea4);
  transition: opacity 0.2s;
}
.fc-thumb .mono { font-size: 10px; letter-spacing: 0.3em; color: #0c5a78; }
.fc-thumb .captain {
  font-family: var(--captain);
  font-variant: small-caps;
  font-style: italic;
  font-size: 24px;
  color: #c64619;
  letter-spacing: 0.04em;
}
.fc-icon { width: 120px; margin: 0 auto; }
.foldout-card[aria-expanded="true"] .fc-thumb { opacity: 0; pointer-events: none; }

.fc-fold {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: stretch;
  background: #fbf8ef;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.95s cubic-bezier(.6, .12, .25, 1);
}
.foldout-card[aria-expanded="true"] .fc-fold {
  clip-path: inset(0 0 0 0);
}

.depth-col {
  padding: 26px 28px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}
.depth-col header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 0.5px solid #5a4b30; padding-bottom: 8px; }
.depth-col h3 {
  font-family: var(--captain);
  font-style: italic;
  font-variant: small-caps;
  font-size: 22px;
  color: #0e1b27;
  margin: 0;
  letter-spacing: 0.04em;
}
.depth-col footer {
  font-size: 9px;
  letter-spacing: 0.28em;
  color: #5a4b30;
}
.column { width: 100%; height: 100%; }

/* Colophon */
.colophon { display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; }

/* Print profile: cyan/black duotone */
@media print {
  body { background: white; }
  .bridge-bar, .depth-gauge, #ocean, #sonar-fx, #flashlight, .bridge-foot { display: none !important; }
  .deck { padding: 0; }
  .manual-shell { display: block; max-width: none; padding: 0; }
  .page {
    aspect-ratio: auto;
    width: 210mm;
    height: 297mm;
    margin: 0 auto;
    page-break-after: always;
    box-shadow: none;
    background: white !important;
    color: black;
    filter: grayscale(1) contrast(1.05);
  }
  .page * { color: black !important; }
  .ch-num, .ch-num::after, .rust-corner { color: black !important; background: black !important; }
  .ch-num::after { border-color: black !important; }
  /* duotone - turn cyan-tagged elements into the spot ink */
  .ch-title, .ch-title i, .sub, em, strong, .dropcap .dc, .side-title,
  .cover-title i, .fc-thumb .mono, table.bells tr.hl td, .depth-col h3 {
    color: #2dc8d2 !important;
  }
  .page::before { display: none; }
  .foldout {
    width: 420mm;
    height: 297mm;
  }
  .foldout-card { aria-expanded: true; }
  .fc-thumb { display: none !important; }
  .fc-fold { clip-path: none !important; position: relative !important; }
}
