/* Patchwork touches shared by every tool page. Loaded after each tool's own styles, so it only nudges colours and type. */

/* Light: warm clay colours from the homepage instead of the cool teal. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink:#181512; --muted:#5e554b; --paper:#f4ead8; --card:#fffaf0; --line:#e3d6be;
    --accent:#22315c; --accent-ink:#ffffff; --warn:#b5522e; --bad:#b5522e; --tint:#f1e4cc;
  }
}
:root[data-theme="light"] {
  --ink:#181512; --muted:#5e554b; --paper:#f4ead8; --card:#fffaf0; --line:#e3d6be;
  --accent:#22315c; --accent-ink:#ffffff; --warn:#b5522e; --bad:#b5522e; --tint:#f1e4cc;
}
/* Dark: keep the dark page, swap the teal for blush. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent:#f1b8ad; --accent-ink:#181512; --paper:#1d1916; --card:#28221e; --line:#3d342d; --tint:#332a24; }
}
:root[data-theme="dark"] { --accent:#f1b8ad; --accent-ink:#181512; --paper:#1d1916; --card:#28221e; --line:#3d342d; --tint:#332a24; }

/* Patterned strip across the top, with a way back to the homepage. */
.pw-strip { display:flex; gap:4px; height:52px; overflow:hidden; background:#2a2420; padding:4px; }
.pw-strip .pw-t { flex:0 0 44px; height:44px; border-radius:4px; overflow:hidden; }
.pw-strip .pw-t svg { width:100%; height:100%; display:block; }
.pw-home { flex:none; display:flex; align-items:center; gap:6px; height:44px; padding:0 14px; border-radius:4px; background:#f4ead8; color:#22315c; text-decoration:none; font:400 18px/1 "DM Serif Display", Georgia, serif; white-space:nowrap; transition:transform .2s cubic-bezier(.3,1.6,.5,1); }
.pw-home:hover { transform:rotate(-3deg) scale(1.04); }
.pw-home:focus-visible { outline:3px solid #f2c318; outline-offset:2px; }

/* Footer with the roadmap link. */
.pw-foot { margin-top:24px; }
.pw-foot-in { max-width:640px; margin:0 auto; padding:0 16px 20px; text-align:center; }
.pw-foot-in p { margin:0 0 12px; color:var(--muted); font-size:15px; }
.pw-links { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.pw-foot .pw-home { background:#22315c; color:#f4ead8; box-shadow:3px 3px 0 #b5522e; }
.pw-coffee { display:flex; align-items:center; height:44px; border-radius:8px; transition:transform .2s cubic-bezier(.3,1.6,.5,1); }
.pw-coffee:hover, .pw-coffee:focus-visible { transform:rotate(-3deg) scale(1.04); }
.pw-coffee:focus-visible { outline:3px solid #f2c318; outline-offset:2px; }
.pw-foot .pw-home.pw-alt { background:#f2c318; color:#181512; box-shadow:3px 3px 0 #181512; }

/* Headings everywhere use the site display serif. It has one weight, so headings are set at 400. */
:root { --display:"DM Serif Display", Georgia, serif; }
h1, h2, .lvn, .verdict b { font-weight:400; }
h2 { font-size:22px; letter-spacing:.005em; }
.pct { font-family:var(--body); font-weight:700; }

/* Bigger page heading in the site colours. */
.top h1 { font-family:"DM Serif Display", Georgia, serif; font-weight:400; font-size:clamp(36px, 7.5vw, 50px); line-height:1.02; color:#22315c; letter-spacing:-.005em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .top h1 { color:#f1b8ad; } }
:root[data-theme="dark"] .top h1 { color:#f1b8ad; }

/* Each tool has its own two colours, the same as its tile on the tools homepage and its tab icon (icon.svg in the tool's folder).
   The page says which tool it is with <html data-tool="folder-name">. The heading band takes the colours; the rest of the page stays cream. */
[data-tool="slab-template-maker"] { --band:#22315c; --band-ink:#f4ead8; }
[data-tool="cane-die-maker"] { --band:#a3bba2; --band-ink:#22315c; }
[data-tool="ceramic-frame-maker"] { --band:#f1b8ad; --band-ink:#181512; }
[data-tool="nerikomi-clay-matcher"] { --band:#181512; --band-ink:#f4ead8; }
[data-tool="stamp-maker"] { --band:#f2c318; --band-ink:#22315c; }
/* In dark mode the ink band would vanish into the dark page, so it turns cream with ink letters, like the other half of its tile. */
@media (prefers-color-scheme: dark) { :root[data-tool="nerikomi-clay-matcher"]:not([data-theme="light"]) { --band:#f4ead8; --band-ink:#181512; } }
:root[data-tool="nerikomi-clay-matcher"][data-theme="dark"] { --band:#f4ead8; --band-ink:#181512; }
html[data-tool] .top { background:var(--band); color:var(--band-ink); box-shadow:0 0 0 100vmax var(--band); clip-path:inset(0 -100vmax); padding-top:26px; padding-bottom:24px; }
html[data-tool] .top h1, html[data-tool] .top p, html[data-tool] .top .kicker, html[data-tool] .top a { color:var(--band-ink) !important; }

/* Cards get a small offset shadow, like the tiles on the homepage. */
.card { box-shadow:3px 3px 0 var(--line); border-radius:12px 16px 12px 14px; }

@media (prefers-reduced-motion: reduce) { .pw-home, .pw-home:hover { transition:none; transform:none; } }
