/* Oogst — in the style of The Disciples:
   white, near-black, lots of air; colour in full, round shapes.
   LT Institute (one weight, Semi Bold) for everything with a voice: headings, navigation, buttons, filters.
   Satoshi (variable, 300–900) for running text, labels and small print. */

/* Vertical metrics are overridden so capitals sit exactly in the middle of the line box:
   ascent = cap height + descent. Then anything centred with flexbox (buttons, pills, bubbles)
   is optically centred too. LT Institute's own metrics put text about 0.1em too high.
   LT Institute: cap 700/1000 -> ascent 95%, descent 25%.  Satoshi: cap 740/1000 -> ascent 97%, descent 23%. */
@font-face {
  font-family: 'LT Institute';
  src: url('/fonts/LTInstitute-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/fonts/Satoshi-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  ascent-override: 97%;
  descent-override: 23%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/fonts/Satoshi-VariableItalic.woff2') format('woff2');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
  ascent-override: 97%;
  descent-override: 23%;
  line-gap-override: 0%;
}

:root {
  /* The Disciples palette */
  --red: #fe3333;
  --mustard: #a78619;
  --brown: #7b4833;
  --lime: #c1fd33;
  --blue: #93dcf8;
  --pink: #fbb0f4;

  --bg: #ffffff;
  --bg-2: #f3f3f3;
  --ink: #242424;
  --ink-2: rgba(36, 36, 36, .66);
  --ink-3: rgba(36, 36, 36, .45);
  --line: rgba(36, 36, 36, .13);
  --accent: var(--blue);     /* becomes the colour you search on */
  --tint: transparent;

  --display: 'LT Institute', -apple-system, 'SF Pro Display', system-ui, sans-serif;
  --text: 'Satoshi', -apple-system, system-ui, 'Helvetica Neue', Arial, sans-serif;
  --gap: 10px;
  --round: 999px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: linear-gradient(var(--tint), var(--tint));
  color: var(--ink);
  font: 450 15px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color .4s;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--ink); }
input[type="checkbox"] { accent-color: var(--ink); width: 16px; height: 16px; }

/* Small print: lowercase grey, like the timestamps on thedisciples.co */
.label { font: 500 12px/1.2 var(--text); color: var(--ink-3); }

/* A chat bubble with a tail, the signature shape of thedisciples.co.
   Used on white only, because the tail is cut out with the page colour. */
.bubble { position: relative; display: inline-block; background: var(--blue); color: var(--ink); border-radius: 26px; padding: 12px 20px; }
.bubble::before, .bubble::after { content: ''; position: absolute; bottom: 0; height: 22px; }
.bubble::before { left: -7px; width: 22px; background: inherit; border-bottom-right-radius: 16px 14px; }
.bubble::after { left: -26px; width: 26px; background: var(--bg); border-bottom-right-radius: 12px; }

/* ---------- top ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 16px 28px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}
.logo { display: block; color: var(--ink); line-height: 0; }
.logo .wordmark { display: block; height: 34px; width: auto; overflow: visible; }
.logo .wordmark .letters, .logo .wordmark .eye { fill: currentColor; }
/* Pupils: ink, or the colour you search on. They follow the cursor,
   and scan the page while a batch is being analysed (hover the logo to see what is going on). */
/* One eye, dark with a white pupil. The pupil takes the colour you search on. */
.logo .pupil { fill: var(--pupil, #fff); transition: fill .4s, transform .25s cubic-bezier(.2,.7,.2,1); }
.logo.busy .pupil { animation: scan 3.6s ease-in-out infinite; }
.logo.busy .pupil + .pupil { animation-delay: .08s; }
@keyframes scan { 0%, 100% { transform: translate(-72px, 0); } 45% { transform: translate(72px, -20px); } 55% { transform: translate(72px, -20px); } }
@media (prefers-reduced-motion: reduce) { .logo.busy .pupil { animation: none; } }

nav { display: flex; gap: 4px; }
nav a { text-decoration: none; font: 600 15px/1 var(--display); color: var(--ink-3); padding: 9px 14px; border-radius: var(--round); transition: background .2s, color .2s; }
nav a:hover { color: var(--ink); }
nav a.on { color: var(--ink); background: var(--blue); }

.search { flex: 1; max-width: 520px; margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px; height: 44px; border: 1px solid var(--line); border-radius: var(--round); background: var(--bg); color: var(--ink-3); }
.search:focus-within { border-color: var(--ink); color: var(--ink); }
.search input { flex: 1; border: 0; outline: 0; background: none; min-width: 0; font-size: 15px; }
.search kbd { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 13px var(--display); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 18px; border-radius: var(--round); border: 1px solid var(--line); background: var(--bg); font: 600 14px var(--display); white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #000; }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.danger:hover { border-color: var(--red); background: var(--red); color: #fff; }
.btn:disabled { opacity: .35; pointer-events: none; }

main { padding: 12px 28px 120px; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin: 0 0 22px; }
.ddrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ddrow.right { gap: 14px; }
.dd { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--round); background: none; font: 600 14px var(--display); color: var(--ink-2); white-space: nowrap; transition: background .15s, color .15s; }
.dd:hover { background: var(--bg-2); color: var(--ink); }
.dd:disabled { opacity: .3; pointer-events: none; }
.dd .ddc { font-size: 8px; color: var(--ink-3); }
.dd.on { color: var(--ink); background: var(--blue); }
.dd .ddk { color: var(--ink-2); }
.dd .ddx { margin-left: 2px; width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; font: 13px/1 var(--text); color: var(--ink-2); }
.dd .ddx:hover { background: var(--ink); color: #fff; }
.ddstar { display: inline-grid; place-items: center; padding: 0; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); font-size: 16px; }
.ddstar:hover { background: var(--bg-2); color: var(--ink); }
.ddstar.on { color: var(--red); }
.clearall { margin-left: 6px; font-size: 13px; }
.swatchclear { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: -8px; border: 2px solid var(--bg); border-radius: 50%; color: #fff; font-size: 11px; line-height: 1; padding: 0; box-shadow: 0 0 0 1px var(--line); }
.ddmenu { min-width: 250px; padding: 8px; }
.ddmenu input { margin-bottom: 6px; }
.ddmenu .ddlist button { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.ddmenu .ddlist button.on { background: var(--blue); }
.ddlist .ddn { font-size: 12px; color: var(--ink-3); }
.ddempty { padding: 10px 12px; color: var(--ink-3); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 13px; border-radius: var(--round); border: 1px solid var(--line); background: none; font: 600 13px var(--display); color: var(--ink-2); text-decoration: none; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { font: 11px var(--text); opacity: .55; margin-left: 5px; }

/* The spectrum: click anywhere and the archive ranks by colour */
.spectrum { position: relative; width: 200px; height: 18px; border-radius: var(--round); cursor: crosshair; overflow: hidden; }
.spectrum canvas { width: 100%; height: 100%; display: block; }
.spectrum .pin { position: absolute; width: 12px; height: 12px; margin: -6px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: none; }

/* ---------- justified rows ---------- */
.rows { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; gap: var(--gap); }
.tile { position: relative; flex: none; overflow: hidden; background: var(--bg-2); border-radius: 4px; cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .35s, transform .5s cubic-bezier(.2,.7,.2,1); }
.tile img.in { opacity: 1; }
.tile:hover img { transform: scale(1.015); }
/* On hover the maker appears as a little blue bubble */
.tile .meta { position: absolute; left: 10px; bottom: 12px; max-width: calc(100% - 20px); display: flex; align-items: baseline; gap: 8px; padding: 7px 13px; border-radius: 18px 18px 18px 4px; background: var(--blue); color: var(--ink); font: 600 13px/1.1 var(--display); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
.tile .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta .label { color: var(--ink-2); font-size: 11px; }
.tile:hover .meta { opacity: 1; transform: none; }
.tile .bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; display: flex; opacity: 0; transition: opacity .2s; }
.tile:hover .bar { opacity: 1; }
.tile .check { position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.15); opacity: 0; transition: opacity .15s; display: grid; place-items: center; }
.tile:hover .check, body.selecting .tile .check { opacity: 1; }
.tile.sel { outline: 4px solid var(--lime); outline-offset: -4px; }
.tile.sel .check { background: var(--lime); border-color: var(--lime); opacity: 1; }
.tile.sel .check::after { content: ''; width: 9px; height: 5px; border: 2px solid var(--ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.tile .fav { position: absolute; top: 9px; right: 11px; color: var(--red); font-size: 16px; text-shadow: 0 0 6px rgba(255,255,255,.7); }

.empty { padding: 110px 20px; text-align: center; color: var(--ink-2); }
.empty h2 { font: 600 40px/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 14px; color: var(--ink); }
.empty p { max-width: 440px; margin: 0 auto 24px; }

/* ---------- makers & collections ---------- */
.pagehead { display: flex; align-items: end; gap: 20px; margin: 18px 0 32px; flex-wrap: wrap; }
.pagehead h1 { font: 600 56px/.95 var(--display); margin: 0; letter-spacing: -.03em; }
.pagehead h1 em { font-style: normal; color: var(--ink-3); }
.pagehead .sub { color: var(--ink-2); max-width: 520px; margin: 0; }
.pagehead .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 32px 20px; }
.card { text-decoration: none; display: block; }
.mosaic { aspect-ratio: 4/5; display: grid; grid-template: 1fr 1fr / 1.4fr 1fr; gap: 4px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic img:first-child { grid-row: span 2; }
.mosaic.n1 img:first-child { grid-column: span 2; }
.card h3 { font: 600 22px/1.1 var(--display); letter-spacing: -.01em; margin: 14px 0 4px; }
.card .label { display: flex; gap: 10px; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--blue); }

/* collection cover: a loose pile */
.pile { aspect-ratio: 5/4; position: relative; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.pile img { position: absolute; width: 46%; border-radius: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.16); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.card:hover .pile img { transform: var(--t) scale(1.04); }

.makerhead { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; margin: 18px 0 32px; }
.makerhead h1 { font: 600 68px/.95 var(--display); letter-spacing: -.03em; margin: 4px 0 14px; }
.makerhead .facts { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); }
.makerhead .facts a { text-underline-offset: 3px; }

/* ---------- moodboard ---------- */
.board-wrap { position: fixed; inset: 76px 0 0 0; }
.board-bar { position: absolute; top: 14px; left: 28px; right: 28px; z-index: 5; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.board-bar > * { pointer-events: auto; }
.board-bar input.title { font: 600 34px/1 var(--display); letter-spacing: -.02em; border: 0; background: none; outline: 0; padding: 0; min-width: 120px; field-sizing: content; }
.board-bar .meta { font-size: 12px; color: var(--ink-3); }
.board-bar .actions { margin-left: auto; display: flex; gap: 6px; }
.board { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none;
  background-image: radial-gradient(circle, rgba(36,36,36,.16) 1px, transparent 1.3px); background-size: 24px 24px; }
.board.panning { cursor: grabbing; }
.board .world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.board .item { position: absolute; cursor: move; user-select: none; border-radius: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.1); background: var(--bg-2); }
.board .item img { width: 100%; display: block; border-radius: 3px; pointer-events: none; }
.board .item .x, .board .item .rs { position: absolute; opacity: 0; transition: opacity .15s; }
.board .item:hover .x, .board .item:hover .rs { opacity: 1; }
.board .item .x { display: grid; place-items: center; padding: 0; top: -11px; right: -11px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; border: 0; font-size: 14px; line-height: 1; }
.board .item .x:hover { background: var(--red); }
.board .item .rs { right: -7px; bottom: -7px; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); cursor: nwse-resize; }
.board .item .who { position: absolute; left: 0; top: 100%; margin-top: 6px; font: 600 11px var(--display); color: var(--ink-2); white-space: nowrap; opacity: 0; }
.board .item:hover .who { opacity: 1; }
.board .item.lift { box-shadow: 0 18px 40px rgba(0,0,0,.22); }
.zoomhint { position: absolute; left: 28px; bottom: 16px; font-size: 12px; color: var(--ink-3); }

/* ---------- selection bar ---------- */
.selbar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 20px; border-radius: var(--round); background: var(--lime); color: var(--ink); font: 600 14px var(--display); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.selbar .btn { background: var(--ink); color: #fff; border-color: transparent; }
.selbar .btn:hover { background: #000; }
.selbar .btn.ghost { background: none; color: var(--ink); }
.selbar .btn.ghost:hover { background: rgba(0,0,0,.07); }

/* ---------- modal & lightbox ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(36,36,36,.35); backdrop-filter: blur(6px); animation: fade .18s; }
.sheet { width: min(1100px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--bg); border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.sheet.small { width: min(440px, 100%); }
.sheet header { display: flex; align-items: center; gap: 12px; padding: 26px 30px 0; }
.sheet header h2 { font: 600 30px/1.05 var(--display); letter-spacing: -.02em; margin: 0; }
.sheet header .close { margin-left: auto; }
.sheet .body { padding: 20px 30px 30px; }
@keyframes fade { from { opacity: 0; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field textarea, .field select { height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--round); background: var(--bg); outline: 0; font-size: 15px; }
.field textarea { height: auto; min-height: 84px; padding: 12px 16px; border-radius: 18px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field input:disabled { background: var(--bg-2); color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
/* The URL field looks like the message box on thedisciples.co: a round field with a black round button */
.urlrow { display: flex; align-items: center; gap: 0; height: 58px; padding: 0 7px 0 22px; border: 1px solid var(--line); border-radius: var(--round); }
.urlrow:focus-within { border-color: var(--ink); }
.urlrow input { flex: 1; height: 100%; font: 600 20px var(--display); border: 0; background: none; outline: 0; min-width: 0; }
.urlrow .btn { height: 44px; padding: 0 22px; }
.check-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--ink-2); }
.progress { margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.progress .track { height: 6px; background: var(--bg-2); margin-top: 10px; overflow: hidden; border-radius: var(--round); }
.progress .track i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: var(--round); transition: width .2s; }
.progress .track.indet i { width: 30%; animation: indet 1.1s infinite ease-in-out; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; margin-top: 14px; }
.pick { position: relative; aspect-ratio: 1; background: var(--bg-2); border-radius: 6px; overflow: hidden; cursor: pointer; }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s, filter .2s; }
.pick:not(.on) img { opacity: .25; filter: grayscale(1); }
.pick .dim { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; color: #fff; background: rgba(0,0,0,.5); padding: 1px 6px; border-radius: var(--round); }
.pick.on::after { content: ''; position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--ink); }
.pick.known::before { content: 'saved'; position: absolute; top: 7px; left: 7px; font: 600 10.5px var(--display); background: var(--ink); color: #fff; padding: 2px 8px; border-radius: var(--round); z-index: 1; }
.pickbar { display: flex; gap: 8px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.pickbar .label { margin-right: auto; }

.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 1fr 420px; background: var(--bg); animation: fade .15s; }
.lightbox .stage { position: relative; display: grid; place-items: center; padding: 32px; min-height: 0; background: var(--bg-2); }
.lightbox .stage img { max-width: 100%; max-height: calc(100vh - 64px); object-fit: contain; border-radius: 3px; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.lightbox .nav { display: grid; place-items: center; padding: 0; position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 18px; }
.lightbox .nav:hover { background: #000; }
.lightbox .nav.prev { left: 20px; } .lightbox .nav.next { right: 20px; }
.lightbox aside { overflow: auto; padding: 28px 28px 32px 30px; display: flex; flex-direction: column; gap: 22px; }
.lightbox aside h2 { font: 600 34px/1 var(--display); letter-spacing: -.02em; margin: 6px 0 0; }
.lightbox aside h2 a { text-decoration: none; }
.lightbox aside h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--blue); }
.lightbox .topline { display: flex; align-items: center; gap: 8px; }
.lightbox .topline .btn:last-child { margin-left: auto; }
.palette { display: flex; height: 40px; border-radius: var(--round); overflow: hidden; }
.palette button { border: 0; padding: 0; position: relative; }
.palette button:hover::after { content: attr(data-hex); position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #fff; mix-blend-mode: difference; }
.kv { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.coltags { display: flex; flex-wrap: wrap; gap: 6px; }

.toast { position: fixed; left: 50%; top: 86px; transform: translateX(-50%); z-index: 90; background: var(--blue); color: var(--ink); padding: 12px 20px; border-radius: 22px 22px 22px 6px; font: 600 14px var(--display); box-shadow: 0 10px 30px rgba(0,0,0,.12); animation: pop .25s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 6px) scale(.96); } }

.menu { position: fixed; z-index: 70; min-width: 220px; max-height: 380px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 40px rgba(0,0,0,.14); padding: 8px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 12px; font-size: 14px; }
.menu button:hover { background: var(--bg-2); }
.menu .new { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.menu input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: var(--round); padding: 0 14px; background: var(--bg); outline: 0; }
.menu input:focus { border-color: var(--ink); }

/* ---------- analysis & relations ---------- */
.linkbtn { border: 0; background: none; padding: 0; margin-left: 4px; font: inherit; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }

.lightbox .muted, .muted { color: var(--ink-3); font-size: 14px; margin: 0; }
.analysis { display: flex; flex-direction: column; gap: 12px; }
/* The description is plain text: the image does the talking */
.analysis .desc { margin: 0 0 6px; color: var(--ink); font-size: 16px; line-height: 1.45; }
.termline { display: grid; grid-template-columns: 86px 1fr; gap: 8px; align-items: start; }
.termline .label { line-height: 30px; }
/* All terms look the same and stay quiet next to the image; blue only on hover, to show they are clickable */
.chip.term { height: 28px; padding: 0 12px; border: 0; background: var(--bg-2); color: var(--ink); font-size: 12.5px; transition: background .15s; }
.chip.term:hover { background: var(--blue); }

.relhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.relhead .chip { height: 28px; white-space: nowrap; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
.related > .muted { grid-column: 1 / -1; }
.rel { cursor: pointer; min-width: 0; }
.rel .rimg { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.rel img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.rel:hover img { transform: scale(1.05); }
.rel .why { font-size: 11.5px; line-height: 1.3; color: var(--ink-3); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel.linked .rimg { outline: 3px solid var(--lime); outline-offset: 2px; }
.rel.linked .why { color: var(--ink); }
.rel .pin { display: grid; place-items: center; padding: 0; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 13px; line-height: 1; opacity: 0; transition: opacity .15s; }
.rel:hover .pin, .rel .pin.on { opacity: 1; }
.rel .pin.on { background: var(--lime); }

.lightbox .trail { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: 14px 20px; overflow-x: auto;
  background: linear-gradient(transparent, color-mix(in srgb, var(--bg-2) 92%, transparent) 40%); }
.lightbox .trail .label { margin-right: 6px; }
.lightbox .trail .btn { margin-left: 10px; flex: none; }
.crumb { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; opacity: .55; transition: opacity .15s, transform .15s; }
.crumb:hover { opacity: 1; }
.crumb.on { opacity: 1; outline: 3px solid var(--lime); outline-offset: 2px; }
.crumb img { width: 100%; height: 100%; object-fit: cover; display: block; box-shadow: none; max-height: none; border-radius: 0; }

.scan-note { margin: 16px 0 0; font-size: 14px; color: var(--ink-2); }
.scan-note.warn { padding: 12px 16px; border-radius: 18px; background: color-mix(in srgb, var(--red) 14%, white); color: var(--ink); }
.scan-note code { font: 13px ui-monospace, monospace; }

/* Loosely related results: offered below the real matches, only on request */
.loose { margin-top: 32px; }
.loosebtn { display: inline-flex; align-items: baseline; gap: 10px; border: 0; background: none; padding: 6px 0; font: 600 14px var(--display); color: var(--ink-2); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--line); }
.loosebtn:hover { color: var(--ink); text-decoration-color: var(--blue); }
.loosewords { font: 12px var(--text); color: var(--ink-3); }
.loosehead { display: flex; align-items: baseline; gap: 12px; padding-top: 20px; margin-bottom: 14px; border-top: 1px solid var(--line); }
.loosehead .label { font: 600 14px var(--display); color: var(--ink); }

@media (max-width: 860px) {
  .top { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  main { padding: 12px 16px 120px; }
  .pagehead h1, .makerhead h1 { font-size: 44px; }
  .makerhead { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 60vh auto; overflow: auto; }
  .spectrum { width: 100%; }
  .board-wrap { inset: 124px 0 0 0; }
}

/* ---------- art buying ---------- */
.sechead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 16px; }
.sechead h2 { font: 600 26px/1 var(--display); letter-spacing: -.02em; margin: 0; }
.sechead.small { margin: 22px 0 4px; }
.pricebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.pricebar .price { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--round); background: var(--lime); font: 600 14px var(--display); }
.pricebar .ratenote { color: var(--ink-2); }
.cardprice { margin-top: 6px; font: 600 13px var(--display); color: var(--ink); }

.joblist { display: flex; flex-direction: column; gap: 12px; }
.job { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 20px; padding: 18px; border-radius: 22px; background: var(--bg-2); }
.jobinfo h3 { font: 600 20px/1.15 var(--display); margin: 0 0 6px; }
.jobinfo .linkbtn { margin: 10px 0 0; }
.jobmeta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.fee { font-weight: 700; color: var(--ink); }
.rights { color: var(--ink-2); }
.rights.soon { color: var(--mustard); font-weight: 600; }
.rights.expired { color: var(--red); font-weight: 600; }
.jobimgs, .cimgs { display: flex; gap: 8px; overflow-x: auto; align-items: flex-start; }
.jobimg { flex: none; padding: 0; border: 0; background: var(--bg); border-radius: 8px; overflow: hidden; height: 120px; cursor: zoom-in; }
.jobimg img { height: 100%; width: auto; display: block; }

.feerow { display: flex; gap: 8px; }
.feerow input { flex: 1; min-width: 0; }
.feerow select { width: 92px; }
.dropzone { margin-top: 14px; padding: 22px; border: 1.5px dashed var(--line); border-radius: 22px; text-align: center; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--ink); background: var(--bg-2); }
.filelist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- briefing ---------- */
.briefform { max-width: 860px; }
.briefbox { width: 100%; min-height: 150px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 28px; background: var(--bg); font: 500 17px/1.5 var(--text); outline: 0; resize: vertical; }
.briefbox:focus { border-color: var(--ink); }
.earlier { margin-top: 36px; display: flex; flex-direction: column; gap: 10px; }
.reading { margin: 4px 0 26px; }
.reading h2 { font: 600 30px/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 12px; max-width: 900px; }
.chip.term.avoid { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.shortlist { display: flex; flex-direction: column; }
.candidate { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.candidate:last-child { border-bottom: 1px solid var(--line); }
.cnum { display: flex; align-items: center; gap: 10px; font: 600 13px var(--display); color: var(--ink-3); }
.candidate h3 { font: 600 28px/1.05 var(--display); letter-spacing: -.02em; margin: 8px 0 4px; }
.candidate h3 a { text-decoration: none; }
.candidate h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--blue); }
.reason { margin: 10px 0 6px; font-size: 16px; line-height: 1.45; }
.cimgs .jobimg { height: 170px; background: var(--bg-2); }
details.again { margin-top: 36px; }
details.again summary { cursor: pointer; font: 600 14px var(--display); color: var(--ink-2); margin-bottom: 14px; }

@media (max-width: 860px) {
  .job, .candidate { grid-template-columns: 1fr; }
}
.picks.jobpicks { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; }

/* ---------- sign-in ---------- */
.gate main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 16px; text-align: center; }
.gate .eyes { width: min(440px, 76vw); margin-bottom: 18px; }
.gate .wordmark { display: block; width: 100%; height: auto; overflow: visible; }
.gate .wordmark .letters, .gate .wordmark .eye { fill: var(--ink); }
/* Shut by default: the pupil is a thin line. --open, --dx and --dy are set from login.js */
.gate .pupil { fill: #fff; transform-box: fill-box; transform-origin: center;
  transform: translate(var(--dx, 0), var(--dy, 0)) scaleY(var(--open, .06)); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.gate .lede { font: 600 22px/1.2 var(--display); margin: 0; letter-spacing: -.01em; }
.gate .btn.big { height: 50px; padding: 0 28px; font-size: 16px; text-decoration: none; }
.gate .note { color: var(--ink-3); margin: 0; max-width: 360px; }
.gate .note.no { color: var(--ink); }
.gate .note.no::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); margin-right: 8px; }

/* ---------- team ---------- */
.who { flex: none; border: 0; background: none; padding: 0; border-radius: 50%; line-height: 0; }
.dot { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font: 600 15px/1 var(--display); flex: none; }
.dot.small { width: 22px; height: 22px; font-size: 11px; }
.menuhead { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menuhead strong { font: 600 15px var(--display); }
.menusep { border-top: 1px solid var(--line); margin: 6px 0; }
.menu .teamitem { display: flex; align-items: center; gap: 10px; }
.menu .teamitem.on { font-weight: 700; }
.menu .teamitem.on::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); margin-left: auto; }
.teamname { outline: 0; border-radius: 8px; }
.teamname[contenteditable]:hover, .teamname[contenteditable]:focus { box-shadow: 0 3px 0 var(--lime); }
.pagehead h1 em { white-space: nowrap; }
.invite { max-width: 900px; margin: 0 0 40px; display: flex; flex-direction: column; gap: 14px; }
.inviterow { display: flex; gap: 8px; align-items: center; }
.linkbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 16px; border-radius: 26px; background: var(--lime); }
.linkbox .field input { border-color: transparent; font-size: 14px; }
.linkbox .label { grid-column: 1 / -1; margin: 2px 6px 0; color: var(--ink); }
.invites { display: flex; flex-direction: column; }
.inviteitem { display: grid; grid-template-columns: 38px auto 1fr auto; gap: 16px; align-items: center; padding: 8px 0; }
.inviteitem .ring { width: 38px; height: 38px; border-radius: 50%; border: 1.5px dashed var(--ink-3); }
.members { display: flex; flex-direction: column; max-width: 900px; }
.member { display: grid; grid-template-columns: 38px minmax(0, 1fr) 70px 130px 130px 90px; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.member .mname { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.member .mname strong { font: 600 17px var(--display); overflow: hidden; text-overflow: ellipsis; }
.member .mname em { font-style: normal; color: var(--ink-3); }
.member .role { margin: 0; font: 500 12px/1.2 var(--text); justify-self: start; }
.member .btn { justify-self: end; }
.leave { max-width: 900px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 8px; display: flex; justify-content: flex-end; }
@media (max-width: 720px) {
  .member { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .member .seen, .member .spent, .member > :nth-child(3) { display: none; }
  .inviteitem { grid-template-columns: 38px 1fr auto; }
  .inviteitem .label { display: none; }
}

/* ---------- welcome: start a team ---------- */
.gate form.start { display: flex; gap: 8px; width: min(460px, 100%); }
.gate form.start input { flex: 1; min-width: 0; height: 50px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--round); font-size: 16px; outline: 0; background: var(--bg); }
.gate form.start input:focus { border-color: var(--ink); }
.gate h1 { font: 600 44px/1 var(--display); letter-spacing: -.02em; margin: 0; }
.gate .back { color: var(--ink-3); }

/* ---------- bring a local archive ---------- */
.bring { max-width: 900px; margin: 0 0 40px; padding: 26px 28px; border-radius: 28px; background: var(--blue); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bring h3 { font: 600 24px/1.1 var(--display); margin: 0; letter-spacing: -.01em; }
.bring p { margin: 0 0 8px; max-width: 560px; }
.bring .progress { width: 100%; height: 14px; border-radius: var(--round); background: rgba(255,255,255,.6); overflow: hidden; margin-top: 6px; }
.bring .progress .fill { height: 100%; width: 0; background: var(--ink); border-radius: var(--round); transition: width .3s; }

/* ---------- video: a still that moves when you rest on it ---------- */
.play { position: absolute; right: 10px; bottom: 10px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; padding-left: 2px; box-shadow: 0 1px 6px rgba(0,0,0,.18); pointer-events: none; transition: opacity .2s; z-index: 2; }
.tile .hoverplay { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; opacity: 0; transform: scale(1.02); transition: opacity .4s; z-index: 1; }
.tile .hoverplay.in { opacity: 1; }
.tile.video:hover .play { opacity: 0; }
.tile.video .meta { z-index: 2; }
.lightbox .player { position: relative; border-radius: 3px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.12); background: #000; }
.lightbox .player img, .lightbox .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; border: 0; object-fit: cover; box-shadow: none; border-radius: 0; }
.lightbox .player .gone { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; color: var(--ink); padding: 10px 18px; border-radius: var(--round); font: 600 14px var(--display); }
.lightbox .vtitle { font: 600 22px/1.15 var(--display); margin: 0 0 8px; }
.pick video { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s, filter .2s; }
.pick:not(.on) video { opacity: .25; filter: grayscale(1); }
.tile video.hoverplay { object-fit: cover; transform: none; }
.lightbox .player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }

/* ---------- platform: every team, the volume and the bin ---------- */
.platform main { padding: 0 28px 80px; }
.platform .top .back { margin-left: auto; text-decoration: none; }
.platform h2 { font: 600 24px/1.1 var(--display); margin: 56px 0 10px; letter-spacing: -.01em; }
.volume { max-width: 1180px; margin: 0 0 44px; }
.volume .pill { display: flex; height: 46px; border-radius: var(--round); background: var(--bg-2); overflow: hidden; }
.volume .pill i { display: block; height: 100%; min-width: 4px; }
.volume .pill i.binned { background: repeating-linear-gradient(135deg, var(--ink-3) 0 6px, transparent 6px 12px); }
.volume .label { margin: 10px 4px 0; }
.teams, .bin, .adminlog { max-width: 1180px; }
.teamrow { display: grid; grid-template-columns: 38px minmax(160px, 1.4fr) 80px minmax(150px, 1fr) 70px 130px 90px auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.teamrow .mname { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.teamrow .mname strong { font: 600 17px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teamrow .mname .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teamrow .acts { display: flex; gap: 4px; justify-self: end; }
.teamrow .ring { width: 38px; height: 38px; border-radius: 50%; border: 1.5px dashed var(--ink-3); }
.binrow { grid-template-columns: 38px minmax(160px, 1.4fr) 80px 70px minmax(150px, 1fr) auto; }
.removing { border-radius: 26px; background: var(--pink); padding: 0 20px 20px; margin: 0 -20px; }
.removing .teamrow { border-top-color: transparent; }
.removing .confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.removing .confirm p { flex-basis: 100%; margin: 0 0 8px; max-width: 640px; }
.removing .confirm .field { flex: 1; max-width: 320px; }
.removing .confirm .field input { border-color: transparent; }
.removing .btn.danger:not(.ghost) { background: var(--ink); color: #fff; border-color: var(--ink); }
.removing .btn.danger:not(.ghost):hover { background: var(--red); border-color: var(--red); }
.adminlog p { margin: 4px 0; }
@media (max-width: 900px) {
  .teamrow, .binrow { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .teamrow > .label { display: none; }
}
.removing .dot { box-shadow: 0 0 0 3px #fff; }

/* ---------- doubles ---------- */
.doubles { max-width: 900px; margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.doubles h3 { font: 600 24px/1.1 var(--display); margin: 0; letter-spacing: -.01em; }
.doubles p { margin: 0 0 6px; max-width: 600px; color: var(--ink-2); }
.pairs { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 14px; }
.pair { display: flex; align-items: flex-end; gap: 4px; padding: 6px; border: 0; border-radius: 12px; background: var(--bg-2); }
.pair > span { position: relative; display: block; line-height: 0; }
.pair img { display: block; height: 110px; width: auto; border-radius: 6px; }
.pair .drop img { height: 70px; opacity: .45; filter: grayscale(1); }
.pair .keep::after { content: ''; position: absolute; top: 6px; right: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); }
.pair .dim { position: absolute; left: 5px; bottom: 5px; font: 500 10.5px/1.4 var(--text); color: #fff; background: rgba(0,0,0,.5); padding: 1px 6px; border-radius: var(--round); }
.pair.both .drop img { height: 110px; opacity: 1; filter: none; }
.pair.both .drop::after { content: ''; position: absolute; top: 6px; right: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); }
.empty .doubles { margin: 60px auto 0; text-align: left; }

/* Board on a phone: the bar wraps, a smaller title */
@media (max-width: 720px) {
  .board-bar { left: 16px; right: 16px; flex-wrap: wrap; }
  .board-bar input.title { font-size: 26px; }
  .board-bar .actions { margin-left: 0; flex-wrap: wrap; }
  .board-bar .actions .btn { height: 34px; padding: 0 14px; font-size: 13px; }
}
