/* Imaginary Assets — editorial gallery.
   Content-forward: the assets are the color; the UI is ink on paper. */

:root {
  --paper: #faf9f6;
  --ink: #16150f;
  --ink-60: rgba(22, 21, 15, .62);
  --ink-30: rgba(22, 21, 15, .30);
  --ink-08: rgba(22, 21, 15, .08);
  --accent: #2f4b32;          /* deep moss — used sparingly */
  --card: #ffffff;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --radius: 2px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141310; --ink: #ece9e2;
    --ink-60: rgba(236, 233, 226, .62); --ink-30: rgba(236, 233, 226, .3);
    --ink-08: rgba(236, 233, 226, .09); --card: #1c1b17; --accent: #9db89a;
  }
}

/* Actually Human — the research-network sibling brand.
   Lives in the DARK world (matches the split landing's right half), so the
   commit transition lands on a matching background instead of flashing white. */
body.ah {
  --paper: #16150f; --ink: #ece9e2;
  --ink-60: rgba(236, 233, 226, .62); --ink-30: rgba(236, 233, 226, .3);
  --ink-08: rgba(236, 233, 226, .09); --card: #201f19; --accent: #d98a63;
}
.brand-sub { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-30); display: block; margin-top: -2px; }

/* ---------- umbrella split landing (#/) ---------- */
body.welcome .site-head, body.welcome .site-foot { display: none; }
.split { display: flex; min-height: 100vh; position: relative; overflow: hidden; }
.split .half {
  flex: 1 1 50%; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(1.5rem, 5vw, 5rem); cursor: pointer; position: relative;
  transition: flex-basis .5s cubic-bezier(.4, 0, .2, 1), opacity .5s;
}
.split .half .wm { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -.02em; }
.split .half .wm em { font-style: italic; font-weight: 300; }
.split .half .tag { font-family: var(--serif); font-weight: 300; font-size: clamp(1.3rem, 2.6vw, 2.1rem); line-height: 1.15; margin: 1rem 0; max-width: 16ch; }
.split .half .proof { list-style: none; padding: 0; display: grid; gap: .45rem; font-size: .95rem;
  opacity: 0; transform: translateY(8px); transition: opacity .45s .1s, transform .45s .1s; }
.split .half .proof li::before { content: "— "; }
.split .half .enter { margin-top: 1.4rem; opacity: 0; transform: translateY(8px); transition: opacity .45s .18s, transform .45s .18s; }
.split.lean-left .half.left .proof, .split.lean-left .half.left .enter,
.split.lean-right .half.right .proof, .split.lean-right .half.right .enter { opacity: 1; transform: none; }
.split.lean-left .half.left { flex-basis: 65%; }
.split.lean-left .half.right { flex-basis: 35%; opacity: .45; }
.split.lean-right .half.right { flex-basis: 65%; }
.split.lean-right .half.left { flex-basis: 35%; opacity: .45; }
.split .half.left { background: #f3f4ee; color: #16150f; }
.split .half.right { background: #16150f; color: #ece9e2; align-items: flex-end; text-align: right; }
.split .half.right .proof li::before { content: ""; }
.split .half.right .proof li::after { content: " —"; }
.split .half.left .wm em, .split .half.left .tag em { color: #2f4b32; }
.split .half.right .wm em, .split .half.right .tag em { color: #d98a63; }

.split-circle {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(200px, 26vw, 360px); aspect-ratio: 1; border-radius: 50%;
  overflow: hidden; z-index: 5; pointer-events: none;
  box-shadow: 0 24px 80px -24px rgba(0,0,0,.5), 0 0 0 6px rgba(255,255,255,.08);
}
.split-circle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: clip-path .5s cubic-bezier(.4, 0, .2, 1); }
.split-circle .face-i { clip-path: inset(0 50% 0 0); }
.split-circle .face-a { clip-path: inset(0 0 0 50%); }
.split.lean-left .split-circle .face-i { clip-path: inset(0 28% 0 0); }
.split.lean-left .split-circle .face-a { clip-path: inset(0 0 0 72%); }
.split.lean-right .split-circle .face-i { clip-path: inset(0 72% 0 0); }
.split.lean-right .split-circle .face-a { clip-path: inset(0 0 0 28%); }
.split-circle .seam { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: rgba(255,255,255,.35); transition: left .5s cubic-bezier(.4, 0, .2, 1); z-index: 2; }
.split.lean-left .split-circle .seam { left: 72%; }
.split.lean-right .split-circle .seam { left: 28%; }
.split-caption {
  position: absolute; left: 50%; bottom: 1.2rem; transform: translateX(-50%);
  font-size: .72rem; color: rgba(180,178,170,.85); z-index: 6; text-align: center; width: 90%;
}
.split-bridge {
  position: absolute; left: 50%; top: calc(50% + clamp(120px, 15vw, 210px)); transform: translateX(-50%);
  z-index: 6; font-family: var(--serif); font-style: italic; font-size: clamp(.85rem, 1.4vw, 1.1rem);
  color: rgba(180,178,170,.95); white-space: nowrap; pointer-events: none;
}
/* Commit animation: the chosen half takes the whole viewport before navigation. */
.split.commit-left .half.left, .split.commit-right .half.right { flex-basis: 100%; }
.split.commit-left .half.right, .split.commit-right .half.left {
  flex-basis: 0%; opacity: 0; padding-left: 0; padding-right: 0; overflow: hidden;
}
.split.commit-left .half, .split.commit-right .half { transition: flex-basis .55s cubic-bezier(.65, 0, .35, 1), opacity .4s, padding .55s; }
.split.commit-left .split-circle, .split.commit-right .split-circle,
.split.commit-left .split-bridge, .split.commit-right .split-bridge,
.split.commit-left .split-caption, .split.commit-right .split-caption {
  opacity: 0; transition: opacity .35s ease;
}
.split.commit-left .split-circle { transform: translate(-50%, -50%) scale(1.15); transition: opacity .35s, transform .55s; }
.split.commit-right .split-circle { transform: translate(-50%, -50%) scale(1.15); transition: opacity .35s, transform .55s; }

/* Soft page entrance for browsers without the View Transitions API. */
@keyframes page-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
main.enter > * { animation: page-enter .3s ease both; }
@media (prefers-reduced-motion: reduce) {
  main.enter > * { animation: none; }
  .split .half, .split-circle img, .split-circle .seam { transition: none !important; }
}
::view-transition-old(root) { animation-duration: .22s; }
::view-transition-new(root) { animation-duration: .28s; }

@media (max-width: 820px) {
  /* split landing: stack with the twin circle INLINE between the halves */
  .split { flex-direction: column; }
  .split .half { min-height: 40vh; align-items: flex-start !important; text-align: left !important; }
  .split .half .proof, .split .half .enter { opacity: 1; transform: none; }
  .split .half.left { order: 1; }
  .split-circle {
    /* relative (not static): the face images are position:absolute and must
       stay contained by the circle's overflow clip */
    order: 2; position: relative; left: auto; top: auto; transform: none; margin: -56px auto;
    width: 168px; z-index: 5; pointer-events: none;
    box-shadow: 0 14px 44px -14px rgba(0,0,0,.45), 0 0 0 5px var(--paper);
  }
  .split .half.right { order: 3; padding-top: 4.5rem; }
  .split-bridge { display: none; }
  .split-caption { order: 4; position: static; transform: none; width: auto;
    background: #16150f; margin: 0; padding: 0 1rem 1.2rem; }
  /* no hover on touch: no lean states, taps navigate immediately (JS) */
  .split.lean-left .half, .split.lean-right .half { flex-basis: auto; opacity: 1; }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ---------- chrome ---------- */
.site-head {
  display: flex; align-items: baseline; gap: 2.2rem;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--ink-08);
  position: sticky; top: 0; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); z-index: 20;
}
.wordmark { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.wordmark em { font-style: italic; font-weight: 300; }
.site-head nav { display: flex; gap: 1.4rem; font-weight: 500; color: var(--ink-60); }
.site-head nav a:hover { color: var(--ink); }
.nav-create { color: var(--accent) !important; }
#auth-slot { margin-left: auto; display: flex; gap: .8rem; align-items: center; font-weight: 500; }
.pill {
  border: 1px solid var(--ink-30); border-radius: 99px; padding: .35rem 1rem;
  background: none; color: var(--ink); transition: all .15s;
}
.pill:hover { background: var(--ink); color: var(--paper); }
.pill.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill.solid:hover { opacity: .85; }

main { min-height: 70vh; }

.site-foot {
  border-top: 1px solid var(--ink-08); margin-top: 5rem;
  padding: 2rem clamp(1rem, 4vw, 3rem); color: var(--ink-60); font-size: .82rem;
  display: grid; gap: .4rem;
}
.site-foot a { text-decoration: underline; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 9vh, 7rem) clamp(1rem, 4vw, 3rem) 2.5rem; max-width: 1500px; margin: 0 auto; }
.hero h1 {
  font-family: var(--serif); font-weight: 300; letter-spacing: -.03em;
  font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 1.02; max-width: 18ch;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { margin-top: 1.4rem; max-width: 52ch; color: var(--ink-60); font-size: 1.05rem; }
.hero .cta-row { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- filter bar ---------- */
.filter-bar {
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: center;
  padding: 1rem clamp(1rem, 4vw, 3rem); max-width: 1500px; margin: 0 auto;
}
.filter-bar input[type=search] {
  flex: 1 1 220px; max-width: 340px; padding: .5rem .9rem;
  border: 1px solid var(--ink-30); border-radius: 99px; background: none; color: var(--ink); font: inherit;
}
.chip {
  border: 1px solid var(--ink-08); background: var(--card); border-radius: 99px;
  padding: .3rem .9rem; color: var(--ink-60); font-size: .85rem;
}
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- uniform card grid (zero layout shift) ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 1.2rem;
  padding: 1rem clamp(1rem, 4vw, 3rem) 3rem; max-width: 1500px; margin: 0 auto;
}
.card {
  background: var(--card);
  border: 1px solid var(--ink-08); border-radius: var(--radius);
  overflow: hidden; display: block; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 34px -14px rgba(0,0,0,.25); }
.card figure { position: relative; background: var(--ink-08); aspect-ratio: 1; }
.card figure img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.card figure img.ld { opacity: 1; }
.card .meta { padding: .8rem 1rem 1rem; height: 6.1rem; overflow: hidden; }
.card .meta h3 {
  font-family: var(--serif); font-weight: 400; font-size: 1.06rem; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta .sub {
  display: flex; gap: .8rem; color: var(--ink-60); font-size: .8rem; margin-top: .25rem;
  white-space: nowrap; overflow: hidden;
}
.card-save {
  position: absolute; top: .5rem; right: .5rem; z-index: 3;
  width: 2rem; height: 2rem; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(20, 20, 16, .55); color: #fff; font-size: .95rem; line-height: 1;
  backdrop-filter: blur(2px); opacity: 0; transition: opacity .15s, transform .15s;
}
.card:hover .card-save, .card-save.on { opacity: 1; }
.card-save.on { color: #ff8f88; }
.card-save:hover { transform: scale(1.12); }

/* skeleton shimmer — identical footprint to a real card */
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.skel { pointer-events: none; }
.skel .sk {
  background: linear-gradient(100deg, var(--ink-08) 40%, rgba(255,255,255,.14) 50%, var(--ink-08) 60%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 4px;
}
.skel figure.sk { border-radius: 0; aspect-ratio: 1; }
.skel .meta .sk { height: 1rem; margin-bottom: .5rem; }
.skel .meta .sk.short { width: 55%; }
@media (prefers-reduced-motion: reduce) { .skel .sk { animation: none; } }
.scroll-sentinel { height: 1px; }
.card.mx-on { outline: 3px solid var(--accent); outline-offset: -3px; }

/* mixer cast tray */
.mx-tray {
  display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; min-height: 96px;
  border: 1px dashed var(--ink-30); border-radius: 8px; padding: .7rem .9rem; margin-bottom: 1rem;
}
.mx-chip { position: relative; width: 76px; margin: 0; text-align: center; }
.mx-chip img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; border: 2px solid var(--accent); }
.mx-chip figcaption {
  font-size: .66rem; color: var(--ink-60); margin-top: .25rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mx-chip button {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: var(--ink); color: var(--paper); cursor: pointer; font-size: .8rem; line-height: 1;
}
.mx-cast { display: grid; gap: .35rem; justify-items: center; }
.mx-keep { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: center; max-width: 150px; }
.mx-keep .chip { padding: .05rem .5rem; font-size: .68rem; }

/* admin member action bar */
.action-bar {
  position: sticky; bottom: 1rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--ink-30); border-radius: 12px;
  padding: .7rem 1rem; margin-top: 1rem; box-shadow: 0 12px 40px -12px rgba(0,0,0,.35); z-index: 10;
}
.action-bar #m-bar-form { flex-basis: 100%; }
.action-bar input[type=text] { padding: .45rem .8rem; border: 1px solid var(--ink-30); border-radius: 99px; background: var(--paper); color: var(--ink); font: inherit; }
.kind-tag { text-transform: uppercase; letter-spacing: .08em; font-size: .64rem; color: var(--accent); font-weight: 600; }

/* watermark previews for signed-out visitors */
body.anon figure.wm::after {
  content: "IMAGINARY ASSETS · PREVIEW"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; letter-spacing: .3em; color: rgba(255,255,255,.55);
  background: repeating-linear-gradient(-35deg, transparent 0 60px, rgba(255,255,255,.05) 60px 120px);
  text-shadow: 0 1px 4px rgba(0,0,0,.4); pointer-events: none;
}

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: minmax(300px, 1.1fr) 1fr; gap: clamp(1.5rem, 4vw, 4rem);
  padding: 2.5rem clamp(1rem, 4vw, 3rem); max-width: 1400px; margin: 0 auto; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.detail .art { position: sticky; top: 90px; align-self: start; }
.detail .art figure { position: relative; border: 1px solid var(--ink-08); background: var(--card); }
/* Small/legacy images must still fill the frame edge-to-edge. */
.detail .art figure img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.08; }
.detail .byline { color: var(--ink-60); margin: .5rem 0 1.4rem; font-size: .9rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.detail .quote { font-family: var(--serif); font-style: italic; font-size: 1.25rem; margin: 1.2rem 0; color: var(--ink); border-left: 2px solid var(--accent); padding-left: 1rem; }
.action-row { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.4rem 0 2rem; }

.sheet { display: grid; gap: 1.6rem; }
.sheet section h2 {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .18em;
  color: var(--ink-60); font-weight: 600; margin-bottom: .6rem;
  border-bottom: 1px solid var(--ink-08); padding-bottom: .35rem;
}
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .3rem .9rem; font-size: .9rem; }
.kv dt { color: var(--ink-60); }
.kv dd { margin: 0; }
.taglist { display: flex; flex-wrap: wrap; gap: .4rem; }
.taglist li { list-style: none; border: 1px solid var(--ink-08); background: var(--card); border-radius: 99px; padding: .15rem .7rem; font-size: .8rem; }

.stars { display: inline-flex; gap: .15rem; }
.stars button { background: none; border: none; font-size: 1.25rem; color: var(--ink-30); padding: 0 .05rem; }
.stars button.on { color: #c99a2e; }

.notice { padding: .8rem 1rem; border: 1px solid var(--ink-08); background: var(--card); border-radius: var(--radius); font-size: .85rem; color: var(--ink-60); }
.notice.warn { border-color: #c99a2e; }

/* ---------- forms / create ---------- */
.narrow { max-width: 720px; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 3rem); display: grid; gap: 1.3rem; }
.narrow h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
.seg { display: inline-flex; border: 1px solid var(--ink-30); border-radius: 99px; overflow: hidden; width: max-content; }
.seg button { border: none; background: none; padding: .5rem 1.3rem; color: var(--ink-60); }
.seg button.on { background: var(--ink); color: var(--paper); }
textarea, input[type=text] {
  width: 100%; padding: .8rem 1rem; border: 1px solid var(--ink-30); border-radius: var(--radius);
  background: var(--card); color: var(--ink); font: inherit; resize: vertical;
}
label.field { display: grid; gap: .4rem; font-weight: 500; }
.quota-note { font-size: .85rem; color: var(--ink-60); }

.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid var(--ink-30); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- account ---------- */
.account { max-width: 980px; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 3rem); display: grid; gap: 2rem; }
.account h1 { font-family: var(--serif); font-weight: 300; font-size: 2.4rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.plan-card { border: 1px solid var(--ink-08); background: var(--card); padding: 1.3rem; border-radius: var(--radius); display: grid; gap: .5rem; align-content: start; }
.plan-card h3 { font-family: var(--serif); font-weight: 600; }
.plan-card .price { font-size: 1.6rem; font-family: var(--serif); }
.meter { height: 6px; background: var(--ink-08); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
table.plain { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.plain td, table.plain th { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--ink-08); }

.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: .7rem 1.4rem; border-radius: 99px;
  font-size: .9rem; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.25);
}

.empty { text-align: center; color: var(--ink-60); padding: 4rem 1rem; font-family: var(--serif); font-size: 1.2rem; }

/* ---------- home: hero collage ---------- */
.hero-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center;
  padding: clamp(2.5rem, 7vh, 5rem) clamp(1rem, 4vw, 3rem) 1.5rem; max-width: 1500px; margin: 0 auto; }
@media (max-width: 900px) { .hero-wrap { grid-template-columns: 1fr; } .collage { display: none; } }
.collage { position: relative; height: 420px; }
.collage a { position: absolute; width: 62%; border: 1px solid var(--ink-08); background: var(--card);
  padding: 10px 10px 2.4rem; box-shadow: 0 18px 44px -18px rgba(0,0,0,.35);
  transition: transform .25s ease; }
.collage a img { aspect-ratio: 1; object-fit: cover; }
.collage a figcaption { font-family: var(--serif); font-style: italic; font-size: .9rem;
  padding-top: .6rem; color: var(--ink-60); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collage a:nth-child(1) { top: 6%; left: 0; transform: rotate(-4deg); z-index: 1; }
.collage a:nth-child(2) { top: 0; right: 0; transform: rotate(2.5deg); z-index: 2; }
.collage a:nth-child(3) { bottom: 0; left: 18%; transform: rotate(-1deg); z-index: 3; }
.collage a:hover { transform: rotate(0deg) scale(1.04); z-index: 9; }

/* ---------- home: sections & strips ---------- */
.home-section { max-width: 1500px; margin: 0 auto; padding: 1.6rem clamp(1rem, 4vw, 3rem) 0; }
.home-section .sec-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.home-section h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; letter-spacing: -.01em; }
.home-section .sec-head a { margin-left: auto; font-size: .85rem; color: var(--ink-60); text-decoration: underline; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 220px);
  gap: 1rem; overflow-x: auto; padding-bottom: .8rem; scroll-snap-type: x proximity; }
.strip .card { margin-bottom: 0; scroll-snap-align: start; }
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: var(--ink-08); border-radius: 99px; }
.ago { font-size: .72rem; color: var(--ink-30); }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem;
  border-top: 1px solid var(--ink-08); border-bottom: 1px solid var(--ink-08);
  padding: 2rem 0; margin-top: 2.5rem; }
.how div h3 { font-family: var(--serif); font-weight: 600; margin-bottom: .3rem; }
.how div h3 span { color: var(--accent); font-style: italic; margin-right: .5rem; }
.how div p { color: var(--ink-60); font-size: .9rem; }
.cta-band { text-align: center; padding: 4rem 1rem 2rem; }
.cta-band p { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1.2rem; }
.stat-line { color: var(--ink-60); font-size: .9rem; margin-top: .8rem; }
.stat-line strong { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; }

/* ---------- library ---------- */
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--ink-08); background: var(--card); border-radius: 99px;
  padding: .4rem 1.1rem; color: var(--ink-60); }
.tabs button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.badge { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--ink-30);
  border-radius: 99px; padding: .1rem .55rem; color: var(--ink-60); }
.badge.private { border-color: #c99a2e; color: #c99a2e; }
.heart { background: none; border: 1px solid var(--ink-30); border-radius: 99px; padding: .35rem .9rem; color: var(--ink); }
.heart.on { border-color: #b3453f; color: #b3453f; }
.col-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
select.col-select { padding: .45rem .8rem; border: 1px solid var(--ink-30); border-radius: 99px;
  background: var(--card); color: var(--ink); font: inherit; }
.license-doc { max-width: 760px; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 3rem); }
/* ---------- sign-in chooser ---------- */
.signin-list { display: grid; gap: .6rem; }
.signin-btn {
  display: flex; align-items: center; gap: .8rem; width: 100%;
  padding: .8rem 1.1rem; border: 1px solid var(--ink-30); border-radius: 10px;
  background: var(--card); color: var(--ink); font: inherit; font-weight: 500;
  transition: transform .12s, box-shadow .12s;
}
.signin-btn:hover:not(.soon) { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(0,0,0,.3); }
.signin-btn .glyph { width: 1.4rem; text-align: center; font-size: 1.1rem; }
.signin-btn.soon { opacity: .45; cursor: not-allowed; }
.signin-btn .badge { margin-left: auto; }

/* ---------- admin dashboard ---------- */
.dash-hero { position: relative; height: 44vh; min-height: 300px; border: 1px solid var(--ink-08);
  border-radius: var(--radius); overflow: hidden; background: radial-gradient(ellipse at center, #101712 0%, #0b0d0a 70%); }
.dash-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dash-overlay { position: absolute; left: 1rem; right: 1rem; bottom: .8rem; display: flex;
  justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dash-overlay .quota-note { color: rgba(236,233,226,.55); }
.dash-overlay .pill { border-color: rgba(236,233,226,.3); color: #ece9e2; background: rgba(0,0,0,.25); }
.dash-group { margin-top: 1.6rem; }
.dash-group h2 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin-bottom: .7rem; }
.dash-tile h3 { font-family: var(--serif); font-size: 2rem; font-weight: 600; letter-spacing: -.02em; }
.dash-tile.alert { border-color: #c99a2e; }
.palette { position: fixed; inset: 0; background: rgba(10, 10, 8, .55); backdrop-filter: blur(3px);
  z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.palette[hidden] { display: none; }
.palette-box { width: min(640px, 92vw); background: var(--card); border: 1px solid var(--ink-08);
  border-radius: 10px; padding: 1rem; max-height: 65vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.palette-box input { width: 100%; padding: .7rem .9rem; font-size: 1.05rem; border: 1px solid var(--ink-30);
  border-radius: 8px; background: var(--paper); color: var(--ink); }
.palette-filters { display: flex; gap: .4rem; margin: .6rem 0; flex-wrap: wrap; }
.palette-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .5rem;
  border-radius: 6px; }
.palette-row:hover { background: var(--ink-08); }

.license-doc h1 { font-family: var(--serif); font-weight: 300; font-size: 2.4rem; margin-bottom: 1rem; }
.license-doc h2 { font-family: var(--serif); margin: 1.6rem 0 .5rem; }
.license-doc p, .license-doc li { color: var(--ink-60); }

/* ---------- bottom tab bar + global mobile pass ----------
   MUST stay at the END of this file: these override earlier base rules
   (same specificity — cascade order is the mechanism). */
.tabbar { display: none; }
@media (max-width: 820px) {
  /* header: wordmark + sign-in only; primary nav moves to the tab bar */
  .site-head nav { display: none; }
  .site-head { padding: .9rem 1rem; }
  body { padding-bottom: 74px; }
  body.welcome { padding-bottom: 0; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--card); border-top: 1px solid var(--ink-08);
    padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
  }
  body.welcome .tabbar { display: none; }
  .tabbar a {
    display: grid; justify-items: center; gap: .1rem;
    font-size: .66rem; color: var(--ink-60); padding: .25rem 0; min-height: 48px;
  }
  .tabbar a .tb-ic { font-size: 1.15rem; line-height: 1; }
  .tabbar a.active { color: var(--accent); font-weight: 600; }
  /* hover-only affordances become always-on for touch */
  .card-save { opacity: 1; }
  .chip { padding: .45rem .95rem; }
  /* wide tables scroll inside themselves instead of breaking the page */
  .account table.plain, #ad-body table.plain, #pt-body table.plain { display: block; overflow-x: auto; }
  .action-bar { bottom: calc(74px + .5rem); }
  .detail .art { position: static; }
}
