/* Design tokens inherited from calculate-my-wage.emotionmedia.co.uk
   Every colour is declared twice: the hex lands first as a fallback, the
   oklch overrides it wherever oklch is supported. */

@font-face { font-family: "Plex Sans";  src: url("/static/fonts/plex-sans-var.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("/static/fonts/plex-serif-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("/static/fonts/plex-serif-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("/static/fonts/plex-serif-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono";  src: url("/static/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono";  src: url("/static/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono";  src: url("/static/fonts/plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;

  --sans: "Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Plex Serif", Georgia, serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --ink: #2b3242;
  --ink: oklch(0.28 0.03 260);
  --ink-strong: #1c2230;
  --ink-strong: oklch(0.2 0.03 260);
  --muted: #5d6472;
  --muted: oklch(0.45 0.02 260);

  --paper: #f8f6f0;
  --paper: oklch(0.975 0.008 100);
  --paper-band: #efece3;
  --paper-band: oklch(0.945 0.012 100);
  --paper-deep: #e4e0d5;
  --paper-deep: oklch(0.905 0.014 100);

  --accent: #2f8f74;
  --accent: oklch(0.55 0.12 165);
  --accent-wash: #d5eddf;
  --accent-wash: oklch(0.93 0.035 165);
  --accent-ink: #2a5c4c;
  --accent-ink: oklch(0.36 0.06 165);

  --trap: #b35a35;
  --trap: oklch(0.55 0.12 30);
  --trap-wash: #f8e6de;
  --trap-wash: oklch(0.96 0.022 30);
  --trap-ink: #7a3a22;
  --trap-ink: oklch(0.42 0.06 30);

  --link: #2f5fa8;
  --link: oklch(0.42 0.1 250);
  --focus: #1268ad;

  --rule: rgba(43, 50, 66, 0.16);
  --rule-strong: rgba(43, 50, 66, 0.32);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
p { margin: 0; }
a { color: inherit; }

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

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }

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

/* ===== homepage ===== */
/* ---------- header ---------- */
  .site-head { display: flex; align-items: center; justify-content: space-between;
               gap: 24px; padding: 22px 0; }
  .site-head-inner { position: sticky; top: 0; z-index: 5;
                     background: rgba(248, 246, 240, 0.86);
                     backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
  .wordmark { display: flex; align-items: center; gap: 11px; text-decoration: none;
              font-family: var(--serif); font-size: 20px; font-weight: 600;
              color: var(--ink-strong); letter-spacing: -0.015em; }
  /* The supplied logo mark, trimmed and alpha-cut from the source PNG.
     Aspect is 545:491, so 36x32 keeps it undistorted. */
  .mark { width: 36px; height: 32px; object-fit: contain; display: block; }
  .site-nav { display: flex; align-items: center; gap: 26px; font-size: 14.5px; }
  .site-nav a { text-decoration: none; color: var(--muted); }
  .site-nav a:hover { color: var(--ink-strong); }
  .site-nav .cta { background: var(--ink-strong); color: var(--paper);
                   padding: 9px 17px; border-radius: 999px; font-size: 13.5px; }
  .site-nav .cta:hover { background: var(--accent-ink); color: var(--paper); }

  /* ---------- hero ---------- */
  .hero { padding: 88px 0 72px; text-align: center; position: relative; }
  .hero::before {
    content: ""; position: absolute; inset: -10% 12% 30%;
    background: radial-gradient(ellipse at 50% 40%, var(--accent-wash), transparent 68%);
    opacity: 0.75; z-index: -1; filter: blur(8px);
  }
  .pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 9px;
          border-radius: 999px; background: var(--paper); border: 1px solid var(--rule);
          font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em;
          text-transform: uppercase; color: var(--muted); }
  .pill b { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-wash);
            color: var(--accent-ink); padding: 3px 9px; border-radius: 999px; font-weight: 500; }
  .pill b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  /* Scoped to .hero: this rule's max-width and auto margins are hero framing,
     and as a bare h1 selector they centred and wrapped the document page
     headings too. */
  .hero h1 { margin-top: 30px; font-size: clamp(2.6rem, 6.6vw, 4.5rem); line-height: 1.03;
       letter-spacing: -0.03em; font-weight: 500; max-width: 16ch; margin-inline: auto; }
  .hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
  .lede { margin: 26px auto 0; max-width: 58ch; font-size: 1.12rem;
          color: var(--muted); line-height: 1.62; }
  .hero-actions { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
  .btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px;
         border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500;
         transition: transform .16s ease, box-shadow .16s ease; }
  .btn-primary { background: var(--ink-strong); color: var(--paper);
                 box-shadow: 0 3px 14px rgba(43, 50, 66, 0.2); }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 22px rgba(43, 50, 66, 0.26); }
  .btn-ghost { border: 1px solid var(--rule-strong); color: var(--ink); }
  .btn-ghost:hover { background: var(--paper-band); }

  /* ---------- section head ---------- */
  .sec-head { text-align: center; margin-bottom: 40px; }
  .sec-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.18em;
                text-transform: uppercase; color: var(--accent-ink); }
  .sec-head h2 { margin-top: 12px; font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -0.022em; }
  .sec-head p { margin-top: 12px; color: var(--muted); max-width: 52ch; margin-inline: auto; }

  section.block { padding: 76px 0; }

  /* ---------- tool cards ---------- */
  .tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
  .tool { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px;
          background: var(--paper); border: 1px solid var(--rule);
          box-shadow: 0 1px 3px rgba(43, 50, 66, 0.06); text-decoration: none;
          transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
  .tool:hover { transform: translateY(-4px); border-color: var(--rule-strong);
                box-shadow: 0 14px 34px rgba(43, 50, 66, 0.13); }
  .tool-art { height: 168px; display: grid; place-items: center; position: relative;
              background: var(--accent-wash); border-bottom: 1px solid var(--rule); }
  .tool-art::after {
    content: ""; position: absolute; inset: 0; opacity: 0.5;
    background-image: linear-gradient(var(--paper) 1px, transparent 1px),
                      linear-gradient(90deg, var(--paper) 1px, transparent 1px);
    background-size: 26px 26px;
  }
  .tool-art svg { position: relative; z-index: 1; filter: drop-shadow(0 6px 14px rgba(43,50,66,.2)); }
  .tool-body { padding: 26px 26px 24px; display: flex; flex-direction: column; flex: 1; }
  .tool-title { display: flex; align-items: center; gap: 12px; }
  .tool-title h3 { font-size: 1.5rem; letter-spacing: -0.018em; color: var(--ink-strong); }
  .status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
            text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
            background: var(--accent-wash); color: var(--accent-ink); }
  .status--soon { background: var(--paper-band); color: var(--muted); }
  .tool p { margin-top: 12px; color: var(--muted); font-size: 0.96rem; line-height: 1.58; }
  .chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
  .chip { font-size: 12px; color: var(--muted); background: var(--paper-band);
          padding: 5px 11px; border-radius: 999px; }
  .tool-go { margin-top: auto; padding-top: 24px; display: flex; align-items: center; gap: 8px;
             color: var(--link); font-size: 14.5px; font-weight: 500; }
  .tool:hover .tool-go span { transform: translateX(4px); }
  .tool-go span { transition: transform .18s ease; }
  .tool--empty .tool-art { background: var(--paper-band); }
  .tool--empty:hover { transform: none; box-shadow: 0 1px 3px rgba(43, 50, 66, 0.06);
                       border-color: var(--rule); }
  .tool--empty h3 { color: var(--muted); }

  /* ---------- principles ---------- */
  .band { background: var(--paper-band); border-block: 1px solid var(--rule); }
  .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
  .card { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 28px 26px; }
  .card-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
              background: var(--accent-wash); color: var(--accent-ink); font-family: var(--mono);
              font-size: 13px; font-weight: 600; }
  .card:nth-child(2) .card-ico { background: var(--trap-wash); color: var(--trap-ink); }
  .card:nth-child(3) .card-ico { background: #e2e9f5; color: var(--link); }
  .card h3 { margin-top: 20px; font-size: 1.22rem; color: var(--ink-strong); letter-spacing: -0.01em; }
  .card p { margin-top: 9px; color: var(--muted); font-size: 0.94rem; }

  /* ---------- about ---------- */
  .about { text-align: center; max-width: 62ch; margin-inline: auto; }
  .about p { font-size: 1.1rem; line-height: 1.68; color: var(--muted); }
  .about p + p { margin-top: 16px; }

  /* ---------- contact ---------- */
  .contact { background: var(--ink-strong); border-radius: 20px; color: var(--paper);
             padding: clamp(44px, 6vw, 68px) 32px; text-align: center; margin-bottom: 76px; }
  .contact h2 { color: var(--paper); font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.022em; }
  .contact p { margin-top: 14px; color: rgba(248, 246, 240, 0.66); }
  .contact a { display: inline-block; margin-top: 28px; background: var(--paper);
               color: var(--ink-strong); font-family: var(--mono); font-size: clamp(0.9rem, 2.4vw, 1.05rem);
               text-decoration: none; padding: 14px 26px; border-radius: 999px; }
  .contact a:hover { background: var(--accent-wash); color: var(--accent-ink); }

  /* ---------- footer ---------- */
  footer { border-top: 1px solid var(--rule); padding: 30px 0 14px;
           display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center;
           font-size: 13.5px; color: var(--muted); }
  footer nav { margin-left: auto; display: flex; gap: 24px; }
  footer a { text-decoration: none; color: var(--muted); }
  footer a:hover { color: var(--ink-strong); }

  /* Converted from the mockup's inline style attributes: the CSP's
     style-src 'self' blocks inline style attributes as well as <style>. */
  .tool-go--muted { color: var(--muted); }
  .block--tight { padding-bottom: 76px; }

  /* One link per tool card, stretched over the whole card, so the card is a
     single tab stop rather than one per child. */
  .tool { position: relative; }
  .tool-link { text-decoration: none; color: inherit; }
  .tool-link::after { content: ""; position: absolute; inset: 0; }

  @media (max-width: 640px) {
    .wrap { width: min(1120px, 100% - 32px); }

    /* Wordmark + three nav items overflow below ~430px. The page is a single
       scroll, so the anchor links are a convenience; the CTA is not. */
    .site-nav a:not(.cta) { display: none; }
    .site-nav { gap: 0; }

    .hero { padding: 56px 0 48px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { justify-content: center; }

    section.block { padding: 56px 0; }
    .tool-art { height: 140px; }
    .tool-body { padding: 22px 20px 20px; }

    .contact { border-radius: 16px; margin-bottom: 56px; }
    footer { padding-bottom: 24px; }
  }

  /* ===== document pages (privacy, terms) and 404 ===== */
  .doc { max-width: 68ch; margin: 0 auto; padding: 64px 0 88px; }
  .doc-head { padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--rule); }
  .doc-head h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); letter-spacing: -0.025em; }
  .doc-updated { margin-top: 14px; font-family: var(--mono); font-size: 12px;
                 letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
  .doc h2 { margin-top: 44px; font-size: 1.4rem; letter-spacing: -0.015em; color: var(--ink-strong); }
  .doc p, .doc li { color: var(--muted); font-size: 1rem; line-height: 1.72; }
  .doc p { margin-top: 14px; }
  .doc ul { margin-top: 14px; padding-left: 22px; }
  .doc li { margin-top: 8px; }
  .doc a { color: var(--link); text-underline-offset: 3px; }
  .doc-note { margin-top: 40px; padding: 22px 24px; border-radius: 12px;
              background: var(--paper-band); border: 1px solid var(--rule); }
  .doc-note p { margin-top: 0; font-size: 0.94rem; }
  .page-404 { text-align: center; padding: 120px 0 140px; }
  .page-404 h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.03em; }
  .page-404 p { margin-top: 18px; color: var(--muted); }
  .page-404 .btn { margin-top: 32px; }
