:root{
  /* palette from the design brief, matching the logo and every picture: cream paper, olive ink, pink playhead.
     Pink is reserved for the playhead, slot limit lines, the AI result edge and ad blocks; never text on cream. */
  --bg:#F5F2E9;--text:#1C1B16;--accent:#FF4F8B;--primary:#4A5C0C;--surface:#FFFFFF;
  --muted:#55534A;--line:#1C1B16;--tint:#E6E8D3;--ad-tint:#FFE1EC;--olive-light:#D3DDA0;
  --fh:"Schibsted Grotesk","Arial Narrow",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --fb:"Instrument Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --maxw:1240px;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--fb);font-size:1rem;line-height:1.55;min-height:100vh;display:flex;flex-direction:column}
main{flex:1}
img,svg{max-width:100%}
h1,h2,h3,h4{font-family:var(--fh);line-height:1.15;margin:0 0 .5rem;letter-spacing:-.01em}
h1{font-size:clamp(1.7rem,3.6vw,2.4rem);font-weight:800}
h2{font-size:clamp(1.3rem,2.4vw,1.7rem);font-weight:700}
h3{font-size:1.1rem;font-weight:700}
p{margin:0 0 .8rem}
a{color:var(--primary);text-underline-offset:3px}
a:hover{color:var(--text)}
:focus-visible{outline:3px solid var(--text);outline-offset:2px;box-shadow:0 0 0 6px var(--olive-light);border-radius:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-999px;top:0;background:var(--text);color:#fff;padding:.5rem 1rem;z-index:100}
.skip:focus{left:0}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 1rem}

.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.mt{margin-top:.9rem}
.flush{margin:0}
/* top bar */
.topbar{position:sticky;top:0;z-index:50;background:var(--surface);border-bottom:2px solid var(--line)}
.bar-in{max-width:var(--maxw);margin:0 auto;padding:.4rem 1rem;display:flex;align-items:center;gap:1rem;min-height:52px}
.brand{display:flex;align-items:center;gap:.5rem;text-decoration:none;color:var(--text);line-height:1;flex:none}
.logo{display:block;height:36px;width:auto;max-width:none}
.foot .logo{height:28px}
/* text beside a picture by the illustrator */
.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,420px);gap:1.2rem 1.6rem;align-items:center}
.split-img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border:2px solid var(--line);border-radius:6px;background:var(--surface)}
.split-img.sq{aspect-ratio:1/1;max-width:320px;justify-self:end}
.split.in-card{grid-template-columns:minmax(0,1fr) minmax(0,360px);margin-bottom:.6rem}
.split.in-card p{margin:0}
.intro.split{padding:1rem 0 1rem}
.intro.split .hint{margin-top:.5rem}
.ticks{padding-left:1.2rem;margin:.4rem 0 0}
.ticks li{margin-bottom:.3rem}
/* navigation as mixer channel strips: channel label over the name */
.nav{margin-left:auto}
.nav ul{list-style:none;display:flex;gap:0;margin:0;padding:0;border-left:2px solid var(--line)}
.nav li{border-right:2px solid var(--line)}
.nav li.aux{margin-left:.6rem;border-left:2px solid var(--line)}
.nav a{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;padding:.25rem .7rem .3rem;font-family:var(--fh);font-weight:700;font-size:.92rem;line-height:1.15;color:var(--text);text-decoration:none;position:relative}
.nav .ch{font-family:var(--fb);font-weight:600;font-size:.64rem;letter-spacing:.1em;color:var(--muted);display:flex;align-items:center;gap:.3rem}
.nav .ch::before{content:"";width:6px;height:6px;border-radius:50%;border:1.5px solid var(--muted);background:transparent}
.nav a:hover{background:var(--tint)}
.nav a[aria-current="page"]{background:var(--text);color:#fff}
.nav a[aria-current="page"] .ch{color:var(--olive-light)}
.nav a[aria-current="page"] .ch::before{background:var(--olive-light);border-color:var(--olive-light)}
.nav-btn{display:none;margin-left:auto;background:var(--surface);border:2px solid var(--line);border-radius:4px;padding:.35rem .7rem;font:700 .9rem var(--fh);color:var(--text);cursor:pointer}

/* ruler divider */
.ruler{position:relative;height:20px;margin:0;border:0;background:
  repeating-linear-gradient(90deg,var(--text) 0 1px,transparent 1px 50px) left bottom/100% 16px no-repeat,
  repeating-linear-gradient(90deg,var(--text) 0 1px,transparent 1px 10px) left bottom/100% 8px no-repeat}
.ruler::after{content:"";position:absolute;left:var(--ph,62%);top:0;bottom:0;width:2px;background:var(--accent);transition:left .25s ease}
.ruler.thin{opacity:.8}

/* intro */
.intro{padding:.9rem 0 .6rem}
.intro p{color:var(--muted);margin:0;max-width:60ch}
.intro-row{display:flex;flex-wrap:wrap;gap:.5rem 2rem;align-items:baseline;justify-content:space-between}

/* home hero */
.hero{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;align-items:start;padding:1.8rem 0 1.4rem}
.hero .ruler.live{height:24px;margin-top:.2rem}
.hero .ruler.live::after{left:var(--ph,62%)}
.hero h1{font-size:clamp(2.2rem,5.6vw,3.9rem);line-height:1.04;letter-spacing:-.02em;margin-bottom:.9rem}
.hero .lede{font-size:1.15rem;color:var(--muted);max-width:46ch;margin-bottom:1.2rem}
.hero .btnrow{margin:0}
.btn.lg{font-size:1.05rem;padding:.75rem 1.3rem}
.btn.hot{background:var(--text);color:#fff;border-color:var(--accent)}
.btn.hot:hover{background:var(--primary);color:#fff}
/* hero picture: a full-width waveform band on the shared cream paper, sitting directly on the live ruler */
.hero-art{margin:0;border:0;background:none;overflow:hidden}
.hero-art img{display:block;width:100%;height:clamp(140px,14vw,180px);object-fit:cover;object-position:50% 55%}
@media (min-width:761px){
  /* tool-first: headline and action on one row, the painted waveform band across the full width, the ruler under it, then the Spot Timer */
  .hero{grid-template-columns:minmax(0,1fr);grid-template-areas:"txt" "art" "rul";gap:0;padding:.9rem 0 .6rem;align-items:center}
  .hero>div:first-child{grid-area:txt;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:2rem;align-items:end;margin-bottom:.4rem}
  .hero>div:first-child>h1,.hero>div:first-child>.lede,.hero>div:first-child>.example-line{grid-column:1}
  .hero>div:first-child>.btnrow{grid-column:2;grid-row:1/span 3;align-self:center;flex-direction:column;align-items:stretch}
  .hero .ruler.live{grid-area:rul;margin-top:0}
  .hero-art{grid-area:art}
  .hero h1{font-size:clamp(1.6rem,2.6vw,2.1rem);margin-bottom:.3rem}
  .hero .lede{font-size:1rem;margin-bottom:.3rem;max-width:none}
  .hero .example-line{margin-bottom:0}
  .hero .textlink{text-align:center}
}
.example-line{font-size:.95rem;margin:0 0 1.1rem;color:var(--text)}
.textlink{align-self:center;font:700 1rem var(--fh);color:var(--text);text-underline-offset:4px;padding:.5rem .25rem}
.textlink:hover{color:var(--primary)}
.road{margin:.3rem 0 0;padding-left:1.2rem}
.road li{margin-bottom:.3rem}
.alt-card{background:var(--tint)}
.cta-band a.inv{color:#fff}
.ea-form{flex:1 1 340px;max-width:520px}
.ea-form label{color:#fff}
.ea-row{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.3rem}
.ea-row input{flex:1 1 220px;width:auto}
.ea-form .status{color:#fff}
.ai-try{border-left:8px solid var(--primary)}
.ai-try .ai-form{display:grid;gap:.6rem}
.ai-try textarea{min-height:110px}
.cta-band{background:var(--primary);color:#fff;border-top:2px solid var(--line);border-bottom:2px solid var(--line);padding:2.4rem 0}
.cta-band .wrap{display:flex;flex-wrap:wrap;gap:1rem 2rem;align-items:center;justify-content:space-between}
.cta-band h2{color:#fff;font-size:clamp(1.5rem,3vw,2.1rem);margin:0 0 .3rem}
.cta-band p{margin:0;color:#EEF0DC}
.cta-band .btn{border-color:#fff}
.cta-band .btn.hot{border-color:var(--accent)}
.cta-band .btn.hot:hover{background:#fff;color:var(--text)}
.cta-band .btn.pri{background:#fff;color:var(--primary)}
.cta-band .btn.pri:hover{background:var(--text);color:#fff}
.cta-band .btn:not(.pri){background:transparent;color:#fff}
.cta-band .btn:not(.pri):hover{background:#fff;color:var(--primary)}
.bento{display:grid;grid-template-columns:repeat(12,1fr);gap:.9rem}
.bento .b7{grid-column:span 7}.bento .b5{grid-column:span 5}
/* tool pictures: one 3:2 picture per tool, shown whole and centred (no per-card crops) */
.tool-img{display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:cover;object-position:50% 50%;border:2px solid var(--line);border-radius:4px;background:var(--bg);margin:.2rem 0 .5rem}
.page-art{display:block;width:100%;max-width:720px;height:auto;aspect-ratio:3/2;object-fit:cover;object-position:50% 50%;border:2px solid var(--line);border-radius:6px;background:var(--bg);margin:.2rem 0 .9rem}
.page-art.wide{max-width:none;aspect-ratio:21/9}
.nf-img{display:block;width:100%;max-width:640px;height:auto;aspect-ratio:16/5;object-fit:cover;object-position:50% 50%;margin:0 auto 1rem;border:2px solid var(--line);border-radius:6px}
.nf-img.whole{max-width:480px;aspect-ratio:3/2;object-fit:contain;background:var(--bg)}
.tool-card.alt{background:var(--tint)}
.tool-card.big h3{font-size:1.5rem}

/* cards */
.card{background:var(--surface);border:2px solid var(--line);border-radius:6px;padding:.9rem 1rem}
.card-head{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.5rem;flex-wrap:wrap}
.card-head h2,.card-head h3{margin:0}
.tag{font-size:.78rem;font-weight:600;border:1.5px solid var(--line);border-radius:99px;padding:.1rem .6rem;background:var(--bg)}
.grid{display:grid;gap:.9rem}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}

/* lab */
.lab{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:.9rem;align-items:start}
.lab-side{display:grid;gap:.9rem}
textarea,input[type=text],input[type=email],input[type=number],select{width:100%;font:inherit;color:var(--text);background:var(--surface);border:2px solid var(--line);border-radius:4px;padding:.55rem .65rem}
textarea{resize:vertical;line-height:1.6}
#script{min-height:clamp(140px,24vh,210px);font-size:1.05rem;background:var(--bg)}
.readout{display:flex;flex-wrap:wrap;gap:.4rem 1.6rem;align-items:flex-end;margin:.7rem 0 .4rem}
.big{font-family:var(--fh);font-weight:700;font-size:clamp(2.2rem,5vw,3.4rem);line-height:1}
.stat{font-size:.9rem;color:var(--muted)}
.stat b{display:block;font-family:var(--fh);font-size:1.3rem;color:var(--text)}
.btnrow{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.6rem}
.btn{display:inline-block;font:700 .95rem var(--fh);padding:.55rem 1rem;border:2px solid var(--line);border-radius:4px;background:var(--surface);color:var(--text);cursor:pointer;text-decoration:none}
.btn:hover{background:var(--tint);color:var(--text)}
.btn.pri{background:var(--primary);color:#fff}
.btn.pri:hover{background:var(--text);color:#fff}
.btn.sm{font-size:.82rem;padding:.3rem .65rem}
.btn[disabled]{opacity:.55;cursor:wait}
.hint{font-size:.85rem;color:var(--muted);margin:.4rem 0 0}
label{font-weight:600;font-size:.92rem}
.lbl-row{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:.3rem}
output{font-family:var(--fh);font-weight:700;font-size:1.3rem}
input[type=range]{width:100%;accent-color:var(--primary);height:28px}
.scale{display:flex;justify-content:space-between;font-size:.78rem;color:var(--muted)}

/* fit bars */
.fit-row{margin-bottom:.65rem}
.fit-row:last-child{margin-bottom:0}
.fit-top{display:flex;justify-content:space-between;gap:.5rem;font-size:.88rem;align-items:baseline}
.fit-top b{font-family:var(--fh);font-size:1.05rem}
.fit-svg{display:block;width:100%;height:22px}
.fit-svg .bg{fill:var(--bg);stroke:var(--text);stroke-width:2}
.fit-svg .fill{fill:var(--primary)}
.fit-row.over .fill{fill:var(--text)}
.fit-svg .head{stroke:var(--accent);stroke-width:3}
.fit-msg{font-size:.85rem;color:var(--muted)}
.fit-row.over .fit-msg{color:var(--text);font-weight:600}
.fit-row.ok .fit-msg{color:var(--primary);font-weight:600}

/* sections */
.sec{padding:1.6rem 0}
.sec-head{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:.5rem;margin-bottom:.8rem}
.sec-head p{margin:0;color:var(--muted)}
.tool-card{display:flex;flex-direction:column;gap:.3rem}
.tool-card p{color:var(--muted);flex:1;font-size:.95rem}
.tool-card .num{font-family:var(--fh);font-weight:700;font-size:.8rem;color:var(--muted)}
.tool-card .btn{align-self:flex-start}
.glist{list-style:none;margin:0;padding:0;border:2px solid var(--line);border-radius:6px;background:var(--surface)}
.glist li+li{border-top:2px solid var(--line)}
.glist a{display:flex;justify-content:space-between;gap:1rem;padding:.7rem 1rem;color:var(--text);text-decoration:none;font-weight:600}
.glist a span{font-weight:400;color:var(--muted)}
.glist a:hover{background:var(--tint)}
.banner{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:cover;border:2px solid var(--line);border-radius:6px;background:var(--bg)}
.pitch h3{display:flex;gap:.5rem;align-items:center}
.pitch h3::before{content:"";width:6px;height:1.1em;background:var(--primary);border-radius:2px}

/* page head */
.page-head{padding:1.2rem 0 .8rem}
.page-head p{color:var(--muted);max-width:68ch;margin:0}
.prose{max-width:72ch}
.prose h2{margin-top:1.6rem}
.prose ul{padding-left:1.2rem}
.prose li{margin-bottom:.35rem}
.prose .card{margin:1rem 0}

/* pace */
.pace-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.9rem;margin-top:.9rem}
.status{font-size:.9rem;min-height:1.4em;margin:.5rem 0 0;font-weight:600}
.beat{font-family:var(--fh);font-weight:700;font-size:1.6rem}

/* run sheet */
.rs-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:.9rem;align-items:start}
.seglist{list-style:none;margin:0;padding:0;display:grid;gap:.45rem}
.seg{display:grid;grid-template-columns:auto 4.2rem minmax(0,1fr) 8.3rem 5rem auto;gap:.4rem;align-items:center;border:2px solid var(--line);border-radius:5px;padding:.35rem .45rem;background:var(--surface)}
.seg.ad{background:var(--ad-tint)}
.seg.dragging{opacity:.4}
.seg.over{outline:3px dashed var(--primary)}
.handle{touch-action:none;cursor:grab;font-size:1.3rem;line-height:1;padding:.2rem .35rem;border:2px solid var(--line);border-radius:4px;background:var(--bg);user-select:none}
.clock{font-family:var(--fh);font-weight:700;font-size:.9rem}
.seg input,.seg select{padding:.3rem .4rem;font-size:.9rem}
.seg .acts{display:flex;gap:.25rem}
.tl{display:flex;height:34px;border:2px solid var(--line);border-radius:4px;overflow:hidden;background:var(--bg);margin:.4rem 0 .2rem}
.tl i{display:block;height:100%;background:var(--primary);border-right:2px solid var(--surface);min-width:3px}
.tl i.ad{background:var(--accent)}
.sum{display:grid;grid-template-columns:repeat(2,1fr);gap:.6rem;margin:.6rem 0}
.add-row{display:grid;grid-template-columns:minmax(0,1fr) 7rem 9rem auto;gap:.5rem;align-items:end;margin-top:.8rem}
.fields{display:grid;grid-template-columns:repeat(2,1fr);gap:.6rem}
.fields label{display:block;margin-bottom:.2rem}
.result{border:2px solid var(--line);border-radius:5px;background:var(--bg);padding:.7rem .9rem;margin-top:.8rem}
.result .big{font-size:2.2rem}

/* AI */
.ai-grid{display:grid;gap:.9rem}
.ai-card form{display:grid;gap:.6rem}
.ai-card textarea{min-height:120px}
.examples{display:flex;flex-wrap:wrap;gap:.4rem}
.examples button{text-align:left;font:.82rem var(--fb);border:1.5px solid var(--line);background:var(--bg);color:var(--text);border-radius:4px;padding:.3rem .55rem;cursor:pointer}
.examples button:hover{background:var(--tint)}
.ai-out{margin-top:.6rem;border:2px solid var(--line);border-left:6px solid var(--accent);border-radius:4px;background:var(--bg);padding:.7rem .9rem;min-height:3rem}
.ai-out[hidden]{display:none}
.ai-out p{white-space:pre-wrap}
.ai-out ul,.ai-out ol{margin:0;padding-left:1.3rem}
.ai-out li{margin-bottom:.3rem}
.ai-out.err{border-left-color:var(--text);font-weight:600}
.ai-tools{display:flex;gap:.5rem;margin-top:.5rem;flex-wrap:wrap}

/* guides */
.guide{scroll-margin-top:70px}
.guide pre{margin:.6rem 0;padding:.7rem .9rem;background:var(--bg);border:2px solid var(--line);border-radius:4px;white-space:pre-wrap;font:inherit;font-size:.95rem}
.toc{display:flex;flex-wrap:wrap;gap:.5rem;margin:.8rem 0 0;padding:0;list-style:none}

/* footer */
.foot{background:var(--surface);border-top:2px solid var(--line);margin-top:2rem}
.foot-in{max-width:var(--maxw);margin:0 auto;padding:.8rem 1rem;display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;align-items:center;justify-content:space-between;font-size:.88rem}
.foot nav ul{list-style:none;margin:0;padding:0;display:flex;gap:1rem;flex-wrap:wrap}
.foot a{color:var(--text)}
.foot-brand{display:flex;gap:1rem;align-items:center;flex-wrap:wrap}

/* 404 */
.nf{text-align:center;padding:2.5rem 0}
.nf svg{width:100%;max-width:640px;height:auto}
.nf .links{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap;margin-top:1rem}

@media (max-width:960px){
  .g4{grid-template-columns:repeat(2,1fr)}
  .g3{grid-template-columns:1fr}
  .lab,.rs-grid{grid-template-columns:1fr}
  .seg{grid-template-columns:auto 1fr 1fr;}
  .seg .clock{order:-1}
}
@media (max-width:760px){
  .nav-btn{display:block}
  .nav{display:none;position:absolute;left:0;right:0;top:100%;background:var(--surface);border-bottom:2px solid var(--line);padding:.5rem 1rem}
  .nav.open{display:block}
  .nav ul{flex-direction:column;border-left:0}
  .nav li,.nav li.aux{border:0;margin:0}
  .nav li+li{border-top:2px solid var(--line)}
  .nav a{flex-direction:row;align-items:center;gap:.6rem;padding:.6rem .5rem}
  .nav .ch{min-width:3.4rem}
  .g2,.g4,.pace-grid{grid-template-columns:1fr}
  .add-row{grid-template-columns:1fr 1fr}
  .hero{grid-template-columns:1fr;padding:1.4rem 0 1rem}
  /* mobile home: the Spot Timer comes right after the headline; the hero picture moves below the tool */
  .home-top{display:flex;flex-direction:column}
  .home-top .hero{display:contents}
  .home-top .hero>div:first-child{order:0;padding-top:1.1rem}
  .home-top .hero .ruler.live{order:1;margin:.6rem 0 .8rem}
  .home-top .lab{order:2}
  .home-top .hero-art{order:3;margin-top:.9rem}
  .home-top .ai-try{order:4}
  .hero h1{font-size:clamp(1.8rem,8vw,2.3rem);margin-bottom:.5rem}
  .hero .lede{font-size:1rem;margin-bottom:.6rem}
  .hero .example-line{margin-bottom:.6rem}
  .hero-art img{height:150px}
  .logo{height:30px}
  .split,.split.in-card{grid-template-columns:1fr}
  .split-img.sq{justify-self:start;max-width:100%}
  .bento{grid-template-columns:1fr}
  .bento .b7,.bento .b5{grid-column:auto}
  /* mobile lab: pace slider first, compact text area, three stats in one row */
  .lab-side{display:contents}
  .lab .pace-card{order:0}
  .lab .script-card{order:1}
  .lab .fit-card{order:2}
  #script{min-height:140px}
  .readout{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}
  .readout>div:first-child{grid-column:1/-1}
  .stat b{display:block}
}
@media (min-width:761px) and (max-width:980px){
  .nav a{padding:.25rem .45rem .3rem;font-size:.84rem}
  .nav li.aux{margin-left:.3rem}
  .logo{height:28px}
}
@media (max-width:480px){
  .seg{grid-template-columns:auto 1fr}
  .fields{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none!important;animation:none!important}
}
