/* Direction A, "Kitchen Table". Ground and paper, set for reading. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/Inter-Variable-latin.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/assets/fonts/SourceSerif4-Variable-latin.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/assets/fonts/SourceSerif4-Italic-Variable-latin.woff2") format("woff2"); }

:root {
  /* The approved palette, and nothing that isn't mixed from it. */
  --ground: #e9e3d6;
  --ink: #221f1a;
  --ochre: #7d6a4f;
  --lichen: #6b7a63;
  --lichen-light: #98a58a;
  --white: #fff;

  --paper: color-mix(in srgb, var(--ground) 42%, var(--white));
  --ink-soft: color-mix(in srgb, var(--ink) 74%, var(--ground));
  --lichen-text: color-mix(in srgb, var(--lichen) 68%, var(--ink));
  --ochre-text: color-mix(in srgb, var(--ochre) 80%, var(--ink));
  --rule: color-mix(in srgb, var(--ink) 16%, transparent);
  --rule-strong: color-mix(in srgb, var(--ink) 32%, transparent);
  --wash: color-mix(in srgb, var(--lichen-light) 30%, transparent);

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4.2vw, 56px);
  --max: 1240px;
  --space-section: clamp(72px, 10vw, 148px);

  --shadow-paper: 0 1px 1px color-mix(in srgb, var(--ink) 8%, transparent), 0 10px 30px -12px color-mix(in srgb, var(--ink) 28%, transparent), 0 30px 60px -30px color-mix(in srgb, var(--ink) 22%, transparent);
  --shadow-phone: 0 2px 2px color-mix(in srgb, var(--ink) 10%, transparent), 0 24px 48px -18px color-mix(in srgb, var(--ink) 40%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--lichen); }
:focus-visible { outline: 2px solid var(--lichen-text); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
mark.pending { background: color-mix(in srgb, var(--ochre) 22%, var(--white)); color: var(--ink); padding: 0 0.3em; font: 600 0.85em var(--sans); }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--ground); padding: 10px 14px; z-index: 10; }
.skip:focus { top: 12px; }
.preview-bar { background: var(--ink); color: var(--ground); font: 500 0.8125rem/1.4 var(--sans); padding: 8px var(--gutter); text-align: center; }

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

h1, .pull, .page-hero h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.02;
  text-wrap: balance;
}
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h3 { font: 600 1.0625rem/1.35 var(--sans); letter-spacing: -0.005em; margin-bottom: 0.4em; }
.kicker {
  font: 600 0.8125rem/1.3 var(--sans);
  letter-spacing: 0.02em;
  color: var(--lichen-text);
  margin-bottom: 1.1rem;
}
.kicker a { text-decoration: none; }
.lede {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 36em;
  text-wrap: pretty;
}
.lede strong { color: var(--ink); font-weight: 600; }
.prose { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.62; text-wrap: pretty; }
.prose p { max-width: 34em; }
.status { font: 500 0.9375rem/1.5 var(--sans); color: var(--ink-soft); padding-left: 14px; border-left: 3px solid var(--lichen); max-width: 36em; }
.sample-note { font: 400 0.8125rem/1.5 var(--sans); color: var(--ink-soft); }

.arrow { display: inline-block; margin-left: 0.35em; font-family: var(--sans); font-weight: 500; transform: translateY(-0.04em); transition: transform 180ms ease-out; }
a:hover .arrow { transform: translate(3px, -0.04em); }
main { flex: 1 0 auto; }
.text-link { font: 600 1rem/1.4 var(--sans); text-decoration: underline; text-decoration-color: var(--lichen); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.text-link:hover { text-decoration-color: var(--ink); }
.button {
  display: inline-flex; align-items: center; gap: 0.35em;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--ground);
  font: 600 1rem/1 var(--sans); text-decoration: none;
  border-radius: 2px;
  transition: background-color 160ms ease-out;
}
.button:hover { background: color-mix(in srgb, var(--ink) 82%, var(--lichen)); }
.button:active { transform: translateY(1px); }

.band-paper { background: var(--paper); }
.section-head { max-width: 44rem; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 + p { margin-top: 1rem; color: var(--ink-soft); font-size: 1.125rem; }
.section-head.wide { max-width: 52rem; }
.two-col { display: grid; gap: 24px 64px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }

/* ------------------------------------------------------------- header */

.site-header { padding-block: 20px 12px; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.logo img { height: 32px; width: auto; }
@media (max-width: 560px) { .logo img { height: 28px; } }
.site-header nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.site-header nav a {
  font: 500 0.9375rem/1 var(--sans); text-decoration: none;
  padding: 12px 0; border-bottom: 2px solid transparent;
}
.site-header nav a:hover { border-bottom-color: var(--rule-strong); }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--lichen); }
@media (max-width: 560px) {
  .header-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-header nav { gap: 0 20px; }
}

/* --------------------------------------------------------------- hero */

.hero { padding-top: clamp(40px, 7vw, 104px); padding-bottom: clamp(48px, 6vw, 88px); }
.hero h1 { font-size: clamp(2.6rem, 1rem + 6vw, 5.6rem); max-width: 13em; margin-bottom: 0.34em; }
.hero .lede { margin-bottom: 1.6rem; max-width: 38em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 0; }

/* ------------------------------------------------------------ company */

.stand { padding-bottom: var(--space-section); }
.stand h2 { margin-bottom: clamp(24px, 3.5vw, 44px); }
.stand-list { display: grid; gap: 0 40px; border-top: 1px solid var(--rule-strong); }
@media (min-width: 700px) { .stand-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .stand-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stand-list li { padding-block: 26px 10px; }
.stand-list h3 { font: 500 1.55rem/1.2 var(--serif); letter-spacing: -0.01em; margin-bottom: 0.45em; }
.stand-list p { color: var(--ink-soft); margin: 0; max-width: 28em; }
.why-us { padding-block: var(--space-section); }

.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0.6em 0 0; font: 500 0.9375rem/1 var(--sans); color: var(--ink-soft); position: relative; }
.platforms-label { margin-right: -4px; }
.platform { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; }
.platform svg { flex: 0 0 auto; width: 20px; height: 20px; }
.platform-ios svg { color: var(--ink); }
.platform-android svg { color: #3ddc84; }
.platform-web svg { color: var(--lichen); }
.platform .eye { fill: var(--ground); }
.band-paper .platform .eye { fill: var(--paper); }
.sr-sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------- main event */

.main-event { padding-block: var(--space-section); border-top: 1px solid var(--rule); }
.product-head { text-align: center; max-width: 46rem; margin: 0 auto clamp(64px, 8vw, 112px); display: grid; justify-items: center; }
.product-head .platforms { justify-content: center; }
.product-name { display: inline-flex; align-items: center; gap: 0.3em; font-size: clamp(2.8rem, 1.6rem + 4.6vw, 5.2rem); font-weight: 600; letter-spacing: -0.02em; }
.product-name img { width: 0.9em; height: 0.9em; border-radius: 18%; }
.product-tagline { font: italic 400 clamp(1.2rem, 1rem + 0.8vw, 1.5rem)/1.4 var(--serif); color: var(--ink-soft); margin: 0.4em 0 1em; }
.product-pitch { font: 400 clamp(1.125rem, 1rem + 0.45vw, 1.35rem)/1.55 var(--serif); max-width: 34em; margin-bottom: 1.2em; }

.story-grid { display: grid; gap: 24px 72px; margin-bottom: clamp(56px, 7vw, 96px); }
@media (min-width: 900px) { .story-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.pull { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.9rem); line-height: 1.04; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }

/* The table top: the sheet and the phone, laid down like paper. */
.table-top { display: grid; gap: 48px; position: relative; margin-bottom: var(--space-section); }
.artifact { min-width: 0; }
@media (min-width: 1100px) {
  .table-top { grid-template-columns: minmax(0, 1fr) 280px; gap: 0 44px; align-items: start; }
  .artifact-phone { margin-top: 40px; }
  .artifact-notes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; }
}
.artifact-note { font: 400 0.9375rem/1.55 var(--sans); color: var(--ink-soft); margin: 0; max-width: 30em; }
.artifact-phone .artifact-note { margin-top: 24px; padding-left: 12px; }
.artifact-notes { margin-top: 28px; display: grid; gap: 16px; }
.note-label { display: block; font-weight: 700; color: var(--ochre-text); font-size: 0.8125rem; letter-spacing: 0.02em; margin-bottom: 4px; }
.table-caption { font: italic 400 1rem/1.5 var(--serif); color: var(--ink-soft); margin: 0; max-width: 40em; }

.product-pair { display: grid; gap: 64px 48px; justify-items: center; }
@media (min-width: 800px) { .product-pair { grid-template-columns: 1fr 1fr; align-items: start; } }
.product-pair article { max-width: 360px; }
.product-pair .phone { width: min(280px, 70vw); margin: 0 auto 32px; }
.product-pair h3 { font: 500 1.6rem/1.2 var(--serif); margin-bottom: 0.35em; }
.product-pair p { color: var(--ink-soft); }
.product-foot { max-width: 44rem; margin: clamp(56px, 7vw, 96px) auto 0; display: grid; gap: 20px; justify-items: center; text-align: center; }
.product-foot .status { border-left: 0; padding-left: 0; margin: 0; }
.product-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; margin: 0; }
.product-actions a:not(.button) { text-decoration-color: var(--lichen); text-decoration-thickness: 2px; }

/* --------------------------------------------------------------- sheet */

.sheet { margin: 0; }
.sheet-window {
  display: grid;
  background: var(--white);
  box-shadow: var(--shadow-paper);
  border-radius: 3px;
  overflow: hidden;
  transform: rotate(-0.5deg);
  transform-origin: 30% 50%;
}
@media (min-width: 1100px) { .sheet.has-chart:not(.chart-below) .sheet-window { grid-template-columns: minmax(0, 1fr) 290px; } }
.sheet-scroll { overflow-x: auto; min-width: 0; }
.sheet table { border-collapse: collapse; width: 100%; font: 400 clamp(0.8125rem, 0.72rem + 0.2vw, 0.9375rem)/1.2 var(--sans); }
.sheet th, .sheet td { border: 1px solid color-mix(in srgb, var(--ink) 11%, transparent); padding: 10px 11px; text-align: left; white-space: nowrap; }
.sheet .letters td { background: color-mix(in srgb, var(--ground) 45%, var(--white)); color: var(--ink-soft); font-size: 0.6875rem; font-weight: 500; text-align: center; padding-block: 5px; letter-spacing: 0.04em; }
.sheet .labels th { font-weight: 700; color: var(--ink); background: var(--white); }
.sheet .row-number, .sheet .corner { width: 34px; text-align: center; color: var(--ink-soft); font-weight: 500; font-size: 0.75rem; background: color-mix(in srgb, var(--ground) 45%, var(--white)); }
.sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet tr.is-highlight td { background: var(--wash); }
.sheet tr.is-highlight td.row-number { background: color-mix(in srgb, var(--lichen-light) 45%, var(--white)); color: var(--ink); }
.sheet tr.is-highlight td:nth-of-type(5) { box-shadow: inset 0 0 0 2px var(--lichen); font-weight: 700; }
.checkbox { display: inline-block; width: 13px; height: 13px; border: 1.5px solid color-mix(in srgb, var(--ink) 45%, transparent); border-radius: 2px; vertical-align: -2px; }
.sheet-chart { padding: 14px 10px 6px; border-top: 1px solid color-mix(in srgb, var(--ink) 11%, transparent); }
@media (min-width: 1100px) { .sheet:not(.chart-below) .sheet-chart { border-top: 0; border-left: 1px solid color-mix(in srgb, var(--ink) 11%, transparent); display: flex; flex-direction: column; justify-content: center; } }
.chart-below .sheet-chart svg { max-width: 380px; margin-inline: 0; }
.chart-below .sheet-chart { padding-inline: 16px; }
@media (max-width: 1199px) { .sheet .desk-only { display: none; } }
.chart-title { font: 400 0.9375rem/1.3 var(--sans); color: var(--ink-soft); margin: 0 0 2px 6px; }
.sheet-chart svg { width: 100%; max-width: 340px; height: auto; display: block; margin-inline: auto; overflow: visible; }
.pie-slices path { stroke: var(--white); stroke-width: 2; stroke-linejoin: round; }
.pie-label polyline { fill: none; stroke: color-mix(in srgb, var(--ink) 38%, transparent); stroke-width: 1; }
.pie-label circle { fill: color-mix(in srgb, var(--ink) 55%, transparent); }
.pie-name { font: 500 11.5px var(--sans); fill: var(--ink); }
.pie-share { font: 400 10.5px var(--sans); fill: var(--ink-soft); }
.sheet figcaption { font: italic 400 0.9375rem/1.5 var(--serif); color: var(--ink-soft); margin-top: 18px; max-width: 42em; }
@media (max-width: 720px) { .sheet .wide-only { display: none; } .sheet-window { transform: none; } .sheet th, .sheet td { padding: 9px 8px; } }

/* --------------------------------------------------------------- phone */

.phone {
  width: min(300px, 76vw);
  aspect-ratio: 1080 / 2400;
  border-radius: 30px;
  padding: 7px;
  background: var(--ink);
  box-shadow: var(--shadow-phone);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 24px; }
.artifact-phone .phone { width: min(280px, 72vw); transform: rotate(1.6deg); }
.tilt-left { transform: rotate(-1.2deg); }
.tilt-right { transform: rotate(1.1deg); }
.raise { transform: translateY(-18px); }
@media (prefers-reduced-motion: no-preference) {
  .phone { transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1); }
  .phone:hover { transform: rotate(0deg) translateY(-4px); }
}

/* ------------------------------------------------------------ practice */

.rule { font: 500 clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem)/1.25 var(--serif); margin-bottom: 0.4em; letter-spacing: -0.008em; }
.why { color: var(--ink-soft); margin: 0; max-width: 34em; }

/* --------------------------------------------------------------- writing */

.writing-list { padding-block: var(--space-section); }
.split-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; max-width: none; }
.split-head p { margin: 0; }
.post-grid { display: grid; gap: 40px 32px; }
@media (min-width: 760px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .post-grid:not(.two) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card a { display: grid; gap: 18px; text-decoration: none; height: 100%; }
.post-cover { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: var(--white); box-shadow: 0 0 0 1px var(--rule); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.post-card a:hover .post-cover img { transform: scale(1.02); }

/* A phone stands in the frame at its own shape, lit from the paper behind it. */
.post-cover.is-phone { display: grid; justify-items: center; align-items: start; padding-top: 7%; background: var(--paper); }
.post-cover.is-phone .phone { width: 46%; min-width: 150px; }
@media (max-width: 759px) { .post-cover.is-phone .phone { width: 54%; } }
.post-card a:hover .post-cover.is-phone .phone { transform: translateY(-6px); }
.post-body { display: grid; gap: 8px; align-content: start; }
.post-meta { font: 500 0.8125rem/1.4 var(--sans); color: var(--ink-soft); margin: 0; }
.post-title { font: 500 clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem)/1.2 var(--serif); letter-spacing: -0.01em; margin: 0; }
.post-card a:hover .post-title { text-decoration: underline; text-decoration-color: var(--lichen); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.post-summary { color: var(--ink-soft); margin: 0; }
.post-more { font: 600 0.9375rem/1.4 var(--sans); margin: 4px 0 0; }
.post-card.is-featured { margin-bottom: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--rule-strong); }
@media (min-width: 1000px) {
  .post-card.is-featured a { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
  .post-card.is-featured .post-title { font-size: clamp(2rem, 1.2rem + 2vw, 3rem); line-height: 1.08; }
  .post-card.is-featured .post-summary { font: 400 1.2rem/1.5 var(--serif); }
}
.blog-hero { padding-bottom: clamp(32px, 4vw, 56px); }
.blog-posts { padding-bottom: var(--space-section); }
.back-to-blog { margin-top: 32px; }
.essay-next .post-card { max-width: 40rem; }

/* ------------------------------------------------------------ evenhearth */

.eh-hero { padding-block: clamp(40px, 7vw, 96px) var(--space-section); display: grid; gap: 56px; }
@media (min-width: 1000px) { .eh-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; } }
.eh-brand { display: inline-flex; align-items: center; gap: 12px; font: 600 1.25rem/1 var(--serif); margin-bottom: 1.4rem; }
.eh-brand img { width: 40px; height: 40px; border-radius: 22%; }
.eh-hero h1 { font-size: clamp(2.5rem, 1.2rem + 4.6vw, 4.6rem); margin-bottom: 0.4em; }
.eh-hero .lede { margin-bottom: 1.4rem; }
.eh-hero-art { position: relative; min-width: 0; }
.desk-shot { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-paper); background: var(--white); border: 1px solid var(--rule); }
.eh-hero-art .desk-shot { transform: rotate(0.6deg); }

.eh-month { padding-block: var(--space-section); }
.steps { display: grid; gap: 64px 40px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps li:nth-child(2) { margin-top: 32px; } .steps li:nth-child(3) { margin-top: 64px; } }
.steps .phone { width: min(260px, 70vw); margin-bottom: 28px; }
.steps h3 { font: 500 1.5rem/1.2 var(--serif); }
.steps p { color: var(--ink-soft); max-width: 26em; }


.extras { margin-top: clamp(64px, 8vw, 112px); display: grid; gap: 36px 48px; border-top: 1px solid var(--rule-strong); padding-top: 40px; }
@media (min-width: 700px) { .extras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .extras { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.extras p { color: var(--ink-soft); margin: 0; }

.eh-ventures { padding-block: var(--space-section); }
.spread { display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 3vw, 44px); margin-bottom: clamp(56px, 7vw, 96px); overflow: hidden; padding: 24px 8px 40px; }
.spread .phone { width: min(260px, 28vw); flex: 0 0 auto; }
@media (max-width: 700px) { .spread { flex-direction: column; align-items: center; } .spread .phone { width: min(280px, 72vw); } .spread .raise { transform: none; } }
.points { display: grid; gap: 36px 56px; }
@media (min-width: 800px) { .points { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 60rem; } }
.points p { color: var(--ink-soft); margin: 0; }

.eh-extension, .eh-today, .eh-platforms { padding-block: var(--space-section); }
.eh-platforms .lede { margin-bottom: 1rem; }
.eh-hero .platforms { margin-bottom: 1.2rem; }
.eh-extension .kicker { margin-bottom: 1rem; }
.eh-desk { padding-block: var(--space-section); }
.desk-wide { margin-bottom: 18px; }
.today-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start; font: 400 1.25rem/1.45 var(--serif); padding-block: 18px; border-top: 1px solid var(--rule-strong); }
.today-list li:last-child { border-bottom: 1px solid var(--rule-strong); }
.today-list .icon { width: 26px; height: 26px; color: var(--lichen-text); margin-top: 2px; }
.eh-close { padding-block: 64px var(--space-section); font-size: 1.125rem; color: var(--ink-soft); }
.eh-close p { max-width: 40em; }

/* A desktop screenshot on a phone: shown at a readable size, panned sideways. */
@media (max-width: 760px) {
  .pan { overflow-x: auto; overscroll-behavior-x: contain; }
  .pan img { width: 760px; max-width: none; }
  .eh-hero-art .desk-shot { transform: none; }
}

/* ------------------------------------------------------------ split demo */

.try { margin-top: clamp(64px, 8vw, 112px); display: grid; gap: 32px 64px; padding: clamp(28px, 4vw, 56px); background: var(--ground); border-radius: 4px; }
@media (min-width: 900px) { .try { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; } }
.try h3 { font: 500 clamp(1.6rem, 1.3rem + 1vw, 2.2rem)/1.15 var(--serif); margin-bottom: 0.5em; }
.try-copy p { color: var(--ink-soft); }
.split-demo { margin: 0; display: grid; gap: 20px; background: var(--white); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-paper); border-radius: 3px; }
@media (min-width: 640px) { .split-demo { grid-template-columns: 1fr 1fr; gap: 28px 32px; } .split-caption { grid-column: 1 / -1; } }
.split-merchant { font: 600 1.125rem/1.3 var(--serif); margin-bottom: 14px; }
.split-merchant span { display: block; font: 400 0.8125rem/1.4 var(--sans); color: var(--ink-soft); margin-top: 2px; }
.split-total { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; padding-block: 10px; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); margin: 0 0 12px; }
.split-field { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 8px; font-size: 0.9375rem; }
.split-input { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--rule-strong); border-radius: 2px; padding: 0 10px; min-height: 44px; background: var(--paper); font-variant-numeric: tabular-nums; }
.split-input input { width: 5.5ch; border: 0; background: transparent; font: 600 1rem var(--sans); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.split-input input:focus { outline: none; }
.split-input:focus-within { outline: 2px solid var(--lichen-text); outline-offset: 2px; }
.split-input input[readonly] { color: var(--ink-soft); }
.split-demo:not(.is-live) .split-hint { display: none; }
.split-result dl { margin: 0 0 14px; }
.split-result dl div { display: flex; justify-content: space-between; padding-block: 10px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.split-result dt { color: var(--ink-soft); }
.split-result dd { margin: 0; font-weight: 600; }
.split-owes { font: 400 1.125rem/1.45 var(--serif); margin: 0; }
.split-demo.is-invalid .split-owes { color: var(--ochre-text); }
.split-caption { font: italic 400 0.9375rem/1.5 var(--serif); color: var(--ink-soft); }

/* ------------------------------------------------------------- pages */

.page-hero { padding-block: clamp(40px, 7vw, 96px) clamp(48px, 6vw, 88px); }
.page-hero h1 { font-size: clamp(2.5rem, 1.2rem + 4.6vw, 4.8rem); max-width: 14em; margin-bottom: 0.4em; }
.about-origin { padding-block: var(--space-section); }
.about-origin .sheet { margin-top: clamp(40px, 5vw, 72px); }
.house-rules { padding-block: var(--space-section); }
.rule-grid { display: grid; gap: 0 56px; }
@media (min-width: 800px) { .rule-grid { grid-template-columns: 1fr 1fr; } }
.rule-grid li { padding-block: 28px; border-top: 1px solid var(--rule-strong); }
.about-company, .contact-company { padding-block: var(--space-section); }
.about-company h2 + p { margin-top: 1rem; color: var(--ink-soft); }

.company-details { margin: 0; border-top: 1px solid var(--rule-strong); }
.company-details div { display: grid; grid-template-columns: minmax(8rem, 1fr) 2fr; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.company-details dt { font: 500 0.875rem/1.5 var(--sans); color: var(--ink-soft); }
.company-details dd { margin: 0; font-weight: 500; }

.contact-hero { padding-block: clamp(40px, 7vw, 96px) clamp(56px, 7vw, 104px); }
.contact-hero h1 { font-size: clamp(2.8rem, 1.2rem + 6vw, 6rem); margin-bottom: 0.3em; }
.big-email { font: 500 clamp(1.7rem, 0.9rem + 3.6vw, 3.4rem)/1.1 var(--serif); letter-spacing: -0.015em; margin-top: 1.2rem; overflow-wrap: anywhere; }
.big-email a { text-decoration: underline; text-decoration-color: var(--lichen); text-decoration-thickness: 3px; text-underline-offset: 0.16em; }
.topics { display: grid; gap: 36px 48px; padding-block: var(--space-section); }
@media (min-width: 700px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.topics h2 { font: 500 1.5rem/1.2 var(--serif); margin-bottom: 0.4em; }
.topics p { color: var(--ink-soft); margin: 0; max-width: 30em; }

/* --------------------------------------------------------------- essay */

.essay-head { padding-block: clamp(40px, 7vw, 96px) 40px; max-width: 52rem; margin-inline: auto; text-align: center; }
.essay-head h1 { font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.4rem); margin-bottom: 0.35em; }
.essay-dek { font: italic 400 clamp(1.2rem, 1rem + 0.7vw, 1.45rem)/1.45 var(--serif); color: var(--ink-soft); max-width: 32em; margin-inline: auto; }
.essay-head .essay-meta { display: block; margin-top: 1.5rem; }
.essay-figure-wrap { display: flex; justify-content: center; margin-block: 32px clamp(48px, 6vw, 80px); }
.essay-figure-wrap .sheet { width: min(100%, 1040px); }
.essay-figure { margin: 0; display: grid; justify-items: center; gap: 16px; }
.essay-figure figcaption { font: 400 0.8125rem/1.5 var(--sans); color: var(--ink-soft); text-align: center; max-width: 28em; }
.essay-body { width: min(100% - 2 * var(--gutter), 38rem); margin-inline: auto; padding-bottom: var(--space-section); }
.essay-body p { max-width: none; }
.essay-body > p:first-child { font-size: 1.3em; line-height: 1.5; }
.essay-body h2 { font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.9rem); margin: 2.2em 0 0.7em; }
.essay-next { border-top: 1px solid var(--rule-strong); padding-block: 40px var(--space-section); max-width: 38rem; }

/* --------------------------------------------------------------- legal */

.legal { padding-block: clamp(40px, 7vw, 96px) var(--space-section); max-width: 44rem; }
.legal h1 { font-size: clamp(2.2rem, 1.3rem + 3.2vw, 3.6rem); margin-bottom: 0.4em; }
.legal-meta { font: 500 0.875rem/1.5 var(--sans); color: var(--ink-soft); padding-bottom: 32px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 40px; }
.legal-body h2 { font-size: 1.5rem; margin: 2em 0 0.6em; }
.legal-body ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1em; }
.legal-body li { margin-bottom: 0.5em; }
.legal-body li::marker { color: var(--lichen); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--rule-strong); font-weight: 500; }
.legal-nav a[aria-current="page"] { text-decoration-color: var(--lichen); text-decoration-thickness: 2px; }

.not-found-links { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 24px; }

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

.site-footer { background: var(--paper); border-top: 1px solid var(--rule); padding-top: clamp(56px, 7vw, 88px); }
.footer-grid { display: grid; gap: 40px 56px; padding-bottom: 56px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; } }
.footer-logo img { width: 132px; height: auto; }
.footer-company p { margin: 0 0 8px; }
.footer-legal-name { font: 500 1.25rem/1.3 var(--serif); }
.footer-place { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.flag { width: 28px; height: 14px; flex: 0 0 auto; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.footer-nav { display: flex; gap: 48px; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { text-decoration: none; font-weight: 500; }
.footer-nav a:hover { text-decoration: underline; text-decoration-color: var(--lichen); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px 28px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--ink-soft); }


/* ------------------------------------------------------------ extension */

.ext-figure { margin: clamp(40px, 5vw, 72px) auto 0; max-width: 900px; }
.ext-callout { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0 6px 10px 0; font: 600 0.8125rem/1.3 var(--sans); color: var(--ochre-text); }
.ext-callout::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); }
.ext-window { border-radius: 10px; overflow: hidden; background: var(--white); box-shadow: var(--shadow-paper); }
.ext-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; background: color-mix(in srgb, var(--ground) 70%, var(--white)); border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.ext-dots { display: flex; gap: 7px; }
.ext-dots span { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.ext-url { flex: 1; min-width: 0; font: 400 0.75rem/1 var(--sans); color: color-mix(in srgb, var(--ink) 65%, var(--white)); background: var(--white); border-radius: 6px; padding: 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext-tools { display: flex; align-items: center; gap: 4px; }
.ext-tool { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: color-mix(in srgb, var(--ink) 70%, var(--white)); }
.ext-tool img { width: 22px; height: 22px; }
.ext-tool.is-open { background: color-mix(in srgb, var(--ochre) 18%, var(--white)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ochre) 55%, var(--white)); }
.ext-stage { position: relative; }
.ext-invoice { width: 100%; }
.ext-popup { position: absolute; top: 10px; right: 8px; width: min(300px, 44%); border-radius: 10px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent), 0 18px 40px -12px color-mix(in srgb, var(--ink) 45%, transparent); background: var(--white); }
.ext-popup img { border-radius: 10px; }
/* The pointer from the popup up to the button that opened it. */
.ext-popup::before { content: ""; position: absolute; top: -6px; right: 13px; width: 12px; height: 12px; background: color-mix(in srgb, var(--ground) 55%, var(--white)); transform: rotate(45deg); box-shadow: -1px -1px 0 color-mix(in srgb, var(--ink) 12%, transparent); }
.ext-figure figcaption { margin: 14px 0 0; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-soft); }
@media (max-width: 640px) {
  .ext-popup { position: relative; top: auto; right: auto; width: auto; margin: 14px 12px 12px; }
  .ext-popup::before { right: 20px; }
  .ext-callout { font-size: 0.75rem; }
}

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