/* Shoreheld console: the sign-up / key page, styled with the product website's "Nautical Chart" design
   system (Influence-Alpha/compute-website: DESIGN.md, src/styles/tokens.css, base.css, codeblock.css).
   One light theme; no shadows, gradients, cards or icons; magenta only for the primary action and the
   node in the mark. Fonts are self-hosted (OFL-1.1, Fontsource), as on the website. */

@font-face {
  font-family: "Besley Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("/static/console/fonts/besley-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Atkinson Hyperlegible Next Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/static/console/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/static/console/fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --paper: oklch(0.985 0.006 230);
  --water: oklch(0.93 0.035 225);
  --land: oklch(0.91 0.075 95);
  --ink: oklch(0.24 0.04 250);
  --ink-2: oklch(0.42 0.035 250);
  --line: oklch(0.8 0.03 240);
  --accent: oklch(0.52 0.2 350);
  --accent-strong: oklch(0.44 0.18 350);
  --on-accent: oklch(0.99 0.005 350);
  --deep: oklch(0.22 0.045 250);
  --on-deep: oklch(0.95 0.015 230);
  --on-deep-2: oklch(0.78 0.04 230);
  --deep-line: oklch(0.38 0.05 250);
  --mark-water: oklch(0.62 0.11 230);

  --font-display: "Besley Variable", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next Variable", Verdana, sans-serif;
  --font-code: "Atkinson Hyperlegible Mono Variable", ui-monospace, Menlo, monospace;
  --text-s: 0.875rem;
  --text-m: 1.0625rem;
  --text-l: 1.375rem;
  --text-xl: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --text-2xl: clamp(2.5rem, 1.5rem + 4.5vw, 4.25rem);
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-6: 1.5rem;
  --s-8: 2rem; --s-12: 3rem; --s-16: 4rem; --s-24: 6rem;
  --radius: 4px;
  --wrap: 72rem;
  --measure: 36em;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--ink-2) var(--paper); accent-color: var(--accent); caret-color: var(--accent); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--text-m); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: var(--font-display); margin: 0; text-wrap: balance; color: inherit; }
h1 { font-size: var(--text-2xl); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin-block-end: var(--s-6); }
h2 { font-size: var(--text-xl); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin-block-end: var(--s-4); }
p { margin: 0 0 var(--s-4); max-width: var(--measure); text-wrap: pretty; }
.lede { font-size: var(--text-l); line-height: 1.45; max-width: 46ch; }
.muted { color: var(--ink-2); }

a { color: var(--ink); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
    transition: text-decoration-thickness 150ms var(--ease); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--land); color: var(--ink); }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.page-head { padding-block: var(--s-16) var(--s-12); }
@media (min-width: 768px) { .page-head { padding-block: var(--s-24) var(--s-16); } }
.page-head .lede { margin-block-end: 0; }
.content { padding-block-end: var(--s-24); }
.content .section { max-width: 52rem; }
.section + .section { margin-block-start: var(--s-16); }

.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 10; padding: var(--s-2) var(--s-4);
        background: var(--paper); color: var(--ink); font-weight: 600; }
.skip:focus { top: var(--s-4); }

/* Header, as on the website: logo left, links right, hairline below */
.site-header { border-block-end: 1px solid var(--line); background: var(--paper); }
.site-header__row { display: flex; align-items: center; gap: var(--s-6); min-height: 4.5rem; }
.site-nav { margin-inline-start: auto; }
.site-nav ul { display: flex; gap: var(--s-6); list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration-line: underline; text-decoration-thickness: 2px; }
@media (max-width: 640px) { .site-nav .wide { display: none; } }

.site-footer { border-block-start: 2px solid var(--ink); padding-block: var(--s-12) var(--s-8); }
.site-footer p { margin: var(--s-2) 0 0; }
.site-footer__grid { display: grid; gap: var(--s-8); }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1fr 2fr; } }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--s-1) var(--s-6); }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__legal { margin-block-start: var(--s-8); font-size: var(--text-s); }
caption { caption-side: top; text-align: left; font-size: var(--text-s); padding-block-end: var(--s-2); }

.logo { display: inline-flex; align-items: flex-end; gap: 0.6rem; min-height: 44px; padding-block: var(--s-2);
        text-decoration: none; color: var(--ink); }
.logo__mark { width: 1.75rem; height: 1.4rem; flex: none; }
.logo__land { fill: currentColor; }
.logo__word { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; line-height: 0.82; letter-spacing: -0.01em; }

/* Status line: ink text behind a heavy ink rule, never a coloured box */
.status { border-inline-start: 3px solid var(--ink); padding: var(--s-2) var(--s-4); margin-block: 0 var(--s-6); max-width: var(--measure); font-weight: 600; }

/* Form: bounded by a 2px ink rule above, not a box */
.form { display: grid; gap: var(--s-4); max-width: 30rem; padding-block-start: var(--s-6); border-block-start: 2px solid var(--ink); }
.field { display: grid; gap: var(--s-1); }
.field label { font-weight: 600; font-size: var(--text-s); }
.field input {
  min-height: 44px; width: 100%; padding: 0 var(--s-3); font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius);
}
.field input:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.form .button { justify-self: start; margin-block-start: var(--s-2); }
.form + p { margin-block-start: var(--s-6); }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--s-6);
  background: var(--accent); color: var(--on-accent); font-family: var(--font-body); font-size: var(--text-m);
  font-weight: 600; line-height: 1.2; text-decoration: none; border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background-color 150ms var(--ease);
}
.button:hover { background: var(--accent-strong); }

/* Two columns from 960px: form beside the terms, as the website splits copy beside code */
@media (min-width: 960px) {
  .split { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: var(--s-16); align-items: start; }
  .split .section + .section { margin-block-start: 0; }
}

/* Tide table */
.table { width: 100%; max-width: 44rem; border-collapse: collapse; font-variant-numeric: tabular-nums; text-align: left; margin-block: var(--s-4) var(--s-6); }
.table th, .table td { border-block-end: 1px solid var(--line); padding: var(--s-3) var(--s-4) var(--s-3) 0; vertical-align: top; }
.table tbody tr:first-child th, .table tbody tr:first-child td { border-block-start: 2px solid var(--ink); }
.table tbody th { font-weight: 600; width: 45%; }

/* Code: monospace only in code */
pre, code { font-family: var(--font-code); font-size: var(--text-s); line-height: 1.6; }
pre { overflow-x: auto; margin: 0; padding: var(--s-6); tab-size: 2; }
:not(pre) > code { font-size: 0.9em; overflow-wrap: anywhere; }

.codeblock { background: var(--deep); color: var(--on-deep); border-radius: var(--radius); margin-block: var(--s-6); min-width: 0; }
.codeblock__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
                  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-6); border-block-end: 1px solid var(--deep-line); }
.codeblock__label { color: var(--on-deep-2); font-size: var(--text-s); }
.codeblock pre { color: var(--on-deep); }
.codeblock .copy {
  min-height: 44px; min-width: 5.5rem; padding: 0 var(--s-4); background: transparent; color: var(--on-deep);
  border: 1px solid var(--on-deep-2); border-radius: var(--radius); font: 600 var(--text-s) / 1 var(--font-body);
  cursor: pointer; transition: background-color 150ms var(--ease);
}
.codeblock .copy:hover { background: var(--deep-line); }
.codeblock .copy:focus-visible { outline-color: var(--on-deep); }
.codeblock--key pre { overflow-wrap: anywhere; white-space: pre-wrap; }
.codeblock--key code { font-size: 1.0625rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
