/* CRIB. Black on white with BRAT light grey for buttons and accents, or white on black, one grey, one hairline. Four type sizes, two weights. No radius, no shadow. */

@font-face {
  font-family: "CRIB Sans";
  src: url("/fonts/crib-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CRIB Sans";
  src: url("/fonts/crib-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* white ground; BRAT light grey (Grey 10) is kept for buttons and accent areas */
  --ink: #000;
  --paper: #fff;
  --grey: #666;
  --line: #dcdcdc;
  --wash: #e8e8e8;
  --scrim: rgb(255 255 255 / 0.9);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  --font: "CRIB Sans", "Neue Haas Grotesk Display Pro", "Neue Haas Grotesk Text Pro", "NHaasGroteskDSPro-55Rg", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: clamp(40px, 5.4vw, 84px);
  --title: 28px;
  --body: 18px;
  --label: 14px;
  --m: 32px;
  --bar: 72px;
  --gap: 12px;
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --in: cubic-bezier(0.7, 0, 0.84, 0);
  --red: #e5322d;
  --orange: #f28c28;
  --yellow: #f2c230;
  --green: #2e9e5b;
  --blue: #2a62d9;
  --purple: #7a3fc4;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #fff;
  --paper: #000;
  --grey: #8f8f8f;
  --line: #2e2e2e;
  --wash: #1c1c1c;
  --scrim: rgb(0 0 0 / 0.88);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  --blue: #4a80f0;
  --purple: #9a62e0;
}
@media (max-width: 640px) {
  :root {
    --m: 16px;
    --bar: 108px;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
  border-radius: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}
body {
  margin: 0;
  padding-top: var(--bar);
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--body) / 1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.panel-open {
  overflow: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}
h1, h2, h3, h4 {
  font-size: inherit;
  font-weight: inherit;
}
ul, ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
strong, b {
  font-weight: 700;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border-radius: 0;
}
button {
  cursor: pointer;
}
::selection {
  background: var(--ink);
  color: var(--paper);
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--grey);
}
.label {
  font-size: var(--label);
}
.caps {
  text-transform: uppercase;
}
.visually-hidden, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  left: var(--m);
  top: 8px;
  z-index: 100;
  background: var(--paper);
  padding: 12px 16px;
  font-size: var(--label);
}

/* top bar */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--bar);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 var(--m);
}
.wordmark {
  flex: none;
  display: block;
  width: 96px;
  height: 40px;
  background: currentColor;
  -webkit-mask: url("/logo.svg") left center / contain no-repeat;
  mask: url("/logo.svg") left center / contain no-repeat;
}
.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  font-size: var(--label);
  line-height: 1;
  padding: 8px 0 6px;
  border-bottom: 2px solid transparent;
  color: var(--grey);
}
.nav a:hover {
  color: var(--ink);
}
.nav a[aria-current] {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--ink);
}
.bar .search {
  flex: 0 1 300px;
  min-width: 0;
  margin-left: auto;
  font-size: var(--label);
  min-height: 44px;
}
@media (max-width: 1023px) {
  .bar { gap: 24px; }
  .nav { gap: 20px; }
  .bar-actions { gap: 16px; }
}
.bar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.add-wrap {
  position: relative;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 13px);
  z-index: 60;
  width: 360px;
  max-width: calc(100vw - var(--m) * 2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--ink);
}
.menu-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.menu-row .field {
  flex: 1;
  min-width: 0;
  font-size: var(--label);
}
.menu-row .btn {
  flex: none;
}
@media (max-width: 640px) {
  .bar {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 60px 46px;
    gap: 0 16px;
    align-items: center;
  }
  .wordmark { grid-area: 1 / 1; width: 86px; height: 36px; }
  .bar-actions { grid-area: 1 / 2; justify-self: end; gap: 16px; }
  .nav { grid-area: 2 / 1; gap: 18px; }
  .bar .search { grid-area: 2 / 2; width: 100%; margin-left: 0; }
  .bar { gap: 0 16px; }
}

/* controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--wash);
  background: var(--wash);
  color: var(--ink);
  font-size: var(--label);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn.primary:hover:not(:disabled) {
  background: var(--paper);
  color: var(--ink);
}
.btn:disabled {
  color: var(--grey);
  cursor: default;
}
/* a button sitting on a grey area needs to stay visible */
.strip .btn:not(.primary), .notice .btn:not(.primary), .invite-link .btn:not(.primary) {
  background: var(--paper);
  border-color: var(--paper);
}
.strip .btn:not(.primary):hover:not(:disabled), .notice .btn:not(.primary):hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
}
.tbtn {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--label);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.tbtn:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
  text-decoration-color: transparent;
}
.tbtn:disabled {
  color: var(--grey);
  text-decoration: none;
  cursor: default;
}
.tbtn.quiet {
  color: var(--grey);
}
.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.link:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration-color: transparent;
}
.field {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field:hover {
  border-bottom-color: var(--grey);
}
.field:focus, .field:focus-visible {
  border-bottom-color: var(--ink);
  outline: none;
}
.field::placeholder {
  color: var(--grey);
  opacity: 1;
}
.field.inline {
  display: inline-block;
  width: auto;
  min-width: 220px;
}
.field.area {
  resize: none;
  overflow: hidden;
  line-height: 1.4;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
.select {
  padding-right: 24px;
  background-image: var(--chev);
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 12px 8px;
}
.select option {
  background: var(--paper);
  color: var(--ink);
}
.fbtn {
  position: relative;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  font-size: var(--label);
  display: inline-flex;
  align-items: center;
  color: var(--grey);
  white-space: nowrap;
}
.fbtn:hover {
  color: var(--ink);
}
.fbtn.on, a.fbtn[aria-current] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.fgroup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 18px;
}
.swatch {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--c);
  margin: 0 7px;
}
.fbtn.on .swatch {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
[data-label="red"] { --c: var(--red); }
[data-label="orange"] { --c: var(--orange); }
[data-label="yellow"] { --c: var(--yellow); }
[data-label="green"] { --c: var(--green); }
[data-label="blue"] { --c: var(--blue); }
[data-label="purple"] { --c: var(--purple); }

/* page */
.page {
  padding: 36px var(--m) 176px;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 28px;
}
.page-head.stack {
  display: block;
}
.head-meta {
  padding-bottom: 0.5em;
}
.name {
  display: block;
  min-width: 0;
  font-size: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0 0.05em;
}
input.name {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input.name:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.1em;
}
input.name:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
  text-decoration: none;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 28px;
  min-height: 44px;
  margin-bottom: 12px;
  font-size: var(--label);
}
.crumbs .sep {
  margin: 0 8px;
}
.desc {
  margin-top: 12px;
  max-width: 760px;
  border-bottom-color: transparent;
}
.code-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.code-in {
  width: 120px;
  font-size: var(--label);
  min-height: 44px;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  margin-top: 16px;
  font-size: var(--label);
}
.inline-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
}
.toolbar {
  position: sticky;
  top: var(--bar);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 40px;
  min-height: 56px;
  margin: 0 calc(var(--m) * -1) 24px;
  padding: 4px var(--m);
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: var(--label);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 40px;
}
.size {
  gap: 0 14px;
}
.size::before {
  content: "Size";
  color: var(--grey);
  margin-right: 4px;
}
.strip {
  position: relative;
  margin: 0 0 28px;
  background: var(--wash);
  font-size: var(--body);
  overflow: hidden;
}
.strip-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px;
}
.strip .row-actions {
  margin-top: 0;
}
/* The strip fills from the left while Claude works. Difference blending turns the grey
   ground black and the black type white wherever the fill has reached, in either theme. */
.strip-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  z-index: 1;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  transition: width 700ms var(--out);
}
.strip:not(.working) .strip-fill {
  transition: none;
}
.strip-text {
  flex: 1 1 420px;
  max-width: 760px;
}
.strip-text p + p {
  margin-top: 6px;
}
.strip-instruction {
  font-size: var(--label);
  user-select: all;
  -webkit-user-select: all;
}
.ask {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
}
.sub {
  font-size: var(--body);
  font-weight: 700;
}
.empty {
  max-width: 560px;
  padding: 40px 0;
}
.empty p {
  margin-bottom: 16px;
}
.empty-line {
  padding: 24px 0;
  max-width: 560px;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 20px;
}
.more {
  margin-top: 40px;
}
.instruction {
  max-width: 640px;
  margin-top: 24px;
}

/* masonry and tiles */
.group {
  margin-bottom: 56px;
}
.group-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.masonry {
  position: relative;
  width: 100%;
}
.tile {
  position: absolute;
  left: 0;
  top: 0;
  background: var(--ph, var(--wash));
}
.masonry.animating .tile {
  transition: translate 420ms var(--out);
}
.tile.dragging {
  z-index: 5;
  transition: none !important;
  opacity: 0.9;
  cursor: grabbing;
}
body.is-dragging {
  user-select: none;
  -webkit-user-select: none;
  cursor: grabbing;
}
.group .tile {
  cursor: grab;
}
.tile-link {
  position: relative;
  display: block;
  width: 100%;
  height: calc(100% - 24px);
  overflow: hidden;
  -webkit-user-drag: none;
}
.tile-link:focus-visible {
  outline-offset: 3px;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms var(--out);
  -webkit-user-drag: none;
  user-select: none;
}
.tile img.loaded {
  opacity: 1;
}
.tile-type {
  position: absolute;
  inset: 0;
  background: var(--ink);
  color: var(--paper);
}
.tile-ext {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-weight: 700;
}
.tile-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 9px 12px 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--label);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
}
.tile:hover .tile-cap, .tile:focus-within .tile-cap {
  opacity: 1;
}
body.is-dragging .tile-cap {
  opacity: 0 !important;
}
.tile.selected {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
.check {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  opacity: 0;
}
.check::after {
  content: "";
  position: absolute;
  inset: -12px;
}
.tile:hover .check, .tile:focus-within .check, body.has-selection .check {
  opacity: 1;
}
.tile.selected .check {
  opacity: 1;
  background: var(--ink);
  border-color: var(--paper);
  outline: 2px solid var(--ink);
}
@media (hover: none) {
  .check { opacity: 1; }
}
.dot {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 12px;
  height: 12px;
  background: var(--c);
  outline: 2px solid var(--paper);
  pointer-events: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}
.tile.enter, .board-row.enter {
  animation: rise 480ms var(--out) both;
  animation-delay: calc(var(--i, 0) * 14ms);
}

/* selection bar, confirm, toast, uploads, drop */
.selbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px var(--m);
  background: var(--paper);
  border-top: 2px solid var(--ink);
}
.selbar > .label:first-child {
  font-weight: 700;
  margin-right: 12px;
}
.selbar .spacer {
  flex: 1;
}
.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--m);
  background: var(--scrim);
}
.confirm {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  width: min(480px, 100%);
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--ink);
}
.confirm-text {
  flex: 1 1 100%;
  margin: 0 0 16px;
}
.picker {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
}
.picker .field.inline {
  min-width: 180px;
}
#toast {
  position: fixed;
  left: var(--m);
  bottom: var(--m);
  z-index: 90;
  max-width: min(520px, calc(100vw - var(--m) * 2));
  padding: 14px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--label);
  line-height: 1.3;
  visibility: hidden;
  opacity: 0;
  translate: 0 8px;
  transition: opacity 200ms var(--in), translate 200ms var(--in), visibility 0s 200ms;
}
#toast.show {
  visibility: visible;
  opacity: 1;
  translate: 0 0;
  transition: opacity 320ms var(--out), translate 320ms var(--out);
}
body.has-bar #toast {
  bottom: calc(var(--m) + 72px);
}
#uploads {
  position: fixed;
  right: var(--m);
  bottom: var(--m);
  z-index: 55;
  width: min(360px, calc(100vw - var(--m) * 2));
  background: var(--paper);
  border: 1px solid var(--ink);
  border-bottom: 0;
}
body.has-bar #uploads {
  bottom: calc(var(--m) + 72px);
}
#uploads:empty {
  display: none;
}
.up-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--ink);
  font-size: var(--label);
}
.up-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.up-state {
  flex: none;
  color: var(--grey);
}
.up-bar {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: calc(var(--p, 0) * 100%);
  background: var(--ink);
}
#drop {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--scrim);
  border: 2px solid var(--ink);
  margin: 12px;
  pointer-events: none;
}
#drop.show {
  display: flex;
}
#drop p {
  font-size: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

/* boards index */
.board-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px 24px;
}
.board-rows > .empty-line {
  grid-column: 1 / -1;
}
.board-row {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
a.board-row:focus-visible {
  outline-offset: 4px;
}
.row-covers {
  order: -1;
  display: grid;
  gap: 2px;
  aspect-ratio: 3 / 2;
  margin-bottom: 14px;
  background: var(--wash);
  overflow: hidden;
  pointer-events: none;
}
.row-covers[data-n="2"] { grid-template-columns: 1fr 1fr; }
.row-covers[data-n="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.row-covers[data-n="3"] img:first-child { grid-row: 1 / 3; }
.row-covers[data-n="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.row-covers img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: scale 480ms var(--out);
}
a.board-row:hover .row-covers img {
  scale: 1.03;
}
.row-covers.none {
  align-items: end;
  padding: 12px 14px;
  color: var(--grey);
  font-size: var(--label);
}
.row-name {
  font-size: var(--title);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 0.05em;
}
a.board-row:hover .row-name {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
}
.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-top: 8px;
  color: var(--grey);
}
.row-meta .stale {
  color: var(--ink);
  font-weight: 700;
}
.board-row.new {
  flex-direction: row;
  align-items: flex-end;
  gap: 12px;
  width: min(460px, 100%);
}
.row-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  outline: none;
  padding: 0 0 4px;
  font-size: var(--title);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
}
.row-input::placeholder {
  color: var(--grey);
  opacity: 1;
}
.row-input:hover {
  border-bottom-color: var(--grey);
}
.row-input:focus-visible {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 3px;
}

/* panel */
.panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  translate: 100% 0;
  transition: translate 480ms var(--out);
}
.panel.open {
  translate: 0 0;
}
.panel.closing {
  transition: translate 300ms var(--in);
}
.panel-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
  padding: 0 var(--m);
  border-bottom: 1px solid var(--line);
}
.panel-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-nav .label {
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}
.panel-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 520px);
}
.panel-image {
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--wash);
}
.panel-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 72px - 64px);
  object-fit: contain;
}
.tile-type.big {
  position: relative;
  inset: auto;
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
}
.panel-details {
  min-height: 0;
  overflow: auto;
  padding: 24px var(--m) 56px;
}
.panel:focus {
  outline: none;
}
.src {
  display: flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.title-in {
  font-size: var(--title);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  border-bottom-color: transparent;
  text-overflow: ellipsis;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.field-block {
  margin-top: 24px;
  min-width: 0;
}
.field-block > .label {
  margin-bottom: 6px;
  font-weight: 400;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 12px;
}
.swatches li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.swatches button {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.chip-color {
  display: block;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.tags:empty {
  display: none;
}
.tag {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--wash);
  background: var(--wash);
  font-size: var(--label);
}
.tag:hover {
  background: var(--ink);
  color: var(--paper);
}
.plain-list li {
  padding: 4px 0;
}
.inline-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 8px;
}
.inline-row .select {
  flex: 1;
}
.readings {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.readings > .sub {
  margin-bottom: 8px;
}
.reading-block {
  margin-top: 32px;
}
.reading-name {
  font-weight: 700;
}
.empty-reading {
  margin-top: 10px;
}
.reading-block .area {
  margin-top: 4px;
}
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pad {
  padding: 24px var(--m);
}

/* brief */
.brief {
  max-width: 760px;
}
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 8px 0 32px;
  padding: 14px 20px;
  background: var(--wash);
}
.editor .area {
  margin-top: 4px;
  min-height: 320px;
  overflow: auto;
}
.md > :first-child {
  margin-top: 0;
}
.md h1, .md h2, .md h3, .md h4 {
  font-size: var(--body);
  font-weight: 700;
  margin: 44px 0 12px;
}
.md h1 {
  font-size: var(--title);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.md p {
  margin: 0 0 16px;
}
.md ul, .md ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.md ul { list-style: square; }
.md ol { list-style: decimal; }
.md li {
  margin: 4px 0;
}
.md a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.md code {
  background: var(--wash);
  padding: 0 4px;
}
.md pre {
  margin: 0 0 16px;
  padding: 16px;
  background: var(--wash);
  overflow: auto;
  font-size: var(--label);
  white-space: pre-wrap;
}
.md pre code {
  background: none;
  padding: 0;
}
.md blockquote {
  margin: 0 0 16px;
  padding-left: 20px;
  border-left: 2px solid var(--ink);
}
.md hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}
.md-table {
  overflow-x: auto;
  margin-bottom: 16px;
}
.md table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--label);
}
.md th, .md td {
  text-align: left;
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.md th {
  font-weight: 700;
  border-bottom-color: var(--ink);
}

/* lenses */
.lens-list {
  border-top: 1px solid var(--line);
  max-width: 1080px;
}
.lens {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 0 16px;
  align-items: start;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--line);
}
.lens.retired .field, .lens.retired .lens-name {
  color: var(--grey);
}
.lens-head {
  display: contents;
}
.lens-head > .label {
  grid-column: 1;
  grid-row: 1;
  padding-top: 14px;
}
.lens-name {
  grid-column: 2;
  grid-row: 1;
  font-weight: 700;
  border-bottom-color: transparent;
}
.lens > .area {
  grid-column: 2;
  grid-row: 2;
  border-bottom-color: transparent;
  color: var(--grey);
}
.lens > .area:hover, .lens > .area:focus {
  color: var(--ink);
}
.lens .row-actions {
  grid-column: 3;
  grid-row: 1 / 3;
  margin: 0;
  justify-content: flex-end;
  max-width: 360px;
}
.save-state {
  min-width: 48px;
}
.lens-new {
  margin-top: 56px;
  max-width: 760px;
}
.lens-new .sub {
  margin-bottom: 12px;
}
.lens-new .label {
  display: block;
  margin-top: 16px;
}

@media (max-width: 1023px) {
  .panel-body {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  }
  .lens {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .lens .row-actions {
    grid-column: 2;
    grid-row: 3;
    justify-content: flex-start;
    max-width: none;
    margin-top: 8px;
  }
}
@media (max-width: 760px) {
  .panel-body {
    display: block;
    overflow: auto;
  }
  .panel-image {
    display: block;
    overflow: visible;
    padding: 16px;
  }
  .panel-image img {
    width: 100%;
    max-height: none;
  }
  .panel-details {
    overflow: visible;
    padding: 24px var(--m) 56px;
  }
  .hide-phone { display: none; }
}
@media (max-width: 640px) {
  .page { padding-top: 24px; }
  .toolbar { position: static; gap: 0 24px; }
  .filters { gap: 0 24px; }
  .board-rows { grid-template-columns: 1fr; }
  .lens { grid-template-columns: minmax(0, 1fr); }
  .lens-head > .label { display: none; }
  .lens-name, .lens > .area, .lens .row-actions { grid-column: 1; }
  .two { grid-template-columns: 1fr; }
  .panel-bar { height: 60px; }
  #toast, #uploads { bottom: var(--m); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

/* tick inside a selected tile's check box */
.tile.selected .check::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}

/* landing: the library with the lights off. Always black, whatever the theme. */
body.locked {
  padding-top: 0;
  overflow: hidden;
  background: #000;
}
body.locked > .bar, body.locked > main, body.locked > .skip {
  display: none;
}
.landing {
  --ink: #000;
  --paper: #fff;
  --grey: #555;
  --line: #c6c6c6;
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
  color: #fff;
  color-scheme: light;
}
.wall {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 12px;
}
.wall-col {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  translate: 0 calc(var(--shift, 0px) * var(--f, 0) * 2);
  transition: translate 900ms var(--out);
}
.wall-tile {
  flex: none;
  --l: 0;
  --g: 0;
  background: color-mix(in srgb, #fff calc(max(var(--l), var(--g)) * 30% + 5%), #000);
  transition: background-color 700ms var(--out);
}
.wall-tile.glint {
  --g: 0.45;
}
.wall-tile.on {
  background: #fff;
  transition: background-color 420ms var(--out);
}
.landing-logo {
  position: absolute;
  left: var(--m);
  bottom: calc(var(--m) + 36px);
  width: min(62vw, 1180px);
  aspect-ratio: 319.2 / 134;
  background: #fff;
  -webkit-mask: url("/logo.svg") left bottom / contain no-repeat;
  mask: url("/logo.svg") left bottom / contain no-repeat;
  z-index: 1;
  pointer-events: none;
  transition: background-color 500ms var(--out) 250ms;
}
/* when the lights come on the wall turns white, so the solid logo and notes turn black */
.landing.lit .landing-logo {
  background: #000;
}
.landing.lit .landing-note {
  color: #000;
}
.landing-note {
  position: absolute;
  left: var(--m);
  margin: 0;
  z-index: 1;
  pointer-events: none;
  transition: color 500ms var(--out) 250ms;
}
.landing-note.top { top: var(--m); }
.landing-note.bottom { bottom: var(--m); }
.door {
  position: absolute;
  right: var(--m);
  top: 50%;
  translate: 0 -50%;
  width: min(380px, calc(100vw - var(--m) * 2));
  z-index: 2;
  background: #fff;
  color: #000;
  transition: opacity 300ms var(--in);
}
.landing.lit .door {
  opacity: 0;
}
.door-form {
  display: flex;
  flex-direction: column;
  padding: 32px;
}
.door-title {
  font-size: var(--title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}
.door-lead {
  margin-top: 8px;
  color: var(--grey);
}
.door-row {
  margin-top: 20px;
}
.door-row .label {
  display: block;
  color: var(--grey);
}
.door-row .field[readonly] {
  color: var(--grey);
}
.door-error {
  min-height: 20px;
  margin-top: 16px;
  font-weight: 700;
}
.door-go {
  width: 100%;
  margin-top: 8px;
  min-height: 52px;
}
.door-foot {
  margin-top: 20px;
  color: var(--grey);
}
@media (max-width: 760px) {
  .landing-logo {
    top: calc(var(--m) + 44px);
    bottom: auto;
    width: 72vw;
    -webkit-mask-position: left top;
    mask-position: left top;
  }
  .door {
    left: var(--m);
    right: var(--m);
    top: auto;
    bottom: calc(var(--m) + 36px);
    translate: none;
    width: auto;
  }
  .door-form { padding: 24px; }
}

/* account and team */
.account {
  max-width: 760px;
}
.account section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.account .sub {
  margin-bottom: 12px;
}
.account form .label {
  display: block;
  margin-top: 16px;
  color: var(--grey);
}
.people li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}
.people .who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 0;
}
.people .off {
  color: var(--grey);
}
.invite-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-top: 8px;
}
.invite-row .field {
  flex: 1 1 220px;
  width: auto;
}
.invite-row .select {
  flex: 0 0 130px;
}
.invite-link {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--wash);
  overflow-wrap: anywhere;
}
.invite-link .label {
  user-select: all;
  -webkit-user-select: all;
}

/* status under each image: one tick stored, two ticks read by Claude */
.tile-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  display: flex;
  align-items: center;
  background: var(--paper);
}
.ticks {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
}
.ticks i {
  position: absolute;
  top: 0;
  left: 3px;
  width: 6px;
  height: 11px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}
.ticks i + i {
  left: 10px;
  border-color: var(--line);
}
.ticks[data-state="read"] i + i {
  border-color: var(--ink);
}
.ticks[data-state="partly"] i + i {
  border-color: var(--grey);
}
.ticks[data-state="reading"] i + i {
  animation: tick-wait 900ms var(--out) infinite alternate;
}
@keyframes tick-wait {
  from { border-color: var(--line); translate: 0 0; }
  to { border-color: var(--ink); translate: 0 -2px; }
}

/* facts, review marks, house standard */
.facts {
  margin: 0;
}
.fact {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--label);
}
.fact dd {
  margin: 0;
}
.fact-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.fact-palette span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fact-palette i {
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
}
.reading-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
}
.marks {
  gap: 0 16px;
}
.standard {
  max-width: 1080px;
  margin-bottom: 40px;
}
.standard .sub {
  margin-bottom: 6px;
}
.standard .area {
  margin-top: 8px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: var(--label);
}
.check-row input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}
