/* kellylucas.dev
   A poster of a place on a big sun, Kelly's drawings on round shapes, and
   bands of color with wavy edges. Her six colors plus honey and sage.
   One sans (Instrument Sans) and a mono for small labels (DM Mono).
   The playground rooms keep lab.css. */

/* ---------- Type ---------- */
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/InstrumentSans-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/assets/fonts/DMMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* the six */
  --paper: #f8f6f1;
  --navy: #1f355e;
  --teal: #5a9e9a;
  --coral: #d6605b;
  --pale-teal: #d4e7e5;
  --pale-coral: #f6dcd8;
  /* the two friends */
  --honey: #f0bf4c;
  --sage: #9fb78f;
  /* shades and tints of those eight */
  --deep-coral: #b5443f;
  --deep-teal: #3b7672;
  --honey-tint: #fbf0cf;
  --sage-tint: #e6ecdf;
  --navy-hover: #35496e;
  --navy-soft: #556583;
  --line: #d7d9db;

  /* names the design desk still reads */
  --ink: var(--navy);
  --ink-2: var(--navy-hover);
  --ink-3: var(--navy-soft);
  --paper-2: #efece4;
  --card: #fcfbf8;
  --rule: rgba(31, 53, 94, 0.14);
  --rule-2: rgba(31, 53, 94, 0.28);
  --mint: var(--pale-teal);
  --mint-2: var(--teal);
  --lilac: var(--pale-coral);
  --sand: var(--honey-tint);
  --sky: var(--sage-tint);
  --case: var(--navy);
  --link: var(--navy);
  --live: var(--deep-teal);
  --radius: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --wrap: 1320px;
  --gutter: 60px;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font: var(--sans);
  /* the wavy and scalloped band edges: one mask each, any band color */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 28'%3E%3Cpath d='M0 28V20C40 20 40 4 80 4S120 20 160 20V28Z'/%3E%3C/svg%3E");
  --scallop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 28'%3E%3Cpath d='M0 28A28 24 0 0 1 56 28Z'/%3E%3C/svg%3E");

  color-scheme: light;
  accent-color: var(--navy);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ol, ul, figure, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
::selection { background: var(--honey); color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.sr-only, .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.shape { display: block; overflow: visible; }
time, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--paper-2);
}
kbd {
  font-family: var(--mono);
  font-size: 13px;
  padding: 0 5px;
  border: 1px solid var(--navy);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(248, 246, 241, 0.55);
}

/* ---------- Type scale ---------- */
.h1 { font-size: 86px; font-weight: 400; line-height: 0.95; letter-spacing: -0.02em; }
.h2 { font-size: 52px; font-weight: 400; line-height: 1.06; letter-spacing: -0.02em; }
.h3 { font-size: 26px; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.lede { font-size: 22px; line-height: 1.42; letter-spacing: -0.005em; }
.tlink { font-size: 18px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tlink:hover { text-decoration-thickness: 2px; }
.prose a, .lede a, .does a, .text-link { text-underline-offset: 3px; }
.prose { max-width: 40em; }
.prose p + p { margin-top: 14px; }
.sec-head { max-width: 760px; }
.sec-head p { max-width: 36em; margin-top: 22px; font-size: 20px; line-height: 1.45; }
.sec-head .tlink { display: inline-block; margin-top: 22px; }

/* ---------- Buttons: round ends, never square ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font: inherit;
  font-size: 18px;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.2s;
}
.btn:hover { background: var(--navy-hover); transform: translateY(-1px); }
.btn--line { background: transparent; color: var(--navy); }
.btn--line:hover { background: var(--navy); color: var(--paper); }
.btn--sm { font-size: 16px; padding: 10px 20px; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row--after { margin-top: 28px; }
.btn .lock { width: 14px; height: 14px; }

/* ---------- Header ---------- */
.top { position: relative; z-index: 5; background: var(--paper); }
.top__in { display: flex; align-items: center; gap: 36px; height: 78px; }
.mark { display: flex; align-items: center; gap: 10px; font-size: 20px; letter-spacing: -0.01em; text-decoration: none; }
.mark svg { width: 24px; height: 24px; }
.nav { display: flex; gap: 30px; font-size: 17px; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.top .btn { margin-left: auto; }

/* ---------- Status dots ---------- */
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot-use { background: var(--navy); }
.dot-live { background: var(--deep-teal); }
.dot-priv { background: var(--deep-coral); }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ---------- Bands, with wavy or scalloped tops ---------- */
.band { position: relative; padding: 120px 0; }
.band--pteal { background: var(--pale-teal); }
.band--pcoral { background: var(--pale-coral); }
.band--tint { background: var(--honey-tint); }
.band--sage { background: var(--sage-tint); }
.band--paper { background: var(--paper); }
.band--cont { padding-top: 0; }
.edge::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -27px;
  height: 28px;
  background: inherit;
  pointer-events: none;
  -webkit-mask: var(--wave) 0 0 / 160px 28px repeat-x;
  mask: var(--wave) 0 0 / 160px 28px repeat-x;
}
.edge--scallop::before {
  -webkit-mask: var(--scallop) 0 0 / 56px 28px repeat-x;
  mask: var(--scallop) 0 0 / 56px 28px repeat-x;
}

/* ---------- Home: hello and the poster ---------- */
.hero { position: relative; padding: 26px 0 88px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 640px); gap: 40px; align-items: center; }
.hero__text { position: relative; z-index: 2; max-width: 640px; }
.hero .lede { margin-top: 30px; max-width: 600px; }
.hero__acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

/* the Magpie note under the hero text */
.note { display: flex; align-items: center; gap: 22px; max-width: 580px; margin-top: 58px; border-radius: 12px; color: inherit; text-decoration: none; }
.note__art { position: relative; flex: none; width: 118px; }
.note__art .shape { position: absolute; left: 50%; top: 54%; width: 104%; translate: -50% -50%; color: var(--pale-teal); transition: color 0.2s, transform 0.3s; }
.note__art img { position: relative; width: 100%; transition: transform 0.3s; }
.note__t { font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; text-decoration: underline transparent; text-decoration-thickness: 1.5px; text-underline-offset: 5px; transition: text-decoration-color 0.15s; }
.note:hover .note__t, .note:focus-visible .note__t { text-decoration-color: currentColor; }
.note:hover .note__art .shape { color: var(--honey); transform: rotate(14deg); }
.note:hover .note__art img { transform: translateY(-3px); }
.note__t, .note__d { display: block; }
.note__d { margin-top: 6px; font-size: 17px; line-height: 1.4; }

/* the poster: one big place on a sun */
.poster { position: relative; }
.poster__stage { position: relative; aspect-ratio: 1 / 0.92; }
/* the spin lives on the svg root, so it turns around its own center and stays put behind the drawing */
.spin { transform-origin: center; animation: spin 180s linear infinite; }
.spin--rev { animation: spin 240s linear infinite reverse; }
.poster__sun { position: absolute; left: 8%; top: 0; width: 84%; color: var(--poster-c, var(--honey)); transition: color 0.5s; }
.poster__art { position: absolute; z-index: 2; left: 0; bottom: 0; width: 100%; height: 76%; object-fit: contain; object-position: 50% 100%; }
.orb { position: absolute; z-index: 1; }
.orb--ast { width: 13%; left: 9%; top: -4%; color: var(--sage); }
.orb--quat { width: 11%; right: 23%; top: -5%; color: var(--honey); }
.orb--splat { width: 12%; left: -4%; top: 57%; color: var(--coral); }
.orb--squig { width: 13%; right: -2%; top: 40%; color: var(--navy); }
/* two small places on round shapes, orbiting the sun */
.poster__cap { position: relative; display: grid; justify-items: center; gap: 12px; margin-top: 22px; font-size: 20px; letter-spacing: -0.01em; text-align: center; }
.poster__cap a { text-underline-offset: 3px; }
.poster__cap .btn { width: 200px; justify-content: center; }

/* the one cursor: a wink */
.cur { position: absolute; z-index: 4; display: flex; align-items: flex-start; pointer-events: none; animation: bob 7s ease-in-out infinite; }
.cur svg { flex: none; width: 20px; height: 20px; fill: var(--deep-coral); }
.cur svg path { stroke: var(--paper); stroke-width: 1.4; }
.cur b { margin: 16px 0 0 -4px; padding: 3px 10px; border-radius: 999px; background: var(--deep-coral); color: var(--paper); font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.poster .cur { right: -1%; bottom: -4%; }

/* ---------- Inner pages: a smaller poster beside the title ---------- */
.page-hero { position: relative; padding: 26px 0 88px; }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: center; }
.page-hero__text { position: relative; z-index: 2; max-width: 640px; }
.page-hero .lede { margin-top: 26px; max-width: 600px; }
.page-hero .status-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 16px; }
.page-hero .btn-row { margin-top: 34px; }
.page-hero .poster__stage { aspect-ratio: 1 / 0.9; }
.page-hero .poster__sun { left: 6%; width: 88%; }
.page-hero .poster__art { height: 78%; }
.page-hero--plain .page-hero__grid { grid-template-columns: minmax(0, 1fr); }

/* ---------- Home: Magpie ---------- */
.mp-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 22px; font-size: 16px; }
.mp-meta span { display: inline-flex; align-items: center; gap: 8px; }
.mp-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); grid-template-areas: "head art" "does art"; column-gap: 72px; align-items: start; }
.mp-grid > .sec-head { grid-area: head; }
.mp-grid > .does { grid-area: does; margin-top: 52px; }
.mp-grid > .mp-art { grid-area: art; align-self: center; }
.does li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--navy); }
.does li:first-child { padding-top: 0; }
.tile { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.tile svg { width: 24px; height: 24px; }
.does h3 { font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.does p { margin-top: 4px; font-size: 16px; }
.reflex { min-height: 1.6em; margin-top: 14px; font-size: 15px; color: var(--navy-soft); }
.mp-art { position: relative; width: min(100%, 680px); margin: 0 auto; }
.mp-art__flower { position: absolute; left: 6%; top: 50%; width: 88%; translate: 0 -50%; color: var(--coral); }
.mp-art img { position: relative; z-index: 2; width: 86%; margin: 0 auto; }
.mp-art .o1 { position: absolute; z-index: 3; right: 2%; top: 4%; width: 13%; color: var(--sage); }
.mp-art .o2 { position: absolute; z-index: 1; left: -2%; bottom: 2%; width: 15%; color: var(--navy); }
.mp-stats { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--navy); }
.big-n { font-size: 120px; line-height: 0.85; letter-spacing: -0.04em; }
.mp-stats p:not(.big-n) { font-size: 16px; }
.mp-stats .big-n + p { margin-top: 14px; }
.mp-stats .h3 { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips li { padding: 4px 13px; border: 1px solid var(--navy); border-radius: 999px; background: rgba(248, 246, 241, 0.5); font-size: 15px; }
.mp-stats .btn { margin-top: 22px; }

/* ---------- Home: the projects ---------- */
.pj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 80px; align-items: start; margin-top: 64px; }
.pj-list { border-top: 1px solid var(--navy); }
.pj-list li { border-bottom: 1px solid var(--navy); }
.row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 84px 128px; gap: 16px; align-items: baseline; padding: 16px 0; text-decoration: none; }
.row__n { position: relative; font-family: var(--mono); font-size: 13px; }
.row__n svg { position: absolute; left: 0; top: -2px; width: 22px; height: 22px; color: var(--honey); opacity: 0; transition: opacity 0.15s; }
.row__t { font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
.row__w { display: block; margin-top: 3px; font-size: 15px; line-height: 1.4; }
.row__k { font-size: 14px; }
.row__s { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.row__thumb { display: none; }
.row__meta { display: contents; }
.row:hover .row__t, .row:focus-visible .row__t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pj-list li.is-on .row__n > span { opacity: 0; }
.pj-list li.is-on .row__n svg { opacity: 1; }
.pv { position: sticky; top: 40px; }
.pv__stage { position: relative; padding: 30px 18px 34px; }
.pv__splat { position: absolute; right: -4%; top: -6%; width: 46%; color: var(--honey); }
.pv__ast { position: absolute; z-index: 1; left: -2%; bottom: 0; width: 16%; color: var(--navy); }
.pv__card { position: relative; }
.pv__card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; clip-path: url(#blob-clip); }
.pv__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 15px; }
.pv__what { min-height: 2.8em; margin-top: 8px; font-size: 18px; }
.pv .btn { margin-top: 12px; }

/* ---------- Home: places, a scatter of drawings ---------- */
.scatter { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 28px; row-gap: 40px; align-items: start; margin-top: 80px; }
.pl figure { position: relative; }
.pl__art { position: relative; }
.pl__shape { position: absolute; left: 50%; top: var(--t, 46%); width: var(--s, 78%); translate: -50% -50%; rotate: var(--r, 0deg); color: var(--c, var(--paper)); }
.pl img { position: relative; width: 100%; }
.pl figcaption { margin-top: 14px; font-size: 17px; letter-spacing: -0.005em; text-align: center; }
.pl:nth-child(1) { grid-column: 1 / span 6; grid-row: 1; }
.pl:nth-child(1) figcaption { font-size: 22px; }
.pl:nth-child(2) { grid-column: 8 / span 4; grid-row: 1; margin-top: 70px; }
.pl:nth-child(3) { grid-column: 2 / span 3; grid-row: 2; margin-top: 10px; }
.pl:nth-child(4) { grid-column: 6 / span 3; grid-row: 2; margin-top: 64px; }
.pl:nth-child(5) { grid-column: 10 / span 3; grid-row: 2; margin-top: -20px; }
.pl:nth-child(6) { grid-column: 1 / span 3; grid-row: 3; margin-top: 30px; }
.pl:nth-child(7) { grid-column: 4 / span 3; grid-row: 3; margin-top: -10px; }
.pl:nth-child(8) { grid-column: 7 / span 3; grid-row: 3; margin-top: 64px; }
.pl:nth-child(9) { grid-column: 10 / span 3; grid-row: 3; margin-top: 16px; }
.places-wrap { position: relative; }
.pl-deco { position: absolute; pointer-events: none; }
.pl-deco--a { left: 50%; top: 8%; width: 64px; color: var(--sage); }
.pl-deco--b { right: 0; top: 4%; width: 84px; color: var(--navy); }

/* ---------- Doors: arched cards (playground and log at home) ---------- */
.nd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-top: 64px; }
.door { position: relative; display: flex; flex-direction: column; }
.door__top { position: relative; aspect-ratio: 2 / 1; border-radius: 9999px 9999px 0 0; background: var(--door); }
.door__body { flex: 1; padding: 6px 48px 48px; border-radius: 0 0 32px 32px; background: var(--door); }
.door--dcoral { --door: var(--deep-coral); color: var(--paper); }
.door--sage { --door: var(--sage); color: var(--navy); }
.door--dcoral :focus-visible, .door--navy :focus-visible { outline-color: var(--paper); }
.door__top .shape { position: absolute; }
.door__top .s1 { width: 34%; left: 33%; top: 26%; }
.door__top .s2 { width: 16%; left: 18%; top: 62%; }
.door__top .s3 { width: 11%; right: 20%; top: 58%; }
.door--sage .door__top .s1 { width: 30%; left: 35%; top: 30%; }
.door--sage .door__top .s2 { width: 13%; left: 20%; top: 60%; }
.door--sage .door__top .s3 { width: 12%; right: 20%; top: 56%; }
.door p { margin-top: 12px; max-width: 520px; font-size: 17px; }
.door .tlink { display: inline-block; margin-top: 20px; font-size: 18px; }
.loglist { margin-top: 18px; border-top: 1px solid rgba(31, 53, 94, 0.35); }
.loglist li { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(31, 53, 94, 0.35); font-size: 17px; }
.loglist time { padding-top: 3px; font-size: 14px; }
.door--dcoral .loglist, .door--navy .loglist { border-color: rgba(248, 246, 241, 0.7); }
.door--dcoral .loglist li { border-color: rgba(248, 246, 241, 0.7); }

/* ---------- Pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 22px 34px; margin-top: 30px; }
.pill { display: inline-flex; align-items: center; gap: 18px; padding: 10px 34px 14px 12px; border-radius: 999px; font-size: 64px; line-height: 1; letter-spacing: -0.025em; text-decoration: none; transition: transform 0.2s; }
.pill .ptile { display: grid; place-items: center; flex: none; width: 64px; height: 64px; margin-top: 4px; border-radius: 50%; }
.pill .ptile svg { width: 38px; height: 38px; }
.pill:hover { transform: translateY(-3px) rotate(-1deg); }
.pill--navy { background: var(--navy); color: var(--paper); }
.pill--sage { background: var(--sage-tint); }
.pill--coral { background: var(--coral); }      /* navy on coral is 3.3:1: large text only */
.pill--honey { background: var(--honey); }
.pill--dcoral { background: var(--deep-coral); color: var(--paper); }
.pills--sm .pill { font-size: 40px; gap: 14px; padding: 8px 26px 10px 10px; }
.pills--sm .pill .ptile { width: 48px; height: 48px; margin-top: 2px; }
.pills--sm .pill .ptile svg { width: 28px; height: 28px; }

/* ---------- Say hello ---------- */
.hello { padding: 104px 0 112px; text-align: center; overflow-x: clip; }
.hello .h1 { font-size: 96px; }
.hello p { max-width: 640px; margin: 24px auto 0; font-size: 22px; }
.hello .btn { margin-top: 36px; }
.hello .deco { position: absolute; }
.hello .d1 { width: 200px; right: -40px; top: 40px; }
.hello .d2 { width: 90px; right: 13%; bottom: 40px; }
.hello .d3 { width: 90px; left: 5%; top: 90px; }
.hello .books { position: absolute; left: 7%; bottom: 36px; width: 240px; }
.hello .wrap { position: relative; }

/* ---------- Footer ---------- */
.foot { position: relative; padding: 90px 0 40px; background: var(--paper); }
.foot__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.foot__mark { display: flex; align-items: center; gap: 12px; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.foot__mark svg { width: 40px; height: 40px; }
.foot h2 { margin-bottom: 14px; font-size: 16px; font-weight: 500; color: var(--navy); }
.foot li { margin: 0 0 10px; font-size: 15px; }
.foot li a { display: inline-flex; align-items: center; gap: 6px; padding-block: 2px; text-decoration: none; }
.foot li a:hover { text-decoration: underline; }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-top: 70px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--navy-soft); }
.lock { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font-size: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.toast.is-shown { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0s; }

/* ---------- Chapters (record pages, colophon) ---------- */
.chapter { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 72px; }
.chapter + .chapter { margin-top: 96px; }
.chapter__head p { margin-top: 14px; font-size: 18px; max-width: 26em; }
.chapter__body { max-width: 660px; }
.chapter__body.prose { max-width: 40em; }

/* numbered steps with round tiles */
.journey { counter-reset: step; }
.journey li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--navy); counter-increment: step; }
.journey li:first-child { padding-top: 0; }
.journey li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--honey); font-family: var(--mono); font-size: 15px; }
.journey li:nth-child(2n)::before { background: var(--pale-teal); }
.journey li:nth-child(3n)::before { background: var(--pale-coral); }
.journey h3 { font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.journey p { margin-top: 6px; }
.journey li > h3, .journey li > p { grid-column: 2; }
.journey--plain li { grid-template-columns: 1fr; }
.journey--plain li::before { content: none; }

/* label and value rows */
.bench li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 6px 24px; padding: 16px 0; border-bottom: 1px solid var(--navy); }
.bench li:first-child { padding-top: 0; }
.bench b { font-size: 18px; font-weight: 500; }
.datalist > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--navy); }
.datalist dt { font-size: 15px; color: var(--navy-soft); }
.quote-line { margin-bottom: 22px; font-size: 32px; line-height: 1.15; letter-spacing: -0.015em; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.counts > div { display: flex; flex-direction: column-reverse; }
.counts .big-n { font-size: 72px; }
.counts dt { margin-top: 10px; font-size: 16px; }
.tally-note { margin-top: 28px; max-width: 40em; font-size: 15px; color: var(--navy-soft); }

/* the next page, as one big pill */
.next-sec { padding: 24px 0 120px; }
.next-sec .lede { font-size: 22px; font-weight: 400; }

/* ---------- The Magpie popup, redrawn in this site's colors ----------
   Sized in container units so the picture scales with its frame. */
.scene { margin-top: 64px; }
.scene__frame { position: relative; container-type: inline-size; border-radius: 28px; background: var(--paper); overflow: hidden; }
.scene figcaption { max-width: 60ch; margin-top: 14px; font-size: 15px; color: var(--navy-soft); }
.mp-scene { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.mp-gallery { position: absolute; left: 4%; top: 6%; bottom: 6%; width: 64%; padding: 2cqw 2.2cqw; border: 1px solid var(--line); border-radius: 1.6cqw; background: var(--card); overflow: hidden; }
.mp-gallery__bar { display: flex; align-items: center; gap: 1cqw; padding-bottom: 1.2cqw; border-bottom: 1px solid var(--line); }
.mp-gallery__bar img { width: 2.6cqw; height: 2.6cqw; }
.mp-gallery__word { font-size: 2.2cqw; line-height: 1; }
.mp-gallery__count { margin-left: auto; font-size: 1.1cqw; color: var(--navy-soft); }
.mp-gallery__search { margin-top: 1.4cqw; padding: 0.9cqw 1.2cqw; border: 1px solid var(--line); border-radius: 99cqw; background: var(--paper); font-size: 1.15cqw; color: var(--navy-soft); }
.mp-gallery__tags { display: flex; gap: 0.6cqw; margin-top: 1cqw; white-space: nowrap; overflow: hidden; }
.mp-gallery__tags span { padding: 0.3cqw 1cqw; border: 1px solid var(--line); border-radius: 99cqw; font-size: 1cqw; }
.mp-gallery__tags .is-on { border-color: var(--navy); background: var(--navy); color: var(--paper); }
.mp-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5cqw; margin-top: 1.6cqw; }
.mp-card { border: 1px solid var(--line); border-radius: 1.2cqw; background: var(--paper); overflow: hidden; }
.mp-card__img { aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.mp-card__img img { width: 100%; height: 100%; object-fit: cover; }
.mp-card__meta { padding: 0.9cqw 1cqw 1.1cqw; }
.mp-card__t { font-size: 1.25cqw; font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-card__d { margin-top: 0.2cqw; font-size: 1.02cqw; color: var(--navy-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-card.is-new { outline: 0.3cqw solid var(--honey); outline-offset: 0.3cqw; }
.mp-pop { position: absolute; right: 4%; top: 15%; width: 34%; padding: 1.7cqw 1.6cqw 1.6cqw; border: 1px solid var(--line); border-radius: 1.8cqw; background: var(--card); font-size: 1.22cqw; line-height: 1.35; }
.mp-pop__head { display: flex; align-items: center; gap: 1cqw; padding-bottom: 1.2cqw; border-bottom: 1px solid var(--line); }
.mp-pop__head img { width: 3.2cqw; height: 3.2cqw; }
.mp-pop__word { font-size: 2.3cqw; line-height: 1; }
.mp-pop__badge { margin-left: auto; padding: 0.35cqw 0.9cqw; border-radius: 99cqw; background: var(--pale-teal); font-size: 1cqw; white-space: nowrap; }
.mp-pop__preview { display: grid; grid-template-columns: 40% 1fr; gap: 1cqw; align-items: center; margin-top: 1.3cqw; padding: 0.8cqw; border: 1px solid var(--line); border-radius: 1.2cqw; background: var(--paper); }
.mp-pop__preview .mp-card__img { border-radius: 0.6cqw; }
.mp-pop__pt { font-weight: 500; line-height: 1.25; }
.mp-pop__pd { margin-top: 0.2cqw; font-size: 1.05cqw; color: var(--navy-soft); }
.mp-pop__body { display: contents; }
.mp-pop__label { margin-top: 1.25cqw; font-family: var(--mono); font-size: 0.95cqw; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy-soft); }
.mp-pop__field { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5cqw; min-height: 3.1cqw; margin-top: 0.5cqw; padding: 0.6cqw 0.8cqw; border: 1px solid var(--line); border-radius: 1cqw; background: var(--paper); }
.mp-pop__chip { padding: 0.15cqw 0.8cqw; border-radius: 99cqw; background: var(--pale-coral); }
.mp-pop__guess { font-weight: 500; }
.mp-pop__btn { display: flex; justify-content: center; align-items: center; gap: 0.6cqw; width: 100%; margin-top: 1.5cqw; padding: 0.95cqw 0; border: 0; border-radius: 99cqw; background: var(--navy); color: var(--paper); font: inherit; font-size: max(13px, 1.35cqw); font-weight: 500; cursor: pointer; transition: transform 0.15s ease; }
.mp-pop__btn:active { transform: scale(0.98); }
.mp-pop__btn svg { width: 1.4cqw; height: 1.4cqw; }
.mp-flyer { position: absolute; z-index: 3; border: 1px solid var(--line); border-radius: 0.8cqw; overflow: hidden; pointer-events: none; }
.mp-flyer img { width: 100%; height: 100%; object-fit: cover; }
@container (max-width: 560px) {
  .mp-scene { aspect-ratio: auto; height: 158cqw; }
  .mp-gallery { left: 4%; right: 4%; width: auto; top: 3%; bottom: auto; padding: 3.6cqw; border-radius: 3.2cqw; }
  .mp-gallery__bar { gap: 2cqw; padding-bottom: 2.4cqw; }
  .mp-gallery__bar img { width: 5.2cqw; height: 5.2cqw; }
  .mp-gallery__word { font-size: 4.4cqw; }
  .mp-gallery__count { font-size: 2.4cqw; }
  .mp-gallery__search { margin-top: 2.6cqw; padding: 1.8cqw 2.4cqw; font-size: 2.5cqw; }
  .mp-gallery__tags { gap: 1.2cqw; margin-top: 2cqw; }
  .mp-gallery__tags span { font-size: 2.2cqw; padding: 0.6cqw 2cqw; }
  .mp-wall { gap: 2.4cqw; margin-top: 3cqw; }
  .mp-card { border-radius: 2cqw; }
  .mp-card__meta { padding: 1.4cqw 1.6cqw 1.8cqw; }
  .mp-card__t { font-size: 2.4cqw; }
  .mp-card__d { font-size: 2cqw; }
  .mp-pop { top: auto; bottom: 3%; right: 4%; width: 74%; padding: 3.2cqw 3cqw 3cqw; border-radius: 3.6cqw; font-size: 2.65cqw; }
  .mp-pop__head { gap: 2cqw; padding-bottom: 2.2cqw; }
  .mp-pop__head img { width: 6.4cqw; height: 6.4cqw; }
  .mp-pop__word { font-size: 4.8cqw; }
  .mp-pop__badge { font-size: 2.2cqw; padding: 0.7cqw 1.8cqw; }
  .mp-pop__preview { margin-top: 2.4cqw; padding: 1.6cqw; gap: 2cqw; border-radius: 2.4cqw; }
  .mp-pop__pd { font-size: 2.3cqw; }
  .mp-pop__label { margin-top: 2.4cqw; font-size: 2.1cqw; }
  .mp-pop__field { margin-top: 1cqw; padding: 1.2cqw 1.6cqw; min-height: 6.4cqw; border-radius: 2cqw; gap: 1cqw; }
  .mp-pop__chip { padding: 0.3cqw 1.6cqw; }
  .mp-pop__btn { margin-top: 3cqw; padding: 2cqw 0; font-size: max(13px, 2.9cqw); }
  .mp-pop__btn svg { width: 3cqw; height: 3cqw; }
}

/* ---------- Playground: the rooms ---------- */
.rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; margin-top: 64px; }
.room { display: block; color: inherit; text-decoration: none; }
.room__pic { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 0.9; }
.room__pic .shape { grid-area: 1 / 1; width: 88%; rotate: var(--r, 0deg); color: var(--c, var(--pale-teal)); transition: transform 0.3s; }
.room__pic img { grid-area: 1 / 1; position: relative; width: 74%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top center; clip-path: url(#blob-clip); }
.room:hover .room__pic .shape { transform: rotate(8deg); }
.room__pic--empty { font-family: var(--mono); font-size: 14px; }
.room__pic--empty .shape { width: 62%; }
.room__pic--empty span { grid-area: 1 / 1; position: relative; }
.room__t { display: block; margin-top: 18px; font-size: 24px; line-height: 1.2; letter-spacing: -0.015em; }
.room:hover .room__t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.room__w { display: block; margin-top: 6px; font-size: 16px; max-width: 32em; }

/* ---------- Log ---------- */
.ledger { max-width: 860px; border-top: 1px solid var(--navy); }
.ledger li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--navy); }
.ledger time, .ledger__when { padding-top: 4px; font-size: 14px; }
.ledger p { max-width: 40em; font-size: 18px; }
.ledger b { font-weight: 500; }
.ledger__v { display: inline-block; margin-right: 8px; padding: 1px 10px; border-radius: 999px; background: var(--honey); font-family: var(--mono); font-size: 13px; vertical-align: 2px; }
.ledger li:nth-child(2n) .ledger__v { background: var(--pale-teal); }
.ledger li:nth-child(3n) .ledger__v { background: var(--pale-coral); }

/* ---------- 404 ---------- */
.lost { padding: 0 0 20px; }


/* ---------- Per-instance colors for shapes and tiles ---------- */
.c-paper { color: var(--paper); }
.c-navy { color: var(--navy); }
.c-teal { color: var(--teal); }
.c-coral { color: var(--coral); }
.c-pale-teal { color: var(--pale-teal); }
.c-pale-coral { color: var(--pale-coral); }
.c-honey { color: var(--honey); }
.c-sage { color: var(--sage); }
.bg-paper { background: var(--paper); }
.bg-navy { background: var(--navy); }
.bg-teal { background: var(--teal); }
.bg-coral { background: var(--coral); }
.bg-pale-teal { background: var(--pale-teal); }
.bg-pale-coral { background: var(--pale-coral); }
.bg-honey { background: var(--honey); }
.bg-sage { background: var(--sage); }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6px, -5px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1299px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); }
  .hero .lede { font-size: 20px; }
}
@media (max-width: 1180px) {
  :root { --gutter: 40px; }
  .h1 { font-size: 68px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 48%); }
  .page-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 44%); }
  .poster__cap { font-size: 18px; }
  .mp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; }
  .pj-grid { grid-template-columns: 1fr; }
  .pv { display: none; }
  .pill { font-size: 52px; }
  .scatter { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 48px; }
  .pl-deco { display: none; }
  .pl:nth-child(n) { grid-row: auto; margin-top: 0; }
  .pl:nth-child(1) { grid-column: 1 / span 6; padding: 0 12%; }
  .pl:nth-child(2n) { grid-column: 1 / span 3; }
  .pl:nth-child(2n+3) { grid-column: 4 / span 3; margin-top: 56px; }
  .hello { padding-bottom: 270px; }
  .hello .books { left: 50%; translate: -50% 0; bottom: 40px; width: 210px; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .chapter + .chapter { margin-top: 72px; }
}
@media (max-width: 960px) {
  .hero__grid, .page-hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .poster { width: 100%; max-width: 600px; margin: 0 auto; }
  .page-hero .poster { max-width: 480px; }
  .mp-stats { grid-template-columns: 1fr; gap: 36px; }
  .page-hero__art { order: -1; }
  .mp-grid { grid-template-columns: 1fr; grid-template-areas: "head" "art" "does"; }
  .mp-grid > .mp-art { max-width: 480px; margin-top: 48px; }
  .nd-grid { grid-template-columns: 1fr; max-width: 620px; }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .top__in { flex-wrap: wrap; gap: 0 16px; height: auto; padding-top: 12px; padding-bottom: 10px; }
  .mark { order: 1; font-size: 18px; }
  .top .btn { order: 2; }
  .nav { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 0 22px; margin-top: 10px; padding-top: 2px; border-top: 1px solid var(--line); font-size: 16px; }
  .nav a { padding: 8px 0; }
  .btn { font-size: 16px; padding: 11px 20px; }
  .hero, .page-hero { padding: 26px 0 64px; }
  .h1 { font-size: 52px; }
  .hero .lede, .page-hero .lede { font-size: 19px; margin-top: 20px; }
  .hero__acts { margin-top: 26px; gap: 10px; }
  .note { margin-top: 36px; gap: 16px; }
  .note__art { width: 92px; }
  .note__t { font-size: 22px; }
  .note__d { font-size: 16px; }
  .poster__cap { font-size: 18px; margin-top: 16px; }
  .poster__cap [data-place-name] { display: grid; align-content: end; min-height: 3em; }
  .orb--quat { right: 28%; }
  .cur b { font-size: 12px; padding: 2px 8px; }
  .band { padding: 84px 0; }
  .edge::before { top: -19px; height: 20px; -webkit-mask-size: 114px 20px; mask-size: 114px 20px; }
  .edge--scallop::before { -webkit-mask-size: 40px 20px; mask-size: 40px 20px; }
  .h2 { font-size: 36px; }
  .h3 { font-size: 22px; }
  .sec-head p { font-size: 18px; }
  .mp-grid > .mp-art { max-width: 340px; margin-top: 36px; }
  .mp-grid > .does { margin-top: 36px; }
  .mp-stats { grid-template-columns: 1fr; gap: 36px; margin-top: 60px; }
  .big-n { font-size: 96px; }
  .counts { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .counts .big-n { font-size: 56px; }
  .pj-grid { margin-top: 40px; }
  .row { grid-template-columns: 76px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
  .row__n { display: none; }
  .row__thumb { display: block; grid-row: span 3; width: 68px; aspect-ratio: 1; margin: 3px 4px 0; border-radius: 50%; object-fit: cover; object-position: top center; outline: 1px solid rgba(31, 53, 94, 0.18); outline-offset: -1px; }
  .row__t { font-size: 19px; }
  .row__meta { display: flex; gap: 16px; grid-column: 2; margin-top: 6px; }
  .row__k, .row__s { font-size: 13px; }
  .scatter { margin-top: 52px; column-gap: 14px; row-gap: 30px; }
  .pl:nth-child(1) { padding: 0 2%; }
  .pl:nth-child(1) figcaption { font-size: 19px; }
  .pl:nth-child(2n+3) { margin-top: 36px; }
  .pl figcaption { font-size: 15px; margin-top: 8px; }
  .nd-grid { grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
  .door__body { padding: 4px 24px 32px; border-radius: 0 0 26px 26px; }
  .loglist li { grid-template-columns: 1fr; gap: 2px; padding: 9px 0; font-size: 16px; }
  .pills { gap: 14px; }
  .pill, .pills--sm .pill { font-size: 38px; gap: 12px; padding: 8px 24px 10px 8px; }
  .pill .ptile, .pills--sm .pill .ptile { width: 42px; height: 42px; }
  .pill .ptile svg, .pills--sm .pill .ptile svg { width: 26px; height: 26px; }
  .hello { padding: 80px 0 210px; }
  .hello .h1 { font-size: 60px; }
  .hello .d1 { width: 120px; right: -48px; top: 10px; }
  .hello .d3 { display: none; }
  .hello .d2 { width: 56px; right: 6%; bottom: 70px; }
  .hello p { font-size: 18px; }
  .hello .books { width: 170px; left: 50%; translate: -50% 0; }
  .foot__grid { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .foot__brand { grid-column: span 2; }
  .foot__mark { font-size: 32px; }
  .rooms { grid-template-columns: 1fr; gap: 40px; }
  .room__pic img { width: 82%; }
  .ledger li { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .ledger p { font-size: 17px; }
  .datalist > div, .bench li { grid-template-columns: 1fr; }
  .journey li { grid-template-columns: 36px 1fr; gap: 14px; }
  .journey--plain li { grid-template-columns: 1fr; }
  .journey li::before { width: 36px; height: 36px; font-size: 13px; }
  .quote-line { font-size: 26px; }
  .scene { margin-top: 44px; }
  .scene__frame { border-radius: 20px; }
}

/* the narrowest phones: smaller pills, and the coral sun clears the "Say hello" title */
@media (max-width: 360px) {
  .pill { font-size: 30px; }
  .pills--sm .pill { font-size: 26px; }
  .hello .d1 { width: 90px; right: -36px; top: -24px; }
}
/* ---------- Design desk ----------
   Rendered by design.js from design-library.js. Class names here are
   load-bearing for that script. Every pile is a band with its own pair of
   colors: navy and honey for HelioFlux, sage for Heliopolis, honey for
   Pretzel, pale teal for the shelf, deep teal for the videos, deep coral
   for the examples. Cards are always paper, so they read on any band. */

/* the strong bands (paper words on the dark ones) */
.band--navy { background: var(--navy); color: var(--paper); }
.band--sagefull { background: var(--sage); }
.band--honey { background: var(--honey); }
.band--dteal { background: var(--deep-teal); color: var(--paper); }
.band--dcoral { background: var(--deep-coral); color: var(--paper); }
.band--navy .text-link { color: var(--honey); }
.band--dteal .text-link, .band--dcoral .text-link { color: var(--paper); }

/* chips: filters, folds, the ratio toy, the library's tags */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 6px 15px 7px;
  border: 1.5px solid var(--navy); border-radius: 999px;
  background: rgba(248, 246, 241, 0.6); color: var(--navy);
  font: inherit; font-size: 15px; line-height: 1.2; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.2s var(--ease);
}
.chip:hover { background: var(--paper); transform: translateY(-1px); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--navy); color: var(--paper); }
.chip__count { font-family: var(--mono); font-size: 12.5px; opacity: 0.7; }
.chip.is-active .chip__count, .chip[aria-pressed="true"] .chip__count { opacity: 0.85; }
.chip--small { min-height: 30px; padding: 3px 12px 4px; font-size: 14px; }
.chip--more { border-style: dashed; }
.desk-fold { justify-content: center; margin-top: 30px; }
.desk-fold .chip { min-height: 46px; padding: 8px 24px; font-size: 17px; background: var(--paper); }
.desk-fold .chip:hover { background: var(--navy); color: var(--paper); }

/* the hero's piles: chunky pills, one color pair each */
.pile-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.pile-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 18px 7px 6px; border-radius: 999px;
  background: var(--pp-bg); color: var(--pp-ink, var(--navy));
  font-size: 20px; letter-spacing: -0.01em; text-decoration: none;
  transition: transform 0.25s var(--ease);
}
.pile-pill:hover { transform: translateY(-3px) rotate(-1.5deg); }
.pile-pill:nth-child(even):hover { transform: translateY(-3px) rotate(1.5deg); }
.pile-pill__tile { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--pp-tile); }
.pile-pill__tile svg { width: 22px; height: 22px; color: var(--pp-shape); transition: transform 0.5s var(--ease); }
.pile-pill:hover .pile-pill__tile svg { transform: rotate(60deg); }
.pile-pill__n { font-size: 13px; opacity: 0.8; }
.pile-pill__n:empty { display: none; }
.pile-pill--website { --pp-bg: var(--navy); --pp-ink: var(--paper); --pp-tile: var(--honey); --pp-shape: var(--navy); }
.pile-pill--heliopolis { --pp-bg: var(--sage); --pp-tile: var(--paper); --pp-shape: var(--navy); }
.pile-pill--pretzel { --pp-bg: var(--honey); --pp-tile: var(--coral); --pp-shape: var(--paper); }
.pile-pill--resources { --pp-bg: var(--pale-teal); --pp-tile: var(--teal); --pp-shape: var(--paper); }
.pile-pill--examples { --pp-bg: var(--deep-coral); --pp-ink: var(--paper); --pp-tile: var(--pale-coral); --pp-shape: var(--deep-coral); }

/* the pile bar: follows you down the page and lights up the pile you're in */
.pilebar { position: sticky; top: 0; z-index: 30; background: rgba(248, 246, 241, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.pilebar__in { display: flex; gap: 4px; padding-block: 10px; overflow-x: auto; scrollbar-width: none; }
.pilebar__in::-webkit-scrollbar { display: none; }
.pilebar__link {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 38px; padding: 0 15px 0 12px; border-radius: 999px;
  font-size: 15.5px; text-decoration: none; white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.pilebar__link:hover { background: var(--paper-2); }
.pilebar__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pb-dot); box-shadow: inset 0 0 0 1.5px var(--pb-ring, transparent); transition: transform 0.25s var(--ease); }
.pilebar__link[aria-current="true"] { background: var(--pb-on); color: var(--pb-on-ink, var(--navy)); }
.pilebar__link[aria-current="true"] .pilebar__dot { transform: scale(1.25); background: var(--pb-on-dot, var(--pb-dot)); }
.pilebar__link--website { --pb-dot: var(--navy); --pb-on: var(--navy); --pb-on-ink: var(--paper); --pb-on-dot: var(--honey); }
.pilebar__link--heliopolis { --pb-dot: var(--sage); --pb-on: var(--sage); --pb-on-dot: var(--paper); }
.pilebar__link--pretzel { --pb-dot: var(--honey); --pb-on: var(--honey); --pb-on-dot: var(--coral); }
.pilebar__link--resources { --pb-dot: var(--teal); --pb-on: var(--pale-teal); }
.pilebar__link--videos { --pb-dot: var(--deep-teal); --pb-on: var(--deep-teal); --pb-on-ink: var(--paper); --pb-on-dot: var(--pale-teal); }
.pilebar__link--notebook { --pb-dot: var(--paper); --pb-ring: var(--navy); --pb-on: var(--paper-2); }
.pilebar__link--examples { --pb-dot: var(--deep-coral); --pb-on: var(--deep-coral); --pb-on-ink: var(--paper); --pb-on-dot: var(--pale-coral); }
.pilebar__link--lab { --pb-dot: var(--coral); --pb-on: var(--pale-coral); }

/* the piles */
.desk-section { padding-block: clamp(80px, 8vw, 120px); scroll-margin-top: 58px; }
.desk-section__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: end; gap: 14px 48px;
}
.desk-section__head .h2 { display: flex; align-items: center; gap: 18px; }
.desk-badge { flex: none; width: 54px; height: 54px; transition: transform 0.8s var(--ease); }
.desk-section:hover .desk-badge { transform: rotate(40deg); }
.desk-section__meta { font-size: 16px; line-height: 1.45; }
.desk-count { display: block; margin-top: 8px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.01em; }
.desk-count:empty { display: none; }
.desk-count--line { margin: 0 0 18px; font-size: 13px; }

.desk-part { margin-top: clamp(40px, 4.4vw, 56px); }
.desk-part[hidden] { display: none; }
.desk-sub {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px; font-family: var(--mono); font-size: 13px; font-weight: 400;
  letter-spacing: 0.04em; text-transform: lowercase;
}
.desk-sub::after { content: ""; flex: 1; height: 1.5px; border-radius: 2px; background: currentColor; opacity: 0.25; }
.desk-empty { padding: 22px 26px; border-radius: 24px; background: rgba(248, 246, 241, 0.5); font-size: 16px; }
.desk-empty[hidden] { display: none; }
.desk-note { margin-top: 8px; font-size: 14px; color: var(--navy-soft); }

/* the shelf's search and filters */
.desk-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin: 34px 0 20px; }
.desk-search-wrap { position: relative; display: block; width: min(360px, 100%); }
.desk-search-wrap svg { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; color: var(--navy); pointer-events: none; }
.desk-search {
  width: 100%; height: 50px; padding: 0 20px 0 46px;
  border: 1.5px solid var(--navy); border-radius: 999px;
  background: var(--paper); color: var(--navy); font: inherit; font-size: 16px;
  -webkit-appearance: none; appearance: none;
}
.desk-search::placeholder { color: var(--navy-soft); }
.desk-search:focus { outline: none; box-shadow: 0 0 0 4px var(--honey); }
.desk-shelf .chip[data-kind="gallery"] { --chip-on: var(--teal); }
.desk-shelf .chip[aria-pressed="true"][data-kind]:not([data-kind="all"]) { background: var(--chip-on, var(--navy)); border-color: var(--chip-on, var(--navy)); color: var(--chip-on-ink, var(--paper)); }
.desk-shelf .chip[data-kind="gallery"] { --chip-on: var(--teal); --chip-on-ink: var(--navy); }
.desk-shelf .chip[data-kind="site"] { --chip-on: var(--honey); --chip-on-ink: var(--navy); }
.desk-shelf .chip[data-kind="tool"] { --chip-on: var(--coral); --chip-on-ink: var(--navy); }
.desk-shelf .chip[data-kind="reading"] { --chip-on: var(--sage); --chip-on-ink: var(--navy); }
.desk-shelf .chip[data-kind="repo"] { --chip-on: var(--navy); --chip-on-ink: var(--paper); }

/* picture-first cards: paper on any band, the tile wears a color pair */
.desk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.desk-grid[hidden], .desk-card[hidden] { display: none; }
.desk-card { min-width: 0; border-radius: 26px; background: var(--paper); color: var(--navy); transition: transform 0.3s var(--ease); }
.desk-card:hover { transform: translateY(-4px) rotate(-0.5deg); }
.desk-card:nth-child(even):hover { transform: translateY(-4px) rotate(0.5deg); }
.desk-card__link { display: flex; flex-direction: column; height: 100%; padding: 8px 8px 18px; color: inherit; text-decoration: none; border-radius: 26px; }
.desk-tile {
  position: relative; display: grid; place-items: center; overflow: hidden;
  aspect-ratio: 16 / 10; border-radius: 19px;
  background: var(--t-bg); color: var(--t-ink, var(--navy));
}
.desk-tile::before { content: ""; position: absolute; width: 62%; aspect-ratio: 1; right: -14%; bottom: -30%; border-radius: 50%; background: var(--t-shape); transition: transform 0.8s var(--ease); }
.desk-card:hover .desk-tile::before { transform: scale(1.15) translate(-6%, -4%); }
.desk-tile--mint { --t-bg: var(--teal); --t-shape: var(--pale-teal); }
.desk-tile--sand { --t-bg: var(--honey); --t-shape: var(--coral); }
.desk-tile--lilac { --t-bg: var(--pale-coral); --t-shape: var(--deep-coral); }
.desk-tile--sky { --t-bg: var(--sage); --t-shape: var(--honey-tint); }
.desk-tile--ink { --t-bg: var(--navy); --t-shape: var(--teal); --t-ink: var(--paper); }
.desk-tile img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
.desk-card__link:hover .desk-tile img { transform: scale(1.04); }
.desk-tile__mark { position: relative; font-size: clamp(34px, 3.2vw, 50px); letter-spacing: -0.04em; line-height: 1; }
.desk-tile__domain { position: absolute; left: 14px; bottom: 11px; font-family: var(--mono); font-size: 12px; }
.desk-card__body { display: flex; flex-direction: column; padding: 14px 10px 0; }
.desk-card__meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kind-pill { flex: none; padding: 2px 10px 3px; border: 1.5px solid transparent; border-radius: 999px; font-size: 13px; line-height: 1.3; }
.kind-pill--gallery { background: var(--pale-teal); }
.kind-pill--tool { background: var(--pale-coral); }
.kind-pill--reading { background: var(--honey-tint); }
.kind-pill--site { border-color: var(--navy); }
.kind-pill--repo, .kind-pill--video { background: var(--navy); color: var(--paper); }
.desk-card__domain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; color: var(--navy-soft); }
.desk-card__title { margin-top: 10px; font-size: 19px; font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; }
.desk-card__link:hover .desk-card__title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.desk-card__why { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--navy-hover); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* the little label line on documents and videos */
.dot-tag { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--navy-soft); }
.dot-tag__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.private-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 2px 11px 3px; border-radius: 999px; background: var(--pale-coral); font-size: 13px; }
.private-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--deep-coral); }
.pending-pill { display: inline-block; margin-top: 12px; padding: 2px 11px 3px; border-radius: 999px; background: var(--honey); font-size: 13px; }

/* "Open" links: a small pill with an arrow that slides */
.cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 7px 8px 7px 16px; border-radius: 999px; background: var(--navy); color: var(--paper); font-size: 15px; text-decoration: none; transition: background 0.15s; }
.cta:hover { background: var(--navy-hover); }
.cta__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--honey); color: var(--navy); }
.cta__icon svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.cta:hover .cta__icon svg { transform: translateX(3px); }

/* design systems: a paper card with the palette as a row of suns */
.system-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 20px; }
/* one system on its own gets the whole row: the palette on the left, the rules on the right */
.system-grid--one { grid-template-columns: minmax(0, 1fr); }
.system-grid--one .system-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-auto-rows: min-content; column-gap: 56px; }
.system-grid--one .system-card > * { grid-column: 1; }
.system-grid--one .system-card > .system-rules { grid-column: 2; grid-row: 1 / span 6; margin-top: 4px; }
.system-card { padding: 28px 30px 30px; border-radius: 32px; background: var(--paper); color: var(--navy); }
.band--paper .system-card { background: var(--honey-tint); }
.system-card h3 { font-size: 26px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.15; }
.palette-row { display: flex; flex-wrap: wrap; gap: 14px 12px; margin-top: 20px; }
.tone { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 52px; font-family: var(--mono); font-size: 11px; line-height: 1.2; text-align: center; color: var(--navy-soft); }
.tone__chip { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--rule); transition: transform 0.25s var(--ease); }
.tone:hover .tone__chip { transform: scale(1.12); }
.system-card__type { margin-top: 20px; font-size: 15px; color: var(--navy-hover); }
.system-card__type b { font-weight: 500; color: var(--navy); }
.system-rules { margin-top: 14px; padding: 0; font-size: 15px; color: var(--navy-hover); }
.system-rules li { position: relative; padding-left: 20px; }
.system-rules li + li { margin-top: 7px; }
.system-rules li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.system-rules li:nth-child(3n+2)::before { background: var(--coral); }
.system-rules li:nth-child(3n)::before { background: var(--honey); }
.system-card__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.system-card__links a { padding: 6px 15px 7px; border: 1.5px solid var(--navy); border-radius: 999px; font-size: 15px; text-decoration: none; transition: background 0.15s, color 0.15s; }
.system-card__links a:hover { background: var(--navy); color: var(--paper); }

/* documents */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.doc-card { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 8px 20px; border-radius: 26px; background: var(--paper); color: var(--navy); }
.doc-card > :not(.doc-tile):not(.art-strip) { margin-inline: 10px; }
.doc-card--wide { grid-column: 1 / -1; padding: 24px 24px 22px; }
.doc-card--wide > :not(.art-strip) { margin-inline: 0; }
.doc-tile { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 14px; border-radius: 19px; overflow: hidden; background: var(--pale-teal); }
.doc-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
.doc-tile:hover img { transform: scale(1.04); }
.doc-tile__mark { font-size: 40px; letter-spacing: -0.04em; }
.doc-tile__badge { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 2px 10px 3px; border-radius: 999px; background: var(--coral); color: var(--navy); font-family: var(--mono); font-size: 12px; }
.doc-card h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
.doc-card--wide h3 { font-size: 24px; font-weight: 400; }
.doc-card h3 a { text-decoration: none; }
.doc-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc-card p { margin-top: 8px; font-size: 15px; color: var(--navy-hover); max-width: 62ch; }
.doc-card .cta { margin-top: auto; }
.doc-card p + .cta, .doc-card .dot-tag + .cta, .doc-card .private-pill + .cta { margin-top: 16px; }
.art-strip { display: flex; gap: 12px; width: 100%; margin-top: 18px; padding-bottom: 10px; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.art-strip a { position: relative; flex: none; width: 210px; color: inherit; text-decoration: none; scroll-snap-align: start; }
.art-strip figure { margin: 0; }
.art-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; background: var(--pale-teal); transition: transform 0.3s var(--ease); }
.art-strip a:hover img { transform: translateY(-3px); }
.art-strip--tall a { width: 250px; }
.art-strip--tall img { aspect-ratio: 3 / 2; object-fit: contain; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); }
.art-strip figcaption { margin-top: 7px; font-family: var(--mono); font-size: 12px; color: var(--navy-soft); }

/* libraries */
.library-list { display: grid; gap: 10px; }
.library-list li { display: grid; grid-template-columns: minmax(10rem, 17rem) minmax(0, 1fr); gap: 6px 26px; padding: 18px 24px; border-radius: 24px; background: var(--paper); color: var(--navy); }
.library-list .now-label a { font-size: 19px; text-decoration: none; }
.library-list .now-label a:hover { text-decoration: underline; text-underline-offset: 3px; }
.library-list .now-body { font-size: 15px; color: var(--navy-hover); }
.library-list small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--navy-soft); }
.library-list .private-pill { margin-left: 0; }
.band--paper .library-list li { background: var(--honey-tint); }

/* the rewatch list */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 20px; margin-top: 34px; }
.video-card { display: flex; flex-direction: column; padding: 8px 8px 20px; border-radius: 26px; background: var(--paper); color: var(--navy); }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 19px; background: var(--navy); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.video-thumb:hover img { transform: scale(1.04); }
.video-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--honey); color: var(--navy); transform: translate(-50%, -50%); transition: transform 0.25s var(--ease); }
.video-thumb:hover .video-play { transform: translate(-50%, -50%) scale(1.12); }
.video-play svg { width: 18px; height: 18px; margin-left: 3px; }
.video-body { padding: 14px 10px 0; }
.video-body h3 { font-size: 18px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.video-body h3 a { text-decoration: none; }
.video-body h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.takeaways { margin-top: 12px; padding: 0; font-size: 15px; color: var(--navy-hover); }
.takeaways li { position: relative; padding-left: 18px; }
.takeaways li + li { margin-top: 6px; }
.takeaways li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--deep-teal); }
.band--dteal .desk-empty, .band--dcoral .desk-empty, .band--navy .desk-empty { background: rgba(248, 246, 241, 0.12); }

/* the notebook: each page wears its pen */
.notebook-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 34px; align-items: start; }
.notepage { min-width: 0; padding: 10px 10px 26px; border-radius: 30px; background: var(--np-bg); transition: transform 0.3s var(--ease); }
.notepage:nth-child(1) { rotate: -0.6deg; }
.notepage:nth-child(3) { rotate: 0.5deg; }
.notepage:hover { transform: translateY(-4px); }
.notepage--red { --np-bg: var(--pale-coral); --np-dot: var(--deep-coral); }
.notepage--blue { --np-bg: var(--pale-teal); --np-dot: var(--navy); }
.notepage--pink { --np-bg: var(--honey-tint); --np-dot: var(--coral); }
.notepage > :not(.notepage__photo) { margin-inline: 12px; }
.notepage__photo { display: block; border-radius: 22px; overflow: hidden; background: var(--paper); cursor: zoom-in; }
.notepage__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
.notepage__photo:hover img { transform: scale(1.04); }
.notepage h3 { margin-top: 18px; font-size: 24px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.15; }
.notepage__pen { margin-top: 4px; font-family: var(--mono); font-size: 12.5px; color: var(--navy-soft); }
.notepage__list { margin-top: 16px; }
.notepage__list li { position: relative; padding-left: 18px; font-size: 15px; color: var(--navy-hover); }
.notepage__list li + li { margin-top: 8px; }
.notepage__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--np-dot); }
.notepage__list b { font-weight: 500; color: var(--navy); }
.scale-demo { margin-top: 22px; padding: 18px; border-radius: 22px; background: var(--paper); }
.scale-demo__label { margin-bottom: 10px; font-family: var(--mono); font-size: 12.5px; }
.scale-specimen { margin-top: 14px; overflow-x: auto; }
.scale-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; line-height: 1.25; transition: font-size 0.35s var(--ease); }
.scale-line + .scale-line { margin-top: 8px; }
.scale-line--display { letter-spacing: -0.03em; }
.scale-px { flex: none; font-family: var(--mono); font-size: 12px; color: var(--navy-soft); }

.desk-how { margin-top: 0; }

/* the picture viewer */
.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(31, 53, 94, 0.97); color: var(--paper); }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; animation: fade-in 0.25s ease; }
.lightbox__fig { display: grid; justify-items: center; gap: 14px; max-width: min(1200px, 100vw - 160px); }
.lightbox__fig img { max-width: 100%; max-height: calc(100dvh - 150px); border-radius: 20px; background: var(--paper); object-fit: contain; }
.lightbox__cap { font-size: 16px; text-align: center; }
.lightbox__cap .mono { margin-left: 8px; font-size: 13px; opacity: 0.8; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--paper); color: var(--navy); cursor: pointer; transition: transform 0.2s var(--ease), background 0.15s; }
.lightbox__btn:hover { transform: scale(1.08); background: var(--honey); }
.lightbox__btn:disabled { opacity: 0.3; cursor: default; transform: none; background: var(--paper); }
.lightbox__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__prev { left: 24px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 24px; top: 50%; translate: 0 -50%; }
.lightbox__close { top: 20px; right: 24px; background: var(--honey); }
.lightbox__open { position: absolute; top: 32px; left: 28px; color: var(--paper); font-size: 15px; text-underline-offset: 4px; }

@media (max-width: 1100px) {
  .desk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .desk-section__head { grid-template-columns: minmax(0, 1fr); }
  .notebook-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .desk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .desk-card { border-radius: 22px; }
  .desk-card__link { padding: 6px 6px 14px; border-radius: 22px; }
  .desk-tile { border-radius: 16px; }
  .desk-card__body { padding: 10px 6px 0; }
  .desk-card__title { font-size: 16px; }
  .desk-card__why { font-size: 14px; -webkit-line-clamp: 2; }
  .desk-card__domain { display: none; }
  .desk-badge { width: 40px; height: 40px; }
  .desk-section__head .h2 { gap: 12px; }
  .pile-pills { gap: 8px; margin-top: 26px; }
  .pile-pill { font-size: 17px; padding-right: 15px; }
  .pile-pill__tile { width: 32px; height: 32px; }
  .pile-pill__tile svg { width: 18px; height: 18px; }
  .desk-controls { margin-top: 26px; }
  .desk-search-wrap { width: 100%; }
  .notebook-grid { grid-template-columns: 1fr; }
  .notepage:nth-child(n) { rotate: none; }
  .library-list li { grid-template-columns: 1fr; padding: 16px 18px; }
  .system-grid--one .system-card { grid-template-columns: minmax(0, 1fr); }
  .system-grid--one .system-card > .system-rules { grid-column: 1; grid-row: auto; margin-top: 14px; }
  .system-card { padding: 22px 20px 24px; border-radius: 28px; }
  .doc-card--wide { padding: 18px 16px; }
  .lightbox__fig { max-width: calc(100vw - 24px); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 20px; translate: none; }
  .lightbox__prev { left: calc(50% - 64px); }
  .lightbox__next { right: calc(50% - 64px); }
  .lightbox__fig img { max-height: calc(100dvh - 210px); }
}
@media (max-width: 380px) {
  .desk-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .desk-card:hover, .desk-card:nth-child(even):hover, .pile-pill:hover, .notepage:hover { transform: none; }
}

/* ---------- Magpie, my library (private: /brain/gallery.html and the sign-in) ----------
   Rendered by brain/library.js from the private library. Each shelf wears
   its own pair of colors; the cards sit on paper inside a pale teal band. */
.lib-page { background: var(--paper); }

/* the header: Magpie's feather, redrawn flat in the site's colors */
.lib-top { background: var(--paper); }
.lib-top__in { display: flex; align-items: center; gap: 22px; height: 78px; }
.lib-mark { display: flex; align-items: center; gap: 10px; font-size: 22px; letter-spacing: -0.01em; text-decoration: none; }
.lib-mark .feather { width: 34px; height: 34px; transition: transform 0.3s var(--ease); }
.lib-mark:hover .feather { transform: rotate(-12deg) translateY(-2px); }
.lib-private { font-size: 15px; }
.lib-top__home { margin-left: auto; font-size: 16px; text-underline-offset: 4px; }
.lib-top .btn { gap: 8px; }
.lib-top .btn .lock { fill: none; stroke: currentColor; stroke-width: 1.3; }

/* the hero: the magpie on her books, on a honey sun */
.lib-hero { padding: 18px 0 64px; }
.lib-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 48px; align-items: center; }
.lib-hero .lede { margin-top: 24px; max-width: 34em; }
.lib-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.lib-stats li { display: flex; align-items: baseline; gap: 8px; padding: 10px 20px 11px; border-radius: 999px; font-size: 16px; }
.lib-stats b { font-size: 26px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.lib-stats li:nth-child(1) { background: var(--navy); color: var(--paper); }
.lib-stats li:nth-child(2) { background: var(--honey); }
.lib-stats li:nth-child(3) { background: var(--pale-teal); }
.lib-stats li:nth-child(4) { background: var(--pale-coral); }
.lib-hero__acts { align-items: center; gap: 12px 20px; margin-top: 30px; }
.lib-hero__acts .btn { gap: 10px; }
.lib-hero__acts .btn .shape { width: 18px; height: 18px; color: var(--honey); transition: transform 0.4s var(--ease); }
.lib-hero__acts .btn:hover .shape { transform: rotate(90deg); }
.lib-hero__acts .btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.lib-hero__since { font-size: 13px; color: var(--navy-soft); }
.lib-hero__art .poster__stage { aspect-ratio: 1 / 0.86; }
.lib-hero__art .poster__sun { left: 10%; width: 80%; }
.lib-hero__art .poster__art { height: 84%; }
.lib-hero__art .orb--quat { right: 6%; top: 2%; }
.lib-hero__art .orb--squig { right: -4%; top: 52%; }

/* the bar: search, origin, sort, layout and the shelves; it follows you down the page */
.lib-bar { position: sticky; top: 0; z-index: 20; padding: 14px 0 12px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.lib-bar__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lib-search { position: relative; flex: 1 1 220px; display: block; }
.lib-search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; translate: 0 -50%; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.lib-search input {
  width: 100%; height: 52px; padding: 0 52px 0 50px;
  border: 1.5px solid var(--navy); border-radius: 999px;
  background: var(--card); color: var(--navy);
  font: inherit; font-size: 17px;
  -webkit-appearance: none; appearance: none;
}
.lib-search input::placeholder { color: var(--navy-soft); }
.lib-search input:focus { outline: none; box-shadow: 0 0 0 4px var(--honey); }
.lib-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.lib-search__key { position: absolute; right: 18px; top: 50%; translate: 0 -50%; pointer-events: none; }
.lib-search input:focus ~ .lib-search__key, .lib-search input:not(:placeholder-shown) ~ .lib-search__key { opacity: 0; }
.lib-select select {
  height: 52px; padding: 0 44px 0 20px;
  border: 1.5px solid var(--navy); border-radius: 999px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%231f355e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") right 18px center / 12px no-repeat;
  color: var(--navy); font: inherit; font-size: 16px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.lib-select select:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--honey); }
.lib-view { display: flex; padding: 4px; border: 1.5px solid var(--navy); border-radius: 999px; background: var(--card); }
.lib-view button { display: grid; place-items: center; width: 42px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--navy); cursor: pointer; }
.lib-view button svg { width: 18px; height: 18px; fill: currentColor; }
.lib-view button[aria-pressed="true"] { background: var(--navy); color: var(--paper); }

.lib-shelves { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.shelf {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 10px;
  border: 1.5px solid transparent; border-radius: 999px;
  background: var(--shelf-soft, var(--paper-2)); color: var(--navy);
  font: inherit; font-size: 16px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s, transform 0.2s var(--ease);
}
.shelf:hover { transform: translateY(-2px); border-color: var(--navy); }
.shelf__shape { width: 20px; height: 20px; color: var(--shelf-strong, var(--navy)); transition: transform 0.4s var(--ease); }
.shelf:hover .shelf__shape { transform: rotate(45deg) scale(1.1); }
.shelf__dot { width: 14px; height: 14px; margin: 0 3px; border-radius: 50%; background: conic-gradient(var(--teal) 0 25%, var(--honey) 0 50%, var(--coral) 0 75%, var(--sage) 0); }
.shelf__n { font-size: 13px; opacity: 0.75; }
.shelf[aria-pressed="true"] { background: var(--shelf-on, var(--navy)); color: var(--shelf-on-ink, var(--paper)); border-color: var(--shelf-on, var(--navy)); }
.shelf[aria-pressed="true"] .shelf__shape { color: var(--shelf-on-ink, var(--paper)); }
.shelf[aria-pressed="true"] .shelf__n { opacity: 0.9; }
.shelf.is-empty { opacity: 0.45; }
.shelf--all { --shelf-soft: var(--paper-2); }

/* the pairs: soft for the button, strong for its shape and its cards */
.shelf--page, .clip--page, .clip__pic--page, .kind--page { --shelf-soft: var(--pale-teal); --shelf-strong: var(--teal); --shelf-on: var(--teal); --shelf-on-ink: var(--navy); --tile: var(--teal); --tile-shape: var(--pale-teal); --tile-ink: var(--navy); }
.shelf--reading, .clip--reading, .clip__pic--reading, .kind--reading { --shelf-soft: var(--honey-tint); --shelf-strong: var(--honey); --shelf-on: var(--honey); --shelf-on-ink: var(--navy); --tile: var(--honey); --tile-shape: var(--coral); --tile-ink: var(--navy); }
.shelf--video, .clip--video, .clip__pic--video, .kind--video { --shelf-soft: var(--pale-coral); --shelf-strong: var(--coral); --shelf-on: var(--deep-coral); --shelf-on-ink: var(--paper); --tile: var(--coral); --tile-shape: var(--honey); --tile-ink: var(--navy); }
.shelf--code, .clip--code, .clip__pic--code, .kind--code { --shelf-soft: var(--sage-tint); --shelf-strong: var(--navy); --shelf-on: var(--navy); --shelf-on-ink: var(--paper); --tile: var(--navy); --tile-shape: var(--teal); --tile-ink: var(--paper); }
.shelf--picture, .clip--picture, .clip__pic--picture, .kind--picture { --shelf-soft: var(--sage-tint); --shelf-strong: var(--sage); --shelf-on: var(--sage); --shelf-on-ink: var(--navy); --tile: var(--sage); --tile-shape: var(--honey-tint); --tile-ink: var(--navy); }
.shelf--note, .clip--note, .clip__pic--note, .kind--note { --shelf-soft: var(--pale-coral); --shelf-strong: var(--deep-teal); --shelf-on: var(--deep-teal); --shelf-on-ink: var(--paper); --tile: var(--pale-coral); --tile-shape: var(--coral); --tile-ink: var(--navy); }

/* the results band */
.lib-results { position: relative; padding: 40px 0 120px; background: var(--pale-teal); min-height: 60vh; }
.lib-results:focus { outline: none; }
.lib-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-tags:empty { display: none; }
.lib-alltags { margin-top: 12px; padding: 18px; border-radius: 28px; background: var(--paper); }
.lib-alltags__find input {
  width: min(320px, 100%); height: 42px; padding: 0 18px;
  border: 1.5px solid var(--navy); border-radius: 999px; background: var(--card);
  color: var(--navy); font: inherit; font-size: 16px;
}
.lib-alltags__find input:focus { outline: none; box-shadow: 0 0 0 4px var(--honey); }
.lib-alltags__list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; margin-top: 14px; overflow-y: auto; overscroll-behavior: contain; }
.lib-alltags__none { color: var(--navy-soft); }
.lib-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 22px 0 22px; min-height: 36px; }
.lib-count { font-size: 18px; letter-spacing: -0.01em; }
.lib-active { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 14px;
  border: 0; border-radius: 999px; background: var(--navy); color: var(--paper);
  font: inherit; font-size: 15px; cursor: pointer;
}
.lib-pill__x { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); color: var(--navy); font-size: 16px; line-height: 1; }
.lib-pill:hover .lib-pill__x { background: var(--honey); }
.lib-clear { border: 0; background: none; color: var(--navy); font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* the cards */
.lib-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.clip {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 8px 8px 16px; border-radius: 26px; background: var(--paper);
  transition: transform 0.3s var(--ease);
}
.clip:hover { transform: translateY(-4px) rotate(-0.4deg); }
.clip:nth-child(even):hover { transform: translateY(-4px) rotate(0.4deg); }
.clip__face { display: block; border-radius: 19px; overflow: hidden; }
.clip__pic { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 19px; background: var(--tile, var(--paper-2)); color: var(--tile-ink, var(--navy)); }
.clip__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
.clip__face:hover .clip__pic img { transform: scale(1.04); }
.clip__ph { position: absolute; inset: 0; display: grid; place-items: center; }
.clip__shape { position: absolute; width: 58%; right: -10%; bottom: -24%; color: var(--tile-shape, var(--paper)); transition: transform 0.8s var(--ease); }
.clip:hover .clip__shape { transform: rotate(30deg); }
.clip__initials { position: relative; font-size: clamp(34px, 3.4vw, 52px); letter-spacing: -0.04em; line-height: 1; }
.clip__pic--zoom img { object-position: left top; transform-origin: 0 0; scale: 1.55; }
.clip__face:hover .clip__pic--zoom img { transform: none; }
.clip__pic--whole { background: #fff; }
.clip__pic--whole img { object-fit: contain; }
.clip__body { display: flex; flex-direction: column; flex: 1; padding: 14px 10px 0; }
.clip__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.clip__meta time { font-family: var(--mono); font-size: 12.5px; color: var(--navy-soft); }
.kind { display: inline-block; padding: 2px 10px 3px; border-radius: 999px; background: var(--shelf-soft); font-size: 13px; line-height: 1.35; }
.kind--code { background: var(--navy); color: var(--paper); }
.kind--transcript { background: var(--honey); }
.clip__title { margin-top: 10px; font-size: 19px; font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clip__title a { text-decoration: none; }
.clip__title a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.clip__text { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--navy-hover); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clip__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.clip__tag { padding: 2px 9px 3px; border: 1px solid var(--rule-2); border-radius: 999px; background: transparent; color: var(--navy); font: inherit; font-size: 13px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.clip__tag:hover { border-color: var(--navy); background: var(--honey-tint); }
.clip__tag.is-on { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.clip__more { align-self: center; padding: 0 4px; font-family: var(--mono); font-size: 12px; color: var(--navy-soft); }
.clip__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.clip__site { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; color: var(--navy-soft); }
.clip__read {
  flex: none; height: 34px; padding: 0 14px; border: 1.5px solid var(--navy); border-radius: 999px;
  background: transparent; color: var(--navy); font: inherit; font-size: 15px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.clip__read:hover { background: var(--navy); color: var(--paper); }
.clip--ghost { min-height: 340px; background: rgba(248, 246, 241, 0.6); animation: ghost 1.4s ease-in-out infinite alternate; }
@keyframes ghost { to { background: rgba(248, 246, 241, 0.95); } }

/* the list layout */
.lib-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.is-list .clip { flex-direction: row; align-items: center; gap: 14px; padding: 8px 18px 8px 8px; border-radius: 20px; }
.is-list .clip:hover { transform: translateX(4px); }
.is-list .clip__face { flex: none; width: 120px; border-radius: 14px; }
.is-list .clip__pic { border-radius: 14px; }
.is-list .clip__initials { font-size: 26px; }
.is-list .clip__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta foot" "title foot" "text foot"; column-gap: 18px; padding: 0; }
.is-list .clip__meta { grid-area: meta; }
.is-list .clip__title { grid-area: title; margin-top: 4px; font-size: 17px; }
.is-list .clip__text { grid-area: text; -webkit-line-clamp: 1; font-size: 14px; margin-top: 2px; }
.is-list .clip__tags { display: none; }
.is-list .clip__foot { grid-area: foot; flex-direction: column; align-items: flex-end; justify-content: center; padding: 0; gap: 6px; }

.lib-more { display: flex; justify-content: center; margin-top: 40px; }
.lib-more .btn { background: var(--paper); }
.lib-more .btn:hover { background: var(--navy); }
.lib-empty { display: grid; justify-items: center; gap: 12px; max-width: 460px; margin: 30px auto 0; text-align: center; }
.lib-empty img { width: 220px; margin-bottom: 4px; }
.lib-empty p { color: var(--navy-hover); }
.lib-empty .btn { margin-top: 8px; }

/* the note sheet: slides in from the right, full screen on a phone */
.sheet {
  position: fixed; inset: 0 0 0 auto; width: min(640px, 100vw); max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; border-radius: 32px 0 0 32px;
  background: var(--paper); color: var(--navy); overflow: hidden;
}
.sheet::backdrop { background: rgba(31, 53, 94, 0.42); }
.sheet[open] { animation: sheet-in 0.35s var(--ease); }
.sheet[open]::backdrop { animation: fade-in 0.35s ease; }
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
html.sheet-open { overflow: hidden; }
.sheet__in { display: flex; flex-direction: column; height: 100%; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 12px 22px; border-bottom: 1px solid var(--rule); }
.sheet__nav { display: flex; align-items: center; gap: 8px; }
.sheet__pos { min-width: 70px; font-size: 13px; text-align: center; color: var(--navy-soft); }
.sheet__btn { display: grid; place-items: center; width: 42px; height: 42px; border: 1.5px solid var(--navy); border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer; transition: background 0.15s, color 0.15s; }
.sheet__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sheet__btn:hover:not(:disabled) { background: var(--navy); color: var(--paper); }
.sheet__btn:disabled { opacity: 0.3; cursor: default; }
.sheet__close { background: var(--honey); border-color: var(--honey); }
.sheet__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 30px 60px; }
.sheet__scroll:focus { outline: none; }
.sheet__pic .clip__pic { aspect-ratio: 16 / 8; border-radius: 22px; }
.sheet__pic .clip__initials { font-size: 64px; }
.sheet__scroll > .clip__meta { margin-top: 18px; }
.sheet__title { margin-top: 10px; font-size: 34px; font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.sheet__acts { margin-top: 18px; }
.sheet__tags:empty { display: none; }
.md { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule-2); font-size: 16.5px; line-height: 1.6; overflow-wrap: anywhere; }
.md.is-loading { color: var(--navy-soft); animation: ghost-text 1s ease-in-out infinite alternate; }
@keyframes ghost-text { to { opacity: 0.5; } }
.md > * + * { margin-top: 14px; }
.md h2, .md h3, .md h4 { margin-top: 26px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
.md h2 { font-size: 24px; }
.md h3 { font-size: 20px; }
.md h4 { font-size: 17px; }
.md ul, .md ol { padding-left: 22px; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li + li { margin-top: 6px; }
.md li::marker { color: var(--coral); }
.md blockquote { margin-left: 0; padding: 14px 18px; border-radius: 18px; background: var(--honey-tint); }
.md pre { padding: 14px 16px; border-radius: 16px; background: var(--navy); color: var(--paper); overflow-x: auto; font-size: 13.5px; }
.md pre code { padding: 0; background: none; color: inherit; }
.md a { text-underline-offset: 3px; }
.md hr { border: 0; border-top: 1px dashed var(--rule-2); }
.md__wiki { padding: 0 4px; border-radius: 4px; background: var(--pale-teal); }
.md__front { display: grid; gap: 6px; padding: 14px 16px; border-radius: 18px; background: var(--pale-teal); font-size: 14px; }
.md__front div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.md__front dt { font-family: var(--mono); font-size: 12.5px; color: var(--navy-soft); padding-top: 2px; }
.md__front dd { margin: 0; overflow-wrap: anywhere; }

.lib-foot { padding: 34px 0 40px; background: var(--navy); color: var(--paper); font-size: 15px; }
.lib-foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; }
.lib-foot a { color: var(--honey); text-underline-offset: 3px; }

/* the sign-in door */
.door-page { min-height: 100dvh; display: grid; background: var(--pale-teal); }
.door { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; width: min(1100px, 100% - 40px); margin: auto; padding: 40px 0; }
.door__art { position: relative; aspect-ratio: 1; }
.door__art .door__sun { position: absolute; inset: 4%; color: var(--teal); }
.door__art img { position: absolute; z-index: 2; left: 14%; bottom: 0; width: 72%; }
.door__art .door__o1 { position: absolute; z-index: 3; width: 13%; left: 4%; top: 6%; color: var(--coral); }
.door__art .door__o2 { position: absolute; z-index: 3; width: 11%; right: 6%; bottom: 14%; color: var(--honey); }
.door__card { padding: 44px 44px 36px; border-radius: 36px; background: var(--paper); }
.door__brand { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.door__brand .feather, .door__brand svg { width: 40px; height: 40px; }
.door__brand .status { margin-left: auto; font-size: 15px; }
.door__card h1 { margin-top: 28px; font-size: 52px; font-weight: 400; line-height: 1.02; letter-spacing: -0.02em; }
.door__card > p { margin-top: 14px; font-size: 18px; line-height: 1.45; color: var(--navy-hover); }
.door__form { display: grid; gap: 10px; margin-top: 28px; }
.door__form label:not(.sr-only) { font-size: 15px; }
.door__form input[type="password"] {
  height: 56px; padding: 0 22px; border: 1.5px solid var(--navy); border-radius: 999px;
  background: var(--card); color: var(--navy); font: inherit; font-size: 18px; letter-spacing: 0.08em;
}
.door__form input[type="password"]:focus { outline: none; box-shadow: 0 0 0 4px var(--honey); }
.door__form .btn { justify-content: center; height: 56px; margin-top: 4px; font-size: 18px; }
.door__form .btn:disabled { opacity: 0.7; cursor: progress; transform: none; }
.door__msg { min-height: 1.5em; color: var(--deep-coral); font-size: 15px; }
.door__msg:not(:empty) { animation: shake 0.35s ease; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.door__back { display: inline-block; margin-top: 18px; font-size: 15px; text-underline-offset: 4px; }

/* ---------- Magpie collections: the rail, filing, picking, the menu, the dialogs ----------
   Raindrop's structure (Unsorted, collections in a side list, drag to file)
   in the poster's colors. Each collection wears one of five pairs: the
   strong color for its dot, the tint for its row when it's open. */
.col--teal { --col: var(--teal); --col-soft: var(--pale-teal); --col-ink: var(--navy); }
.col--coral { --col: var(--coral); --col-soft: var(--pale-coral); --col-ink: var(--navy); }
.col--honey { --col: var(--honey); --col-soft: var(--honey-tint); --col-ink: var(--navy); }
.col--sage { --col: var(--sage); --col-soft: var(--sage-tint); --col-ink: var(--navy); }
.col--navy { --col: var(--navy); --col-soft: #dde2ea; --col-ink: var(--navy); }
.col--none, .col--unsorted { --col: var(--deep-coral); --col-soft: var(--pale-coral); --col-ink: var(--navy); }
.col--all { --col: var(--navy); --col-soft: var(--paper); --col-ink: var(--navy); }
.col--trash { --col: var(--navy-soft); --col-soft: var(--paper-2); --col-ink: var(--navy); }

.lib-stats li.lib-stats__go { padding: 0; background: var(--pale-coral); }
.lib-stats__go button { display: flex; align-items: baseline; gap: 8px; padding: 10px 20px 11px; border: 0; border-radius: 999px; background: transparent; color: var(--navy); font: inherit; cursor: pointer; transition: background 0.15s; }
.lib-stats__go button:hover { background: var(--coral); }
.lib-stats li:nth-child(2) { background: var(--honey); }
.lib-stats li:nth-child(4) { background: var(--pale-teal); }
.lib-hero__acts .btn--line .shape { color: var(--coral); }
.lib-hero__since { margin-top: 14px; }

.lib-select-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 20px;
  border: 1.5px solid var(--navy); border-radius: 999px; background: var(--card); color: var(--navy);
  font: inherit; font-size: 16px; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.lib-select-btn .ico { width: 18px; height: 18px; }
.lib-select-btn:hover { background: var(--honey-tint); }
.lib-select-btn[aria-pressed="true"] { background: var(--navy); color: var(--paper); }
.ico { width: 18px; height: 18px; flex: none; }

/* the band: the rail on the left, the clips on the right */
.lib-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; align-items: start; }
.lib-main { min-width: 0; }
.lib-rail { position: sticky; top: 104px; max-height: calc(100vh - 124px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 10px 16px; border-radius: 28px; background: var(--paper); scrollbar-width: thin; }
.rail-toggle { display: none; }
.rail-list { display: grid; gap: 2px; }
.rail-row {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 12px;
  border: 0; border-radius: 999px; background: transparent; color: var(--navy); font: inherit; font-size: 16px; text-align: left; cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.rail-row:hover { background: var(--paper-2); }
.rail-row[aria-current="true"] { background: var(--col-soft, var(--pale-teal)); }
.rail-row__ico { width: 19px; height: 19px; color: var(--navy); }
.rail-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-row__n { font-size: 12.5px; color: var(--navy-soft); }
.rail-row__dot { width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--col); box-shadow: inset 0 0 0 1.5px rgba(31, 53, 94, 0.18); }
.rail-row--unsorted.has-new .rail-row__n { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--deep-coral); color: var(--paper); text-align: center; }
.rail-row--unsorted[aria-current="true"] { background: var(--pale-coral); }
.rail-list > li:nth-child(2) .rail-row[aria-current="true"] { background: var(--pale-teal); }
.rail-row--trash[aria-current="true"] { background: var(--paper-2); }
.rail-row.is-drop { background: var(--honey); box-shadow: 0 0 0 2px var(--navy); }
body.is-dragging .rail-row:not([data-col=""]) { box-shadow: inset 0 0 0 1.5px var(--rule-2); }
body.is-dragging .rail-row.is-drop { box-shadow: 0 0 0 2px var(--navy); }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 6px 12px; }
.rail-head__title { font-family: var(--mono); font-size: 12.5px; font-weight: 400; letter-spacing: 0.02em; color: var(--navy-soft); }
.rail-add { display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--navy); border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.3s var(--ease); }
.rail-add:hover, .rail-add[aria-expanded="true"] { background: var(--navy); color: var(--paper); transform: rotate(90deg); }
.rail-add .ico { width: 16px; height: 16px; }
.rail-tree-wrap:focus { outline: none; }
.rail-tree, .rail-tree__kids { display: grid; gap: 2px; }
.rail-tree__kids { margin-left: 18px; padding-left: 6px; border-left: 1.5px dashed var(--rule-2); }
.rail-line { display: flex; align-items: center; gap: 0; }
.rail-line .rail-row { flex: 1; min-width: 0; padding-left: 6px; }
.rail-twist { display: grid; place-items: center; flex: none; width: 24px; height: 28px; padding: 0; border: 0; background: none; color: var(--navy-soft); cursor: pointer; border-radius: 8px; }
.rail-twist .ico { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.rail-twist[aria-expanded="false"] .ico { transform: rotate(-90deg); }
.rail-twist:hover { color: var(--navy); background: var(--paper-2); }
.rail-twist--none { cursor: default; }
.rail-more { display: grid; place-items: center; flex: none; width: 30px; height: 30px; margin-left: 2px; border: 0; border-radius: 50%; background: none; color: var(--navy-soft); cursor: pointer; opacity: 0; transition: opacity 0.15s, background 0.15s; }
.rail-line:hover .rail-more, .rail-more:focus-visible, .rail-more[aria-expanded="true"] { opacity: 1; }
.rail-more:hover, .rail-more[aria-expanded="true"] { background: var(--paper-2); color: var(--navy); }
.rail-none { padding: 6px 12px; font-size: 14.5px; color: var(--navy-soft); }
.rail-list--bottom { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule); }
.rail-connect { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px; padding: 12px 14px; border: 1.5px dashed var(--rule-2); border-radius: 20px; background: var(--honey-tint); color: var(--navy); font: inherit; font-size: 15px; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.rail-connect:hover { border-color: var(--navy); background: var(--honey); }

/* where you are */
.lib-place { margin-bottom: 14px; }
.lib-place__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 0; font-size: 14px; }
.lib-place__crumbs:empty { display: none; }
.lib-place__crumb { padding: 0; border: 0; background: none; color: var(--navy-soft); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lib-place__crumb:hover { color: var(--navy); }
.lib-place__sep { color: var(--navy-soft); }
.lib-place__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.lib-place__title { display: flex; align-items: center; gap: 14px; font-size: 44px; font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.lib-place__title::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--col, var(--navy)); }
.col--all .lib-place__title::before { background: conic-gradient(var(--teal) 0 25%, var(--honey) 0 50%, var(--coral) 0 75%, var(--sage) 0); }
.lib-place__empty { background: var(--paper); }
.lib-results .lib-shelves { margin: 0 0 10px; }
.lib-results .lib-tags { margin-top: 0; }

/* the cards: a picker in the corner, and where each one lives */
.lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.clip__check { position: absolute; z-index: 3; top: 16px; left: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1.5px var(--navy); cursor: pointer; opacity: 0; transform: scale(0.85); transition: opacity 0.15s, transform 0.2s var(--ease), background 0.15s; }
.clip__check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.clip__tick { width: 14px; height: 8px; margin-top: -3px; border-left: 2.5px solid transparent; border-bottom: 2.5px solid transparent; transform: rotate(-45deg); }
.clip:hover .clip__check, .clip__check:focus-within, .is-selecting .clip__check, .clip.is-picked .clip__check { opacity: 1; transform: none; }
.clip__check:focus-within { box-shadow: 0 0 0 1.5px var(--navy), 0 0 0 5px var(--honey); }
.clip.is-picked .clip__check { background: var(--navy); }
.clip.is-picked .clip__tick { border-color: var(--paper); }
.clip.is-picked { box-shadow: 0 0 0 3px var(--navy); }
.is-selecting .clip { cursor: pointer; }
.is-selecting .clip:hover { transform: none; }
.clip[draggable="true"] { cursor: grab; }
.is-selecting .clip[draggable="true"] { cursor: pointer; }
.clip.is-lifted { opacity: 0.45; transform: scale(0.97); }
.clip.is-new { animation: clip-new 1.6s var(--ease); }
@keyframes clip-new { 0%, 30% { box-shadow: 0 0 0 4px var(--honey); } 100% { box-shadow: 0 0 0 0 transparent; } }
.clip__meta .clip__site { margin-left: auto; max-width: 48%; }
.clip__where {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; height: 34px; padding: 0 10px 0 9px;
  border: 0; border-radius: 999px; background: var(--col-soft); color: var(--navy); font: inherit; font-size: 14px; cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.clip__where:hover, .clip__where[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--navy); }
.clip__where-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--col); }
.clip__where-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip__where-caret { width: 14px; height: 14px; flex: none; }
.clip__where.col--none { background: var(--pale-coral); }
.md__none { color: var(--navy-soft); }

/* the menu: file a clip, a collection's options */
.pop-menu {
  position: fixed; z-index: 90; overflow-y: auto; overscroll-behavior: contain; padding: 8px;
  border: 1.5px solid var(--navy); border-radius: 22px; background: var(--paper);
  box-shadow: 0 18px 40px -18px rgba(31, 53, 94, 0.45);
}
.menu-head { padding: 6px 12px 6px; font-family: var(--mono); font-size: 12.5px; color: var(--navy-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 7px 12px 7px calc(12px + var(--depth, 0) * 16px);
  border: 0; border-radius: 14px; background: none; color: var(--navy); font: inherit; font-size: 15.5px; text-align: left; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--col-soft, var(--pale-teal)); outline: none; }
.menu-item[aria-checked="true"] { font-weight: 550; }
.menu-item__dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--col); }
.menu-item__ico { width: 18px; height: 18px; }
.menu-item__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item__check { width: 18px; height: 18px; color: var(--deep-teal); }
.menu-item--add { color: var(--deep-teal); }
.menu-item--danger { color: var(--deep-coral); }
.menu-item--danger:hover, .menu-item--danger:focus-visible { background: var(--pale-coral); }
.menu-rule { margin: 6px 8px; border: 0; border-top: 1px solid var(--rule); }
.menu-name { display: flex; gap: 6px; padding: 4px; }
.menu-name input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1.5px solid var(--navy); border-radius: 999px; background: var(--card); color: var(--navy); font: inherit; font-size: 15.5px; }
.menu-name input:focus { outline: none; box-shadow: 0 0 0 4px var(--honey); }
.menu-name__ok { flex: none; height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--navy); color: var(--paper); font: inherit; font-size: 15px; cursor: pointer; }
.menu-swatches { display: flex; gap: 8px; padding: 8px 12px 6px; }
.menu-swatch { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--col); cursor: pointer; box-shadow: inset 0 0 0 1.5px rgba(31, 53, 94, 0.2); transition: transform 0.2s var(--ease); }
.menu-swatch:hover { transform: scale(1.12); }
.menu-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--navy); }
.menu-confirm { padding: 8px 12px; font-size: 15px; line-height: 1.45; }
.menu-confirm__row { display: flex; gap: 8px; padding: 4px 12px 8px; }
.menu-confirm__yes { background: var(--deep-coral); border-color: var(--deep-coral); }
.menu-confirm__yes:hover { background: var(--coral); }

/* picking several: a bar floats at the foot of the window */
.lib-selectbar {
  position: fixed; z-index: 60; left: 50%; bottom: 22px; translate: -50% 0; display: flex; align-items: center; gap: 8px;
  width: max-content; max-width: calc(100vw - 24px); padding: 8px 8px 8px 22px; border-radius: 999px; background: var(--navy); color: var(--paper);
  box-shadow: 0 18px 40px -16px rgba(31, 53, 94, 0.6); animation: rise 0.3s var(--ease);
}
.lib-selectbar[hidden] { display: none; }
@keyframes rise { from { translate: -50% 20px; opacity: 0; } }
.lib-selectbar__n { margin-right: 6px; font-size: 15.5px; white-space: nowrap; }
.lib-selectbar__btn { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border: 1.5px solid rgba(248, 246, 241, 0.5); border-radius: 999px; background: transparent; color: var(--paper); font: inherit; font-size: 15px; white-space: nowrap; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.lib-selectbar__btn:hover:not(:disabled) { border-color: var(--paper); background: rgba(248, 246, 241, 0.12); }
.lib-selectbar__btn--main { border-color: var(--honey); background: var(--honey); color: var(--navy); }
.lib-selectbar__btn--main:hover:not(:disabled) { background: var(--paper); border-color: var(--paper); color: var(--navy); }
.lib-selectbar__btn:disabled { opacity: 0.4; cursor: default; }
.lib-selectbar__done { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }

/* the toast, with Undo */
.lib-toast {
  position: fixed; z-index: 95; left: 50%; bottom: 22px; translate: -50% 0; display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: calc(100vw - 24px); padding: 12px 12px 12px 22px; border-radius: 999px; background: var(--deep-teal); color: var(--paper);
  font-size: 15.5px; box-shadow: 0 16px 36px -16px rgba(31, 53, 94, 0.6); animation: rise 0.3s var(--ease);
}
.lib-toast[hidden] { display: none; }
.lib-toast.is-error { background: var(--deep-coral); }
.lib-toast__text { min-width: 0; }
.lib-toast__undo { flex: none; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--paper); color: var(--navy); font: inherit; font-size: 15px; cursor: pointer; }
.lib-toast__undo:hover { background: var(--honey); }
.lib-selectbar:not([hidden]) ~ .lib-toast { bottom: 88px; }
.drag-ghost { position: fixed; top: -200px; left: 0; max-width: 260px; padding: 9px 16px; border-radius: 999px; background: var(--navy); color: var(--paper); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the sheet's filing and editing */
.sheet__edit { display: grid; gap: 12px; margin-top: 20px; padding: 16px; border-radius: 22px; background: var(--paper-2); }
.sheet__field { display: grid; gap: 6px; font-size: 14.5px; }
.sheet__field > span { color: var(--navy-hover); }
.sheet__field em { font-style: normal; color: var(--navy-soft); }
.sheet__field input, .sheet__field select, .sheet__field textarea {
  width: 100%; min-height: 46px; padding: 10px 16px; border: 1.5px solid var(--navy); border-radius: 18px;
  background: var(--card); color: var(--navy); font: inherit; font-size: 16px;
}
.sheet__field select { appearance: none; padding-right: 40px; border-radius: 999px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%231f355e' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; cursor: pointer; }
.sheet__field input:focus, .sheet__field select:focus, .sheet__field textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--honey); }
.sheet__field textarea { resize: vertical; line-height: 1.5; }
.sheet__field--col { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.sheet__more summary { font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sheet__more[open] summary { margin-bottom: 12px; }
.sheet__more > .sheet__field + .sheet__field { margin-top: 10px; }
.sheet__edit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.sheet__edit-msg { font-size: 14px; color: var(--deep-teal); }
.sheet__trash { justify-self: start; padding: 0; border: 0; background: none; color: var(--deep-coral); font: inherit; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* the dialogs: add a link, connect the feather */
.pop {
  width: min(560px, 100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: hidden;
  border: 0; border-radius: 32px; background: var(--paper); color: var(--navy);
}
.pop::backdrop { background: rgba(31, 53, 94, 0.42); }
.pop[open] { animation: pop-in 0.3s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.pop__in { position: relative; display: grid; gap: 14px; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 34px 34px 28px; }
.pop__sun { position: absolute; top: -70px; right: -70px; width: 190px; opacity: 0.9; pointer-events: none; }
.pop__title { position: relative; font-size: 36px; font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; }
.pop__lede { position: relative; max-width: 30em; font-size: 16.5px; line-height: 1.5; color: var(--navy-hover); }
.pop__msg { min-height: 1.4em; font-size: 15px; color: var(--deep-teal); }
.pop__msg:empty { min-height: 0; }
.pop__msg.is-error { color: var(--deep-coral); }
.pop__acts { margin-top: 4px; }
.pop__steps { display: grid; gap: 10px; padding-left: 22px; list-style: decimal; font-size: 15.5px; line-height: 1.5; }
.pop__steps li::marker { color: var(--coral); font-family: var(--mono); }
.pop__key { display: flex; gap: 8px; }
.pop__key input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 14px; border-radius: 999px; }
.pop__fine { font-size: 14px; line-height: 1.5; color: var(--navy-soft); }
.pop__bookmarklet { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--honey); color: var(--navy); text-decoration: none; cursor: grab; }
@media (max-width: 1100px) {
  .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .lib-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lib-hero__art { order: -1; width: min(360px, 82%); margin: 0 auto; }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .door { grid-template-columns: minmax(0, 1fr); gap: 0; width: min(520px, 100% - 32px); padding: 24px 0 40px; }
  .door__art { width: min(300px, 80%); margin: 0 auto -30px; }
}
@media (max-width: 700px) {
  .lib-top__in { gap: 12px; height: 64px; }
  .lib-top__home { display: none; }
  .lib-private { margin-left: auto; }
  .lib-hero { padding-bottom: 36px; }
  .lib-stats { gap: 8px; margin-top: 24px; }
  .lib-stats li { padding: 8px 14px 9px; font-size: 15px; }
  .lib-stats b { font-size: 21px; }
  .lib-bar { position: relative; padding-top: 12px; }
  .lib-bar__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "search search view" "origin sort sort"; }
  .lib-search { grid-area: search; }
  .lib-bar__row > .lib-select:nth-of-type(2) { grid-area: origin; }
  .lib-bar__row > .lib-select:nth-of-type(3) { grid-area: sort; }
  .lib-view { grid-area: view; }
  .lib-search input { height: 48px; }
  .lib-view button { height: 36px; width: 38px; }
  .lib-search__key { display: none; }
  .lib-search input { padding-right: 20px; }
  .lib-select select { width: 100%; height: 46px; padding: 0 34px 0 16px; background-position: right 14px center; font-size: 15px; text-overflow: ellipsis; }
  .lib-shelves { flex-wrap: nowrap; overflow-x: auto; margin: 12px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .lib-shelves::-webkit-scrollbar { display: none; }
  .lib-results { padding-top: 26px; }
  .lib-tags { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .lib-tags::-webkit-scrollbar { display: none; }
  .lib-tags .chip { flex: none; }
  .clip { padding: 6px 6px 12px; border-radius: 22px; }
  .clip__pic { border-radius: 16px; }
  .clip__body { padding: 10px 6px 0; }
  .clip__title { font-size: 16px; }
  .clip__text { font-size: 14px; -webkit-line-clamp: 2; }
  .clip__tags { display: none; }
  .clip__foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .clip__site { max-width: 100%; }
  .is-list .clip { padding-right: 10px; }
  .is-list .clip__face { width: 84px; }
  .is-list .clip__body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "meta" "title" "foot"; }
  .is-list .clip__text { display: none; }
  .is-list .clip__foot { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 6px; }
  .is-list .clip__read { height: 30px; font-size: 14px; }
  .sheet { inset: 0; width: 100vw; border-radius: 0; }
  .sheet__scroll { padding: 18px 20px 48px; }
  .sheet__title { font-size: 27px; }
  .door__card { padding: 30px 24px 26px; border-radius: 30px; }
  .door__card h1 { font-size: 40px; }
}
@media (max-width: 420px) {
  .lib-grid:not(.is-list) { grid-template-columns: minmax(0, 1fr); }
  .clip__tags { display: flex; }
  .clip__foot { flex-direction: row; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .clip, .clip__shape, .shelf, .shelf__shape, .clip__pic img, .lib-mark .feather { transition: none; }
  .clip:hover, .clip:nth-child(even):hover, .is-list .clip:hover, .shelf:hover { transform: none; }
  .clip--ghost, .md.is-loading, .door__msg:not(:empty) { animation: none; }
  .sheet[open], .sheet[open]::backdrop { animation: none; }
}
@media (max-width: 1240px) {
  .lib-grid:not(.is-list) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-bar__row { flex-wrap: nowrap; }
  .lib-bar .lib-select select { max-width: 190px; padding: 0 36px 0 16px; background-position: right 14px center; text-overflow: ellipsis; }
  .lib-select-btn { justify-content: center; width: 52px; padding: 0; flex: none; }
  .lib-select-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 900px) {
  .lib-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .lib-rail { position: relative; top: 0; max-height: none; overflow: visible; padding: 0; background: transparent; }
  .rail-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 52px; padding: 0 18px 0 22px;
    border: 1.5px solid var(--navy); border-radius: 999px; background: var(--paper); color: var(--navy); font: inherit; font-size: 17px; cursor: pointer;
  }
  .rail-toggle__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
  .rail-toggle__n { font-size: 13px; color: var(--navy-soft); }
  .rail-toggle .ico { transition: transform 0.2s var(--ease); }
  .rail-toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
  .rail-panel { display: none; margin-top: 8px; padding: 12px 10px 14px; border-radius: 26px; background: var(--paper); }
  .lib-rail.is-open .rail-panel { display: block; }
  .rail-more { opacity: 1; }
  .lib-place__title { font-size: 34px; }
}
@media (max-width: 700px) {
  .lib-bar__row { grid-template-areas: "search search view" "origin sort pick"; }
  .lib-select-btn { grid-area: pick; justify-content: center; width: 46px; height: 46px; padding: 0; }
  .lib-select-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lib-results .lib-shelves { margin: 0 calc(var(--gutter) * -1) 10px; }
  .lib-bar .lib-select select { padding: 0 28px 0 14px; background-position: right 9px center; font-size: 14.5px; }
  .lib-stats__go button { padding: 8px 14px 9px; }
  .lib-place__title { font-size: 30px; gap: 10px; }
  .lib-place__title::before { width: 16px; height: 16px; }
  .clip__check { top: 12px; left: 12px; width: 30px; height: 30px; }
  .clip__meta .clip__site { display: none; }
  .clip__foot { flex-direction: row; align-items: center; gap: 6px; }
  .clip__where { height: 30px; padding: 0 8px; font-size: 13px; }
  .clip__read { height: 30px; padding: 0 11px; font-size: 14px; }
  .lib-selectbar { bottom: 12px; padding: 6px 6px 6px 16px; gap: 4px; }
  .lib-selectbar__n { font-size: 14px; margin-right: 2px; }
  .lib-selectbar__btn { height: 38px; padding: 0 11px; font-size: 14px; }
  .lib-selectbar__btn .ico { display: none; }
  .lib-selectbar__btn--main span, .lib-selectbar__btn span { display: inline; }
  .lib-toast { bottom: 12px; font-size: 14.5px; padding: 10px 10px 10px 18px; }
  .lib-selectbar:not([hidden]) ~ .lib-toast { bottom: 70px; }
  .pop { border-radius: 26px; }
  .pop__in { padding: 26px 22px 22px; }
  .pop__title { font-size: 30px; }
}
@media (max-width: 420px) {
  .lib-grid:not(.is-list) { grid-template-columns: minmax(0, 1fr); }
  #selectAll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lib-selectbar, .lib-toast, .pop[open], .clip.is-new { animation: none; }
  .rail-add, .rail-twist .ico, .clip__check { transition: none; }
}
