/* notchmd.com — the site is set in Notch's own world: the Paper theme, or
   Night when the visitor switches to it (light is always the default, never
   the system's setting), the app's faces, one accent (the app's link blue). */

@font-face { font-family: "Newsreader"; src: url("/assets/fonts/Newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/Newsreader-Italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --paper: #f4f2ed;
  --sheet: #fbfaf7;
  --ink: #1d1c1a;
  --ink-2: #4a4843;
  --muted: #6c6960;
  --rule: #dcd8ce;
  --rule-strong: #c4bfb2;
  --accent: #1f6c9f;
  --accent-ink: #ffffff;
  --wash: #e7eef3;
  --mark: #f6e7b3;
  --shadow: 0 1px 2px rgba(40, 32, 12, 0.06), 0 24px 56px -18px rgba(40, 32, 12, 0.28);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 68ch;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #191918;
  --sheet: #201f1d;
  --ink: #ecebe6;
  --ink-2: #c9c7bf;
  --muted: #a3a198;
  --rule: #34322e;
  --rule-strong: #4a4742;
  --accent: #8fc3e8;
  --accent-ink: #0f1c26;
  --wash: #1d2a33;
  --mark: #4a4126;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 28px 60px -18px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mark); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
img, video { max-width: 100%; display: block; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
kbd { padding: 0.05em 0.35em; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--sheet); white-space: nowrap; }
html { scrollbar-color: var(--rule-strong) transparent; }
.tabular { font-variant-numeric: tabular-nums; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.prose { max-width: var(--measure); }

/* Header and footer */
.top { display: flex; align-items: center; gap: 28px; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; color: var(--ink); text-decoration: none; font: 600 18px/1 var(--sans); letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; }
.top nav { margin-left: auto; display: flex; gap: 22px; font-size: 15px; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.theme-toggle { min-height: 44px; font: inherit; font-size: 15px; white-space: nowrap; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); text-decoration: underline; }
.foot { margin-top: 112px; padding: 36px 0 56px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 14px 28px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.foot .fine { flex-basis: 100%; }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 480; letter-spacing: -0.015em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); margin: 0 0 0.3em; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin: 2.4em 0 0.45em; }
h3 { font-size: 1.35rem; margin: 1.8em 0 0.35em; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); max-width: 36ch; }
.note { color: var(--muted); font-size: 15px; max-width: var(--measure); }

/* Actions */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 30px 0 14px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 10px; border: 0;
  background: var(--accent); color: var(--accent-ink);
  font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 8px 20px -10px var(--accent);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms ease-out;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 12px 26px -10px var(--accent); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.button svg { width: 18px; height: 18px; }
.quiet { color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; min-height: 44px; }
.pro { display: inline-block; margin-left: 0.4em; padding: 0.02em 0.5em; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font: 600 12px/1.5 var(--sans); letter-spacing: 0.04em; vertical-align: 0.18em; }

/* The first viewport: the offer beside the film, at window scale */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; padding: 40px 0 24px; }
.film { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: #111; box-shadow: var(--shadow); border: 1px solid var(--rule); aspect-ratio: 16 / 9; }
.film video { width: 100%; height: 100%; object-fit: cover; }
.film button { position: absolute; left: 12px; bottom: 10px; font: 500 12px/1 var(--sans); color: #eee; background: rgba(0, 0, 0, 0.45); border: 0; border-radius: 6px; padding: 6px 9px; cursor: pointer; }

/* Notch blocks: a page that is also its source */
.page { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 36px clamp(22px, 5vw, 64px) 42px; box-shadow: var(--shadow); }
.nb { position: relative; margin: 0 -14px; padding: 6px 14px; border-radius: 8px; cursor: text; transition: background 160ms ease-out; }
.nb:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.nb .src { display: none; margin: 0; padding: 12px 14px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); font: 14px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.nb.is-source .src { display: block; animation: reveal 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.nb.is-source .out { display: none; }
@keyframes reveal { from { clip-path: inset(0 0 100% 0); opacity: 0.4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.nb h3 { margin-top: 0.6em; }
.nb p { margin: 0.4em 0; }
.nb .wiki { color: var(--accent); text-decoration: underline dotted; text-underline-offset: 0.22em; }
.nb mark { background: var(--mark); color: inherit; padding: 0 0.15em; border-radius: 2px; }
.nb table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0.4em 0; }
.nb th, .nb td { padding: 7px 10px; border-bottom: 1px solid var(--rule); text-align: left; }
.nb th { font-weight: 600; color: var(--ink-2); font-size: 13px; letter-spacing: 0.02em; }
.nb .c { text-align: center; } .nb .r { text-align: right; }
.tasks { list-style: none; padding: 0; margin: 0.4em 0; }
.tasks li { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.box { width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 3px; flex: none; }
.box.done { border-color: var(--accent); background: var(--accent); position: relative; }
.box.done::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tasks .done-text { color: var(--muted); }
.hint { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* Lists that read like a document, not a card grid */
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 56px; margin: 28px 0 0; padding: 0; list-style: none; }
.points li { padding: 16px 0 18px; border-top: 1px solid var(--rule); }
.points b { display: block; font: 600 17px/1.35 var(--sans); margin-bottom: 4px; }
.points span { color: var(--ink-2); }

/* Price */
.price { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--sheet); }
.price section { padding: 30px clamp(20px, 3vw, 36px); }
.price section + section { border-left: 1px solid var(--rule); }
.price h3 { margin: 0 0 4px; font-size: 1.6rem; }
.price .amount { font: 500 2.6rem/1.1 var(--serif); margin: 10px 0 2px; }
.price .amount small { font: 400 16px var(--sans); color: var(--muted); }
.price ul { padding-left: 1.1em; margin: 14px 0 0; }
.price li { margin: 6px 0; }
.count { font-weight: 600; }

/* Downloads */
.dl { width: 100%; border-collapse: collapse; margin: 18px 0; }
.dl th, .dl td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.dl th { font: 600 13px/1.3 var(--sans); color: var(--muted); letter-spacing: 0.02em; }
.dl td:first-child { font-weight: 600; white-space: nowrap; }
.dl tr.here { background: var(--wash); }
.soon { color: var(--muted); }
.dl a.get { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.dl .gets { display: flex; flex-direction: column; gap: 2px; }
.dl .gets .sub { font-weight: 400; color: var(--muted); }
.sum { font: 12px/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }

/* Questions */
details { border-top: 1px solid var(--rule); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font: 600 17px/1.4 var(--sans); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 2px; color: var(--ink-2); max-width: var(--measure); }

/* Forms */
.form { display: grid; gap: 14px; max-width: 420px; margin-top: 22px; }
.form label { display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.form input { font: 16px/1.4 var(--sans); padding: 11px 13px; border: 1px solid var(--rule-strong); border-radius: 9px; background: var(--sheet); color: var(--ink); }
.form input::placeholder { color: var(--muted); }
.status { min-height: 1.6em; font-size: 15px; }
.status.error { color: #b3261e; }
:root[data-theme="dark"] .status.error { color: #f2a097; }
.key { font: 14px/1.6 var(--mono); padding: 14px 16px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--sheet); overflow-wrap: anywhere; overflow-x: auto; }
#key { white-space: pre-wrap; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 12px; }
  .points { grid-template-columns: 1fr; }
  .price { grid-template-columns: 1fr; }
  .price section + section { border-left: 0; border-top: 1px solid var(--rule); }
  .top nav { gap: 14px; font-size: 14px; }
  .theme-toggle { font-size: 14px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top { flex-wrap: wrap; gap: 12px; }
  .top nav { order: 2; margin-left: 0; width: 100%; justify-content: space-between; }
  .theme-toggle { order: 1; margin-left: auto; }
  .dl thead { display: none; }
  .dl tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .dl td { display: block; padding: 3px 10px; border: 0; }
  .dl .notes { color: var(--ink-2); font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Subpages */
.prose-page { padding-top: 28px; }
.prose-page > ul.prose { padding-left: 1.2em; }
.prose-page > ul.prose li { margin: 8px 0; }
