/* The public shell and homepage (SPC-174 c1; spec pd/log docs/team/specs/SPC-174.md, option B v3).
   Loaded after site.css on public pages only (body.pub); the private build never links it, so its look is unchanged.
   Fonts are self-hosted (privacy.md: nothing from other companies' servers). Every rule is scoped to .pub. */

@font-face { font-family: "Jersey 10"; src: url(fonts/Jersey10-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url(fonts/Silkscreen-400-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(fonts/SpaceMono-700-latin.woff2) format("woff2"); font-weight: 700; font-display: swap; }

.pub {
  --night: #16112F; --panel: #2A2356; --mut: #6E6890; --dim: #9C94D6;
  --pix: "Jersey 10", ui-monospace, Menlo, monospace; --spm: "Space Mono", ui-monospace, Menlo, monospace;
}
/* visually hidden, for screen readers: off-screen too, so no hidden text ever sits over a light band */
.pub .sr, .pub .rotw.on .word, .pub .figcap {
  position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- header: brand left, links + Subscribe on one centre line ---------- */
.pub .topbar {
  background: none; box-shadow: none; padding: 18px 0 0; margin: 0 0 8px; text-transform: none; letter-spacing: 0;
  font: 400 16px var(--pix); color: var(--lilac); font-synthesis: none;
}
.pub .topbar .brand { gap: 10px; }
/* SPC-186 wordmark: "The Crit" drawn in pixel cells (build.wordmark, cell 2 = 14 px tall), centred on the critter */
.pub .topbar .brand .name { display: block; flex: none; }
.pub .topbar nav.top { display: flex; align-items: center; gap: 26px; font: 400 19px var(--pix); color: var(--paper); font-synthesis: none; }
.pub .topbar nav.top > * { line-height: 20px; padding: 0; }
.pub .topbar nav.top .sub-l { background: var(--green); color: var(--night); padding: 8px 14px; }
.pub .topbar nav.top .sub-l[aria-current], .pub .topbar nav.top .sub-l:hover { color: var(--night); background: var(--yellow); }
.pub .dock { display: none; }

/* ---------- footer: on a solid night panel, never on the sky's light bands ---------- */
.pub .site-foot {
  margin-top: 40px; padding: 24px 0 32px; border-top: 4px solid var(--panel); background: var(--night);
  box-shadow: 0 0 0 100vmax var(--night); clip-path: inset(0 -100vmax -100vmax);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 22px; font: 14px/1.5 var(--sans); color: var(--dim);
}
.pub .site-foot .foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pub .site-foot a { color: var(--lilac); text-decoration: none; }
.pub .site-foot a:hover { color: var(--yellow); text-decoration: underline; }
.pub .site-foot p { margin: 0 0 0 auto; }

/* captions and small labels sit on the ink, never straight on the sky (spec §1 contrast rule): the figure caption is
   screen-reader text (above), the quote and term captions are on their ink cards (site.css) */
.pub .draft-banner { background: var(--night); color: var(--paper); padding: 8px 12px; }

/* ---------- standard pages (privacy, terms, ...): from 1024 px the card is a centred 68ch reading column plus its
   26 px side padding (SPC-183, PD); the DRAFT banner spans the card ---------- */
@media (min-width: 1024px) {
  .pub main.std-page .term { max-width: calc(68ch + 52px); margin-left: auto; margin-right: auto; }
}

/* ---------- the subscribe form (homepage strip and subscribe.html) ---------- */
.pub form.subscribe { display: grid; grid-template-columns: minmax(300px, 1fr) auto; gap: 10px; align-items: stretch; margin: 0; }
.pub form.subscribe input {
  font: 15px var(--sans); padding: 13px 14px; border: 0; border-radius: 4px; background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink); min-width: 0;
}
.pub form.subscribe input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--red); }  /* SPC-195 bad-email page */
.pub form.subscribe input::placeholder { color: var(--mut); opacity: 1; }
.pub form.subscribe button {
  background: var(--green); color: var(--ink); border: 0; border-radius: 4px; font: 400 19px var(--pix); font-synthesis: none; padding: 0 22px; cursor: pointer;
}
.pub form.subscribe p { grid-column: 1 / -1; margin: 4px 0 0; font: 14px var(--sans); color: var(--lilac); }
.pub form.subscribe button:hover, .pub form.subscribe button:focus-visible { background: var(--yellow); }
/* the honeypot (SPC-195): out of the grid and off-screen; aria-hidden + tabindex -1 keep people and screen readers out */
.pub form.subscribe .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pub .term form.subscribe { margin-top: 18px; }
.pub .term form.subscribe p { color: #4A4470; }
/* the one-button forms on /api/confirm and /api/unsubscribe (SPC-195): the Subscribe button's look */
.pub form.act { margin: 18px 0; }
.pub form.act button {
  background: var(--green); color: var(--ink); border: 0; border-radius: 4px; font: 400 19px var(--pix); font-synthesis: none;
  padding: 12px 26px; min-height: 48px; cursor: pointer; box-shadow: inset 0 0 0 2px var(--ink);
}
.pub form.act button:hover, .pub form.act button:focus-visible { background: var(--yellow); }

/* ---------- homepage ---------- */
.pub.home-page { background: var(--night); }
.pub.home-page > svg.scene { display: none; }
.pub.home-page .wrap { max-width: 1280px; }  /* the mock's 1200 px content at 40 px gutters */
.pub .tagline { padding: 26px 0 34px; border-bottom: 4px solid var(--panel); }
.pub .tagline h1 { font: 400 115px/0.92 var(--pix); font-synthesis: none; letter-spacing: -.02em; margin: 0; max-width: 1100px; color: var(--paper); }
.pub .tagline em { font-style: normal; color: var(--yellow); }
.pub .tagline br.wide { display: none; }  /* from 721 px the yellow phrase starts line 2 whole (SPC-187, PD lens D) */
@media (min-width: 721px) { .pub .tagline br.wide { display: inline; } }
.pub .rotw canvas { display: none; }
.pub .rotw.on canvas { display: inline-block; }

.pub ol.cards {
  list-style: none; margin: 0; padding: 32px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.pub .cards .card { display: flex; }
.pub .cards .card > a {
  flex: 1; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 6px; overflow: hidden;
  text-decoration: none; transition: transform .15s;
}
.pub .cards .card > a:hover, .pub .cards .card > a:focus-visible { transform: translateY(-4px); outline: 3px solid var(--yellow); outline-offset: 3px; }
.pub .cards .art { position: relative; display: block; }
.pub .cards .art svg { display: block; width: 100%; height: auto; aspect-ratio: 240 / 134; }
.pub .plate {
  position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper); color: var(--ink); font: 400 18px/20px var(--pix); font-synthesis: none; padding: 3px 10px; border-radius: 3px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.pub .plate img { width: 20px; height: 20px; border-radius: 3px; object-fit: contain; display: block; }
.pub .cards .words { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pub .chip { align-self: flex-start; font: 700 11px var(--spm); letter-spacing: .08em; padding: 3px 8px; border-radius: 3px; color: var(--ink); }
.pub .cards .title { font: 700 20px/1.25 var(--sans); letter-spacing: -.01em; flex: 1; }
.pub .cards .min { font: 700 13px var(--spm); color: var(--mut); }
.pub .cards .lead { grid-column: span 2; grid-row: span 2; }
.pub .cards .lead .words { padding: 24px 28px 28px; justify-content: flex-end; }
.pub .cards .lead .title { font-size: 30px; flex: 0 0 auto; }
.pub .cards .new { font: 700 12px var(--spm); color: #C2410C; letter-spacing: .1em; }
.pub .cards .motive { margin: 0; font: italic 400 19px/1.4 var(--serif); color: #4A4470; }

.pub .strip {
  margin: 12px 0 0; background: var(--panel); border-radius: 6px; padding: 28px 32px;
  display: grid; grid-template-columns: 190px 1fr auto; gap: 28px; align-items: center;
}
.pub .strip .pic svg { display: block; width: 190px; height: auto; aspect-ratio: 172 / 86; }
.pub .strip h2 { font: 400 38px/1.1 var(--pix); font-synthesis: none; margin: 0 0 6px; color: var(--paper); white-space: nowrap; }
.pub .strip .say p { margin: 0; font: 16px/1.5 var(--sans); color: var(--lilac); }

/* ---------- 2 columns ---------- */
@media (max-width: 1023px) {
  .pub ol.cards { grid-template-columns: repeat(2, 1fr); }
  .pub .tagline h1 { font-size: 90px; }
  .pub .strip { grid-template-columns: 150px 1fr; }
  .pub .strip .pic svg { width: 150px; }
  .pub .strip form.subscribe { grid-column: 1 / -1; }
}

/* ---------- phone: brand only on top, the links in a bottom dock ---------- */
@media (max-width: 720px) {
  .pub .wrap { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .pub .topbar { padding-top: 14px; }
  .pub .topbar nav.top { display: none; }
  .pub .dock {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--paper); color: var(--ink); border-top: 4px solid var(--ink); padding-bottom: env(safe-area-inset-bottom);
    font: 400 18px var(--pix); font-synthesis: none; text-align: center;
  }
  .pub .dock > * { min-height: 52px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
  .pub .dock a[aria-current] { color: #4B3BD0; }
  .pub .dock .sub-l { background: var(--green); color: var(--ink); }
  .pub .dock .sub-l[aria-current] { color: var(--ink); box-shadow: inset 0 -4px 0 var(--ink); }
  .pub .dock .soon { opacity: .55; }
  /* on a slide page the stepper's own bottom bar sits above the dock, never under it */
  .stepping .pub .slide .foot:not(.screen .foot) { bottom: calc(56px + env(safe-area-inset-bottom)); }
  .stepping .pub .wrap { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
  .pub .site-foot { padding-bottom: 20px; }
  .pub .site-foot p { margin: 0; width: 100%; }

  .pub .tagline { padding: 12px 0 22px; }
  .pub .tagline h1 { font-size: 58px; line-height: .98; }
  .pub ol.cards { grid-template-columns: 1fr; padding: 20px 0; gap: 20px; }
  .pub .cards .lead { grid-column: auto; grid-row: auto; }
  .pub .cards .lead .words { padding: 16px 18px 18px; }
  .pub .cards .lead .title { font-size: 22px; }
  .pub .strip { grid-template-columns: 1fr; gap: 16px; padding: 22px 18px; }
  .pub .strip .pic svg { width: 170px; }
  .pub .strip h2 { font-size: 33px; white-space: normal; }
  .pub form.subscribe { grid-template-columns: 1fr; }
  .pub form.subscribe input { padding: 14px; }
  .pub form.subscribe button { min-height: 52px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .pub .cards .card > a:hover, .pub .cards .card > a:focus-visible { transform: none; }
}

/* ---------- the Subscribe pop-up (SPC-199; spec pd/log docs/team/specs/SPC-199.md, PD mock tools/pd/spc199/popup.py) ----------
   build.subscribe_popup + static/subpop.js. The dialog has no padding: .subpop-in fills it, so a click on the dialog
   itself is the backdrop. */
.pub dialog.subpop {
  width: min(880px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 6px;
  background: var(--panel); color: var(--paper); box-shadow: 10px 10px 0 var(--night), 0 0 0 4px #1B1640; overflow: auto;
}
.pub dialog.subpop[open] { animation: subpop-fade .15s ease-out; }
.pub dialog.subpop::backdrop { background: rgba(22, 17, 47, .78); }
.pub .subpop-in { position: relative; display: grid; grid-template-columns: 1fr 200px; gap: 32px; align-items: center; padding: 52px 56px 48px; }
.pub .subpop h2 { margin: 0 0 14px; font: 400 64px var(--pix); line-height: .95; font-synthesis: none; color: var(--paper); letter-spacing: .005em; }
.pub .subpop h2 em { font-style: normal; color: var(--yellow); }
.pub .subpop-sub { margin: 0 0 30px; font: 18px/1.45 var(--sans); color: var(--lilac); }
.pub .subpop-form { display: grid; gap: 10px; max-width: 520px; margin: 0; }
.pub .subpop-form label { font: 700 12px var(--spm); letter-spacing: .06em; text-transform: uppercase; color: var(--lilac); }
.pub .subpop-form input[type=email] {
  font: 17px var(--sans); height: 54px; padding: 0 16px; border: 0; border-radius: 4px; min-width: 0;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink);
}
.pub .subpop-form input[type=email]:focus { outline: 3px solid var(--yellow); outline-offset: 2px; }
.pub .subpop-form input::placeholder { color: var(--mut); opacity: 1; }
.pub .subpop-form button {
  height: 58px; margin-top: 4px; border: 0; border-radius: 4px; background: var(--green); color: var(--ink); cursor: pointer;
  font: 400 26px var(--pix); font-synthesis: none; box-shadow: inset 0 -4px 0 rgba(27, 22, 64, .25);
}
.pub .subpop-form button:hover, .pub .subpop-form button:focus-visible { background: var(--yellow); outline: none; }
.pub .subpop-form p { margin: 2px 0 0; font: 14px var(--sans); color: var(--lilac); }
.pub .subpop-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pub .subpop-art { align-self: end; display: flex; justify-content: center; padding-bottom: 92px; }
.pub .subpop-x {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 4px;
  background: transparent; color: var(--lilac); cursor: pointer; display: grid; place-items: center;
}
.pub .subpop-x:hover, .pub .subpop-x:focus-visible { color: var(--ink); background: var(--yellow); outline: none; }
@keyframes subpop-fade { from { opacity: 0; } }
@keyframes subpop-up { from { transform: translateY(100%); } }
@media (max-width: 720px) {
  .pub dialog.subpop {
    width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 10px 10px 0 0; box-shadow: 0 -4px 0 #1B1640;
  }
  .pub dialog.subpop[open] { animation: subpop-up .18s ease-out; }
  .pub .subpop-in {
    grid-template-columns: 1fr 84px; gap: 8px 12px; align-items: start;
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .pub .subpop-copy { display: contents; }
  .pub .subpop h2 { grid-column: 1; font-size: 40px; margin: 0 0 10px; }
  .pub .subpop-sub { grid-column: 1; font-size: 16px; margin: 0 0 18px; }
  .pub .subpop-art { grid-column: 2; grid-row: 1; align-self: start; padding: 34px 0 0; }
  .pub .subpop-art svg { width: 84px; height: 84px; }
  .pub .subpop-form { grid-column: 1 / -1; max-width: none; }
  .pub .subpop-x { top: 6px; right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .pub dialog.subpop[open] { animation: none; }
}

/* SPC-197 std pages: the footer pages (about, privacy, terms, disclaimer, newsletter) + 404 as one card on the night, the
   page's h1 and critter in the hero (PD spec docs/team/specs/SPC-197.md, mock tools/pd/spc197/pages.py; SPC-201's card) */
.pub.cp { background: var(--night); }
.pub.cp > svg.scene { display: none; }
.pub main.cpage { padding: 28px 0 56px; }
.pub .cp-card {
  width: min(880px, 100%); margin: 0 auto; box-sizing: border-box; background: var(--panel); border-radius: 6px;
  box-shadow: 10px 10px 0 #0E0A22, 0 0 0 4px #1B1640; color: var(--paper);
}
.pub .cp-hero {
  display: grid; grid-template-columns: 1fr 180px; gap: 24px; align-items: center; padding: 48px 56px 28px;
  border-bottom: 4px solid #1B1640;
}
.pub .cp-hero h1 { margin: 0; font: 400 72px var(--pix); line-height: .95; font-synthesis: none; color: var(--paper); }
.pub .cp-hero h1 em { font-style: normal; color: var(--yellow); }
.pub .cp-art { display: flex; justify-content: flex-end; }
.pub .cp-body { padding: 32px 56px 48px; max-width: 680px; font: 17px/1.65 var(--sans); color: var(--paper); }
.pub .cp-body h2 {
  margin: 36px 0 10px; font: 400 34px var(--pix); line-height: 1; font-synthesis: none; color: var(--paper);
  display: flex; align-items: center; gap: 12px;
}
.pub .cp-body h2::before { content: ""; width: 10px; height: 10px; background: var(--yellow); flex: none; }
.pub .cp-body p { margin: 0 0 14px; }
.pub .cp-body b, .pub .cp-body strong { color: #FFFFFF; }
.pub .cp-body a { color: var(--yellow); }
.pub .cp-body ul, .pub .cp-body ol { margin: 0 0 16px; padding-left: 22px; }
.pub .cp-body ul { list-style: none; }
.pub .cp-body ul li { position: relative; margin: 0 0 8px; }
.pub .cp-body ul li::before { content: ""; position: absolute; left: -20px; top: .62em; width: 7px; height: 7px; background: var(--green); }
.pub .cp-body ol li { margin: 0 0 8px; }
.pub .cp-body ol li::marker { font: 700 14px var(--spm); color: var(--yellow); }
.pub .cp-body > :first-child { margin-top: 0; }
@media (max-width: 720px) {
  .pub main.cpage { padding: 8px 0 28px; }
  .pub .cp-card { box-shadow: 6px 6px 0 #0E0A22, 0 0 0 3px #1B1640; }
  .pub .cp-hero { grid-template-columns: 1fr 84px; gap: 12px; padding: 24px 20px 18px; }
  .pub .cp-hero h1 { font-size: 46px; }
  .pub .cp-art svg.critter { width: 84px; height: 84px; }
  .pub .cp-art svg.env { width: 120px; height: 60px; }
  .pub .cp-hero.env { grid-template-columns: 1fr; }
  .pub .cp-hero.env .cp-art { order: -1; justify-content: flex-start; }
  .pub .cp-body { padding: 22px 20px 30px; font-size: 16px; }
  .pub .cp-body h2 { font-size: 30px; margin-top: 28px; }
}
/* §5: the owner's LinkedIn. LinkedIn's own white "in" bug, unaltered, so it can't take lilac: it dims at rest and goes
   full white on hover/focus. Footer: icon only, 20 px in a 44 x 44 target. About: the 24 px icon + "Ayush on LinkedIn". */
.pub .site-foot a.foot-li {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -12px 0;
  border-radius: 4px; opacity: .72;
}
.pub .site-foot a.foot-li:hover, .pub .site-foot a.foot-li:focus-visible { opacity: 1; }
.pub .site-foot a.foot-li:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; }
.pub .site-foot a.foot-li img { display: block; width: auto; height: 20px; }
.pub .cp-body .li-row a { display: inline-flex; align-items: center; gap: 10px; }
.pub .cp-body .li-row img { display: block; width: auto; height: 24px; }
/* end SPC-197 */

/* SPC-201 status card */
/* The sign-up status pages (lib/pages.py on /api/, and site/pages with `layout: status`): one card in the Subscribe
   pop-up's look on the night colour, the critter in its mood on the right (spec pd/log docs/team/specs/SPC-201.md §2). */
.pub.st { background: var(--night); }
.pub.st > svg.scene { display: none; }
.pub main.status { display: grid; place-items: center; min-height: calc(100vh - 260px); padding: 24px 0 48px; }
.pub .st-card {
  width: min(880px, 100%); box-sizing: border-box; display: grid; grid-template-columns: 1fr 200px; gap: 32px; align-items: center;
  padding: 52px 56px 48px; background: var(--panel); color: var(--paper); border-radius: 6px; box-shadow: 10px 10px 0 #0E0A22, 0 0 0 4px #1B1640;
}
.pub .st-card h1 { margin: 0 0 18px; font: 400 64px var(--pix); line-height: .95; font-synthesis: none; color: var(--paper); }
.pub .st-card h1 em { font-style: normal; color: var(--yellow); }
.pub .st-card p { margin: 0 0 12px; font: 18px/1.5 var(--sans); color: var(--lilac); max-width: 520px; }
.pub .st-card p b { color: var(--paper); }
.pub .st-card a { color: var(--yellow); }
.pub .st-acts { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.pub .st-acts:empty { display: none; }
.pub .st-card form.act { margin: 0; }
.pub .st-card form.act button, .pub .st-card form.subscribe button {
  height: 56px; min-height: 0; padding: 0 30px; border: 0; border-radius: 4px; background: var(--green); color: var(--ink);
  font: 400 26px var(--pix); font-synthesis: none; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(27, 22, 64, .25);
}
.pub .st-card form.act button:hover, .pub .st-card form.act button:focus-visible,
.pub .st-card form.subscribe button:hover, .pub .st-card form.subscribe button:focus-visible { background: var(--yellow); outline: none; }
.pub .st-card form.act button:disabled { cursor: progress; }
.pub .st-back { font: 17px var(--sans); }
.pub .st-card form.subscribe { width: 100%; max-width: 520px; grid-template-columns: 1fr auto; margin: 0 0 12px; }
.pub .st-acts form.subscribe { margin: 0; }
.pub .st-card form.subscribe input { height: 56px; box-sizing: border-box; padding: 0 16px; font: 17px var(--sans); }
.pub .st-card form.subscribe input:focus { outline: 3px solid var(--yellow); outline-offset: 2px; }
.pub .st-card form.subscribe p { font-size: 14px; margin: 2px 0 0; }
.pub .st-art { display: flex; justify-content: center; }
.pub .st-art svg { display: block; }
@media (max-width: 720px) {
  .pub main.status { min-height: 0; padding: 8px 0 24px; place-items: stretch; }
  .pub .st-card { grid-template-columns: 1fr; gap: 6px; padding: 24px 20px 26px; box-shadow: 6px 6px 0 #0E0A22, 0 0 0 3px #1B1640; }
  .pub .st-art { order: -1; justify-content: flex-start; }
  .pub .st-art svg.critter { width: 96px; height: 96px; }
  .pub .st-art svg.env { width: 200px; height: 100px; }
  .pub .st-card h1 { font-size: 42px; margin-bottom: 12px; }
  .pub .st-card p { font-size: 16px; }
  .pub .st-acts { flex-direction: column; align-items: stretch; }
  .pub .st-card form.act button, .pub .st-card form.subscribe button { width: 100%; min-height: 52px; }
  .pub .st-card form.subscribe { grid-template-columns: 1fr; }
  .pub .st-back { text-align: center; padding: 6px 0; }
}
/* end SPC-201 */
