/* How it works, on the colour system from home.css: a day, light and dark in turn, with the worried moment on white. */
/* The diary's line runs through the strands: each band's line reaches up across the strand above it */
.hiw{--strand:90px}
/* Each band's line meets the next under the noodle strand, so a white line never disappears against a white band */
.hiw{--seam:.6;--seam-f:.66}
.strand.flip{transform:scaleX(-1)}
.hiw-grid::before{top:calc(var(--pad) * -1 - var(--strand) * (1 - var(--seam)));bottom:calc(var(--pad) * -1 - var(--strand) * var(--seam))}
.strand.flip+.hiw-m .hiw-grid::before{top:calc(var(--pad) * -1 - var(--strand) * (1 - var(--seam-f)))}
.hiw-m:has(+.strand.flip) .hiw-grid::before{bottom:calc(var(--pad) * -1 - var(--strand) * var(--seam-f))}
.hiw-m.hiw-first .hiw-grid::before{top:calc(var(--pad) * -1)}
.hiw-body h2{font-size:clamp(34px,4.1vw,60px);line-height:1.02}
/* Proofs: inked, every Kitchen green */
.hiw-card,.hiw-table,.hiw-mail,.hiw-kit,.hiw-m .paper{border:var(--inked);box-shadow:var(--shadow)}
.hiw-m .paper{border-radius:22px}
.hiw-kit{background:var(--green);color:var(--white)}
.hiw-kit-top span,.hiw-tabs span,.hiw-day{color:var(--white)}
.hiw-tabs span[aria-current]{color:var(--green)}
.hiw-table .hiw-hl th,.hiw-table .hiw-hl td{background:var(--paper)}
/* Blue: learning to ask */
.hiw-blue{--ground:var(--blue);--spine:var(--white);color:var(--white)}
.hiw-blue .hiw-tag{color:var(--white)}
.hiw-blue .hiw-lede{color:var(--white)}
.hiw-blue .hiw-card,.hiw-blue .hiw-card p{color:var(--ink)}
.hiw-blue .hiw-card .bub-kid{color:var(--white)}
.hiw-blue .hiw-card .screen-dev{color:var(--teal)}
.hiw-blue .hiw-card .screen-seen{color:var(--ink-2)}
.hiw-blue a.deep::after{color:var(--yellow)}
/* Strands */
.hiw-yellow+.strand{background:var(--yellow)}
.hiw-paper+.strand{background:var(--paper)}
.hiw-white+.strand{background:var(--white)}
.hiw-blue+.strand{background:var(--blue)}
.hiw-night+.strand{background:var(--teal-deep)}
.hiw-gs+.strand{background:var(--teal)}
.strand.to-blue path:first-child{fill:var(--blue)}
.strand.to-night path:first-child{fill:var(--teal-deep)}
@media(max-width:760px){
  .hiw-body h2{font-size:clamp(30px,8.4vw,44px)}
}
@media(max-width:560px){
  .hiw{--strand:56px}
}
@media(max-width:760px){
  /* home.css's .wrap padding would otherwise put the words under the line */
  .wrap.hiw-grid{padding-left:44px}
  .hiw-grid::before{left:17px}
  .hiw-dot{left:7px}
  .hiw-hero .wrap.hiw-grid,.hiw-gs .wrap.hiw-grid,.hiw-faq .wrap.hiw-grid{padding-left:20px}
}
/* The urgent email: small and dense, the note on one line */
.hiw-serious{margin-top:20px;gap:6px}
.hiw-serious .paper{max-width:560px;margin-top:10px;padding:12px 18px 14px;transform:none}
.hiw-serious .paper:before{display:none}
.hiw-serious .paper-label{margin:0 0 4px;font-size:21px;line-height:1.1}
.hiw-serious .mail{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 16px;align-items:center}
.hiw-serious .mail>p{grid-column:1;margin:0;font-size:14px;line-height:1.35}
.hiw-serious .mail .mail-subject{font-size:17px;line-height:1.2}
.hiw-serious .mail-button{grid-column:2;grid-row:1 / span 3;margin:0;padding:8px 14px;font-size:14px;white-space:nowrap}
.hiw-serious .sticky{top:-14px;right:-10px;width:auto;max-width:none;padding:4px 10px 6px;font-size:18px;line-height:1.1;white-space:nowrap;transform:rotate(2deg)}
@media(max-width:560px){
  .hiw-serious .mail{grid-template-columns:minmax(0,1fr)}
  .hiw-serious .mail-button{grid-column:1;grid-row:auto;justify-self:start;margin-top:8px}
  .hiw-serious .sticky{right:-4px;font-size:16px}
}
/* One chat for everything: one chat, and one list of what it does */
.hiw-fig-hw{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px 64px;align-items:center}
.hiw-more{display:flex;flex-direction:column;gap:20px;margin:0;padding:0;list-style:none}
.hiw-more li{display:flex;flex-direction:column;gap:2px;font-size:18px;line-height:1.4;color:var(--ink-2)}
.hiw-more b{font-family:var(--display);font-weight:800;font-size:23px;line-height:1.15;letter-spacing:-.015em;color:var(--ink)}
.hiw-exception{margin:12px 0 0;max-width:560px}
@media(max-width:860px){
  .hiw-fig-hw{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:760px){
  .hiw-more{gap:14px}
  .hiw-more li{font-size:16px}
  .hiw-more b{font-size:20px}
}
/* Whatever they ask: the chat, with the prompt tip landing on it like a note */
.hiw-learn{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);align-items:center}
.hiw-learn-chat{z-index:0;padding:22px 24px 26px;gap:14px}
.hiw-learn-chat .bub{font-size:19px}
.hiw-blue .hiw-learn-chat .bub-kid{font-size:22px}
.hiw-learn-tip{position:relative;z-index:1;display:flex;flex-direction:column;gap:12px;margin-left:-28px;padding:26px 28px 30px;background:var(--yellow);border:var(--inked);border-radius:22px;box-shadow:var(--shadow);transform:rotate(1.2deg)}
.hiw-blue .hiw-learn-tip p{margin:0;color:var(--ink)}
.hiw-blue .hiw-learn-tip .hiw-learn-head{font-family:var(--hand);font-size:30px;line-height:1;color:var(--ink)}
.hiw-blue .hiw-learn-tip .hiw-learn-say{font-size:18px;line-height:1.4;font-weight:700}
.hiw-blue .hiw-learn-tip .hiw-learn-ask{font-family:var(--display);font-weight:800;font-size:clamp(24px,2.5vw,34px);line-height:1.32;letter-spacing:-.02em}
.hiw-learn-ask .say{background:var(--white);font-weight:800}
.hiw-learn-links{display:flex;flex-wrap:wrap;gap:0 32px}
.hiw-blue .hiw-learn-links .games-link{color:var(--white)}
@media(max-width:860px){
  .hiw-learn{grid-template-columns:minmax(0,1fr)}
  .hiw-learn-tip{margin:-16px 0 0 10px;padding:20px 20px 22px}
  .hiw-learn-chat .bub{font-size:17px}
}
/* Noodle sleeps: a night sky, Noodle large, the hours on a note as in the film */
.hiw-night{background-image:radial-gradient(circle at 4% 78%,#ffd54a 0 2px,transparent 3px),radial-gradient(circle at 46% 9%,#fff 0 1.5px,transparent 2.5px),radial-gradient(circle at 62% 30%,#ffd54a 0 2px,transparent 3px),radial-gradient(circle at 93% 14%,#fff 0 2px,transparent 3px),radial-gradient(circle at 88% 62%,#ffd54a 0 1.5px,transparent 2.5px),radial-gradient(circle at 56% 74%,#fff 0 1.5px,transparent 2.5px)}
.hiw-bed{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:32px 56px;align-items:center}
.hiw-bed-words{display:flex;flex-direction:column;gap:20px;min-width:0}
.hiw-bed-breaks{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.hiw-night .hiw-bed-label{margin:0;color:var(--white);font-family:var(--display);font-weight:800;font-size:22px;letter-spacing:-.01em}
.hiw-night .hiw-breaks div{border:var(--inked);border-radius:18px;box-shadow:5px 5px 0 var(--ink)}
.hiw-night .hiw-breaks small{color:var(--ink-2)}
.hiw-night .hiw-bed-note{margin:6px 0 0;font-size:16px;line-height:1.45;color:var(--on-teal)}
.hiw-bed-scene{position:relative;display:flex;justify-content:center;min-width:0;padding:8px 0 76px}
.hiw-bed-disc{position:absolute;left:50%;top:0;width:min(100%,400px);aspect-ratio:1;border-radius:50%;background:var(--paper);transform:translateX(-50%)}
.hiw-bed-scene img{position:relative;width:min(70%,270px);height:auto}
.hiw-night .hiw-bed-clock{position:absolute;left:0;bottom:0;margin:0;padding:12px 18px 14px;background:var(--yellow);border:var(--inked);border-radius:14px;box-shadow:5px 5px 0 var(--ink);color:var(--ink);font-weight:800;font-size:16px;line-height:1.1;transform:rotate(-2deg)}
.hiw-bed-clock small{display:block;margin-bottom:4px;font-size:14px;font-weight:800;color:var(--ink)}
.hiw-bed-clock b{font-family:var(--display);font-size:clamp(24px,2.3vw,32px);letter-spacing:-.025em}
.hiw-bed-clock span{margin:0 2px}
@media(max-width:860px){
  .hiw-bed{grid-template-columns:minmax(0,1fr)}
  .hiw-bed-scene{order:-1;max-width:400px;width:100%;justify-self:center}
}
@media(max-width:560px){
  .hiw-bed-scene{padding-bottom:64px}
  .hiw-bed-scene img{width:min(56%,190px)}
  .hiw-bed-disc{width:min(82%,290px)}
  .hiw-breaks{gap:8px}
  .hiw-night .hiw-breaks div{padding:10px 10px;border-width:2px;box-shadow:3px 3px 0 var(--ink)}
  .hiw-night .hiw-breaks b{font-size:24px}
  .hiw-night .hiw-breaks small{font-size:13px}
}
@media(max-width:860px){
  .hiw-night{background-image:none}
}
/* Sunday: breakfast on the table, Noodle peeking over the email, and every Kitchen room its own colour */
.hiw-sun-head{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:24px 40px;align-items:center}
.hiw-mug{width:100%;height:auto}
.hiw-sun{gap:40px;align-items:start;margin-top:0}
.hiw-mailwrap{position:relative;margin-top:96px;min-width:0}
.hiw-peek{position:absolute;right:28px;top:-104px;width:124px;height:auto}
.hiw-mailwrap .hiw-mail{position:relative;border-radius:18px;transform:rotate(-1.2deg)}
.hiw-mail-sticky{position:absolute;left:-14px;top:-62px;right:auto;z-index:2;max-width:210px;font-size:21px;line-height:1.1;transform:rotate(-4deg)}
.hiw-sun .hiw-kit{transform:rotate(.8deg)}
.hiw-room b{justify-self:start;padding:3px 10px 5px;border-radius:999px;color:var(--white);font-size:15px;line-height:1.2}
.hiw-room{grid-template-columns:96px minmax(0,1fr);border:2px solid var(--ink)}
.room-tomato{background:var(--tomato-deep)}
.room-teal{background:var(--teal)}
.room-purple{background:var(--purple)}
.room-blue{background:var(--blue)}
.room-ink{background:var(--ink)}
@media(max-width:860px){
  .hiw-mailwrap{margin-top:84px}
}
@media(max-width:560px){
  .hiw-sun-head{grid-template-columns:minmax(0,1fr)}
  .hiw-mug{width:170px;justify-self:end;margin-top:-6px}
  .hiw-peek{right:14px;top:-88px;width:100px}
  .hiw-mail-sticky{position:absolute;display:block;left:-6px;top:-66px;max-width:190px;margin:0;font-size:19px;transform:rotate(-4deg)!important}
  .hiw-mailwrap .hiw-mail,.hiw-sun .hiw-kit{transform:none}
  .hiw-room{grid-template-columns:82px minmax(0,1fr)}
}
.hiw-m .hiw-mail-sticky{background:var(--white);border:2.5px solid var(--ink);box-shadow:4px 4px 0 var(--ink);color:var(--ink);top:-70px}
@media(max-width:560px){
  .hiw-mailwrap{margin-top:96px}
  .hiw-m .hiw-mail-sticky{top:-84px}
}
.hiw-m .hiw-mail-sticky{max-width:300px;width:300px;padding:7px 12px 9px;top:-72px;font-size:20px}
@media(max-width:560px){
  .hiw-m .hiw-mail-sticky{max-width:236px;width:236px;top:-72px;font-size:18px}
}
/* Getting started: three matching cards in a row, headings and mock-ups lined up, with arrows between */
.hiw-gs-head img{width:150px;padding:14px;aspect-ratio:1;object-fit:contain;background:var(--paper);border-radius:50%}
.hiw-gs-lede{font-weight:800;color:var(--white)}
.hiw-gs-steps{grid-template-rows:auto auto;row-gap:0;column-gap:44px;counter-reset:gs}
.hiw-gs-steps li{grid-row:span 2;display:grid;grid-template-rows:subgrid;gap:0;padding:0;background:var(--white);border:var(--inked);border-radius:22px;box-shadow:var(--shadow)}
.hiw-gs-steps li::before{left:18px;top:16px;width:46px;height:46px;background:var(--ink);border:0;color:var(--yellow);font-size:24px}
.hiw-gs-steps li:not(:last-child)::after{content:"\2192";position:absolute;right:-44px;top:50%;width:44px;text-align:center;font-family:var(--body);font-weight:800;font-size:36px;line-height:1;color:var(--yellow);transform:translateY(-50%)}
.hiw-gs-step{display:flex;flex-direction:column;gap:6px;padding:16px 18px 18px 78px;background:var(--yellow);border-radius:19px 19px 0 0;border-bottom:var(--inked)}
.hiw-gs-steps .hiw-gs-step h3{margin:0;color:var(--ink);font-size:24px;line-height:1.1}
.hiw-gs-steps .hiw-gs-step p{color:var(--ink);font-size:16px;line-height:1.4}
.hiw-gs-ui{min-height:0;border:0;border-radius:0 0 19px 19px;padding:20px;justify-content:center;background:var(--white)}
.hiw-gs-ticket{background:var(--paper)}
.hiw-gs-ticket small{color:var(--ink-2)}
.hiw-gs-pills i{padding:8px 13px;font-size:15px;white-space:nowrap}
.hiw-gs-pills i.on{background:var(--teal);border-color:var(--teal);color:var(--white)}
.hiw-gs-more a.games-link{color:var(--yellow)}
@media(max-width:900px){
  .hiw-gs-steps{grid-template-rows:none;row-gap:44px;column-gap:0}
  .hiw-gs-steps li{grid-row:auto;grid-template-rows:auto auto}
  .hiw-gs-steps li:not(:last-child)::after{content:"\2193";right:50%;top:auto;bottom:-44px;transform:translate(50%,-2px)}
}
@media(max-width:600px){
  .hiw-gs-head img{width:92px;padding:8px}
  .hiw-gs-steps li{padding:0}
  .hiw-gs-steps{row-gap:40px}
  .hiw-gs-step{padding:14px 14px 14px 62px}
  .hiw-gs-steps li::before{left:12px;top:14px;width:38px;height:38px;font-size:20px}
  .hiw-gs-steps .hiw-gs-step h3{font-size:21px;margin:0}
  .hiw-gs-ui{padding:14px;gap:10px}
}
/* Questions: four matching cards, each opening on a question mark; the links plain */
.hiw-faq-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.hiw-faq-head h2{font-size:clamp(34px,4.1vw,60px);line-height:1.02}
.hiw-faq-head img{flex:none;width:150px;height:auto}
.hiw-faqc{align-items:stretch;gap:24px}
.hiw-q{position:relative;padding:24px 26px 26px 88px;background:var(--white);border:var(--inked);border-radius:22px;box-shadow:var(--shadow)}
.hiw-q::before{content:"?";position:absolute;left:24px;top:22px;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:var(--yellow);border:3px solid var(--ink);font-family:var(--display);font-weight:800;font-size:26px;line-height:1;color:var(--ink)}
.hiw-q h3{font-size:clamp(23px,1.9vw,27px)}
.hiw-q p{font-weight:600;color:var(--ink-2)}
.hiw-q a{color:var(--teal)}
.hiw-more-links{gap:8px 32px}
.hiw-more-links a,.hiw-more-links a:hover{padding:6px 0;border:0;border-radius:0;background:none}
.hiw-more-links b{color:var(--teal);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:2px}
@media(max-width:560px){
  .hiw-faq-head img{width:84px}
  .hiw-q{padding:18px 18px 20px 66px}
  .hiw-q::before{left:14px;top:16px;width:38px;height:38px;font-size:22px}
}

/* Where the noodle stroke crosses the line, by width, normal and flipped */
@media(min-width:1561px){.hiw{--seam:.69;--seam-f:.77}}
@media(max-width:1100px){.hiw{--seam:.69;--seam-f:.77}}
@media(max-width:760px){.hiw{--seam:.43;--seam-f:.13}}
@media(max-width:560px){.hiw{--seam:.4;--seam-f:.17}}
/* After the crit: the page */
.hiw-blue :focus-visible,.hiw-night :focus-visible{outline-color:var(--yellow)}
.hiw-learn-tip{margin-left:-12px}
.hiw-tabs{background:#00000026}
/* The worried moment stays still and says the exception plainly */
.hiw-serious .sticky{transform:none}
.hiw-exception{font-size:18px;line-height:1.5;color:var(--ink)}
.hiw-exception a{white-space:nowrap}
.hiw-m .hiw-kit.hiw-skip-m{display:flex}
/* Sunday: the fun stays around the text, the text sits straight */
.hiw-mailwrap .hiw-mail,.hiw-sun .hiw-kit{transform:none}
.hiw-room b{background:var(--teal)}
.hiw-m .hiw-room-skip{display:grid}
.hiw-mail-cap{margin:12px 0 0;font-size:15px;color:var(--ink-yellow)}
/* Getting started on white, so setup doesn't read as more night */
.hiw-gs{--ground:var(--white);background:var(--white);color:var(--ink)}
.hiw-gs h2,.hiw-gs h2 a,.hiw-gs h2 a:hover{color:var(--ink)}
.hiw-gs .hiw-mt{color:var(--teal)}
.hiw-gs-lede{color:var(--ink)}
.hiw-gs+.strand{background:var(--white)}
.hiw-gs-steps li:not(:last-child)::after{color:var(--ink)}
.hiw-gs-more a.games-link{color:var(--teal)}
@media(max-width:860px){
  /* Bedtime, stacked: label, heading and a small Noodle together; the hours after the tiles */
  .hiw-bed{grid-template-columns:minmax(0,1fr) 104px;gap:16px 14px}
  .hiw-bed-words,.hiw-bed-scene{display:contents}
  .hiw-bed-words h2{grid-column:1;grid-row:1;align-self:center}
  .hiw-bed-scene img{grid-column:2;grid-row:1;width:104px;height:104px;padding:8px;object-fit:contain;background:var(--paper);border-radius:50%}
  .hiw-bed-disc{display:none}
  .hiw-bed-words .hiw-lede,.hiw-bed-breaks{grid-column:1 / -1}
  .hiw-night .hiw-bed-clock{position:static;grid-column:1 / -1;justify-self:start;transform:none;margin-top:4px}
}
@media(max-width:560px){
  .hiw-peek{display:none}
  .hiw-mailwrap{margin-top:12px}
  .hiw-m .hiw-mail-sticky{position:static;display:block;width:auto;max-width:none;margin:0 0 10px;transform:none!important}
}
/* A flipped strand makes its own stacking layer, so the line has to sit above it */
.hiw-m .hiw-grid{z-index:1}
.hiw-serious .hiw-exception{margin-top:30px;max-width:720px}
@media(max-width:760px){.hiw-serious .hiw-exception{margin-top:18px}}
/* Questions: Noodle no longer sets the height of the heading row */
.hiw-faq{--pad:52px !important}
.hiw-faq-head{align-items:center}
.hiw-faq-head img{width:88px}
@media(max-width:560px){
  .hiw-faq{--pad:36px !important}
  .hiw-faq-head img{width:64px}
}

/* Round 27, direction A (see home.css). The signature band is blue, 5.00pm "Whatever they ask" */
@media(min-width:961px){
  .hiw-first,.hiw-night,.hiw-yellow:not(.hiw-first){background:var(--paper)}
  .hiw-night :is(h2,h2 a,.hiw-time b,.hiw-tag,.hiw-lede,.hiw-bed-label,.hiw-bed-note),.hiw-yellow:not(.hiw-first) .hiw-lede{color:var(--ink)!important}
  .hiw-blue+.strand path:first-of-type{fill:var(--paper)}
  .hiw-first+.strand,.hiw-paper:not(.hiw-faq)+.strand,.hiw-night+.strand,.hiw-yellow:not(.hiw-first)+.strand,.hiw-gs+.strand{display:none}
}
