/* digitaltwin.org.uk, draft 1 (15 Oct 2026). Its own look: a calm research journal (paper, ink, one violet accent, a warm
   highlight), related to Stratapault and markmaynard.me without copying either. Plain CSS, no build step (like markmaynard-site). */
:root {
  --paper: #f7f5f0; --card: #ffffff; --ink: #18202b; --muted: #4f5966; --line: #e3ded3;
  --accent: #4a3fc7; --accent-ink: #3a30a8; --accent-soft: #ecebfb; --warm: #8f4510; --warm-soft: #fbefe2;
  --ok: #1d7a55; --ok-soft: #e3f4ec; --shadow: 0 1px 2px rgba(24,32,43,.05), 0 8px 24px rgba(24,32,43,.06);
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', system-ui, sans-serif; 
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12141b; --card: #1a1d26; --ink: #ecebe6; --muted: #a9b0bb; --line: #2c303c;
    --accent: #a59cff; --accent-ink: #b9b2ff; --accent-soft: #24223d; --warm: #f0a25e; --warm-soft: #2d2218;
    --ok: #5fd0a0; --ok-soft: #16302a; --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); }
img { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* header */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 19px; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--ink); font: inherit; font-size: 14px; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav.open { display: flex; }
}

/* type */
.eyebrow { font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--warm); margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 60px); }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 21px; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 680px; margin: 20px 0 0; }
p { margin: 14px 0 0; }
strong { color: var(--ink); }
.muted { color: var(--muted); }

/* sections */
section { padding: 72px 0; }
section.tint { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero { padding: 88px 0 64px; position: relative; overflow: hidden; }
.hero .art { position: absolute; right: -60px; top: 30px; width: 420px; opacity: .9; pointer-events: none; }
/* hidden below 1400px: between ~900 and 1400px it overlapped the H1 (launch review 20 Oct) */
@media (max-width: 1400px) { .hero .art { display: none; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1.5px solid var(--accent); }
.btn.primary { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #12141b; } }
.btn.ghost { color: var(--accent-ink); background: transparent; }
.btn:hover { filter: brightness(1.07); }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: 16px; }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.tag { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 12.5px; letter-spacing: .01em; padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.tag.warm { background: var(--warm-soft); color: var(--warm); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }

/* the input → transformation → output block */
.block { display: grid; grid-template-columns: 1fr auto 1.2fr auto 1fr; align-items: center; gap: 10px; margin-top: 28px; }
.block div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.block div b { display: block; font-family: var(--sans); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--warm); }
.block div span { font-size: 17px; font-weight: 500; }
.block .mid { border: 2px solid var(--accent); }
.block i { color: var(--accent); font-style: normal; font-size: 22px; }
@media (max-width: 620px) { .block { grid-template-columns: 1fr; } .block i { transform: rotate(90deg); justify-self: center; } }

/* label for claim types, used across the site */
.claimkey { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--muted); }

.note { border-left: 3px solid var(--warm); background: var(--warm-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; margin-top: 24px; font-size: 15px; }
.note p { margin: 0; color: var(--ink); }

.band { background: linear-gradient(135deg, var(--accent), #2b2580); color: #fff; border-radius: 22px; padding: 44px 32px; text-align: center; }
.band h2 { color: #fff; } .band p { color: rgba(255,255,255,.92); max-width: 620px; margin-left: auto; margin-right: auto; }
.band .btn { background: #fff; color: #2b2580; border-color: #fff; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 15px; color: var(--muted); }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr; } }
.site-foot .fh { margin: 0 0 10px; font-family: var(--sans); font-size: 14px; color: var(--ink); }
.site-foot ul { list-style: none; margin: 0; padding: 0; } .site-foot li { margin: 6px 0; }
.site-foot a { color: var(--muted); text-decoration: none; } .site-foot a:hover { color: var(--accent-ink); }
.site-foot .small { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.ext::after { content: " ↗"; }

/* Project 1 · registry demo */
.search { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; margin-top: 24px; }
@media (max-width: 700px) { .search { grid-template-columns: 1fr; } }
.search input[type=search], .search select { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.search input[type=search]:focus, .search select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.search label.chk { display: flex; gap: 8px; align-items: center; font-size: 15px; white-space: nowrap; }
.tries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); align-items: center; }
.tries button { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.tries button:hover { border-color: var(--accent); }
.results { display: grid; gap: 12px; margin-top: 18px; }
.ds { padding: 0; }
.ds summary { list-style: none; cursor: pointer; padding: 20px 22px; display: grid; gap: 6px; }
.ds summary::-webkit-details-marker { display: none; }
.ds[open] summary { border-bottom: 1px solid var(--line); }
.ds-top { display: flex; gap: 6px; }
.ds-title { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.25; }
.ds-sub { color: var(--muted); font-size: 15px; }
.ds-claims { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ds-grid { display: grid; grid-template-columns: 170px 1fr; gap: 10px 18px; margin: 0; padding: 20px 22px; font-size: 15px; }
@media (max-width: 620px) { .ds-grid { grid-template-columns: 1fr; gap: 2px; } .ds-grid dd { margin-bottom: 10px; } }
.ds-grid dt { font-family: var(--sans); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--warm); padding-top: 4px; }
.ds-grid dd { margin: 0; }
.ds-grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.anatomy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
@media (max-width: 620px) { .anatomy { grid-template-columns: 1fr; } }
.anatomy div { border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.anatomy b { font-family: var(--sans); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--warm); display: block; }
.phases { counter-reset: ph; display: grid; gap: 12px; margin-top: 24px; padding: 0; list-style: none; }
.phases li { counter-increment: ph; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.phases li::before { content: counter(ph); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 19px; background: var(--accent-soft); color: var(--accent-ink); }
.phases li.now::before { background: var(--accent); color: #fff; }

/* idea page: one quiet label per part */
.part { display: flex; align-items: center; gap: 10px; margin: 56px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.prose > .part:first-child, .wrap > .part:first-child { margin-top: 0; }

/* knowledge base */
.tag.soft { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.kb-search { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin-top: 28px; max-width: 820px; }
@media (max-width: 700px) { .kb-search { grid-template-columns: 1fr; } }
.kb-search input, .kb-search select, .brief-form select { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.kb-search input:focus, .kb-search select:focus, .brief-form select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font: inherit; font-size: 14px; font-weight: 500; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: #12141b; } }
#kres { margin-top: 14px; }
.kb-card { display: flex !important; flex-direction: column; gap: 10px; }
.kb-card h3, .card .meta + h3 { margin-top: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-foot { margin-top: auto !important; font-size: 14px !important; }
.coming { margin-top: 48px; }
.coming h2 { font-size: 26px; }
.coming ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
@media (max-width: 760px) { .coming ul { grid-template-columns: 1fr; } }
.coming li { font-size: 16px; }

/* quiet briefing */
.brief { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; }
@media (max-width: 820px) { .brief { grid-template-columns: 1fr; } }
.brief-form { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 14px; }
.brief-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.brief-form .btn { justify-content: center; cursor: pointer; font: inherit; font-weight: 600; }
.small-print { font-size: 13px; margin: 0; }

/* article */
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.crumbs a { color: var(--muted); }
.art-title { font-size: clamp(32px, 5vw, 48px); margin-top: 14px; }
.byline { font-size: 14px; color: var(--muted); margin-top: 18px; }
.prose { font-size: 18px; }
.prose h2 { font-size: clamp(23px, 3vw, 28px); margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 22px; } .prose li { margin: 8px 0; }
.lead-card { margin-top: 40px; border-color: var(--accent); }
.lead-card h3 { margin-top: 0; }
.ext-card h3::after { content: " ↗"; color: var(--accent); }
button, input, select, textarea { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* quotable answer, citation, challenge (5850: be a source AI chats, blogs and podcasts quote) */
.answer { background: var(--accent-soft); border-radius: 16px; padding: 20px 22px; margin-bottom: 36px; }
.answer .eyebrow { color: var(--accent-ink); margin-bottom: 6px; }
.answer p:last-child { margin: 0; font-size: 18px; color: var(--ink); }
.after { margin-top: 24px; }
.after h3 { margin-top: 0; }
.cite { font-size: 14px !important; word-break: break-word; background: var(--paper); border-radius: 10px; padding: 10px 12px; }
.linkbtn { background: none; border: none; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: pointer; font-size: 16px; }

/* comparison tables (scroll sideways on phones, inside their own box) */
.table-wrap { overflow-x: auto; margin-top: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.table-wrap:focus { outline: 2px solid var(--accent); }
.table-wrap table { border-collapse: collapse; min-width: 760px; font-size: 14.5px; line-height: 1.45; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table-wrap thead th { background: var(--paper); font-weight: 600; font-size: 13px; position: sticky; top: 0; }
.table-wrap tbody th { font-weight: 600; white-space: nowrap; }
.table-wrap tbody tr:last-child > * { border-bottom: none; }
.table-dl { font-size: 14px !important; color: var(--muted); margin-top: 8px !important; }
.prose h3 { font-size: 20px; margin-top: 28px; }
.prose > .card, .prose details.card { margin-top: 24px; }
.sources summary { cursor: pointer; }
.sources ul { font-size: 14px; margin-top: 12px; } .sources li { margin: 6px 0; word-break: break-word; }
.changes ul { font-size: 15px; }
.challenge { margin-top: 14px; } .challenge .reply { font-size: 15px; }

/* glossary */
.glossary { margin: 0; display: grid; gap: 4px; }
.term { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.term dt { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.term dt a { color: var(--ink); text-decoration: none; } .term dt a:hover { color: var(--accent-ink); }
.term dd { margin: 6px 0 0; color: var(--muted); }
.term:target { background: var(--accent-soft); border-radius: 12px; padding-left: 14px; padding-right: 14px; }

/* press */
.press-top { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: start; }
@media (max-width: 620px) { .press-top { grid-template-columns: 1fr; } }
.press-photo { border-radius: 18px; width: 160px; height: 160px; object-fit: cover; }
.press-top h2 { margin-top: 0; }

/* tool cards */
.tool h3 { margin-top: 12px; }
.prose .table-wrap { width: min(1040px, calc(100vw - 40px)); margin-left: calc(50% - min(520px, calc(50vw - 20px))); }
.table-wrap tbody th { white-space: normal; min-width: 130px; }

/* The Reaction (27 Oct 2026) */
.rx-consent { display: flex !important; flex-direction: row !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; font-size: 14px; }
.rx-consent input { margin-top: 4px; }
.rx-form input[type=email] { padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 15px; width: 100%; }
.rx-msg { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 15px; }
.rx-msg.ok { background: var(--ok-soft); } .rx-msg.bad { background: var(--warm-soft); }
.rx-issue { margin-top: 26px; } .rx-issue h3 { font-size: 22px; }
.rx-item { border-top: 1px solid var(--line); padding: 14px 0; } .rx-item h4 { margin: 4px 0 0; font-size: 18px; }

/* working papers (28 Oct): two-minute summary and contents */
.answer ul { margin: 0; padding-left: 20px; font-size: 16.5px; } .answer li { margin: 6px 0; }
.toc ol { font-size: 15px; margin: 12px 0 0; padding-left: 22px; } .toc li { margin: 4px 0; }
.prose h2[id] { scroll-margin-top: 84px; }
/* Respond to a paper (29 Oct) */
.respond { margin-top: 36px; } .respond-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .respond-form .two { grid-template-columns: 1fr; } }
.respond-form input:not([type=checkbox]), .respond-form textarea { width: 100%; font: inherit; font-size: 16px; font-weight: 400; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); box-sizing: border-box; }
.respond-form input:focus, .respond-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.respond-msg { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
/* Papers as a book; Mark's why (29 Oct) */
.why-quote { margin: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--warm); }
.why-quote p { font-family: var(--serif, Georgia, serif); font-size: clamp(20px, 2.4vw, 25px); line-height: 1.45; margin: 0 0 10px; }
.why-quote footer { font-size: 14px; color: var(--muted); }
.chapter h3 a { color: inherit; text-decoration: none; } .chapter h3 a:hover { text-decoration: underline; }
.es-link { white-space: nowrap; }
/* Home: who's behind this (29 Oct) */
.who { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: start; }
.who img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.who h3 { margin: 4px 0 8px; } .who p { margin: 0 0 8px; }
@media (max-width: 520px) { .who { grid-template-columns: 1fr; } .who img { width: 96px; height: 96px; } }

/* menu items never split over two lines (Spanish labels are longer; 30 Oct) */
.nav a { white-space: nowrap; }

/* "Leer en español" band under the header of every English page (D16, 30 Oct): noticeable but tidy */
.es-band { background: var(--accent-soft); border-bottom: 1px solid var(--line); padding: 14px 0 12px; }
.es-band p { margin: 0; }
.es-band-ask { font-family: var(--serif); font-size: 21px; line-height: 1.35; color: var(--ink); }
.es-band-ask a { white-space: nowrap; text-underline-offset: 3px; }
.es-band-note { font-size: 13.5px; color: var(--muted); margin-top: 4px !important; }
@media (max-width: 520px) { .es-band-ask { font-size: 18px; } }

/* Mark's role line on /press/ (D17) */
.role-line { font-size: 15px; color: var(--muted); margin: 0 0 6px; }
/* Cartoons (30 Oct) */
.cartoon-grid .cartoon-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.cartoon-card img { width: 100%; height: auto; border-radius: 10px; aspect-ratio: 1 / 1; object-fit: cover; }
.cartoon-card h3 { margin: 6px 0 0; } .cartoon-card p { margin: 0; color: var(--muted); font-size: 15px; }
.cartoon-figure { margin: 0 0 26px; } .cartoon-figure img { width: 100%; max-width: 560px; height: auto; border-radius: 12px; display: block; margin: 0 auto; }
.cartoon-figure figcaption { font-size: 14px; color: var(--muted); max-width: 560px; margin: 10px auto 0; }
