/* Idle Format — shared stylesheet. Midnight admiralty chart.
   No web fonts, no external requests, no image files. */

:root {
  --bg: #0f1b2d;
  --text: #dfe8f2;
  --accent: #4f9dd9;
  --accent-2: #c2a14d;
  --card: #16273d;
  --rule: rgba(194, 161, 77, 0.4);
  --display: "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  --body: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  --col: 620px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--accent-2);
  border-radius: 2px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.masthead-inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.01em;
}
.brand:hover .brand-name { text-decoration: underline; }
.rose { width: 26px; height: 26px; flex: 0 0 26px; }

.nav-toggle {
  margin-left: auto;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 11px;
  cursor: pointer;
}
.nav-toggle:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent-2); }

@media (max-width: 620px) {
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    padding: 6px 20px 14px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px dashed var(--rule); }
}
@media (min-width: 621px) {
  .nav-toggle { display: none; }
}

/* ---------- hero with chart grid ---------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--rule);
  padding: 46px 20px 34px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(to right, var(--accent) 1px, transparent 1px),
    linear-gradient(to bottom, var(--accent) 1px, transparent 1px),
    linear-gradient(to right, var(--accent-2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--accent-2) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px, 140px 140px, 140px 140px;
}
.hero > * { position: relative; }
.hero-inner { max-width: var(--col); margin: 0 auto; }

/* ---------- layout ---------- */

main { display: block; }

.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 34px 20px 60px;
}

.page-head {
  max-width: var(--col);
  margin: 0 auto;
  padding: 40px 20px 0;
}

/* ---------- typography ---------- */

h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.3;
  margin: 0 0 18px;
  letter-spacing: 0.005em;
}
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.35;
  margin: 42px 0 12px;
}
h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  margin: 30px 0 8px;
}
h4 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 16px;
  margin: 22px 0 6px;
}
p { margin: 0 0 18px; }
a { color: var(--accent); }
a:hover { color: var(--text); }

.lede { font-size: 18.5px; }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 10px;
}

.step-indicator {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 4px 9px;
  display: inline-block;
  margin: 0 0 14px;
}

ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin: 0 0 8px; }

/* ---------- dividers ---------- */

.route {
  border: 0;
  border-top: 2px dashed var(--rule);
  margin: 40px 0;
}

.glyph-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 44px 0;
  color: var(--accent-2);
}
.glyph-rule::before, .glyph-rule::after {
  content: "";
  flex: 1;
  border-top: 2px dashed var(--rule);
}
.anchor { width: 20px; height: 20px; flex: 0 0 20px; }

/* ---------- panels ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 20px 22px;
  margin: 26px 0;
}
.panel > :last-child { margin-bottom: 0; }
.panel h2, .panel h3 { margin-top: 0; }

.disclosure {
  background: var(--card);
  border: 1px solid var(--accent-2);
  border-left: 3px solid var(--accent-2);
  border-radius: 2px;
  padding: 18px 20px;
  margin: 26px 0;
  font-size: 17px;
}
.disclosure > :last-child { margin-bottom: 0; }
.disclosure .kicker { margin-bottom: 6px; }

.aside-note {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 16px;
  margin: 26px 0;
  font-size: 16.5px;
}
.aside-note > :last-child { margin-bottom: 0; }

.link-note {
  font-size: 14.5px;
  font-family: var(--mono);
  line-height: 1.6;
  color: var(--text);
  margin: 6px 0 18px;
}

/* ---------- checklists ---------- */

.checklist {
  list-style: none;
  padding-left: 0;
  margin: 18px 0 24px;
}
.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 15px;
  height: 15px;
  border: 1px solid var(--accent-2);
  border-radius: 2px;
}

.steps-list { counter-reset: s; list-style: none; padding-left: 0; }
.steps-list li {
  counter-increment: s;
  position: relative;
  padding-left: 40px;
  margin-bottom: 16px;
}
.steps-list li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1px 5px;
}

.contents {
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 16px 20px;
  margin: 0 0 32px;
}
.contents h2 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 8px;
}
.contents ol { margin-bottom: 0; }

/* ---------- tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: 15.5px;
}
caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding-bottom: 8px;
}
th, td {
  border: 1px solid var(--rule);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}
th { font-weight: 600; background: var(--card); }

dl { margin: 18px 0; }
dt { font-weight: 600; margin-top: 14px; }
dd { margin: 4px 0 0; padding-left: 0; }

/* ---------- pagination ---------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  margin-top: 44px;
  font-size: 15.5px;
}
.pager span { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); }

.printbtn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent-2);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
}
.printbtn:hover { color: var(--accent-2); }

/* ---------- depth soundings ---------- */

.soundings {
  position: fixed;
  left: 18px;
  top: 120px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 2.4;
  color: var(--accent-2);
  opacity: 0.45;
  display: none;
  pointer-events: none;
  user-select: none;
}
@media (min-width: 1080px) {
  .soundings { display: block; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--card);
  padding: 30px 20px 40px;
  font-size: 15px;
  line-height: 1.7;
}
.footer-inner { max-width: var(--col); margin: 0 auto; }
.footer-inner address {
  font-style: normal;
  margin: 0 0 14px;
}
.footer-inner .pubname {
  font-family: var(--display);
  font-size: 18px;
}
.footer-links { margin: 0 0 14px; }
.footer-links a { white-space: nowrap; }
.footer-notice { font-size: 14px; margin: 0 0 12px; }
.footer-reviewed { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--accent-2); margin: 0; }

/* ---------- print ---------- */

@media print {
  :root { --text: #111; }
  body { background: #fff; color: #111; font-size: 12pt; line-height: 1.5; }
  .masthead, .soundings, .printbtn, .nav-toggle, .pager, .site-footer, .hero::before { display: none !important; }
  .wrap, .page-head, .hero-inner { max-width: none; padding: 0; }
  a { color: #111; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .panel, .disclosure, .contents { border: 1px solid #999; background: #fff; }
  .checklist li::before { border: 1px solid #111; }
  h1, h2, h3 { color: #111; page-break-after: avoid; }
  .checklist, table, .panel { page-break-inside: avoid; }
  .kicker, .step-indicator, caption, .footer-reviewed { color: #444; }
  .print-only { display: block !important; }
}

.print-only { display: none; }

.nowrap { white-space: nowrap; }
