/* Shoal & Axis: stylesheet. Palette: six colors on hue 210, defined once on :root. */

:root {
  --c-deep: #0c1f31;
  --c-tide: #225487;
  --c-slate: #445e79;
  --c-mist: #d0deec;
  --c-paper: #f2f6fa;
  --c-shoal: #98badd;

  --font-head: Futura, "Avenir Next", "Century Gothic", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --slant: clamp(1.5rem, 4.5vw, 3.5rem);
  --block: clamp(2.75rem, 6.5vw, 5.5rem);
  --wrap: 72rem;
  --radius: 2px;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background-color: var(--c-paper);
  color: var(--c-deep);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

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

main:focus-visible {
  outline: none;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0 0 0.55em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 1.1rem + 4.6vw, 4.4rem);
}

h2 {
  font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--c-tide);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.band--deep :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--c-shoal);
}

.band--tide :focus-visible {
  outline-color: var(--c-paper);
}

.skip-link {
  position: absolute;
  top: -120px;
  left: var(--gutter);
  z-index: 10;
  padding: 0.7rem 1rem;
  background-color: var(--c-deep);
  color: var(--c-paper);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 0.75rem;
  outline-color: var(--c-tide);
}

.wrap {
  width: min(100%, var(--wrap));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header and navigation */

.site-header {
  background-color: var(--c-paper);
  border-bottom: 1px solid var(--c-mist);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-deep);
  text-decoration: none;
}

.brand:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  border-left: 2px solid var(--c-tide);
  border-bottom: 2px solid var(--c-tide);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 1.05rem;
  height: 2px;
  background-color: var(--c-tide);
  transform-origin: 0 100%;
  transform: rotate(-42deg);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-block;
  padding-block: 0.25rem;
  font-size: 0.96rem;
  color: var(--c-deep);
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* Diagonal bands: each band is clipped on its top and bottom edges by the same slant,
   and the next band starts one slant higher so the two edges meet exactly. */

.band,
.site-footer {
  position: relative;
}

.band {
  padding-block: calc(var(--slant) + var(--block)) calc(var(--slant) + var(--block));
  clip-path: polygon(0 var(--slant), 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}

.band + .band,
.band + .site-footer {
  margin-top: calc(var(--slant) * -1);
}

.band--paper {
  background-color: var(--c-paper);
}

.band--mist {
  background-color: var(--c-mist);
}

.band--deep {
  background-color: var(--c-deep);
  color: var(--c-paper);
}

.band--tide {
  background-color: var(--c-tide);
  color: var(--c-paper);
}

.band--deep a:not(.button),
.site-footer a:not(.button) {
  color: var(--c-shoal);
}

.band--tide a:not(.button) {
  color: var(--c-paper);
}

.band--hero {
  padding-top: calc(var(--slant) + clamp(2.25rem, 5vw, 4rem));
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-tide);
}

.kicker::before {
  content: "";
  flex: none;
  width: 2.25rem;
  height: 2px;
  background-color: currentColor;
}

.band--deep .kicker {
  color: var(--c-shoal);
}

.band--tide .kicker {
  color: var(--c-paper);
}

.lead {
  max-width: 38em;
  font-size: clamp(1.1rem, 1.02rem + 0.45vw, 1.3rem);
  line-height: 1.55;
}

.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy .lead {
  margin: 1.25rem 0 0;
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 4rem;
  }
}

.hero-art {
  margin: 0;
}

.hero-svg {
  display: block;
  width: 100%;
  max-width: 32rem;
  height: auto;
  margin-inline: auto;
}

.hero-art figcaption {
  max-width: 32rem;
  margin: 0.75rem auto 0;
  font-size: 0.9rem;
  color: var(--c-shoal);
}

.band--mist .hero-art figcaption {
  color: var(--c-slate);
}

.axis-line,
.axis-tick,
.contour {
  fill: none;
}

.axis-line,
.axis-tick {
  stroke: var(--c-paper);
  stroke-width: 1.5;
}

.contour {
  stroke: var(--c-shoal);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.contour--trail {
  stroke-width: 2.2;
}

.sounding {
  fill: var(--c-paper);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.two-col {
  display: grid;
  gap: 1.25rem 3.5rem;
  margin-top: 2rem;
}

@media (min-width: 52rem) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.wrap.two-col {
  margin-top: 0;
}

.section-link {
  margin: 2.5rem 0 0;
  font-weight: 600;
}

/* Buttons */

.button {
  display: inline-block;
  max-width: 100%;
  padding: 0.85rem 1.4rem;
  border: 2px solid var(--c-tide);
  border-radius: var(--radius);
  background-color: var(--c-tide);
  color: var(--c-paper);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background-color: var(--c-deep);
  border-color: var(--c-deep);
  color: var(--c-paper);
  text-decoration: none;
}

.button--ghost {
  background-color: var(--c-paper);
  color: var(--c-tide);
}

.button--ghost:hover {
  background-color: var(--c-deep);
  color: var(--c-paper);
}

.band--deep .button--primary {
  background-color: var(--c-shoal);
  border-color: var(--c-shoal);
  color: var(--c-deep);
}

.band--deep .button--primary:hover {
  background-color: var(--c-paper);
  border-color: var(--c-paper);
  color: var(--c-deep);
}

.band--deep .button--ghost {
  background-color: var(--c-deep);
  border-color: var(--c-paper);
  color: var(--c-paper);
}

.band--deep .button--ghost:hover {
  background-color: var(--c-paper);
  border-color: var(--c-paper);
  color: var(--c-deep);
}

.band--tide .button--primary {
  background-color: var(--c-paper);
  border-color: var(--c-paper);
  color: var(--c-tide);
}

.band--tide .button--primary:hover {
  background-color: var(--c-deep);
  border-color: var(--c-deep);
  color: var(--c-paper);
}

.band--tide .button--ghost {
  background-color: var(--c-tide);
  border-color: var(--c-paper);
  color: var(--c-paper);
}

.band--tide .button--ghost:hover {
  background-color: var(--c-paper);
  border-color: var(--c-paper);
  color: var(--c-tide);
}

/* Numbered and ruled lists */

.ruled-list,
.stack-list,
.steps {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  counter-reset: item;
}

.ruled-list > li,
.stack-list > li,
.steps > li {
  counter-increment: item;
  padding: 1.5rem 0 1.75rem;
  border-top: 2px solid var(--c-deep);
}

.ruled-list > li::before,
.stack-list > li::before,
.steps > li::before {
  content: counter(item, decimal-leading-zero);
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-tide);
}

.band--deep .ruled-list > li,
.band--deep .stack-list > li,
.band--deep .steps > li {
  border-top-color: var(--c-shoal);
}

.band--deep .ruled-list > li::before,
.band--deep .stack-list > li::before,
.band--deep .steps > li::before {
  color: var(--c-shoal);
}

@media (min-width: 52rem) {
  .ruled-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 2.5rem;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 3.5rem;
  }
}

.check-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 0 0 0.75rem;
  padding-left: 1.75rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.95rem;
  height: 2px;
  background-color: var(--c-tide);
}

.band--deep .check-list li::before {
  background-color: var(--c-shoal);
}

.plain-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list a {
  text-decoration: none;
}

.plain-list a:hover {
  text-decoration: underline;
}

/* Services */

.service {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 56rem) {
  .service {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 4.5rem;
  }
}

.service-for {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--c-tide);
}

.band--deep .service-for {
  border-left-color: var(--c-shoal);
}

.service-detail h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
}

.service-detail h3:first-child {
  margin-top: 0;
}

.jump-list {
  margin-top: 2rem;
}

.jump-list ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jump-list a {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--c-tide);
  border-radius: var(--radius);
  background-color: var(--c-paper);
  color: var(--c-tide);
  font-size: 0.95rem;
  text-decoration: none;
}

.jump-list a:hover {
  background-color: var(--c-tide);
  color: var(--c-paper);
}

.notice {
  margin: 0 0 2.25rem;
  padding: 1rem 1.25rem;
  background-color: var(--c-paper);
  border-left: 4px solid var(--c-tide);
  color: var(--c-deep);
}

.notice p {
  margin: 0;
}

.fine-print {
  margin-top: 2.5rem;
  font-size: 0.95rem;
  color: var(--c-slate);
}

.band--deep .fine-print {
  color: var(--c-shoal);
}

/* Guide figures and glossary */

.figure-pair {
  display: grid;
  gap: 2.5rem;
  margin: 2.75rem 0 0;
}

@media (min-width: 52rem) {
  .figure-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
  }
}

.figure-pair figure {
  margin: 0;
}

.figure-pair svg {
  display: block;
  width: 100%;
  max-width: 26rem;
  height: auto;
}

.figure-pair figcaption {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--c-slate);
}

.guide-bar {
  fill: var(--c-tide);
}

.guide-axis {
  fill: none;
  stroke: var(--c-deep);
  stroke-width: 2;
}

.guide-label {
  fill: var(--c-slate);
  font-family: var(--font-body);
  font-size: 15px;
}

.guide-label--strong {
  fill: var(--c-deep);
  font-weight: 600;
}

.glossary {
  display: grid;
  margin: 2.5rem 0 0;
}

.glossary > div {
  padding: 1.25rem 0;
  border-top: 2px solid var(--c-shoal);
}

.glossary dt {
  margin-bottom: 0.35rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
}

.glossary dd {
  margin: 0;
}

@media (min-width: 52rem) {
  .glossary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3.5rem;
  }
}

.contact-mail {
  margin: 0 0 1.5rem;
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.2rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Chart builder */

.builder {
  display: grid;
  gap: 2rem;
}

.builder .actions {
  margin-top: 0;
}

.builder-top {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 52rem) {
  .builder-top {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.choice-group,
.value-set {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend,
.value-set legend {
  margin-bottom: 0.75rem;
  padding: 0;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
}

.choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
}

.choice-options label,
.check-field {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  cursor: pointer;
}

.check-field {
  display: flex;
}

.check-field label {
  cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--c-tide);
  cursor: pointer;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field > label,
.check-field label {
  font-weight: 600;
}

.field input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--c-deep);
  background-color: var(--c-paper);
  border: 2px solid var(--c-slate);
  border-radius: var(--radius);
}

.hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--c-slate);
}

.value-set .hint {
  margin-bottom: 0.5rem;
}

.value-row {
  display: grid;
  gap: 0.75rem 1rem;
  padding: 1rem 0 1.1rem;
  border-top: 1px solid var(--c-slate);
}

.row-name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--c-slate);
}

@media (min-width: 40rem) {
  .value-row {
    grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 11rem);
    align-items: end;
  }

  .row-name {
    padding-bottom: 0.7rem;
  }
}

.status {
  min-height: 1.6em;
  margin: 1.5rem 0 0;
  font-weight: 600;
}

.chart-figure {
  margin: 1.5rem 0 0;
}

.chart-output {
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background-color: var(--c-paper);
  border: 2px solid var(--c-slate);
  border-radius: var(--radius);
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-summary {
  margin-top: 0.9rem;
  font-size: 0.98rem;
}

.empty-state {
  margin: 0;
  padding: 3.5rem 1rem;
  text-align: center;
  color: var(--c-slate);
}

.chart-grid {
  stroke: var(--c-slate);
  stroke-width: 0.8;
  stroke-dasharray: 1 4;
}

.chart-axis {
  stroke: var(--c-deep);
  stroke-width: 1.5;
}

.chart-bar {
  fill: var(--c-tide);
}

.chart-line {
  fill: none;
  stroke: var(--c-tide);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: var(--c-tide);
  stroke: var(--c-paper);
  stroke-width: 2;
}

.chart-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  fill: var(--c-deep);
}

.chart-tick,
.chart-cat,
.chart-axis-title {
  font-family: var(--font-body);
  font-size: 14px;
  fill: var(--c-slate);
}

.chart-value {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  fill: var(--c-deep);
}

.table-wrap {
  margin-top: 2rem;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--c-paper);
}

.data-table caption {
  padding-bottom: 0.6rem;
  caption-side: top;
  text-align: left;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
}

.data-table th,
.data-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--c-slate);
}

.data-table thead th {
  border-bottom: 2px solid var(--c-deep);
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Footer */

.site-footer {
  padding: calc(var(--slant) + 3.5rem) 0 2.5rem;
  background-color: var(--c-deep);
  color: var(--c-paper);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
}

.footer-grid {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 52rem) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-brand {
  margin-bottom: 0.75rem;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer .fine {
  font-size: 0.92rem;
  color: var(--c-shoal);
}

.footer-label {
  margin-bottom: 0.6rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-shoal);
}

/* Motion: animated versions are offered only when the reader has not asked for reduced motion.
   The reduced-motion default is the static drawing shown above. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .button,
  .nav-list a,
  .jump-list a,
  .brand {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  .contour {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-contour 2.4s ease-out forwards;
  }

  .contour.d2 {
    animation-delay: 0.3s;
  }

  .contour.d3 {
    animation-delay: 0.6s;
  }

  .contour.d4 {
    animation-delay: 0.9s;
  }

  .chart-bar {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: grow-bar 0.6s ease-out both;
  }

  .chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-line 1s ease-out forwards;
  }
}

/* Reduced motion: no animation, transition or smooth scrolling. The static drawing is shown in full. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .nav-list a,
  .jump-list a,
  .brand {
    transition: none;
  }

  .contour,
  .chart-bar,
  .chart-line {
    animation: none;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transform: none;
  }
}

@keyframes draw-contour {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes grow-bar {
  from {
    transform: scaleY(0);
  }

  to {
    transform: scaleY(1);
  }
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}
