/* ==========================================================================
   DreamDives / SharkPoint — "depth chart" theme
   Evolved from the original 2002-2009 site: cyan #11a8dd on white, grey body
   copy, pale blue panels. Modernised into a deep-ocean navy + cyan system
   with a nautical instrument feel (condensed headings, monospace labels,
   depth-scale rules).

   NOTE: content is never hidden waiting on JavaScript. Every entrance
   animation below ends in the visible state and uses animation-fill-mode:both,
   so an animation that never runs still leaves content on screen.
   ========================================================================== */

:root {
  --ink-900: #061622;
  --ink-800: #0a1f2e;
  --ink-700: #123449;
  --ink-600: #1c4763;

  --cyan-600: #0b6f92;
  --cyan-500: #11a8dd;   /* the original brand colour */
  --cyan-400: #35c6f4;
  --cyan-100: #d6f0fb;

  --paper:     #ffffff;
  --paper-alt: #f2f7fa;
  --paper-deep:#e6eef4;
  --rule:      #d3e2ec;

  --text:      #1e3340;
  --text-mute: #5c7383;
  --text-inv:  #e9f4fa;

  --font-head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 3px;
  --shadow: 0 1px 2px rgba(6, 22, 34, .06), 0 8px 24px rgba(6, 22, 34, .07);
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--cyan-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--cyan-500); }

::selection { background: var(--cyan-100); color: var(--ink-800); }

.dd-skip {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--cyan-500); color: #fff; padding: .6rem 1rem; font-weight: 600;
}
.dd-skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--cyan-400); outline-offset: 2px; }

/* ---------- navbar ---------- */
.dd-nav {
  background: var(--ink-800);
  border-bottom: 1px solid rgba(53, 198, 244, .22);
  padding-top: .45rem; padding-bottom: .45rem;
}

.dd-nav .navbar-brand {
  display: flex; align-items: center; gap: .7rem;
  color: var(--text-inv); padding: .25rem 0;
}

.dd-mark {
  display: inline-block; width: 26px; height: 26px; flex: 0 0 26px;
  background:
    radial-gradient(circle at 50% 32%, var(--cyan-400) 0 4.5px, transparent 5px),
    linear-gradient(var(--cyan-500), var(--cyan-500)) 0 70% / 100% 2px no-repeat,
    linear-gradient(var(--cyan-600), var(--cyan-600)) 0 88% / 68% 2px no-repeat;
  border: 1px solid rgba(53, 198, 244, .45);
  border-radius: var(--radius);
}

.dd-word {
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
  letter-spacing: .045em; text-transform: uppercase; line-height: 1;
  color: #fff;
}

.dd-sub {
  display: block; font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-400);
  margin-top: .18rem;
}
.dd-word + .dd-sub { margin-left: 0; }
.dd-nav .navbar-brand > span:nth-child(2) { display: block; }

.dd-nav .nav-link {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em;
  font-size: 1.02rem; font-weight: 600; color: rgba(233, 244, 250, .78);
  padding: .45rem .95rem; border-bottom: 2px solid transparent;
}
.dd-nav .nav-link:hover { color: #fff; border-bottom-color: rgba(53, 198, 244, .55); }
.dd-nav .nav-link.active { color: #fff; border-bottom-color: var(--cyan-400); }

.dd-nav .navbar-toggler { border: 1px solid rgba(53, 198, 244, .5); padding: .35rem .6rem; }
.dd-nav .navbar-toggler:focus { box-shadow: none; }
.dd-burger {
  display: block; width: 22px; height: 2px; background: var(--cyan-400);
  position: relative;
}
.dd-burger::before, .dd-burger::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--cyan-400);
}
.dd-burger::before { top: -7px; }
.dd-burger::after { top: 7px; width: 15px; }

/* ---------- hero ---------- */
.dd-hero {
  position: relative;
  background-color: var(--ink-800);
  background-size: cover;
  background-position: center;
  color: var(--text-inv);
  padding: 4.5rem 0 3.25rem;
  border-bottom: 3px solid var(--cyan-500);
  overflow: hidden;
}
.dd-hero-flat {
  background-image: linear-gradient(160deg, var(--ink-800) 0%, var(--ink-700) 60%, var(--ink-600) 100%);
}

/* The hero image is a CSS background for the scrim effect; this hidden <img>
   keeps it in the HTML source for crawlers and gives it real alt text. */
.dd-hero-alt {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0;
}

.dd-crumb {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--cyan-400); margin-bottom: .9rem;
}
.dd-crumb a { color: var(--cyan-400); text-decoration: none; }
.dd-crumb a:hover { text-decoration: underline; }
.dd-crumb span { opacity: .5; margin: 0 .35rem; }

.dd-hero h1 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  letter-spacing: .015em; line-height: 1.02;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  color: #fff; margin: 0 0 .85rem; max-width: 20ch;
  text-wrap: balance;
}

.dd-hero-lede {
  font-size: 1.08rem; line-height: 1.62; max-width: 62ch;
  color: rgba(233, 244, 250, .88); margin: 0;
}

/* depth-scale motif — the site's signature element */
.dd-scale { display: flex; align-items: flex-end; gap: 6px; height: 22px; margin-top: 1.9rem; }
.dd-scale i { display: block; width: 2px; background: var(--cyan-400); opacity: .75; }
.dd-scale i:nth-child(1) { height: 22px; opacity: 1; }
.dd-scale i:nth-child(2) { height: 8px; }
.dd-scale i:nth-child(3) { height: 12px; }
.dd-scale i:nth-child(4) { height: 8px; }
.dd-scale i:nth-child(5) { height: 16px; opacity: .9; }
.dd-scale i:nth-child(6) { height: 8px; }
.dd-scale i:nth-child(7) { height: 12px; }
.dd-scale i:nth-child(8) { height: 8px; }

/* ---------- layout ---------- */
.dd-shell { padding-top: 3rem; padding-bottom: 4rem; }

.dd-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }

@media (min-width: 992px) {
  .dd-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 3.25rem; }
  .dd-layout-wide { grid-template-columns: minmax(0, 1fr); }
  .dd-layout-wide .dd-main { max-width: 74ch; margin-inline: auto; }
}

.dd-main { min-width: 0; }

/* ---------- section rail ---------- */
.dd-rail { min-width: 0; }
@media (min-width: 992px) {
  .dd-rail { position: sticky; top: 92px; align-self: start; }
}

.dd-rail-title {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-mute);
  padding-bottom: .6rem; margin-bottom: .6rem; border-bottom: 2px solid var(--cyan-500);
}

.dd-rail-list { list-style: none; padding: 0; margin: 0; }
.dd-rail-list li { margin: 0; }

.dd-rail-link {
  display: block; padding: .42rem 0 .42rem .85rem;
  border-left: 2px solid var(--rule);
  color: var(--text); text-decoration: none;
  font-size: .95rem; line-height: 1.4;
}
.dd-rail-link:hover { border-left-color: var(--cyan-400); color: var(--cyan-600); background: var(--paper-alt); }
.dd-rail-link.active { border-left-color: var(--cyan-500); color: var(--ink-800); font-weight: 700; }
.dd-rail-sub { padding-left: 1.7rem; font-size: .88rem; color: var(--text-mute); }

/* ---------- article ---------- */
.dd-article { max-width: 74ch; }

.dd-article > p:first-of-type {
  font-size: 1.16rem; line-height: 1.6; color: var(--ink-700);
}

.dd-article h2 {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em; font-size: clamp(1.45rem, 2.7vw, 1.85rem);
  color: var(--ink-800); margin: 2.75rem 0 .9rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--rule);
  position: relative;
}
.dd-article h2::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 3.5rem; height: 3px;
  background: var(--cyan-500);
}

.dd-article h3 {
  font-family: var(--font-head); font-weight: 600; letter-spacing: .02em;
  font-size: 1.28rem; color: var(--ink-700); margin: 1.9rem 0 .6rem;
}

.dd-article p { margin: 0 0 1.15rem; }

.dd-article ul, .dd-article ol { margin: 0 0 1.35rem; padding-left: 0; }
.dd-article ul { list-style: none; }
.dd-article ul li {
  position: relative; padding-left: 1.5rem; margin-bottom: .55rem;
}
.dd-article ul li::before {
  content: ""; position: absolute; left: 0; top: .66em;
  width: 8px; height: 8px; background: var(--cyan-500);
  transform: rotate(45deg);
}
.dd-article ol { padding-left: 1.4rem; }
.dd-article ol li { margin-bottom: .55rem; }

.dd-article strong { color: var(--ink-800); font-weight: 700; }
.dd-article em { color: var(--ink-700); }

/* tables — instrument-panel styling */
.dd-article table {
  width: 100%; border-collapse: collapse; margin: 0 0 1.6rem;
  font-size: .96rem;
}
.dd-article thead th {
  background: var(--ink-800); color: #fff; text-align: left;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .07em;
  font-weight: 600; font-size: .95rem; padding: .6rem .8rem;
}
.dd-article tbody td { padding: .62rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.dd-article tbody tr:nth-child(even) { background: var(--paper-alt); }

/* keep wide tables inside their own scroller — the page body never scrolls sideways */
.dd-table-scroll { overflow-x: auto; margin-bottom: 1.6rem; -webkit-overflow-scrolling: touch; }
.dd-table-scroll > table { margin-bottom: 0; }

/* figures */
.dd-figure {
  margin: 2.2rem 0; border: 1px solid var(--rule); background: var(--paper-alt);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.dd-figure img { display: block; width: 100%; }
.dd-figure figcaption {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .07em;
  color: var(--text-mute); padding: .65rem .85rem; border-top: 1px solid var(--rule);
  background: var(--paper);
}

/* ---------- footer ---------- */
.dd-footer {
  background: var(--ink-900); color: rgba(233, 244, 250, .78);
  padding: 3.25rem 0 2rem; border-top: 3px solid var(--cyan-500);
  font-size: .95rem;
}

.dd-foot-brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; font-size: 1.3rem; color: #fff; margin-bottom: .8rem;
}

.dd-foot-note { color: rgba(233, 244, 250, .62); font-size: .9rem; line-height: 1.6; }

.dd-foot-title {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cyan-400); margin-bottom: .8rem;
}

.dd-foot-list { list-style: none; padding: 0; margin: 0; }
.dd-foot-list li { margin-bottom: .45rem; }
.dd-foot-list a { color: rgba(233, 244, 250, .78); text-decoration: none; }
.dd-foot-list a:hover { color: var(--cyan-400); text-decoration: underline; }

.dd-foot-rule {
  height: 1px; background: rgba(53, 198, 244, .22); margin: 2.4rem 0 1.3rem;
}

.dd-copy {
  font-size: .82rem; color: rgba(233, 244, 250, .5); margin: 0; max-width: 80ch;
}

/* ---------- entrance animation (progressive enhancement only) ----------
   These animations END visible and use fill-mode:both, so if they never run
   the content is still on screen. Nothing here is gated on JavaScript. */
@keyframes dd-rise {
  from { opacity: .001; transform: translateY(10px); }
  to   { opacity: 1;    transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .dd-hero h1, .dd-hero-lede { animation: dd-rise .5s ease-out both; }
  .dd-hero-lede { animation-delay: .07s; }
}

/* ---------- small screens ---------- */
@media (max-width: 991.98px) {
  .dd-nav .navbar-nav { padding: .6rem 0 .3rem; border-top: 1px solid rgba(53,198,244,.2); margin-top: .5rem; }
  .dd-nav .nav-link { padding: .5rem 0; border-bottom: none; border-left: 2px solid transparent; padding-left: .7rem; }
  .dd-nav .nav-link.active { border-left-color: var(--cyan-400); border-bottom-color: transparent; }
  .dd-hero { padding: 3rem 0 2.25rem; }
  .dd-shell { padding-top: 2.25rem; }
  .dd-rail { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--paper-alt); }
}

@media (max-width: 575.98px) {
  body { font-size: 1rem; }
  .dd-article > p:first-of-type { font-size: 1.08rem; }
}

/* ---------- print ---------- */
@media print {
  .dd-nav, .dd-rail, .dd-footer, .dd-skip, .dd-scale { display: none !important; }
  .dd-hero { background: none !important; color: #000; padding: 0 0 1rem; border-bottom: 2px solid #000; }
  .dd-hero h1, .dd-hero-lede { color: #000; }
  body { font-size: 11pt; }
}
