/* Westie Writes site. No fonts, scripts or images are loaded from anywhere else.
   Palette follows the app (EditorTheme.swift: warm paper, muted teal) plus the
   icon's navy and pencil gold. */
:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --bg-soft: #f1eee7;
  --text: #1f1d1a;
  --muted: #57524a;          /* 7.4:1 on --bg */
  --line: #ddd8cd;
  --accent: #0b3b8c;         /* links and buttons: 9.9:1 on --bg */
  --accent-text: #ffffff;
  --teal: #2a7168;           /* 5.3:1 on --bg, large text and decoration only */
  --gold: #b9852a;
  --note-bg: #fff4d6;
  --note-line: #c99a2e;
  --note-text: #4a3500;
  --focus: #0b3b8c;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1c1e;
    --bg-soft: #26282b;
    --text: #e6e3dd;
    --muted: #b4afa6;
    --line: #3a3c40;
    --accent: #8fb4ff;
    --accent-text: #0e1a33;
    --teal: #6fc2b4;
    --gold: #e0b04f;
    --note-bg: #3a3118;
    --note-line: #d2a63a;
    --note-text: #f3e4b8;
    --focus: #8fb4ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.125rem/1.65 var(--serif);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 2.2em 0 .5em; }
h1 { font-size: clamp(2rem, 5vw + .5rem, 3.1rem); margin-top: 0; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p, ul, ol, dl, figure, table { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
code { background: var(--bg-soft); padding: .1em .35em; border-radius: 4px; }
kbd {
  background: var(--bg-soft); border: 1px solid var(--line); border-bottom-width: 2px;
  padding: .05em .4em; border-radius: 5px; white-space: nowrap;
}
.muted { color: var(--muted); }
.small { font-size: .95rem; }
.sans { font-family: var(--sans); }

.skip {
  position: absolute; left: .75rem; top: -4rem; z-index: 10;
  background: var(--accent); color: var(--accent-text);
  padding: .6rem 1rem; border-radius: 8px; font-family: var(--sans); font-weight: 600;
}
.skip:focus { top: .75rem; }

.wrap { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
.wrap.wide { max-width: 64rem; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 2.25rem; height: 2.25rem; border-radius: 22%; }
nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 1rem; }
nav li { margin: 0; }
nav a { color: var(--text); text-decoration: none; padding: .45rem 0; display: inline-block; border-bottom: 2px solid transparent; }
nav a:hover { border-bottom-color: var(--teal); }
nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 600; }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-family: var(--sans); font-size: .95rem; color: var(--muted); }
.site-footer p { margin-bottom: .5em; }
.site-footer a { color: var(--muted); }

main { padding-top: 2.5rem; }
main .wrap > :last-child { margin-bottom: 0; }

/* Home */
.hero { padding: 1rem 0 2rem; }
.hero .lede { font-size: 1.3rem; line-height: 1.55; max-width: 38rem; }
.lede { font-size: 1.25rem; line-height: 1.55; }
.eyebrow { font-family: var(--sans); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); font-weight: 700; margin-bottom: .75rem; }
.status-pill {
  display: inline-block; font-family: var(--sans); font-size: .95rem; font-weight: 600;
  border: 1.5px solid var(--gold); border-radius: 999px; padding: .3rem .9rem; margin: 0 0 1.25rem;
}
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }
.button {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem;
  background: var(--accent); color: var(--accent-text); text-decoration: none;
  padding: .75rem 1.25rem; border-radius: 10px; border: 2px solid var(--accent);
}
.button.secondary { background: transparent; color: var(--accent); }
.button:hover { text-decoration: underline; }

.features { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.features li { margin: 0; padding: 1.1rem 1.2rem; background: var(--bg-soft); border-radius: 12px; border-left: 4px solid var(--teal); }
.features h3 { margin: 0 0 .3em; font-size: 1.1rem; }
.features p { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--muted); }

.shots { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 1.5rem 0; padding: 0; list-style: none; }
.shots li { margin: 0; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.shot figcaption { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin-top: .5rem; }

/* Notes for Kev. Remove each one when its question is settled. */
.todo {
  font-family: var(--sans); font-size: .95rem; line-height: 1.5;
  background: var(--note-bg); color: var(--note-text);
  border: 2px dashed var(--note-line); border-radius: 10px; padding: .8rem 1rem; margin: 1.25rem 0;
}
.todo strong:first-child { text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.todo a { color: inherit; }
.todo-inline { background: var(--note-bg); color: var(--note-text); padding: 0 .3em; border-radius: 4px; font-family: var(--sans); font-size: .92em; }

/* Prose pages */
.prose h2 { border-top: 1px solid var(--line); padding-top: 1.4em; margin-top: 2.4em; }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.meta { font-family: var(--sans); font-size: .95rem; color: var(--muted); }
.toc { font-family: var(--sans); font-size: 1rem; background: var(--bg-soft); border-radius: 12px; padding: 1rem 1.25rem; }
.toc ul { margin: .4em 0 0; }
.toc p { margin: 0; font-weight: 600; }
details { border-bottom: 1px solid var(--line); padding: .15rem 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--sans); font-weight: 600; font-size: 1.05rem; padding: .75rem 0; list-style-position: outside; }
summary:hover { color: var(--accent); }
details > :not(summary) { padding-left: .25rem; }
details[open] > summary { margin-bottom: .25rem; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .98rem; }
th, td { text-align: left; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.price-box { border: 1.5px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem; }

@media (prefers-reduced-motion: no-preference) {
  a, .button { transition: background-color .15s, color .15s; }
}
@media (max-width: 30rem) {
  body { font-size: 1.05rem; }
  .hero .lede { font-size: 1.15rem; }
}

@media print {
  :root { --bg: #fff; --text: #000; --muted: #333; --accent: #000; --line: #999; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .site-header nav, .skip, .toc, .actions { display: none; }
  .site-header { border: 0; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
  .todo { border: 1px solid #000; background: #fff; color: #000; }
  details { display: block; }
  h2, h3 { break-after: avoid; }
}

/* ===== Richer layout (home page and shared chrome) ===== */
:root {
  --band: #0c2a63; --band-text: #f4f1ea; --band-muted: #c3cde3; --band-line: rgba(255,255,255,.16);
  --card: #ffffff; --shadow: 0 1px 2px rgba(31,29,26,.06), 0 12px 32px rgba(31,29,26,.10);
  --glow: rgba(11,59,140,.10);
  --f-red:#d9534f; --f-orange:#e8863a; --f-yellow:#d9a82b; --f-green:#5a9e4b; --f-teal:#2a8f82; --f-blue:#3a74d1; --f-purple:#8a5cc8; --f-pink:#d36a9c;
}
@media (prefers-color-scheme: dark) {
  :root { --band:#14233f; --band-text:#eeeae2; --band-muted:#b4c0da; --card:#232528; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 36px rgba(0,0,0,.45); --glow: rgba(143,180,255,.12); }
}
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-footer { background: var(--band); color: var(--band-muted); border: 0; margin-top: 0; }
.site-footer a { color: var(--band-text); }
.site-footer .todo { color: var(--note-text); }
.page-end { height: 4rem; }
main.home { padding-top: 0; }
.bleed { width: 100%; }
section.band { background: var(--band); color: var(--band-text); padding: 4.5rem 0; }
section.band h2 { margin-top: 0; color: var(--band-text); }
section.band p { color: var(--band-muted); }
section.band a { color: #cfe0ff; }
section.pad { padding: 4.5rem 0; }
section.pad h2, section.band h2 { font-size: clamp(1.7rem, 3vw + .8rem, 2.4rem); letter-spacing: -.01em; }
.section-lede { font-size: 1.2rem; max-width: 40rem; color: var(--muted); }

.hero-wrap { background:
  radial-gradient(60rem 28rem at 85% -10%, var(--glow), transparent 70%),
  radial-gradient(40rem 24rem at -10% 20%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%);
  padding: 4rem 0 5rem; }
.hero-grid { display: grid; gap: 3rem; grid-template-columns: 1.05fr .95fr; align-items: center; }
.hero-grid h1 { font-size: clamp(2.4rem, 5.5vw + .5rem, 4.1rem); line-height: 1.05; margin-bottom: .35em; }
.hero-grid h1 em { font-style: italic; color: var(--teal); }
.hero-icon { width: 5.5rem; height: 5.5rem; border-radius: 22%; box-shadow: var(--shadow); margin-bottom: 1.5rem; display: block; }
.platforms { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.75rem 0 0; padding: 0; list-style: none; font-family: var(--sans); font-size: .95rem; color: var(--muted); }
.platforms li { margin: 0; display: flex; align-items: center; gap: .45rem; }
.platforms svg { width: 1.3rem; height: 1.3rem; stroke: var(--teal); }

/* Drawn illustration of the app window */
.mock-wrap { position: relative; }
.mock { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; font-family: var(--sans); transform: rotate(1.2deg); }
.mock-bar { display: flex; gap: 6px; padding: .7rem .9rem; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.mock-bar i:nth-child(1){background:#ee6a5f} .mock-bar i:nth-child(2){background:#f4be4f} .mock-bar i:nth-child(3){background:#61c554}
.mock-body { display: grid; grid-template-columns: 9.5rem 1fr; min-height: 21rem; }
.mock-side { background: var(--bg-soft); padding: 1rem .8rem; font-size: .8rem; border-right: 1px solid var(--line); color: var(--muted); }
.mock-side b { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; margin: .9rem 0 .35rem; }
.mock-side b:first-child { margin-top: 0; }
.mock-side div { display: flex; align-items: center; gap: .5rem; padding: .28rem .4rem; border-radius: 6px; color: var(--text); }
.mock-side div.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.mock-side div::before { content: ""; width: .7rem; height: .7rem; border-radius: 3px; background: var(--c, var(--muted)); flex: none; }
.mock-doc { padding: 1.4rem 1.5rem; font-family: var(--serif); }
.mock-doc h4 { font-size: 1.35rem; margin: 0 0 .6rem; line-height: 1.2; }
.mock-doc p { font-size: .95rem; line-height: 1.6; margin: 0 0 .8rem; color: var(--text); }
.mock-doc .tag { color: var(--teal); font-family: var(--sans); font-size: .85rem; font-weight: 600; }
.mock-doc .ln { height: .55rem; border-radius: 4px; background: var(--line); margin: .55rem 0; }
.mock-status { display: flex; align-items: center; gap: .6rem; font-family: var(--sans); font-size: .75rem; color: var(--muted); margin-top: 1.1rem; }
.ring { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: conic-gradient(var(--teal) 0 62%, var(--line) 0); position: relative; flex: none; }
.ring::after { content:""; position:absolute; inset:.3rem; border-radius:50%; background: var(--card); }
.mock-note { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: 1.1rem; text-align: center; }

/* Feature cards */
.features { gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.features li { background: var(--card); border: 1px solid var(--line); border-left-width: 1px; border-radius: 16px; padding: 1.35rem 1.4rem; box-shadow: 0 1px 2px rgba(31,29,26,.04); }
.features .ico { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 14%, transparent); margin-bottom: .8rem; }
.features .ico svg { width: 1.4rem; height: 1.4rem; stroke: var(--teal); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.features h3 { font-size: 1.15rem; margin-bottom: .35em; }
@media (prefers-reduced-motion: no-preference) {
  .features li { transition: transform .2s, box-shadow .2s; }
  .features li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
}

/* Files band */
.split { display: grid; gap: 3rem; grid-template-columns: 1fr 1fr; align-items: center; }
.tree { background: rgba(0,0,0,.28); border: 1px solid var(--band-line); border-radius: 16px; padding: 1.4rem 1.5rem; font-family: var(--mono); font-size: .95rem; line-height: 1.9; color: var(--band-text); overflow-x: auto; margin: 0; }
.tree .d { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .55rem; vertical-align: -.05em; background: var(--c); }
.tree .i1 { padding-left: 1.6rem; } .tree .i2 { padding-left: 3.2rem; }
.tree span.f { opacity: .8; }
.tree .row { display: block; white-space: nowrap; }

/* Promise trio */
.trio { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); list-style: none; padding: 0; margin: 2rem 0 0; }
.trio li { margin: 0; border: 1px solid var(--band-line); border-radius: 16px; padding: 1.3rem 1.4rem; background: rgba(255,255,255,.05); }
.trio strong { display: block; font-size: 1.35rem; font-family: var(--serif); color: var(--band-text); margin-bottom: .3rem; }
.trio span { color: var(--band-muted); font-size: 1rem; line-height: 1.5; }

/* Screenshot frames */
.shots li:nth-child(2) { margin-top: 1.5rem; }
.shot img { box-shadow: var(--shadow); }
.shot.phone img { border-radius: 26px; border: 6px solid var(--text); }
.shot.tablet img { border-radius: 16px; border: 6px solid var(--text); aspect-ratio: 4/5; object-fit: cover; }
.shot.laptop img { border-radius: 10px; border: 5px solid var(--text); aspect-ratio: 4/5; object-fit: cover; }

.price-box { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 1.5rem 1.75rem; border: 1px solid var(--line); }
.button { box-shadow: 0 1px 2px rgba(0,0,0,.15); }

@media (max-width: 52rem) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero-wrap { padding: 2.5rem 0 3rem; }
  .mock { transform: none; }
  section.band, section.pad { padding: 3rem 0; }
  .shots li:nth-child(2) { margin-top: 0; }
}
@media (max-width: 30rem) {
  .mock-body { grid-template-columns: 1fr; }
  .mock-side { display: none; }
}
@media print { .site-footer { background: none; color: #000; } .hero-wrap, section.band { background: none; color: #000; } }

/* Why-you'd-want-it blocks, small feature list, maker note */
.why { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); margin: 2.25rem 0 0; padding: 0; list-style: none; }
.why li { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.75rem 1.75rem 1.5rem; box-shadow: 0 1px 2px rgba(31,29,26,.04); }
.why .ico { width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 14%, transparent); margin-bottom: 1rem; }
.why .ico svg { width: 1.6rem; height: 1.6rem; stroke: var(--teal); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.why h3 { font-size: 1.4rem; margin: 0 0 .4em; }
.why p { margin: 0 0 .7em; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.why p:last-child { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 1.5rem 0 0; font-family: var(--sans); font-size: .98rem; }
.chips li { margin: 0; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.maker { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 2rem; }
.maker img { width: 9rem; height: 9rem; border-radius: 22%; display: block; }
.maker h2 { margin: 0 0 .5rem; font-size: 1.6rem; }
.maker p { margin: 0 0 .8em; }
.maker p:last-child { margin-bottom: 0; }
.needs { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin: 1rem 0 0; }
@media (max-width: 52rem) { .why { grid-template-columns: 1fr; } .maker { grid-template-columns: 1fr; padding: 1.5rem; } .maker img { width: 6.5rem; height: 6.5rem; } }

.badge-slot { background: transparent; color: var(--text); border: 2px dashed var(--note-line); box-shadow: none; cursor: default; }
.badge-slot small { font-weight: 400; color: var(--muted); }
