/*
 * The look of the site, which is deliberately not the look of a software company.
 *
 * A shipowner's technical superintendent has seen fifty SaaS landing pages this year and every
 * one of them was a gradient, three cards with rounded corners and a photograph of somebody
 * smiling at a laptop. This is built from what the customer's own documents look like instead: a
 * class survey report, a safe manning document, a chart legend. Hairline rules, small-caps
 * labels, figures set in a monospace, a serif that belongs on an institutional document, and
 * generous white space that is white space rather than padding.
 *
 * Three typefaces, all self-hosted: Source Serif 4 for display, because it reads as a document
 * rather than as an advertisement; Figtree for prose, because the product uses it and the site
 * and the product ought to look like the same thing; DM Mono for every number, label and caption,
 * which is what makes the page read as an instrument.
 *
 * There is no framework, no JavaScript bundle, and nothing fetched from a third party at runtime
 * — a site that promises EEA hosting and then loads fonts from Google is not telling the truth.
 */

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/SourceSerif4.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url('/fonts/Figtree-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url('/fonts/Figtree-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/DMMono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/DMMono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  /*
   * Paper and ink, not background and foreground. The paper is warm because a cold white makes
   * a long page of text feel like a form to fill in, and this page is meant to be read.
   */
  --paper: #f7f5f0;
  --paper-2: #efece5;
  --ink: #16212b;
  --ink-soft: #4b5a67;
  /*
   * Faint, and still 4.5:1.
   *
   * This was #8a97a2, which is 2.9:1 on the paper — and it is the colour of every section label,
   * every figure caption, every plate number and every line of the colophon, so it failed 528
   * times across the two sites. The value here is the lightest of the same hue that clears the
   * floor on both paper tints.
   */
  --ink-faint: #626b73;
  --rule: #d9d4c9;
  --rule-strong: #b9b2a3;

  /* The hull colour from the product's own mark, and the one signal colour beside it. */
  --navy: #1b4965;
  --navy-deep: #0f2a3d;
  --signal: #c2410c;
  --signal-soft: #f5e6dd;

  /* Borrowed from the product so a screenshot sits on the page without clashing. */
  --status-red: #b42318;
  --status-amber: #b54708;
  --status-green: #067647;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --shell: 78rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    /* The bridge at night: everything goes down, the signal stays up. */
    --paper: #0d1217;
    --paper-2: #131b22;
    --ink: #e7ecf0;
    --ink-soft: #9fb0bd;
    --ink-faint: #718593;
    --rule: #1f2a34;
    --rule-strong: #33414e;
    --navy: #9fc3dc;
    --navy-deep: #cfe2ee;
    --signal: #fb923c;
    --signal-soft: #26170f;
    --status-red: #f87171;
    --status-amber: #fbbf24;
    --status-green: #4ade80;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --paper: #0d1217;
  --paper-2: #131b22;
  --ink: #e7ecf0;
  --ink-soft: #9fb0bd;
  --ink-faint: #718593;
  --rule: #1f2a34;
  --rule-strong: #33414e;
  --navy: #9fc3dc;
  --navy-deep: #cfe2ee;
  --signal: #fb923c;
  --signal-soft: #26170f;
  --status-red: #f87171;
  --status-amber: #fbbf24;
  --status-green: #4ade80;
  color-scheme: dark;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Figtree, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- the shell ------------------------------------------------------------------------------ */

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/*
 * A thin top rule rather than a floating pill. It does not follow the reader down the page: a
 * sticky bar on a document is a bar that covers the document.
 */
.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead__in {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /* Wider than the gap between the links themselves, so the switch reads as a separate control. */
  gap: 0.9rem 2.5rem;
  padding-block: 1.1rem;
}

/* The links take the space between the wordmark and the language switch. */
.masthead nav {
  margin-left: auto;
}

/*
 * On a phone: the wordmark and the language switch share the first row, the links take the
 * second. Anything narrower than this and the links wrap under a wordmark that then sits
 * vertically centred against a three-line block, which looks like a mistake.
 */
@media (max-width: 46rem) {
  .masthead__in .wordmark {
    order: 1;
    margin-right: auto;
  }

  .masthead__in .signin {
    order: 2;
  }

  .masthead__in .langswitch {
    order: 3;
  }

  .masthead nav {
    order: 4;
    width: 100%;
    margin-left: 0;
    gap: 0.4rem 1.1rem;
  }
}

/*
 * The lockup carries the name, so nothing in the masthead link is text any more. The box is
 * declared in the markup too, so the header has its height before the image arrives and the
 * navigation under it never jumps.
 */
.wordmark {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.wordmark img {
  display: block;
  width: 168px;
  /* Auto, so the artwork's own ratio wins over the rounded box declared in the markup. */
  height: auto;
}

/* A narrow phone already gives the masthead three rows; the lockup gives back some of the first. */
@media (max-width: 30rem) {
  .wordmark img {
    width: 120px;
  }
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  flex-wrap: wrap;
}

.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
}

.masthead nav a:hover,
.masthead nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/*
 * The way in. Bordered rather than plain, because it is the one item in the masthead that leaves
 * this site, and a customer scanning for it should find it without reading the other five.
 */
.signin {
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  white-space: nowrap;
}

.signin:hover,
.signin:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.langswitch {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  overflow: hidden;
}

.langswitch a {
  padding: 0.25rem 0.55rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.langswitch a[aria-current='true'] {
  background: var(--ink);
  color: var(--paper);
}

/* --- type ----------------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

p {
  margin: 0 0 1.1em;
  max-width: var(--measure);
}

a {
  color: var(--navy);
}

/*
 * The small-caps label above a section. It is the single most characteristic mark on the page and
 * it is borrowed straight from a survey report: a numbered, spaced-out heading that tells you
 * where in the document you are.
 */
.label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.4rem;
}

.label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.lede {
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 40rem;
}

.mono {
  font-family: 'DM Mono', ui-monospace, monospace;
}

/* --- sections ------------------------------------------------------------------------------- */

section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  border-top: 1px solid var(--rule);
}

section:first-of-type {
  border-top: 0;
}

.hero {
  padding-block: clamp(3.5rem, 9vw, 8rem) clamp(2.5rem, 6vw, 5rem);
  border-top: 0;
}

.hero h1 {
  max-width: 18ch;
}

.hero .lede {
  margin-top: 1.6rem;
}

/*
 * The readout under the hero. Four facts, hairline-separated, set in the monospace — the visual
 * equivalent of a instrument panel, and the thing that tells a technical reader within two
 * seconds that somebody who knows the domain built this.
 */
.readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.readout > div {
  background: var(--paper);
  padding: 1.1rem 1.2rem;
}

.readout dt {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.45rem;
}

.readout dd {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.1;
}

.readout dd small {
  display: block;
  font-family: Figtree, sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* --- the editorial two-column ---------------------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    align-items: start;
  }

  .split--wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
}

.split__aside h2 {
  margin-bottom: 0.9rem;
}

.split__aside p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* --- plates (screenshots) --------------------------------------------------------------------- */

/*
 * A screenshot is presented as a plate in a manual: numbered, captioned, bordered with a hairline
 * and given no drop shadow at all. A floating card with a soft shadow is the SaaS convention and
 * it makes a real screenshot look like a stock illustration.
 */
figure {
  margin: 0;
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
}

.plate figcaption {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-top: 0.7rem;
  display: flex;
  gap: 0.7rem;
}

.plate figcaption b {
  color: var(--ink-soft);
  font-weight: 500;
}

/* --- the module index ------------------------------------------------------------------------- */

/*
 * The hairlines are drawn by the cells, not by a 1px gap over a coloured background.
 *
 * Nineteen modules never divide evenly into a responsive column count, and with the gap trick the
 * leftover slot in the last row shows up as a grey rectangle — a hole in the page that reads as a
 * missing card. Borders on the cells mean an incomplete last row simply ends.
 */
.modules {
  display: grid;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}

.module {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  padding: 1.5rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  transition: background 120ms ease;
}

.module:hover,
.module:focus-visible {
  background: var(--paper-2);
}

.module__no {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

/* The card's name, whichever level the page needs it to be. */
.module h2,
.module h3 {
  font-size: 1.15rem;
}

.module p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
  max-width: none;
}

.module__cite {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--signal);
  margin-top: auto;
  padding-top: 0.7rem;
}

/* --- the citation block ------------------------------------------------------------------------ */

/*
 * What a module is for, in the regulator's own words and reference. This is the detail that
 * cannot be faked: a page that cites "forskrift 2007-06-26-705 § 15" to a Norwegian superintendent
 * is a page written by somebody who has read it.
 */
.cite {
  border-left: 2px solid var(--signal);
  padding: 0.2rem 0 0.2rem 1.1rem;
  margin: 0 0 1.6rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.cite b {
  display: block;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* --- lists ------------------------------------------------------------------------------------ */

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

.ticks li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.99rem;
}

.ticks li::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.52rem;
  border: 1px solid var(--navy);
  background: transparent;
}

.ticks li b {
  font-weight: 600;
}

/* A plain definition run: term in mono, answer in prose. Used for specs and for the FAQ. */
.defs {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

.defs > div {
  display: grid;
  gap: 0.2rem 2rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .defs > div {
    grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  }
}

.defs dt {
  font-weight: 600;
}

.defs dd {
  margin: 0;
  color: var(--ink-soft);
}

.defs dd p:last-child {
  margin-bottom: 0;
}

/* --- pricing ---------------------------------------------------------------------------------- */

.price {
  border: 1px solid var(--rule-strong);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  display: grid;
  gap: 1.1rem;
  align-content: start;
  background: var(--paper);
}

.price--lead {
  border-color: var(--navy);
  border-width: 2px;
}

.price__amount {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1;
}

.price__amount span {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  display: block;
  margin-top: 0.5rem;
  font-weight: 400;
}

.grid-2 {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: 1fr;
}

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

/* --- buttons ---------------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.3rem;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  border-radius: 2px;
  transition:
    background 120ms ease,
    color 120ms ease;
}

.btn:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn--ghost:hover {
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

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

footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 4rem) 3rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footcols {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin-bottom: 2.5rem;
}

/* Sized like a label, not like a heading — the level is for the reader, not for the look. */
.footcols h2 {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin: 0 0 0.9rem;
}

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

.footcols a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footcols a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.colophon {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* --- utilities --------------------------------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 2px;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2,
.prose h3 {
  margin-top: 2.2em;
}

.prose ul,
.prose ol {
  max-width: var(--measure);
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.4em;
}

.note {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.1rem 1.3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

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

@media print {
  .masthead nav,
  .langswitch,
  .actions {
    display: none;
  }
}
