/* =========================================================================
   Tirzing home page  ·  "a week on a GLP-1"  (prefix wk-)
   -------------------------------------------------------------------------
   Loaded only by the home page (HomeController passes it as a per-page style).
   Night sky from the companion's world, a luminous level line, the week as a
   lit timeline, dawn after the weigh-in, then warm paper. See the header of
   app/Views/home.php for the idea and the rules.

   Public pages are always light-themed in the app's sense (no data-theme), so
   every color here is art direction, defined once below.

   Animations always run: there is deliberately no prefers-reduced-motion
   override anywhere in this file (owner decision, October 2026).
   ========================================================================= */

.wk {
  --night:     #110521;
  --night-2:   #190a2e;
  --night-3:   #2a1145;
  --cream:     #f5ede2;
  --cream-dim: #cbbdd6;
  --cream-mute:#9a8aad;
  --mint:      #86f2da;
  --mint-glow: rgba(110,240,210,.55);
  --lantern:   #f6c86e;
  --lantern-hi:#ffe2a6;
  --paper:     #fbf5ec;
  --paper-2:   #f4eadb;
  --ink:       #24132f;
  --ink-2:     #54445f;
  --rule:      #e4d7c5;
  --plum-ink:  #7a3f86;
  --serif: var(--mk-display, Georgia, serif);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);

  background: var(--night);
  color: var(--cream);
  overflow-x: clip;
}
.wk a { text-decoration: none; }
.wk-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(1.1rem, 3.5vw, 2.5rem); position: relative; }
.wk-mono {
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--mint); margin: 0;
}

/* ---- Header over the night ------------------------------------------- */
.wk .news-header { background: transparent; backdrop-filter: none; }
.wk .news-header.is-stuck { background: rgba(17,5,33,.84); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(245,237,226,.08); }

.wk-banner {
  display: block; text-align: center; padding: .55rem 1rem;
  background: #0b0316; color: var(--lantern); border-bottom: 1px solid rgba(246,200,110,.16);
}
.wk-banner .wk-mono { color: var(--lantern); font-size: .72rem; }
.wk-banner:hover { color: var(--lantern-hi); }
.wk-banner:hover .wk-mono { color: var(--lantern-hi); }

/* ---- Type --------------------------------------------------------------- */
.wk-h1 {
  font-family: var(--serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(2.6rem, 5.9vw, 6rem); line-height: .98; letter-spacing: -.025em;
  color: var(--cream); margin: .3em 0 .3em;
}
.wk-h1 em, .wk-h2 em, .wk-h3 em {
  font-style: italic; font-weight: 300; color: var(--mint);
  text-shadow: 0 0 26px rgba(110,240,210,.45), 0 0 70px rgba(110,240,210,.22);
}
.wk-h2 {
  font-family: var(--serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(2.1rem, 4.6vw, 4rem); line-height: 1.05; letter-spacing: -.02em;
  color: var(--cream); margin: .4em 0 0; max-width: 15em;
}
.wk-h2--ink { color: var(--ink); }
.wk-h2--ink em { color: var(--plum-ink); text-shadow: none; }
.wk-h3 {
  font-family: var(--serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(1.75rem, 3.1vw, 2.75rem); line-height: 1.06; letter-spacing: -.02em;
  color: var(--cream); margin: .45em 0 .55em;
}
.wk-lead { font-size: clamp(1.06rem, 1.35vw, 1.2rem); line-height: 1.62; color: var(--cream-dim); max-width: 42em; margin: 0; }

/* The headline rises line by line on load (transform only, so it is in the
   layout and readable from the first paint). */
.wk-l { display: block; overflow: hidden; padding: 0 .12em .06em 0; margin-bottom: -.06em; }
.wk-l > span { display: inline-block; animation: wk-rise 1.15s var(--ease) both; }
.wk-l + .wk-l > span { animation-delay: .14s; }
@keyframes wk-rise { from { transform: translateY(104%); } to { transform: none; } }

/* ---- Buttons and links -------------------------------------------------- */
.wk-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 1.7rem; }
.wk-cta--center { justify-content: center; }
.wk-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 1.9rem; border-radius: 999px; font-weight: 700; font-size: 1.04rem; letter-spacing: .005em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.wk-btn--lantern {
  background: var(--lantern); color: #1b0a31;
  box-shadow: 0 0 0 1px rgba(255,226,166,.55), inset 0 1px 0 rgba(255,255,255,.5), 0 14px 44px -12px rgba(246,200,110,.85);
  animation: wk-lantern 3.6s ease-in-out infinite;
}
.wk-btn--lantern:hover { background: var(--lantern-hi); color: #1b0a31; transform: translateY(-2px); }
@keyframes wk-lantern {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,226,166,.55), inset 0 1px 0 rgba(255,255,255,.5), 0 14px 44px -12px rgba(246,200,110,.75); }
  50%      { box-shadow: 0 0 0 1px rgba(255,226,166,.75), inset 0 1px 0 rgba(255,255,255,.5), 0 18px 60px -10px rgba(246,200,110,1); }
}
.wk-btn--ink { background: var(--ink); color: var(--paper); box-shadow: 0 14px 30px -18px rgba(36,19,47,.8); }
.wk-btn--ink:hover { background: #3a2147; color: var(--paper); transform: translateY(-2px); }

.wk-play { display: inline-flex; align-items: center; gap: .7rem; color: var(--cream); font-weight: 600; }
.wk-play:hover { color: var(--mint); }
.wk-play-ic {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid rgba(245,237,226,.32); transition: border-color .25s, box-shadow .25s;
}
.wk-play-ic svg { fill: currentColor; margin-left: 2px; }
.wk-play:hover .wk-play-ic { border-color: var(--mint); box-shadow: 0 0 18px rgba(110,240,210,.45); }

.wk-link { display: inline-flex; gap: .4rem; font-weight: 700; color: var(--mint); }
.wk-link span { transition: transform .25s var(--ease); }
.wk-link:hover span { transform: translateX(4px); }

.wk-tag {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .18rem .5rem; border-radius: 999px; margin-left: .45rem; vertical-align: 1px;
  color: var(--lantern); border: 1px solid rgba(246,200,110,.4);
}
.wk-tag--free { color: var(--mint); border-color: rgba(134,242,218,.4); }

/* ---- Hero --------------------------------------------------------------- */
.wk-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  min-height: var(--wk-fold, calc(100svh - 110px));
  padding-top: clamp(1.5rem, 4.5vh, 3.5rem);
  background:
    radial-gradient(70% 55% at 78% 8%, rgba(122,63,134,.42), transparent 70%),
    radial-gradient(60% 34% at 50% 100%, rgba(88,232,205,.05), transparent 75%),
    linear-gradient(180deg, #160830 0%, var(--night) 70%);
}
.wk-hero-copy { z-index: 2; width: 100%; }
.wk-kicker { display: flex; flex-wrap: wrap; gap: .2rem 0; color: var(--cream-mute); }
.wk-kicker span { color: rgba(245,237,226,.25); margin: 0 .7em; }
.wk-kicker { font-size: .7rem; }
.wk-fine { margin-top: 1.15rem; color: var(--cream-mute); font-size: .68rem; }
.wk-fine span { color: rgba(245,237,226,.25); margin: 0 .55em; }

/* The chart runs to the foot of the hero. The plot (line, dots, flags) is the
   top of it, never taller than 460px; the shading carries on under it and fades
   out by the hero's bottom edge, so there is no floor line however tall the
   window is. --wk-plot is read by the plot box, the shading's SVG (same box, so
   they align) and the fade mask (where the fade begins). */
.wk-curve {
  position: relative; z-index: 1; margin: 1.5rem 0 0; flex: 1 1 auto; min-height: 190px;
  --wk-plot: min(100%, 460px);
}
.wk-curve-plot { position: absolute; left: 0; right: 0; top: 0; height: var(--wk-plot); }
.wk-curve-fill {
  position: absolute; inset: 0; overflow: hidden;
  --wk-fade-at: calc(var(--wk-plot) * .58);
  /* Eased, so the shade thins quickly and then trails away to nothing. */
  -webkit-mask-image: linear-gradient(180deg,
    #000 var(--wk-fade-at),
    rgba(0,0,0,.62) calc(var(--wk-fade-at) + (100% - var(--wk-fade-at)) * .22),
    rgba(0,0,0,.32) calc(var(--wk-fade-at) + (100% - var(--wk-fade-at)) * .46),
    rgba(0,0,0,.12) calc(var(--wk-fade-at) + (100% - var(--wk-fade-at)) * .72),
    transparent 100%);
          mask-image: linear-gradient(180deg,
    #000 var(--wk-fade-at),
    rgba(0,0,0,.62) calc(var(--wk-fade-at) + (100% - var(--wk-fade-at)) * .22),
    rgba(0,0,0,.32) calc(var(--wk-fade-at) + (100% - var(--wk-fade-at)) * .46),
    rgba(0,0,0,.12) calc(var(--wk-fade-at) + (100% - var(--wk-fade-at)) * .72),
    transparent 100%);
}
.wk-curve-fill svg {
  position: absolute; left: 0; right: 0; top: .5rem; width: 100%; height: calc(var(--wk-plot) - .5rem);
  overflow: visible;
}
/* The chart is revealed left to right at a steady pace (linear, so it stays in
   step with the marks), and every mark appears as the sweep reaches its --x:
   delay = start + x * (duration / 100). Keep --wk-sweep and the 0.05s factor
   in step if the duration changes. The shading wipes in with the line. */
.wk-curve-svg, .wk-curve-fill {
  clip-path: inset(0 100% 0 0);
  animation: wk-wipe 5s linear .35s forwards;
}
.wk-curve-svg {
  position: absolute; left: 0; right: 0; bottom: 0; top: .5rem; width: 100%; height: calc(100% - .5rem);
  overflow: visible;
  filter: drop-shadow(0 0 4px rgba(245,237,226,.45)) drop-shadow(0 0 18px rgba(134,242,218,.18));
}
@keyframes wk-wipe { to { clip-path: inset(0 0 0 0); } }
.wk-grid { stroke: rgba(245,237,226,.06); stroke-width: 1; }
.wk-trace { fill: none; stroke: #f5ede2; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.wk-curve-marks { position: absolute; left: 0; right: 0; bottom: 0; top: .5rem; }

/* Fireflies in the lower part of the hero, under the shade. */
.wk-hero-low { top: auto; height: 42%; }

/* Daily weigh-ins: faint specks around the line. */
.wk-wt {
  position: absolute; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%;
  background: #f5ede2; opacity: 0;
  animation: wk-fade-to .4s ease forwards; animation-delay: calc(.35s + var(--x) * .05s);
}
@keyframes wk-fade-to { to { opacity: .38; } }

/* A weekly shot on the line, in its dose's color. */
.wk-shotdot {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0 3px rgba(17,5,33,.85), 0 0 14px 2px var(--c);
  transform: scale(0);
  animation: wk-pop .5s cubic-bezier(.3,1.7,.5,1) forwards; animation-delay: calc(.4s + var(--x) * .05s);
}
@keyframes wk-pop { to { transform: scale(1); } }

/* A dose change: a pole rises from the line and a flag pops out in the new color. */
.wk-flag { position: absolute; width: 0; height: 0; z-index: 2; }
.wk-flag-pole {
  position: absolute; left: -.75px; bottom: 7px; width: 1.5px; height: clamp(40px, 7vh, 64px);
  background: linear-gradient(0deg, transparent, var(--c) 30%);
  transform: scaleY(0); transform-origin: bottom;
  animation: wk-grow-y .45s ease-out forwards; animation-delay: calc(.4s + var(--x) * .05s);
}
@keyframes wk-grow-y { to { transform: scaleY(1); } }
.wk-flag-tag {
  position: absolute; left: -.75px; bottom: calc(7px + clamp(40px, 7vh, 64px));
  white-space: nowrap; font-size: .62rem; color: #110521; background: var(--c);
  padding: .32rem .6rem .3rem; border-radius: 7px 7px 7px 0;
  box-shadow: 0 0 22px -2px var(--c);
  opacity: 0; transform: translateY(8px) scale(.85); transform-origin: bottom left;
  animation: wk-flag-in .5s cubic-bezier(.3,1.5,.5,1) forwards; animation-delay: calc(.65s + var(--x) * .05s);
}
@keyframes wk-flag-in { to { opacity: 1; transform: none; } }
.wk-wkl { position: absolute; bottom: .7rem; margin-left: .45rem; font-size: .6rem; color: rgba(245,237,226,.28); }
.wk-now { position: absolute; width: 0; height: 0; opacity: 0; animation: wk-fade .6s ease 5.35s forwards; }
.wk-now i {
  position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--mint); box-shadow: 0 0 14px var(--mint-glow);
  animation: wk-ring 2.2s ease-out 5.6s infinite;
}
.wk-now b { position: absolute; right: 16px; bottom: 10px; color: var(--mint); font-size: .62rem; white-space: nowrap; }
@keyframes wk-ring { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes wk-fade { to { opacity: 1; } }

/* ---- Proof -------------------------------------------------------------- */
.wk-proof { background: var(--night); border-top: 1px solid rgba(245,237,226,.07); }
.wk-proof-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem clamp(2rem, 6vw, 5rem); padding-top: 1.6rem; padding-bottom: 1.6rem; }
.wk-proof p { margin: 0; color: var(--lantern); font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.wk-proof b { font-weight: 400; }
.wk-proof .wk-mono { display: block; color: var(--cream-mute); font-family: var(--mono); font-size: .64rem; margin-top: .1rem; }

/* ---- The week ----------------------------------------------------------- */
.wk-week {
  position: relative; isolation: isolate; padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  background: #130627;   /* solid: the day numerals sit on matching patches over the spine */
}
.wk-week > .wk-wrap { z-index: 1; }
/* Light spilling down from the seam above. */
.wk-week::before {
  content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 340px; pointer-events: none;
  background: radial-gradient(46% 100% at 50% 0%, rgba(246,200,110,.09), rgba(134,242,218,.03) 45%, transparent 72%);
}
/* Soft nebulae down the right-hand side, behind the art and well clear of the
   day numerals on the left (their patches are the solid #130627). */
.wk-week-sky .mk-star { opacity: .22; }
.wk-glow {
  position: absolute; z-index: 0; right: -14vw; width: min(62vw, 820px); aspect-ratio: 1; border-radius: 50%;
  pointer-events: none;
}
.wk-glow--1 { top: 14%; background: radial-gradient(closest-side, rgba(134,242,218,.10), transparent); }
.wk-glow--2 { top: 44%; right: -20vw; background: radial-gradient(closest-side, rgba(122,63,134,.30), transparent); }
.wk-glow--3 { top: 72%; background: radial-gradient(closest-side, rgba(246,200,110,.08), transparent); }
.wk-week-head .wk-h2 { max-width: 14em; }

.wk-days { margin-top: clamp(3rem, 7vw, 6rem); --spine: 3.4rem; }
.wk-spine {
  position: absolute; top: 0; bottom: 0; width: 1px;
  left: calc(clamp(1.1rem, 3.5vw, 2.5rem) + var(--spine));
  background: linear-gradient(180deg, rgba(245,237,226,.16), rgba(245,237,226,.06));
}
.wk-spine i {
  position: absolute; inset: 0; transform-origin: top; transform: scaleY(0);
  background: linear-gradient(180deg, var(--mint), var(--lantern));
  box-shadow: 0 0 14px rgba(110,240,210,.6);
  will-change: transform;
}

.wk-day {
  position: relative; display: grid;
  grid-template-columns: calc(var(--spine) * 2) minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 0 clamp(1.5rem, 4.5vw, 4.5rem); align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.wk-day-mark { position: absolute; left: var(--spine); top: clamp(2.5rem, 6vw, 5rem); }
.wk-node {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--night); border: 1px solid rgba(245,237,226,.35);
  transition: background .5s, border-color .5s, box-shadow .5s, transform .5s var(--ease);
}
.wk-day.is-lit .wk-node {
  background: var(--mint); border-color: var(--mint); transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(134,242,218,.12), 0 0 22px 5px rgba(110,240,210,.6);
}
.wk-day-num { align-self: start; text-align: center; padding-top: 1.4rem; position: relative; z-index: 1; }
.wk-day-num .wk-mono { display: inline-block; color: var(--cream-mute); font-size: .6rem; background: #130627; padding: .3em .35em; position: relative; z-index: 1; }
.wk-day-num b {
  display: block; font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1; color: rgba(245,237,226,.5);
  background: #130627; padding: .1em 0 .15em;
  transition: color .6s, text-shadow .6s;
}
.wk-day.is-lit .wk-day-num b { color: var(--cream); text-shadow: 0 0 30px rgba(110,240,210,.35); }
.wk-day--every .wk-day-num b { font-size: clamp(1.8rem, 3.2vw, 2.8rem); }

.wk-day-label { color: var(--mint); }
.wk-day-body > p:not(.wk-mono) { color: var(--cream-dim); font-size: 1.04rem; line-height: 1.72; max-width: 31em; margin: 0 0 1.1rem; }
.wk-notes { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .45rem; }
.wk-notes li { position: relative; padding-left: 1.4rem; color: var(--cream-mute); font-size: .93rem; line-height: 1.5; }
.wk-notes li::before { content: ""; position: absolute; left: 0; top: .72em; width: .75rem; height: 1px; background: var(--mint); }

/* Art frames: lit windows on the night. */
.wk-frame {
  position: relative; border-radius: 18px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 40px 90px -40px rgba(0,0,0,.9), 0 0 70px -12px rgba(110,240,210,.2);
  transform: rotate(-1.1deg); transition: transform .8s var(--ease), box-shadow .8s var(--ease);
}
.wk-day:nth-of-type(odd) .wk-frame { transform: rotate(.9deg); }
.wk-frame:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 50px 100px -40px rgba(0,0,0,.95), 0 0 90px -10px rgba(110,240,210,.32); }
.wk-frame img { display: block; width: 100%; height: auto; }
.wk-frame .mk-art { box-shadow: none; border: 0; border-radius: 0; }
.wk-frame .mk-art::after { display: none; }
.wk-frame-cap { background: #fff; color: #9a8fa5; font-size: .58rem; padding: 0 1.1rem .9rem; letter-spacing: .06em; }
.wk-shot { display: block; }
.wk-verdict {
  position: absolute; right: 1rem; bottom: 1rem; margin: 0;
  display: inline-flex; align-items: center; gap: .55rem;
  background: rgba(17,5,33,.92); color: var(--cream); border-radius: 999px; padding: .55rem 1rem;
  font-size: .86rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
}
.wk-verdict b { color: var(--mint); font-weight: 700; }
.wk-verdict-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: wk-blink 2.6s ease-in-out infinite; }

/* The example side-effect chart, drawn in HTML. */
.wk-heat {
  border-radius: 18px; padding: 1.5rem 1.4rem 1.2rem;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(245,237,226,.12);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.9);
}
.wk-heat-cap { color: var(--cream-mute); font-size: .6rem; margin-bottom: 1.1rem; }
.wk-heat-grid { display: grid; grid-template-columns: 5.5rem repeat(7, minmax(0, 1fr)); gap: 7px; align-items: center; }
.wk-heat-d { text-align: center; color: var(--cream-mute); font-size: .62rem; }
.wk-heat-n { color: var(--cream-dim); font-size: .85rem; }
.wk-heat-c {
  aspect-ratio: 1; border-radius: 7px;
  background: rgba(134,242,218, calc(.07 + var(--v) * .27));
  box-shadow: 0 0 calc(var(--v) * 8px) rgba(110,240,210, calc(var(--v) * .18));
  transform: scale(.4); opacity: 0;
  transition: transform .6s var(--ease), opacity .6s;
}
.wk-day-art.is-in .wk-heat-c { transform: none; opacity: 1; }
.wk-day-art.is-in .wk-heat-c:nth-child(3n) { transition-delay: .08s; }
.wk-day-art.is-in .wk-heat-c:nth-child(3n+1) { transition-delay: .16s; }
.wk-heat-key { text-align: right; color: var(--cream-mute); font-size: .58rem; margin-top: .9rem; }

.wk-companion { max-width: 420px; margin: 0 auto; }
.wk-companion .companion-stage { border-radius: 26px; box-shadow: 0 40px 90px -40px rgba(0,0,0,.9), 0 0 80px -10px rgba(246,200,110,.28); }

/* ---- Dawn --------------------------------------------------------------- */
.wk-dawn {
  position: relative; overflow: hidden; height: clamp(280px, 38vw, 520px);
  background: linear-gradient(180deg,
    #130627 0%, #2d1248 16%, #5a2463 34%, #a2496f 52%, #e0827f 66%,
    #f5b18c 78%, #f9d6b0 89%, var(--paper) 100%);
  --rise: 0;
}
.wk-dawn .mk-sky { bottom: 45%; opacity: .7; }
.wk-sun {
  position: absolute; left: 50%; bottom: 6%;
  width: clamp(170px, 24vw, 340px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff7df 0%, #ffe2a1 34%, rgba(255,196,128,.55) 52%, rgba(255,170,120,0) 70%);
  transform: translate(-50%, calc((1 - var(--rise)) * 60%));
  will-change: transform;
}
.wk-hill { position: absolute; bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.wk-hill--back  { left: -12%; width: 78%; height: 34%; bottom: -6%; background: #f7dcbc; }
.wk-hill--front { right: -18%; width: 96%; height: 30%; bottom: -10%; background: var(--paper); }

/* ---- Paper -------------------------------------------------------------- */
.wk-paper {
  position: relative; color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .12 0 0 0 0 .1 0 0 0 .03 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(5rem, 10vw, 8rem);
}
.wk-paper .wk-mono { color: var(--plum-ink); }
.wk-paper p { color: var(--ink-2); line-height: 1.7; }
.wk-paper a:not(.wk-btn) { color: var(--plum-ink); }

.wk-meds { max-width: 1100px; }
.wk-poster {
  font-family: var(--serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(2.1rem, 5.6vw, 4.8rem); line-height: 1.1; letter-spacing: -.025em;
  margin: .3em 0 .4em; color: var(--ink) !important;
}
.wk-poster a {
  color: var(--ink) !important;
  background-image: linear-gradient(var(--plum-ink), var(--plum-ink));
  background-size: 0 3px; background-position: 0 94%; background-repeat: no-repeat;
  transition: background-size .45s var(--ease), color .3s;
}
.wk-poster a:hover { color: var(--plum-ink) !important; background-size: 100% 3px; }
.wk-pi { white-space: nowrap; }
.wk-sep { font-style: normal; color: #cdb9a3; margin: 0 .32em 0 .22em; font-weight: 300; }
.wk-poster-tail { display: block; margin-top: .5em; font-size: .36em; font-style: italic; letter-spacing: 0; color: #8d7c94; line-height: 1.4; max-width: 30em; }
.wk-small { font-size: .9rem; max-width: 46em; }

.wk-film { margin-top: clamp(4.5rem, 9vw, 8rem); }
.wk-film-head { margin-bottom: 1.8rem; }
.wk-film-head .wk-h2 { margin-top: .3em; }
.wk-video.mk-video { max-width: none; border-radius: 22px; box-shadow: 0 50px 90px -50px rgba(36,19,47,.75), 0 0 0 1px rgba(36,19,47,.06); }

.wk-ledger { margin-top: clamp(4.5rem, 9vw, 8rem); }
.wk-ledger-head p:last-child { max-width: 34em; margin-top: 1rem; }
.wk-ledger-cols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 5rem);
  margin-top: 2.6rem; border-top: 2px solid var(--ink);
}
.wk-ledger-cols--one { grid-template-columns: minmax(0, 760px); }
.wk-ledger-col h3.wk-mono { font-size: .72rem; padding: 1rem 0; margin: 0; border-bottom: 1px solid var(--rule); }
.wk-ledger-col ul { list-style: none; padding: 0; margin: 0; }
.wk-ledger-col li {
  display: grid; grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr); gap: 1.2rem;
  padding: .95rem 0; border-bottom: 1px solid var(--rule);
}
.wk-ledger-col b { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; color: var(--ink); line-height: 1.3; }
.wk-ledger-col li span { color: var(--ink-2); font-size: .93rem; line-height: 1.55; }
.wk-ledger-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2.2rem; }
.wk-paper .wk-link { color: var(--plum-ink); }

.wk-notes3 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(4.5rem, 9vw, 7rem); padding-top: 2rem; border-top: 1px solid var(--rule);
}
.wk-n { font-size: .8rem; }
.wk-notes3 h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; letter-spacing: -.01em; color: var(--ink); margin: .5rem 0 .6rem; }
.wk-notes3 p:last-child { margin: 0; font-size: .97rem; }



.wk-tools { margin-top: clamp(4.5rem, 9vw, 7rem); }
.wk-index { list-style: none; padding: 0; margin: 2.2rem 0 1.6rem; border-top: 2px solid var(--ink); }
.wk-index a {
  display: grid; grid-template-columns: 3.2rem minmax(0, 15rem) minmax(0, 1fr) 2rem; align-items: baseline; gap: 1rem;
  padding: 1.15rem .4rem; border-bottom: 1px solid var(--rule); color: var(--ink) !important;
  transition: background .3s, padding .3s var(--ease);
}
.wk-index a:hover { background: rgba(122,63,134,.05); padding-left: .9rem; }
.wk-index-n { color: #b7a690 !important; }
.wk-index b { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; letter-spacing: -.01em; }
.wk-index-l { color: var(--ink-2); font-size: .95rem; }
.wk-index-a { text-align: right; color: var(--plum-ink); transition: transform .3s var(--ease); }
.wk-index a:hover .wk-index-a { transform: translateX(5px); }

.wk-faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 6vw, 6rem); margin-top: clamp(4.5rem, 9vw, 7rem); align-items: start; }
.wk-faq-head { position: sticky; top: 6rem; }
.wk-faq-list { border-top: 2px solid var(--ink); }
.wk-faq details { border-bottom: 1px solid var(--rule); }
.wk-faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1.2rem 2.6rem 1.2rem 0;
  font-family: var(--serif); font-weight: 500; font-size: 1.22rem; line-height: 1.3; color: var(--ink);
}
.wk-faq summary::-webkit-details-marker { display: none; }
.wk-faq summary::after {
  content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-weight: 300; font-size: 1.7rem; color: var(--plum-ink);
  transition: transform .3s var(--ease);
}
.wk-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.wk-faq details p { margin: 0 0 1.3rem; max-width: 40em; }

/* ---- Close -------------------------------------------------------------- */
.wk-close {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: clamp(13rem, 24vw, 19rem) 0 clamp(6rem, 12vw, 9rem);
  background: linear-gradient(180deg,
    var(--paper) 0%, #f6d5b2 7%, #e59d8a 15%, #a74f74 25%, #5a2463 37%, #261041 52%, var(--night) 70%);
}
.wk-close .mk-sky { top: 38%; }
.wk-close-inner { z-index: 2; }
.wk-close .wk-mono { color: var(--lantern); }
.wk-h1--close { margin: .3em auto .35em; font-size: clamp(3rem, 8.5vw, 7.6rem); }
.wk-close .wk-lead { margin: 0 auto; }

/* ---- Small screens ------------------------------------------------------ */
@media (max-width: 960px) {
  .wk-days { --spine: 1.4rem; }
  .wk-day { grid-template-columns: calc(var(--spine) * 2) minmax(0, 1fr); gap: 1.6rem 1.2rem; }
  .wk-day-art { grid-column: 2; }
  .wk-day-num b { font-size: 2.1rem; }
  .wk-day-num { padding-top: 1.2rem; }
  .wk-ledger-cols, .wk-notes3, .wk-faq { grid-template-columns: minmax(0, 1fr); }
  .wk-faq-head { position: static; }
  .wk-index a { grid-template-columns: 2.4rem minmax(0, 1fr) 1.4rem; }
  .wk-index-l { grid-column: 2; grid-row: 2; }
  .wk-index-a { grid-column: 3; grid-row: 1; }
}
@media (max-width: 640px) {
  .wk-hero { min-height: auto; }
  .wk-curve { flex: none; height: 220px; }
  .wk-wkl:nth-of-type(even) { display: none; }
  .wk-ledger-col li { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .wk-cta .wk-btn { width: 100%; }
  .wk-heat-grid { grid-template-columns: 4.6rem repeat(7, minmax(0, 1fr)); gap: 5px; }
  .wk-frame, .wk-day:nth-of-type(odd) .wk-frame { transform: none; }
}

/* ---- Connections ------------------------------------------------------- */
/* Its own patch of sky, a cooler and deeper night than the week below it, with
   a plum nebula behind the heading and a teal one low on the left. The seam
   with the week is lit by .wk-divide. */
.wk-links {
  position: relative; isolation: isolate;
  padding: clamp(4.5rem, 9vw, 7.5rem) 0 clamp(4.5rem, 9vw, 7rem);
  background:
    radial-gradient(42% 46% at 88% 14%, rgba(122,63,134,.34), transparent 72%),
    radial-gradient(38% 42% at 6% 82%, rgba(88,232,205,.09), transparent 72%),
    radial-gradient(30% 30% at 62% 58%, rgba(107,155,245,.06), transparent 75%),
    linear-gradient(180deg, var(--night) 0%, #0b0318 100%);
}
.wk-links > .wk-wrap { z-index: 1; }

/* Constellations: draw the lines in, then light the stars along them. */
.wk-con { position: absolute; z-index: 0; pointer-events: none; overflow: visible; filter: drop-shadow(0 0 5px rgba(245,237,226,.35)); }
.wk-con--a { width: clamp(220px, 24vw, 330px); right: clamp(1rem, 6vw, 7rem); top: clamp(3.5rem, 7vw, 6rem); }
.wk-con--b { width: clamp(170px, 18vw, 250px); right: clamp(1.5rem, 9vw, 10rem); bottom: clamp(2rem, 4vw, 3.5rem); }
/* No non-scaling-stroke here: it measures the dash in screen pixels, and the
   pathLength="1" draw-in becomes a dotted line. */
.wk-con-line {
  fill: none; stroke: rgba(245,237,226,.3); stroke-width: .8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.6s var(--ease) .2s;
}
.wk-con-star { fill: #fff; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); transition: opacity .6s ease, transform .6s cubic-bezier(.3,1.6,.5,1); }
.wk-con-star--mint { fill: var(--mint); }
.wk-con-star--gold { fill: var(--lantern-hi); }
.wk-con.is-live .wk-con-line { stroke-dashoffset: 0; }
.wk-con.is-live .wk-con-star { opacity: .85; transform: none; animation: wk-con-twinkle 4.8s ease-in-out infinite; }
.wk-con.is-live .wk-con-star:nth-of-type(2) { transition-delay: .3s; animation-delay: -1.2s; }
.wk-con.is-live .wk-con-star:nth-of-type(3) { transition-delay: .7s; animation-delay: -2.6s; }
.wk-con.is-live .wk-con-star:nth-of-type(4) { transition-delay: 1.1s; animation-delay: -.6s; }
.wk-con.is-live .wk-con-star:nth-of-type(5) { transition-delay: 1.5s; animation-delay: -3.4s; }
.wk-con.is-live .wk-con-star:nth-of-type(6) { transition-delay: 1.9s; animation-delay: -1.9s; }
.wk-con.is-live .wk-con-star:nth-of-type(7) { transition-delay: 2.3s; animation-delay: -4.1s; }
.wk-con.is-live .wk-con-star--mint { filter: drop-shadow(0 0 4px var(--mint)); }
.wk-con.is-live .wk-con-star--gold { filter: drop-shadow(0 0 4px var(--lantern)); }
@keyframes wk-con-twinkle { 0%, 100% { opacity: .85; } 50% { opacity: .4; } }

/* The seam between the patterns and the week: a lit line straddling the two
   sections, with a star where it is brightest. */
.wk-divide {
  position: absolute; z-index: 2; left: 0; right: 0; top: 0; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 0 clamp(1.1rem, 3.5vw, 2.5rem); pointer-events: none;
}
.wk-divide::before, .wk-divide::after {
  content: ""; flex: 1 1 0; max-width: 760px; height: 1px;
  box-shadow: 0 0 14px 1px rgba(110,240,210,.3);
}
.wk-divide::before { background: linear-gradient(90deg, transparent, rgba(134,242,218,.5) 55%, rgba(134,242,218,.85)); }
.wk-divide::after  { background: linear-gradient(90deg, rgba(246,200,110,.85), rgba(246,200,110,.5) 45%, transparent); box-shadow: 0 0 14px 1px rgba(246,200,110,.3); }
.wk-divide-star {
  flex: none; width: 30px; height: 30px; fill: var(--lantern-hi);
  filter: drop-shadow(0 0 6px rgba(246,200,110,.9)) drop-shadow(0 0 22px rgba(246,200,110,.45));
  animation: wk-divide-star 5s ease-in-out infinite;
}
@keyframes wk-divide-star { 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; } 50% { transform: scale(.82) rotate(45deg); opacity: .8; } }
.wk-links-head { max-width: 780px; }
.wk-links-head .wk-lead { margin-top: 1.3rem; }
.wk-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.wk-link-card {
  position: relative; overflow: hidden; margin: 0; padding: 1.7rem 1.7rem 1.8rem; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border: 1px solid rgba(245,237,226,.1);
  transition: border-color .4s, transform .5s var(--ease);
}
.wk-link-card::before {
  content: ""; position: absolute; right: -30%; top: -60%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(246,200,110,.16), transparent 65%); pointer-events: none;
}
.wk-link-card:hover { border-color: rgba(246,200,110,.32); transform: translateY(-3px); }
.wk-pair { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.wk-pair-dot { display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto; }
.wk-pair-dot i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px 2px rgba(110,240,210,.6); }
.wk-pair-dot--b i { background: var(--lantern-hi); box-shadow: 0 0 10px 2px rgba(246,200,110,.7); }
.wk-pair-dot .wk-mono { color: var(--cream-dim); font-size: .62rem; }
.wk-pair-line {
  flex: 1; height: 1px; opacity: .85;
  background: linear-gradient(90deg, var(--mint), var(--lantern));
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s var(--ease); transition-delay: calc(.25s + var(--i) * .12s);
}
.wk-link-card.is-in .wk-pair-line { transform: scaleX(1); }
.wk-link-card blockquote {
  margin: 0; font-family: var(--serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(1.35rem, 2.1vw, 1.75rem); line-height: 1.3; letter-spacing: -.01em; color: var(--cream);
}
.wk-links-note { margin: 1.7rem 0 0; color: var(--cream-mute); font-size: .86rem; line-height: 1.6; max-width: 48em; }

@media (max-width: 960px) {
  .wk-link-grid { grid-template-columns: minmax(0, 1fr); }
  .wk-con--b { display: none; }
}
@media (max-width: 760px) {
  /* No room beside the heading: the stars and fireflies carry the sky alone. */
  .wk-con--a { display: none; }
}

@keyframes wk-blink { 0%, 100% { opacity: .1; } 35% { opacity: 1; } 55% { opacity: .85; } 75% { opacity: .25; } }

/* Short windows (small laptops): tighten the hero so the chart still shows on load. */
@media (max-height: 800px) and (min-width: 641px) {
  .wk-hero { padding-top: 1rem; }
  .wk-h1 { font-size: clamp(2.3rem, 4.4vw, 4.3rem); margin: .2em 0 .25em; }
  .wk-lead { font-size: 1rem; line-height: 1.55; }
  .wk-cta { margin-top: 1.1rem; }
  .wk-btn { padding: .8rem 1.6rem; }
  .wk-fine { margin-top: .75rem; }
  .wk-curve { min-height: 150px; margin-top: .75rem; }
  .wk-flag-pole { height: 34px; }
  .wk-flag-tag { bottom: 41px; }
}

/* ---- A note from the founder ------------------------------------------- */
.wk-note {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.5rem clamp(2rem, 6vw, 5.5rem);
  margin-top: clamp(4.5rem, 9vw, 7rem); padding-top: 2rem; border-top: 2px solid var(--ink);
}
.wk-note-lead img { display: block; border-radius: 50%; object-fit: cover; margin: 1rem 0 0; }
.wk-note-lead blockquote {
  margin: 1rem 0 0; font-family: var(--serif); font-style: italic; font-weight: 300; font-optical-sizing: auto;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.12; letter-spacing: -.015em; color: var(--ink);
}
.wk-note-lead blockquote::before { content: "\201C"; color: var(--plum-ink); margin-right: .05em; }
.wk-note-lead blockquote::after  { content: "\201D"; color: var(--plum-ink); }
.wk-note-body { padding-top: 2.1rem; }
.wk-note-body p { font-size: 1.12rem; line-height: 1.75; margin: 0 0 1.1rem; max-width: 34em; }
.wk-sig { margin-top: 1.2rem; }

/* ---- Members' words ------------------------------------------------------ */
.wk-quotes {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.4rem clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(4rem, 8vw, 6rem);
}
.wk-quotes-label { grid-column: 1 / -1; }
.wk-quotes figure {
  position: relative; margin: 0; padding: 1.6rem 1.7rem 1.4rem;
  background: rgba(255,255,255,.55); border: 1px solid var(--rule); border-radius: 18px;
}
.wk-quotes figure:first-of-type { grid-row: span 2; }
.wk-quotes figure::before {
  content: "\201C"; position: absolute; top: .3rem; left: 1.2rem;
  font-family: var(--serif); font-size: 3.4rem; line-height: 1; color: var(--plum-ink); opacity: .35;
}
.wk-quotes blockquote { margin: .9rem 0 1rem; }
.wk-quotes blockquote p { font-family: var(--serif); font-weight: 400; font-size: 1.16rem; line-height: 1.55; color: var(--ink); margin: 0 0 .8rem; }
.wk-quotes blockquote p:last-child { margin-bottom: 0; }
.wk-quotes figure:first-of-type blockquote p { font-size: 1.24rem; }
.wk-quotes figcaption { color: var(--plum-ink); text-transform: none; letter-spacing: .02em; }
.wk-quotes figcaption a { color: var(--plum-ink); }

/* ---- Made with members --------------------------------------------------- */
.wk-made {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1rem clamp(2rem, 6vw, 5.5rem);
  margin-top: clamp(3.5rem, 7vw, 5rem); padding-top: 1.6rem; border-top: 1px solid var(--rule);
}
.wk-made-h { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; color: var(--ink); margin: 0; }
.wk-made p { margin: 0 0 1rem; max-width: 36em; }
.wk-built-links { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; font-weight: 700; }

@media (max-width: 860px) {
  .wk-note, .wk-made, .wk-quotes { grid-template-columns: minmax(0, 1fr); }
  .wk-quotes figure:first-of-type { grid-row: auto; }
  .wk-note-body { padding-top: 0; }
}
/* =========================================================================
   /features (prefix ft-): the same night-then-paper language as the home page.
   ========================================================================= */
.ft-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(70% 70% at 80% 0%, rgba(122,63,134,.4), transparent 70%),
    linear-gradient(180deg, #160830 0%, var(--night) 100%);
}
.ft-hero-inner { z-index: 2; }
.ft-h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
.ft-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.ft-jump a {
  display: inline-block; padding: .45rem .9rem; border-radius: 999px;
  border: 1px solid rgba(245,237,226,.22); color: var(--cream); font-size: .9rem; font-weight: 600;
  transition: border-color .2s, background .2s, color .2s;
}
.ft-jump a:hover { border-color: var(--mint); color: var(--mint); background: rgba(134,242,218,.06); }

.ft-body { padding-top: clamp(2.5rem, 6vw, 4rem); }
.ft-group { padding-top: clamp(2.5rem, 5vw, 3.5rem); scroll-margin-top: 80px; }
.ft-group + .ft-group { margin-top: clamp(1rem, 3vw, 2rem); }
.ft-group-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: .5rem 2rem; align-items: end; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.ft-group-head .wk-h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.ft-group-head p { margin: 0; color: var(--ink-2); }
.ft-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4rem); }
.ft-list li { display: flex; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--rule); }
.ft-ic {
  flex: 0 0 auto; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px;
  background: rgba(122,63,134,.08); color: var(--plum-ink);
}
.ft-list h3 { margin: 0 0 .3rem; font-family: var(--serif); font-weight: 500; font-size: 1.22rem; line-height: 1.25; color: var(--ink); }
.ft-list p { margin: 0 0 .45rem; font-size: .96rem; line-height: 1.6; }
.ft-tag {
  display: inline-block; vertical-align: 3px; margin-left: .45rem;
  font-family: var(--mono); font-size: .6rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: .16rem .45rem; border-radius: 999px; color: var(--plum-ink); border: 1px solid rgba(122,63,134,.35);
}
.ft-tag--free { color: #0b7564; border-color: rgba(11,117,100,.4); }
.ft-more { font-size: .9rem; font-weight: 700; }
.ft-more span { display: inline-block; transition: transform .2s; }
.ft-more:hover span { transform: translateX(3px); }
.ft-end { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.ft-note { font-size: .9rem; max-width: 46em; }

@media (max-width: 860px) {
  .ft-group-head { grid-template-columns: minmax(0, 1fr); }
  .ft-list { grid-template-columns: minmax(0, 1fr); }
}
