/* WritingBricks' public pages: the landing page (site/, published at /welcome/ and shown at /
   to visitors who aren't signed in) and the Mac download page (downloads/index.html).
   The app's own colours ("Daylight"), system fonts only: the hosted CSP allows no outside hosts. */
:root {
  --ground: #ffffff;
  --tint: #f5f5f2;
  --brick: #ffffff;
  --hair: #e4e4df;
  --hair-2: #d6d6d0;
  --ink: #1c1c1a;
  --ink-2: #3d3d39;
  --muted: #5f5f59;
  --accent: #2d5bd7;
  --accent-soft: #e4ebfb;
  --hl: #f6e08a;
  --shadow: 0 0 0 1px var(--hair), 0 1px 2px rgb(20 20 18 / 0.04), 0 8px 24px rgb(20 20 18 / 0.05);
  --shadow-shot: 0 0 0 1px rgb(20 20 18 / 0.1), 0 2px 6px rgb(20 20 18 / 0.06), 0 30px 80px rgb(20 20 18 / 0.16);
  --f-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --r: 12px;
  --r-lg: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e0f11;
    --tint: #15171a;
    --brick: #16181b;
    --hair: #25282c;
    --hair-2: #34383e;
    --ink: #e8e5de;
    --ink-2: #c4c1ba;
    --muted: #9a9ca2;
    --accent: #7fa2ff;
    --accent-soft: #1c2640;
    --hl: #6b5a1c;
    --shadow: 0 0 0 1px var(--hair), 0 8px 24px rgb(0 0 0 / 0.3);
    --shadow-shot: 0 0 0 1px rgb(255 255 255 / 0.08), 0 30px 80px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.6 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgb(45 91 215 / 0.18); }
code { font-family: var(--f-mono); font-size: 0.86em; background: var(--tint); box-shadow: 0 0 0 1px var(--hair); border-radius: 5px; padding: 0.08em 0.35em; overflow-wrap: anywhere; }
.tinted code { background: var(--brick); }
b { font-weight: 600; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
@media (max-width: 480px) { .wrap { width: calc(100% - 32px); } }

.skip { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--ground) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--hair); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.mark { display: block; flex: none; }
.mark .i { fill: var(--ink); }
.mark .a { fill: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { background: var(--tint); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--tint); }
.nav .nav-button { box-shadow: 0 0 0 1px var(--hair-2); margin-left: 6px; color: var(--ink); }
@media (max-width: 640px) { .nav-wide { display: none; } }
@media (max-width: 380px) { .brand span { font-size: 16px; } .nav a { padding: 8px 9px; } }

/* ------------------------------------------------------------ hero */
.hero { padding: clamp(48px, 9vw, 104px) 0 0; }
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 5px 14px 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 14px; font-weight: 600; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.hero h1 { font-family: var(--f-serif); font-weight: 500; font-size: clamp(2.6rem, 8vw, 5.2rem); line-height: 1.02; letter-spacing: -0.025em; margin: 0 0 24px; }
.lede { max-width: 40em; margin: 0 0 34px; font-size: clamp(1.06rem, 2.2vw, 1.22rem); line-height: 1.6; color: var(--ink-2); }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cta { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-width: 250px; padding: 13px 24px 13px 22px; border-radius: 14px; text-decoration: none; text-align: left; color: var(--ink); background: var(--brick); box-shadow: 0 0 0 1px var(--hair-2), 0 1px 2px rgb(20 20 18 / 0.05); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.cta:hover { box-shadow: 0 0 0 1px var(--muted), 0 6px 16px rgb(20 20 18 / 0.08); }
.cta.primary { background: var(--ink); color: var(--ground); box-shadow: 0 1px 2px rgb(20 20 18 / 0.2), 0 8px 20px rgb(20 20 18 / 0.14); }
.cta.primary:hover { background: var(--ink-2); }
.cta-label { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.cta-note { font-size: 13.5px; opacity: 0.78; }
@media (prefers-reduced-motion: no-preference) { .cta:hover { transform: translateY(-1px); } }
.hero-small { margin: 22px 0 0; font-size: 14.5px; color: var(--muted); max-width: 44em; }
.hero-small span { display: block; }
.hero-small span + span { margin-top: 4px; }

.shot { margin-top: clamp(40px, 7vw, 72px); margin-bottom: 0; padding-bottom: clamp(48px, 8vw, 88px); }
/* The tinted band under the screenshot starts a third of the way down the picture at every width, so its edge is
   always behind the picture and never runs through the words above it. The picture is --shot-w wide and 674/1024
   of that high; the band is the figure's border image, reaching out to the page's edges without widening it. */
.shot { --shot-w: min(1024px, 100vw - 40px); border-image: linear-gradient(to bottom, transparent 0 calc(var(--shot-w) * 0.24), var(--tint) 0) fill 0 / 0 / 0 100vw; }
@media (max-width: 480px) { .shot { --shot-w: calc(100vw - 32px); } }
.shot img { display: block; width: 100%; max-width: 1024px; margin: 0 auto; border-radius: 14px; box-shadow: var(--shadow-shot); }
.shot figcaption { margin: 18px auto 0; max-width: 46em; text-align: center; font-size: 14.5px; color: var(--muted); }

/* ------------------------------------------------------------ sections */
.section { padding: clamp(60px, 8vw, 100px) 0; }
.section.tinted { background: var(--tint); border-block: 1px solid var(--hair); }
.section-head { max-width: 44em; margin: 0 0 clamp(32px, 5vw, 52px); }
.section h2, .page h1 { font-family: var(--f-serif); font-weight: 500; font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 14px; }
.section-head p, .section-lede { margin: 0; font-size: 1.1rem; color: var(--ink-2); }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.feature { background: var(--brick); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px 22px 24px; }
.feature h3 { font-size: 17px; line-height: 1.3; margin: 16px 0 8px; letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.icon { width: 40px; height: 40px; padding: 8px; border-radius: 11px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.icon .dot { fill: var(--accent); }

.split { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.15fr 1fr; } }
.checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; font-size: 16px; color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); }
.checks li::after { content: ""; position: absolute; left: 7.5px; top: calc(0.2em + 5px); width: 6px; height: 10px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.folder { margin: 0; background: var(--brick); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px 22px 22px; font-family: var(--f-mono); font-size: 14px; line-height: 1.5; max-width: 460px; width: 100%; justify-self: center; }
.folder-title { font-weight: 600; padding: 0 0 12px 26px; margin: 0 0 12px; border-bottom: 1px solid var(--hair); position: relative; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 22px; margin-top: 2px; border-left: 1px solid var(--hair-2); margin-left: 7px; }
.tree li { position: relative; padding: 3px 0 3px 26px; overflow-wrap: anywhere; }
.tree .dir { font-weight: 600; }
.tree .dir > ul { font-weight: 400; }
.tree li::before, .folder-title::before { content: ""; position: absolute; left: 1px; top: 8px; width: 16px; height: 12px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent)) 0 0 / 7px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) 0 2px / 100% 10px no-repeat; opacity: 0.85; }
.tree .file::before { left: 3px; top: 7px; width: 11px; height: 14px; border-radius: 2px; background: none; box-shadow: inset 0 0 0 1.5px var(--muted); opacity: 0.8; }
.folder-title::before { top: 5px; }

.ways { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.way { display: flex; flex-direction: column; align-items: flex-start; background: var(--brick); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(24px, 4vw, 34px); }
.way h3 { font-family: var(--f-serif); font-weight: 500; font-size: 1.6rem; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.01em; }
.way > p { margin: 0 0 18px; color: var(--ink-2); }
.facts { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-size: 13.5px; font-weight: 550; padding: 4px 11px; border-radius: 999px; background: var(--tint); box-shadow: 0 0 0 1px var(--hair); color: var(--ink-2); }
.way .button { margin-top: auto; }
.way > .way-actions { margin: auto 0 0; }
.way-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 12px; font-weight: 600; font-size: 15.5px; text-decoration: none; color: var(--ink); background: var(--brick); box-shadow: 0 0 0 1px var(--hair-2); }
.button:hover { box-shadow: 0 0 0 1px var(--muted); }
.button.primary { background: var(--ink); color: var(--ground); box-shadow: none; }
.button.primary:hover { background: var(--ink-2); }

.faq { display: grid; gap: 16px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.qa { padding: 22px 0; border-top: 1px solid var(--hair-2); }
.qa h3 { font-size: 17.5px; margin: 0 0 6px; letter-spacing: -0.01em; }
.qa p { margin: 0; color: var(--ink-2); font-size: 16px; }

.closing { text-align: center; }
.closing-inner { display: flex; flex-direction: column; align-items: center; }
.closing-mark { width: 48px; height: 48px; margin-bottom: 20px; }
.closing p { margin: 0; font-size: 1.1rem; color: var(--ink-2); }
.closing .closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* ------------------------------------------------------------ footer */
.foot { border-top: 1px solid var(--hair); padding: 28px 0 40px; font-size: 14.5px; color: var(--muted); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: var(--ink-2); }

/* ------------------------------------------------------------ the download page */
.page { padding: clamp(48px, 8vw, 88px) 0 clamp(56px, 8vw, 96px); }
.page .wrap { max-width: 760px; }
.get { display: grid; justify-items: center; text-align: center; background: var(--brick); border-radius: 24px; box-shadow: var(--shadow); padding: clamp(28px, 6vw, 52px) clamp(20px, 5vw, 48px); }
.get .app-icon { width: 104px; height: 104px; margin: -6px 0 10px; }
.get h1 { margin-bottom: 10px; }
.get .lede { margin: 0 0 28px; }
.get .meta { margin: 16px 0 0; font-size: 14.5px; color: var(--muted); }
.get .meta span { white-space: nowrap; }
.page h2 { font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.15; letter-spacing: -0.015em; margin: clamp(48px, 7vw, 68px) 0 18px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 62px; background: var(--brick); border-radius: var(--r); box-shadow: var(--shadow); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px; }
.plain-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; color: var(--ink-2); }
.note { margin: 18px 0 0; padding: 16px 18px; border-radius: var(--r); background: var(--tint); box-shadow: 0 0 0 1px var(--hair); font-size: 15.5px; color: var(--ink-2); }
.note strong { color: var(--ink); }
.browser { margin-top: clamp(48px, 7vw, 68px); padding: clamp(24px, 4vw, 34px); border-radius: var(--r-lg); background: var(--tint); box-shadow: 0 0 0 1px var(--hair); }
.browser h2 { margin-top: 0; }
.browser p { margin: 0 0 22px; color: var(--ink-2); }
.browser .way-actions { margin: 0; }
kbd { font-family: var(--f-ui); font-size: 0.9em; padding: 0.05em 0.4em; border-radius: 5px; box-shadow: 0 0 0 1px var(--hair-2); background: var(--brick); white-space: nowrap; }

@media (max-width: 480px) {
  .cta { min-width: 0; width: 100%; }
  .ctas { width: 100%; flex-direction: column; }
  .button { width: 100%; }
  .way-actions .button, .closing-actions .button { width: 100%; }
  .steps li { padding-left: 56px; }
  .steps li::before { left: 13px; }
  .folder { font-size: 13px; padding: 18px 16px 20px; }
  .tree ul { padding-left: 14px; }
}
