/* Knotworthy: shared styles for every page. System fonts only, so no page asks another site for anything. */
:root{
  --denim:#3b5b8c; --denim-deep:#304c77; --denim-ink:#24395c; --cream:#fbf3e4; --tangerine:#ff9a45;
  --soft:rgba(251,243,228,.85); --line:rgba(251,243,228,.25);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{
  background:radial-gradient(120% 80% at 50% 0%, var(--denim) 0%, var(--denim-deep) 100%) fixed, var(--denim);
  color:var(--cream);
  font-family:"Avenir Next","Avenir","Segoe UI",system-ui,-apple-system,sans-serif;
  min-height:100vh; display:flex; flex-direction:column; align-items:center;
  padding:0 1rem 2rem; -webkit-font-smoothing:antialiased;
}
a{color:var(--cream); text-underline-offset:3px}
a:hover{color:var(--tangerine)}

/* top bar on the inner pages */
.bar{width:min(60rem,100%); display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:1.1rem 0; border-bottom:1px solid var(--line)}
.home{display:flex; align-items:center; gap:.55rem; text-decoration:none; font-weight:700; letter-spacing:.01em}
.home img{width:30px; height:30px; display:block}
.bar nav{display:flex; gap:1.25rem; font-size:.95rem}
.bar nav a{text-decoration:none; color:var(--soft)}
.bar nav a:hover,.bar nav a[aria-current]{color:var(--cream)}
.bar nav a[aria-current]{box-shadow:0 2px 0 var(--tangerine)}

main{width:min(60rem,100%); flex:1; text-align:center; padding-top:3rem}
h1{margin:0 0 2rem; line-height:0}
.logo{width:min(560px,88vw); height:auto; display:block; margin:0 auto}
.after{animation:rise .7s ease-out 2.25s both}
.kw-still .after{animation:none}
.replay{display:block; margin:0 auto; padding:0; border:0; background:none; cursor:pointer; width:min(560px,88vw)}
.replay .logo{width:100%}
.replay.small{width:min(300px,62vw)}   /* inner pages: the logo is much smaller than on the home page */
.replay:focus-visible{outline:2px solid var(--tangerine); outline-offset:8px; border-radius:10px}
.tag{font-size:clamp(1.15rem,3.6vw,1.4rem); font-weight:600; margin:0 0 1rem}
.lede{font-size:1.05rem; line-height:1.6; color:var(--soft); margin:0 auto 2rem; max-width:36ch}
.soon{display:inline-block; background:var(--cream); color:var(--denim); border-radius:999px;
  padding:.55rem 1.3rem; font-size:.78rem; font-weight:700; letter-spacing:.16em; text-transform:uppercase}

/* a section of cards: a nice picture in a box, the whole box is the link */
section{margin:3rem 0 1rem; text-align:left}
section h2{font-size:1.45rem; margin:0 0 .4rem}
section > p{color:var(--soft); line-height:1.6; margin:0 0 1.5rem; max-width:44rem}
.cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(15.5rem,1fr)); gap:1.25rem}
.card{display:flex; flex-direction:column; background:var(--cream); color:var(--denim-ink); border-radius:14px;
  overflow:hidden; text-decoration:none; box-shadow:0 6px 18px rgba(20,32,55,.28);
  transition:transform .15s ease, box-shadow .15s ease; outline:3px solid transparent; outline-offset:0}
.card:hover,.card:focus-visible{color:var(--denim-ink); transform:translateY(-3px);
  box-shadow:0 12px 26px rgba(20,32,55,.36); outline-color:var(--tangerine)}
.pic{aspect-ratio:1/1; background:#efe4cf; display:flex; align-items:center; justify-content:center; overflow:hidden}
.pic img{display:block; width:100%; height:100%; object-fit:cover}
.pic.page img{object-fit:contain; height:92%; width:auto; box-shadow:0 2px 10px rgba(47,38,32,.25)}
.pic.denim{background:var(--denim)}
.pic.denim img{object-fit:contain; width:84%; height:auto}
.words{padding:1rem 1.1rem 1.15rem}
.words h3{margin:0 0 .35rem; font-size:1.1rem}
.words p{margin:0 0 .6rem; font-size:.93rem; line-height:1.5; color:#41557a}
.meta{font-size:.74rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:#c86a1c}

/* about */
.about{display:grid; grid-template-columns:minmax(0,17rem) minmax(0,1fr); gap:2.5rem; align-items:start; text-align:left; margin-top:1rem}
.about img{width:100%; height:auto; border-radius:14px; display:block; box-shadow:0 8px 22px rgba(20,32,55,.35)}
.about h1{line-height:1.15; font-size:clamp(1.7rem,4.5vw,2.3rem); margin:0 0 1.25rem}
.about p{line-height:1.7; color:var(--soft); margin:0 0 1rem; font-size:1.04rem}
.about p.signature{font-style:italic; color:var(--cream); margin-bottom:.2rem}
.about p.fullname{margin:0; color:var(--cream)}
@media (max-width:42rem){.about{grid-template-columns:1fr} .about img{max-width:17rem}}

footer{margin-top:3.5rem; padding-top:1.25rem; border-top:1px solid var(--line); width:min(60rem,100%);
  font-size:.85rem; line-height:1.6; color:var(--soft); text-align:center}
footer p{margin:.25rem 0}

@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.after{animation:none} .card{transition:none} .card:hover{transform:none}}

/* a short row of cards, centred (the home page) */
.cards.row{grid-template-columns:repeat(auto-fit,minmax(15.5rem,18.5rem)); justify-content:center}
.cards.row.four{grid-template-columns:repeat(auto-fit,minmax(12.5rem,1fr))}
.tags{display:block; font-size:.7rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:#6b7fa3; margin-bottom:.3rem}

/* narrow screens: the menu goes under the K and name rather than pushing the page sideways */
@media (max-width:30rem){
  .bar{flex-wrap:wrap; justify-content:center; row-gap:.6rem}
  .bar nav{gap:1rem; font-size:.92rem}
}

/* each card carries its permanent reference, at the right of its tag line */
.tags{display:flex; justify-content:space-between; gap:.5rem}
.tags{align-items:baseline}
.ref{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace; font-weight:400; color:#c86a1c; letter-spacing:.02em; font-size:.8rem}

/* knotworthy.co.uk/<ref>: one card, centred, with the ways on */
.one .cards{grid-template-columns:minmax(0,22rem); justify-content:center}
.onward{display:flex; flex-wrap:wrap; justify-content:center; gap:.6rem; margin:1.6rem 0 .8rem}
.onward a,.onward button{font:inherit; background:none; cursor:pointer; padding:.5rem 1.05rem; border:1px solid var(--line); border-radius:999px; text-decoration:none; color:var(--cream); font-size:.95rem}
.onward a:hover,.onward button:hover{border-color:var(--tangerine); color:var(--tangerine)}
.onward a.go{background:var(--cream); color:var(--denim); border-color:var(--cream); font-weight:700}
.onward a.go:hover{background:var(--tangerine); border-color:var(--tangerine); color:var(--denim-ink)}
.share{text-align:center; color:var(--soft); font-size:.92rem; margin:0}
.one > p{max-width:none}

/* not found */
.missing{padding:3rem 0 1rem}
h1.plain{line-height:1.2; font-size:clamp(1.7rem,4.5vw,2.3rem); margin:0 0 1rem}

/* a piece's own pages (/K2026-06/start/ and the rest): their bodies bring their own styles */
main.own{text-align:left; padding-top:2rem}
