/* IBM Plex Mono 400, Latin subset, self-hosted under the SIL OFL 1.1 (fonts/OFL.txt).
   Self-hosted rather than loaded from Google Fonts: the apex CSP admits no
   third-party style or font origin, and a Google request would hand every
   visitor's IP to Google (KN-366). */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400.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;
}
/* IBM Plex Mono 500, Latin subset, self-hosted under the SIL OFL 1.1 (fonts/OFL.txt).
   Self-hosted rather than loaded from Google Fonts: the apex CSP admits no
   third-party style or font origin, and a Google request would hand every
   visitor's IP to Google (KN-366). */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500.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;
}
  /* Minne family: Minne's tokens, system sans in four sizes (52 / 24 / 17 / 14), fine inset rules, wide margins.
     Eddir's own flavour is the mono: a line-number gutter, plain Mac windows with a 1px edge, and on the
     support, privacy and terms pages faint # markers, so each reads as a rendered Markdown document.
     The landing drops the markers for Minne's page grammar (body.landing, at the end of this file). */
  :root {
    color-scheme: light dark;
    --ground: light-dark(#FAF8F3, #131417);
    --panel: light-dark(#FFFFFF, #1A1B1F);
    --ink: light-dark(#17191D, #ECE7DC);
    --muted: light-dark(#5E5A52, #A8A296);
    --rule: light-dark(#E6E0D4, #292B30);
    --rule-strong: light-dark(#CCC4B5, #3D3F45);
    --context: light-dark(#5C7FA6, #7598BE);
    --on-context: light-dark(#FFFFFF, #131417);
    --fill: light-dark(#F2EEE5, #1D1F23);
    --sheet: #FFFFFF;
    --gl: max(5vw, 16px, env(safe-area-inset-left, 0px));
    --gr: max(5vw, 16px, env(safe-area-inset-right, 0px));
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --band-top: 48px;
    --band-bottom: 56px;
  }
  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"] { color-scheme: dark; }

  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body {
    margin: 0; background: var(--ground); color: var(--ink);
    font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%; overflow-wrap: break-word;
  }
  body::before {
    content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
    z-index: 10; background: var(--ground);
  }
  img, video { display: block; max-width: 100%; height: auto; }
  a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  a:focus-visible, video:focus-visible { outline: 2px solid var(--context); outline-offset: 3px; border-radius: 4px; }
  h1, h2, h3, p, ul, ol, dl, dd, figure, pre, table { margin: 0; }
  ul { padding: 0; list-style: none; }
  code { font: 400 .88em var(--mono); background: var(--fill); padding: .1em .35em; border-radius: 4px; }

  .wrap { padding-left: var(--gl); padding-right: var(--gr); max-width: 1240px; margin: 0 auto; }
  .rule-top, .rule-bottom { background: linear-gradient(var(--rule), var(--rule)) no-repeat; background-size: calc(100% - var(--gl) - var(--gr)) 1px; }
  .rule-top { background-position: var(--gl) 0; }
  .rule-bottom { background-position: var(--gl) 100%; }
  .small, .label { font-size: 14px; line-height: 1.5; }
  .label { color: var(--muted); }

  /* Type, with the Markdown markers kept quiet */
  h1 { font-size: clamp(34px, 9.4vw, 52px); line-height: 1.05; letter-spacing: -.025em; font-weight: 650; text-wrap: balance; }
  h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.012em; font-weight: 600; text-wrap: balance; }
  h3 { font-size: 17px; line-height: 1.4; font-weight: 600; }
  h1, h2 { position: relative; }
  h1::before, h2::before {
    font: 400 14px/1 var(--mono); letter-spacing: 0; color: var(--rule-strong);
    margin-right: .6em; vertical-align: .3em;
  }
  h1::before { content: "#"; content: "#" / ""; vertical-align: .9em; }
  h2::before { content: "##"; content: "##" / ""; }

  .lede { color: var(--muted); max-width: 34em; }
  kbd {
    font: 500 13px/1 var(--mono); white-space: nowrap;
    padding: 2px 5px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--panel); color: var(--ink);
  }
  .menu { font-weight: 600; color: var(--ink); white-space: nowrap; }

  /* Buttons, as on Minne. The ::after widens the tap area to 44px. */
  .btn {
    position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 7px;
    background: var(--ink); color: var(--ground); text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  }
  .btn::after { content: ""; position: absolute; inset: -4px 0; }
  .btn:hover { opacity: .86; }
  .btn.lg { height: 44px; padding: 0 22px; font-size: 17px; }
  .btn.lg::after { content: none; }
  .btn-label-long { display: none; }

  /* Header, as on Minne: Minne / Eddir */
  .site-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--ground); }
  header.site { display: flex; align-items: center; height: 72px; }
  .crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .crumbs .sep { color: var(--rule-strong); font-size: 17px; }
  .brand { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 36px; text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
  .brand::after { content: ""; position: absolute; inset: -4px -2px; }
  .brand svg { width: 28px; height: 28px; display: block; }
  /* icon-128.webp is a macOS app icon: its tile is the middle 104 of 128 px
     (alpha > 128), with a transparent margin of 12 px a side for the shadow.
     Sized so the VISIBLE tile is 28 px like the Minne mark beside it, and the
     margin taken back with a negative margin so the layout box is 28 px too:
     the gaps to "/" and to "Eddir" and the vertical centring match the mark's.
     2x needs 69 px of the 128-px raster, 3x 104 px — still a downscale. */
  .brand img { width: calc(28px * 128 / 104); height: calc(28px * 128 / 104); margin: calc(-28px * 12 / 104); }
  nav.site { margin-left: auto; display: flex; align-items: center; gap: 0; }
  nav.site a:not(.btn) { display: none; align-items: center; height: 36px; font-size: 14px; color: var(--muted); text-decoration: none; }
  nav.site a:not(.btn):hover { color: var(--ink); }

  /* Windows: screenshots keep a Mac window's corner and a 1px edge, nothing more */
  .shot { border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--sheet); }

  /* Hero */
  .hero { overflow: hidden; }
  .hero .wrap { display: grid; gap: 18px; padding-top: 36px; padding-bottom: 48px; }
  .hero-copy { display: contents; }
  .hero h1 { order: 1; }
  .hero .lede { order: 2; }
  .hero .btn { order: 3; justify-self: start; }
  .hero .hero-pic { order: 4; margin-top: 8px; display: block; min-width: 0; }
  .hero .hero-pic img { display: block; }

  /* Sections, separated by rules inset to the gutters */
  .band { padding-top: var(--band-top); padding-bottom: var(--band-bottom); }
  .band > .wrap { position: relative; }
  .band > .wrap::before {
    content: ""; position: absolute; top: calc(-1 * var(--band-top)); left: var(--gl); right: var(--gr); height: 1px; background: var(--rule);
  }
  figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }

  /* Mermaid: source and diagram in one split window, as Split shows them */
  .demo { display: grid; min-width: 0; border: 1px solid var(--rule-strong); border-radius: 10px; overflow: hidden; background: var(--panel); }
  .fence {
    position: relative; overflow-x: auto; padding: 16px 16px 16px 50px;
    font: 400 13px/1.7 var(--mono); color: var(--ink); tab-size: 4; background: var(--panel);
  }
  .fence::before {
    content: attr(data-gutter); content: attr(data-gutter) / "";
    white-space: pre; position: absolute; left: 0; top: 16px; width: 36px; text-align: right; color: var(--rule-strong);
  }
  .fence code { font: inherit; background: none; padding: 0; }
  .fence .tick { color: var(--muted); }
  .sheet { background: var(--sheet); border-top: 1px solid var(--rule-strong); padding: 16px; display: grid; place-items: center; }
  .sheet img { height: auto; }
  /* Diagram gallery: stacked panels without script, tabs with it */
  .gallery { display: grid; gap: 24px; min-width: 0; }
  .gallery .panel { display: grid; gap: 10px; min-width: 0; }
  .gallery.is-tabbed { gap: 16px; }
  .gallery.is-tabbed .panel h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .gallery.is-tabbed .demo { min-height: 336px; }
  .gallery .panel:focus-visible { outline: 2px solid var(--context); outline-offset: 3px; border-radius: 10px; }
  .tabs-scroll { overflow-x: auto; overflow-y: hidden; box-shadow: inset 0 -1px 0 var(--rule); min-width: 0; scrollbar-width: thin; }
  .tabs { display: flex; gap: 4px; width: max-content; }
  .tabs button {
    min-height: 44px; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: 0;
    background: none; color: var(--muted); font: 600 14px/1.2 var(--font); cursor: pointer; white-space: nowrap;
  }
  .tabs button:hover { color: var(--ink); }
  .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
  .tabs button:focus-visible { outline: 2px solid var(--context); outline-offset: -2px; border-radius: 4px; }

  /* Themes: one swatch a row on a phone, two from 560px */
  .swatches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .swatches .shot { border-radius: 8px; }
  .swatches figcaption { margin-top: 6px; }

  /* The tour video */
  video { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--fill); }

  /* Free vs Pro: a rendered GFM table */
  .plans { width: 100%; border-collapse: collapse; background: var(--panel); }
  .plans th, .plans td { padding: 10px 12px; border: 1px solid var(--rule); vertical-align: top; }
  .plans thead th { background: var(--fill); font-size: 14px; font-weight: 600; text-align: center; width: 68px; }
  .plans thead th:first-child { text-align: left; width: auto; }
  .plans tbody th { text-align: left; font-weight: 400; }
  .plans td { text-align: center; }
  .yes::before {
    content: ""; display: inline-block; width: 13px; height: 7px; margin-bottom: 3px;
    border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg);
  }
  .no { color: var(--rule-strong); }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .plan-note { color: var(--muted); max-width: 40em; }
  .plan-note a, .doc a { text-decoration: underline; }

  /* FAQ */
  .faq { display: grid; gap: 24px; }
  .faq > div { display: grid; gap: 6px; align-content: start; }
  .faq p { color: var(--muted); max-width: 40em; }

  /* Footer, as on Minne */
  footer.site { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; color: var(--muted); padding-top: 14px; padding-bottom: 6px; }
  footer.site span { margin-right: auto; }
  footer.site a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
  footer.site a:hover { color: var(--ink); }
  .legal { color: var(--muted); font-size: 12px; line-height: 1.5; padding-bottom: 26px; }

  /* Sub-pages: support, privacy, terms */
  .doc { display: grid; gap: 16px; max-width: 760px; margin: 0; padding-top: 44px; padding-bottom: 72px; }
  .doc > * { min-width: 0; }
  .doc h1 { font-size: clamp(32px, 7vw, 40px); }
  .doc h2 { margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--rule); }
  .doc p, .doc li { color: var(--muted); }
  .doc strong { color: var(--ink); font-weight: 600; }
  .doc ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
  .doc .updated { font-size: 14px; }
  .doc .contact { font-family: var(--mono); font-size: 15px; color: var(--ink); user-select: all; }
  .doc .summary { padding: 2px 0 2px 16px; border-left: 3px solid var(--rule-strong); }

  @media (min-width: 560px) {
    .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  }
  @media (min-width: 641px) {
    :root { --band-top: 72px; --band-bottom: 88px; }
    footer.site { height: 72px; gap: 28px; padding: 0 var(--gr) 0 var(--gl); }
    .legal { margin-top: -14px; }
  }
  @media (min-width: 700px) {
    .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
    .demo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .sheet { border-top: 0; border-left: 1px solid var(--rule-strong); }
    .gallery.is-tabbed .demo { min-height: 320px; }
    .plans thead th { width: 112px; }
  }
  @media (min-width: 900px) {
    nav.site { gap: 24px; }
    nav.site a:not(.btn) { display: inline-flex; }
    /* The hero window runs off the right edge of the screen */
    .hero .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
    .hero-copy { display: grid; gap: 20px; justify-items: start; }
    .hero h1 { font-size: clamp(2.25rem, 3.4vw, 2.875rem); }
    .hero .hero-pic { margin: 0; width: 66vw; max-width: none; min-width: 760px; }
    .hero .hero-pic img { width: 100%; }
  }
  @media (min-width: 1000px) {
    /* Markers hang in the margin, where an editor keeps them */
    .doc > h1::before, .doc > h2::before {
      position: absolute; right: 100%; top: .5em; margin-right: 10px; vertical-align: baseline; white-space: nowrap;
    }
    .doc > h1::before { top: 1em; }
    .doc > h2::before { top: calc(24px + .5em); }
  }
  @media (min-width: 1160px) {
    nav.site { gap: 28px; }
    .btn-label-long { display: inline; }
    .btn-label-short { display: none; }
  }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .btn { transition: opacity .15s ease; }
  }
  section[id] { scroll-margin-top: 88px; }

/* KN-381 — the landing, refined 2026-11-30 to Minne's own page grammar: a 12-column grid with a narrow
   label column (a small muted label over the section's heading) and the content in the other nine; fine
   inset rules; rows of term and explanation; a coloured hairline over each of three siblings. The label
   column does the Markdown markers' job, so the landing drops them. Every rule here is under
   body.landing: support, privacy and terms share this file and keep their markers. */
.landing { --work: #D4683C; --docs: #D9A63F; }
.landing h1::before, .landing h2::before { content: none; }
.landing .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
/* mobile first: one column is the base, and the label column arrives only on a wide screen */
.landing .band .side { grid-column: 1 / -1; display: grid; gap: 6px; align-content: start; margin-bottom: 24px; }
.landing .band .main { grid-column: 1 / -1; display: grid; gap: 24px; min-width: 0; }
.landing .band .main > * { min-width: 0; }
.landing .band .side h2 { max-width: 11em; }
.landing .lead { color: var(--muted); max-width: 38em; }
.landing .lead strong, .landing .lead .menu { color: var(--ink); font-weight: 600; }
/* rows: a term on the left, what it means on the right, a rule above each */
.landing .rows { display: grid; border-bottom: 1px solid var(--rule); }
.landing .rows > div { display: grid; gap: 4px 24px; padding: 14px 0; border-top: 1px solid var(--rule); }
.landing .rows > div:first-child { border-top-color: var(--ink); }
.landing .rows dt { font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.landing .rows dd { color: var(--muted); }
.landing .rows dd strong, .landing .rows dd .menu { color: var(--ink); font-weight: 600; }
/* three siblings, each under its own hairline, as Minne's three products */
.landing .trio { display: grid; gap: 22px 24px; }
.landing .trio > li { display: grid; gap: 6px; align-content: start; padding-top: 16px; border-top: 2px solid var(--tone, var(--rule-strong)); }
.landing .trio > .tone-work { --tone: var(--work); }
.landing .trio > .tone-docs { --tone: var(--docs); }
.landing .trio > .tone-context { --tone: var(--context); }
.landing .trio p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.landing .tour video { border-radius: 12px; }
.landing .hero .cta { order: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.landing .hero .cta .btn { order: 0; }
.landing .hero .tour-link { order: 3; justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); margin-top: -8px; }
.landing .hero .tour-link:hover { color: var(--ink); }
/* the closing card, as the Eddir card on Minne */
.landing .card { display: grid; gap: 22px 32px; align-items: center; border: 1px solid var(--rule-strong); border-radius: 12px; background: var(--panel); padding: 28px; }
.landing .card img { width: 72px; height: 72px; display: block; }
.landing .card .words { display: grid; gap: 8px; min-width: 0; }
.landing .card p { color: var(--muted); }
/* "Coming soon to the Mac App Store" is ~320px of unbreakable .btn text, wider than a phone's card: here
   the label wraps inside the card instead of widening the page. One line it is still 44px, as .btn.lg. */
.landing .card .btn {
  justify-self: start; max-width: 100%; height: auto; min-height: 44px; padding-block: 10px;
  white-space: normal; line-height: 1.25; text-align: center; justify-content: center;
}
@media (min-width: 700px) {
  .landing .trio > li { padding-top: 22px; gap: 10px; }
  .landing .rows > div { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); padding: 18px 0; }
  .landing .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) { .landing .card { grid-template-columns: auto minmax(0, 1fr) auto; padding: 32px 36px; } }
@media (min-width: 1041px) {
  .landing .band .side { grid-column: 1 / span 3; gap: 8px; margin-bottom: 0; }
  .landing .band .main { grid-column: 4 / span 9; gap: 32px; }
}

/* KN-366: until Eddir is listed, the download buttons are not links (web-ui/site/site.json). */
.btn.is-soon { cursor: default; }
.btn.is-soon:hover { opacity: 1; }
