:root{
  --bg:#f7f3ee; --panel:#fffdfa; --soft:#efe8df; --line:#e3d9cc; --text:#2b2520; --muted:#7a6e63;
  --accent:#9a5b3c; --accent-ink:#fff; --accent-soft:#f3e3d8; --them:#ffffff; --me:#e9dccf;
  --care:#2f6b5a; --care-soft:#e2f0eb; --danger:#a33a2a; --shadow:0 1px 2px rgba(60,40,20,.06),0 4px 16px rgba(60,40,20,.06);
}
@media (prefers-color-scheme: dark){ :root[data-color]:not([data-color="warm"]):not([data-theme="light"]){
  --bg:hsl(var(--h) 14% 9%); --panel:hsl(var(--h) 13% 12%); --soft:hsl(var(--h) 12% 16%); --line:hsl(var(--h) 11% 21%);
  --text:hsl(var(--h) 18% 91%); --muted:hsl(var(--h) 9% 63%);
  --accent:hsl(var(--h) 55% 68%); --accent-ink:hsl(var(--h) 14% 9%); --accent-soft:hsl(var(--h) 25% 20%); --them:hsl(var(--h) 12% 14%); --me:hsl(var(--h) 22% 23%); --shadow:none;
}}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --bg:#1b1815; --panel:#24201c; --soft:#2d2823; --line:#3a332c; --text:#efe7de; --muted:#a59888;
  --accent:#d39472; --accent-ink:#1b1815; --accent-soft:#3a2b22; --them:#2b2621; --me:#3a2f26;
  --care:#7cc4ad; --care-soft:#1f302a; --danger:#e07a68; --shadow:none;
}}
/* Colour themes: Warm is the original; the others are built from one hue (--h) */
:root[data-color="rose"]{--h:340} :root[data-color="ocean"]{--h:200} :root[data-color="forest"]{--h:145} :root[data-color="lavender"]{--h:265} :root[data-color="midnight"]{--h:225} :root[data-color="blush"]{--h:328} :root[data-color="ruby"]{--h:354} :root[data-color="sunset"]{--h:16} :root[data-color="golden"]{--h:40} :root[data-color="plum"]{--h:296} :root[data-color="velvet"]{--h:345}
:root[data-color]:not([data-color="warm"]){
  --bg:hsl(var(--h) 30% 96%); --panel:hsl(var(--h) 40% 99%); --soft:hsl(var(--h) 25% 91%); --line:hsl(var(--h) 22% 85%);
  --text:hsl(var(--h) 20% 15%); --muted:hsl(var(--h) 10% 42%);
  --accent:hsl(var(--h) 45% 40%); --accent-ink:#fff; --accent-soft:hsl(var(--h) 55% 92%); --them:#fff; --me:hsl(var(--h) 38% 88%);
}
:root[data-color="midnight"]:not([data-theme="light"]){
  --bg:hsl(225 25% 9%); --panel:hsl(225 22% 13%); --soft:hsl(225 18% 17%); --line:hsl(225 15% 23%); --text:hsl(225 20% 92%); --muted:hsl(225 10% 64%);
  --accent:hsl(225 70% 72%); --accent-ink:hsl(225 25% 9%); --accent-soft:hsl(225 30% 22%); --them:hsl(225 20% 15%); --me:hsl(225 28% 24%); --shadow:none;
}
:root[data-color="velvet"]:not([data-theme="light"]){
  --bg:hsl(345 30% 8%); --panel:hsl(345 26% 12%); --soft:hsl(345 22% 16%); --line:hsl(345 18% 22%); --text:hsl(345 25% 92%); --muted:hsl(345 12% 66%);
  --accent:hsl(345 70% 70%); --accent-ink:hsl(345 30% 8%); --accent-soft:hsl(345 35% 22%); --them:hsl(345 24% 14%); --me:hsl(345 32% 24%); --shadow:none;
}
:root[data-theme="dark"]{
  --bg:#1b1815; --panel:#24201c; --soft:#2d2823; --line:#3a332c; --text:#efe7de; --muted:#a59888;
  --accent:#d39472; --accent-ink:#1b1815; --accent-soft:#3a2b22; --them:#2b2621; --me:#3a2f26;
  --care:#7cc4ad; --care-soft:#1f302a; --danger:#e07a68; --shadow:none;
}
:root[data-theme="dark"][data-color]:not([data-color="warm"]){
  --bg:hsl(var(--h) 14% 9%); --panel:hsl(var(--h) 13% 12%); --soft:hsl(var(--h) 12% 16%); --line:hsl(var(--h) 11% 21%);
  --text:hsl(var(--h) 18% 91%); --muted:hsl(var(--h) 9% 63%);
  --accent:hsl(var(--h) 55% 68%); --accent-ink:hsl(var(--h) 14% 9%); --accent-soft:hsl(var(--h) 25% 20%); --them:hsl(var(--h) 12% 14%); --me:hsl(var(--h) 22% 23%); --shadow:none;
}
:root{--warn:#9a6a1c}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.65 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
header{display:flex;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid var(--line);background:var(--panel)}
header a.logo{font-family:Georgia,serif;font-size:22px;font-weight:600;color:var(--text);text-decoration:none}
header .sp{flex:1}
header nav a{color:var(--muted);font-size:14px;margin-left:14px}
main{max-width:760px;margin:0 auto;padding:28px 18px 80px}
h1{font-family:Georgia,serif;font-weight:600;font-size:32px;margin:0 0 4px}
h2{font-family:Georgia,serif;font-weight:600;font-size:21px;margin:30px 0 8px}
h3{font-size:16px;margin:18px 0 6px}
.meta{color:var(--muted);font-size:14px;margin-bottom:18px}
.draft{background:color-mix(in srgb,var(--warn) 14%,transparent);border:1px solid color-mix(in srgb,var(--warn) 45%,transparent);border-radius:12px;padding:12px 14px;font-size:14px;margin:12px 0 22px}
.summary{background:var(--accent-soft);border-radius:12px;padding:14px 18px;margin:14px 0}
.summary ul{margin:6px 0 0;padding-left:20px}
table{width:100%;border-collapse:collapse;font-size:14.5px;margin:8px 0;background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden}
th,td{text-align:left;vertical-align:top;padding:8px 10px;border-bottom:1px solid var(--line)}
th{background:var(--soft);font-size:13px;color:var(--muted)}
tr:last-child td{border-bottom:0}
.wrap{overflow-x:auto}
a{color:var(--accent)}
.blank{background:var(--soft);border-radius:4px;padding:0 4px;font-family:ui-monospace,Consolas,monospace;font-size:.9em}
footer{color:var(--muted);font-size:13px;border-top:1px solid var(--line);margin-top:40px;padding-top:14px}
