/* Ekjut — ekjut.in
   Shared stylesheet for every page on the site. Each rule is a reusable class
   named for what it is, so every other page can use this file unchanged.

   Measured contrast on --cream #F5F3EE:
     --ink        15.39:1     --primary       6.64:1
     --ink-muted   5.80:1     --accent-ink    4.93:1
     --surface on --primary   7.36:1

   --accent #E07A5F is 2.66:1 on cream and must never carry text. Terracotta
   that is text — including the step numerals — uses --accent-ink. */

/* Fonts ------------------------------------------------------------------
   DM Sans, self-hosted. OFL-1.1 — the licence ships beside the files at
   assets/fonts/OFL.txt and must stay there.

   One VARIABLE file per subset, each covering the whole 400-700 range we
   use, so 500 is a real interpolated weight and bold is never synthesised.
   Self-hosted rather than the Google Fonts CDN for two reasons: it removes
   a third-party connection from every page load, which a privacy policy
   claiming no third-party tracking should not have to explain away, and it
   drops a DNS lookup plus a TLS handshake on a phone. */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary: #2D5F4C;
  --primary-dark: #244C3D;
  --accent: #E07A5F;
  --accent-ink: #AF4A2C;
  --cream: #F5F3EE;
  --surface: #FFFFFF;
  --ink: #1C1C1A;
  --ink-muted: #5F5F58;
  --border: #E3E0D8;

  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --maxw: 1100px;
  --gutter: 20px;
  --radius: 8px;
  --section-y: 80px;
}

/* Base ------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 19px;
}

p {
  margin: 0 0 16px;
}

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

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

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

/* Clears the sticky header when an in-page anchor is followed. */
section[id] {
  scroll-margin-top: 88px;
}

/* Layout ----------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
}

/* Full-bleed green band — the one high-contrast block on a page. */
.band {
  background: var(--primary);
  color: var(--surface);
}

.band h2,
.band h3,
.band p {
  color: var(--surface);
}

.band p {
  max-width: 62ch;
}

.band :focus-visible {
  outline-color: var(--surface);
}

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.wordmark {
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.nav__link {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav__link:hover {
  color: var(--primary);
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn--secondary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn--secondary:hover {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.btn--on-dark {
  background: var(--surface);
  border-color: var(--surface);
  color: var(--primary);
}

.btn--on-dark:hover {
  color: var(--primary-dark);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
}

/* Copy ------------------------------------------------------------------- */

.lede {
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 18px;
}

.note {
  color: var(--ink-muted);
}

.muted {
  color: var(--ink-muted);
}

/* Grid and cards --------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card__title {
  margin: 0 0 8px;
}

.card__body {
  margin: 0;
  color: var(--ink-muted);
}

.icon {
  display: block;
  margin-bottom: 14px;
  color: var(--primary);
}

/* Numbered steps --------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  margin: 0;
}

.step__num {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-ink);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}

.step p {
  margin: 0;
  color: var(--ink-muted);
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  padding: 48px 0;
  background: var(--cream);
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
}

.site-footer .wordmark {
  display: inline-block;
  margin-bottom: 8px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 24px 0;
}

.footer__links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--primary);
}

/* Breakpoints ------------------------------------------------------------ */

@media (min-width: 600px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 900px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 599px) {
  :root {
    --section-y: 48px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 26px;
  }

  .lede {
    font-size: 17px;
  }

  .nav {
    gap: 8px 14px;
  }

  .nav__link {
    font-size: 14px;
  }

  .btn-row .btn {
    flex: 1 1 100%;
  }

  .step__num {
    font-size: 34px;
  }
}

/* ========================================================================
   Pages 2-6: long-form documents, FAQ, store button.
   Everything below reuses the tokens above. No new colour is defined here,
   and --accent still never carries text — it appears only as a solid rule.
   ======================================================================== */

/* Skip link -------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--surface);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* Anything that can be an in-page target clears the sticky header. */
h2[id],
h3[id] {
  scroll-margin-top: 88px;
}

/* Page head -------------------------------------------------------------- */

/* The title block on an inner page. Smaller than the home hero: these pages
   are read, not scanned, so the h1 does not need to shout. */
.page-head {
  padding: 56px 0 8px;
}

.page-head h1 {
  font-size: 36px;
}

.page-head .lede {
  margin-top: 4px;
}

.meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

.section--tight {
  padding-top: 32px;
}

/* Long-form prose -------------------------------------------------------- */

/* 70ch rather than the 62ch a lede uses: a legal document is read in long
   passes and a longer measure means fewer line returns. */
.prose {
  max-width: 70ch;
}

.prose > h2 {
  margin-top: 48px;
  font-size: 24px;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 28px;
  font-size: 18px;
}

.prose p,
.prose li {
  color: var(--ink-muted);
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose li:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--ink);
  font-weight: 500;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
}

/* Contents list ---------------------------------------------------------- */

.toc {
  margin: 32px 0 40px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

.toc a {
  color: var(--ink-muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 599px) {
  .toc ol {
    columns: 1;
  }
}

/* A heading that groups several blocks below it, e.g. the two FAQ sets. */
.group-title {
  margin-top: 40px;
}

/* Callout ---------------------------------------------------------------- */

/* The one place --accent appears outside the step numerals: a 3px solid
   rule, which is a shape and not text, so its 2.66:1 never applies. */
.callout {
  margin: 0 0 16px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.callout p {
  color: var(--ink-muted);
}

.callout strong {
  color: var(--ink);
  font-weight: 500;
}

/* Table ------------------------------------------------------------------ */

/* Scrolls rather than squashes on a phone: the deletion table has three
   columns of real sentences and collapsing it would hide a row. */
.table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 15px;
}

caption {
  padding: 14px 18px 0;
  color: var(--ink-muted);
  font-size: 15px;
  text-align: left;
}

th,
td {
  padding: 13px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

thead th {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

tbody th {
  color: var(--ink);
  font-weight: 500;
}

td {
  color: var(--ink-muted);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

/* FAQ -------------------------------------------------------------------- */

.faq {
  max-width: 70ch;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  color: var(--ink);
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq summary:hover {
  color: var(--primary);
}

.faq__body {
  padding: 0 0 20px;
  color: var(--ink-muted);
}

.faq__body p {
  margin-bottom: 12px;
}

/* Store button ----------------------------------------------------------- */

/* A brand-styled button, NOT Google's official badge. The real badge is a
   fixed asset that has to come from Google's badge generator and may not be
   redrawn, so this stands in until that PNG is dropped in. */
.btn--store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
  text-align: left;
}

.btn--store:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn--store svg {
  flex: none;
}

.btn__sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.btn__main {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

/* Contact block ---------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 70ch;
}

.contact__email {
  font-size: 19px;
  font-weight: 500;
}

/* Error page ------------------------------------------------------------- */

.error-page {
  padding: 96px 0;
  text-align: center;
}

.error-page .lede {
  margin: 0 auto 24px;
}

.error-page .btn-row {
  justify-content: center;
}

@media (max-width: 599px) {
  .page-head {
    padding-top: 36px;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .error-page {
    padding: 56px 0;
  }
}
