/* Coco. One stylesheet for every screen. Mobile first. */
@font-face {
  font-family: "Instrument Sans";
  src: url(/assets/InstrumentSans-Regular.woff) format("woff");
  font-weight: 300 549;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url(/assets/InstrumentSans-Bold.woff) format("woff");
  font-weight: 550 800;
  font-display: swap;
}

:root {
  --bg: #F6F6F3;
  --card: #FFFFFF;
  --ink: #222124;
  --muted: #5D5C61;
  --line: #DDDDD8;
  --line-2: #CACAC4;
  --raise: #ECECE7;
  --blue: #5747E6;
  --f: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --lime: #CBEF6E;
  --lav: #C2B9F7;
  --char: #29282B;
  --gut: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.45 var(--f);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

h1 { font-size: clamp(38px, 7vw, 68px); line-height: 1; font-weight: 600; letter-spacing: -.025em; }
h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.08; font-weight: 600; letter-spacing: -.015em; }
h3 { font-size: 19px; line-height: 1.2; font-weight: 600; }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.4; color: var(--muted); }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* Layout */
.wrap { width: min(100% - 2 * var(--gut), 640px); margin-inline: auto; }
.wrap.wide { width: min(100% - 2 * var(--gut), 1120px); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.top .logo { display: block; color: var(--ink); }
.top .logo img { height: 22px; width: auto; }
.top .who { font-size: 15px; font-weight: 600; text-align: right; }
main { display: grid; gap: 28px; padding: 14px 0 96px; }
section { display: grid; gap: 14px; min-width: 0; }
.hero { display: grid; gap: 14px; padding: 18px 0 6px; }
.stackv { display: grid; gap: 12px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.cols { display: grid; gap: 28px; min-width: 0; }
@media (min-width: 920px) {
  .cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.quiet { border-color: var(--line-2); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.follow[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 15px; font-weight: 600; }
.field .help { font-size: 14px; color: var(--muted); }
input[type=text], input[type=url], input[type=email], input[type=number], input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--card); font-size: 16px; font-weight: 500; appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230B0B0C' stroke-width='2'/%3E%3C/svg%3E"); background-position: calc(100% - 14px) 50%; background-repeat: no-repeat; padding-right: 38px; }
textarea { min-height: 92px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #A09FA4; }
.field.bad input, .field.bad textarea, .field.bad select, .field.bad .opts { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field .say { font-size: 14px; font-weight: 600; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }

.opts { display: grid; gap: 8px; border-radius: 16px; }
.opt { display: block; position: relative; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt b { display: block; font-weight: 600; }
.opt span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.opt:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; flex: none;
}
.chip[aria-pressed=true] { background: var(--lime); border-color: var(--lime); color: var(--ink); }

/* Surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; gap: 12px; min-width: 0; }
.card.flat { background: transparent; border-color: var(--line-2); }
.card.raise { background: var(--raise); border-color: var(--raise); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--raise); font-weight: 600; }
.notice.bad { background: var(--card); border: 1px solid var(--ink); }
.empty { padding: 26px 18px; border: 1px dashed var(--line-2); border-radius: 20px; color: var(--muted); text-align: center; }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--raise); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.on { background: var(--lime); color: var(--ink); }
.pill.line { background: transparent; border: 1px solid var(--ink); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
dl { margin: 0; }
.sep { height: 1px; background: var(--line); border: 0; margin: 2px 0; }
.loading { color: var(--muted); padding: 26px 0; }

/* Feed cards */
.feed { display: grid; gap: 12px; }
@media (min-width: 700px) { .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .feed.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fc { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; min-width: 0; cursor: pointer; text-align: left; }
.fc:hover { border-color: var(--line-2); }
.fc .t { font-size: 21px; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
.fc .l { color: var(--muted); font-size: 15px; }
.fc .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fc .price { font-size: 17px; font-weight: 600; }
.fc .shot { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--raise); display: grid; place-items: center; }
.fc .shot img { width: 100%; height: 100%; object-fit: cover; }
.fc .shot .host { font-size: 15px; font-weight: 600; color: var(--muted); padding: 0 12px; text-align: center; }
.fc .shot.text { aspect-ratio: auto; min-height: 64px; }
.fc.own { background: transparent; border: 1px dashed var(--line-2); grid-template-rows: auto auto auto; cursor: default; }
.byline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }

/* Lists of jobs */
.list { display: grid; gap: 10px; }
.item { display: grid; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); min-width: 0; }
a.item:hover { border-color: var(--line-2); }
.item .t { font-weight: 600; font-size: 17px; line-height: 1.25; }
.meta { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 600; }

/* The clock */
.clock { font-size: clamp(52px, 15vw, 88px); line-height: 1; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.clock.late { color: var(--muted); }
.clock.long { font-size: clamp(34px, 9vw, 60px); }      /* a clock that counts days fits on one line */

/* Pack */
.pack { display: grid; gap: 8px; }
.pack li { padding: 10px 12px; border-radius: 12px; background: var(--raise); font-size: 15px; white-space: pre-wrap; }
.pack li a { font-weight: 600; }
.pack li .x { float: right; margin-left: 10px; }

/* Timeline */
.tl { display: grid; gap: 10px; }
.tl li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--line-2); font-size: 15px; }
.tl .w { color: var(--muted); font-size: 13px; }
.tl .b { white-space: pre-wrap; }

/* Stars */
.stars { display: flex; gap: 6px; }
.stars button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); font-weight: 600; cursor: pointer; }
.stars button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Swipe stack */
.deck { position: relative; min-height: 120px; }
.deck .under { position: absolute; inset: 10px 10px -8px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.swipe { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; will-change: transform; }
.swipe.moving { transition: transform .22s ease-out; }
.swipe .tag { position: absolute; top: 14px; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; }
.swipe .tag.yes { right: 14px; background: var(--blue); color: #fff; }
.swipe .tag.no { left: 14px; background: var(--ink); color: var(--bg); }
.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.seg button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--bg); }

/* Admin */
.strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.tile b { font-size: 28px; line-height: 1.05; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile b.money { font-size: 20px; line-height: 1.25; }
.tile span { font-size: 14px; color: var(--muted); }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.formgrid { display: grid; gap: 14px; }
@media (min-width: 760px) { .formgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .formgrid .full { grid-column: 1 / -1; } }
.copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.copy code { font: 500 14px/1.4 var(--f); background: var(--raise); padding: 10px 12px; border-radius: 10px; word-break: break-all; user-select: all; -webkit-user-select: all; }

/* Sticky price bar on the post form */
.bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line-2); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 8px; }
.bar .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar .p { font-size: 20px; font-weight: 600; line-height: 1.1; }

/* Sample data label: fixed, on every screen that shows sample rows */
.sample-label {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600;
  padding: 7px 16px; border-radius: 999px; white-space: nowrap;
}
body.has-sample .top { padding-top: 56px; }

/* Demo board */
.board { display: grid; gap: 12px; }
@media (min-width: 900px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; } }
.col { background: var(--raise); border-radius: 18px; padding: 12px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.col h3 { display: flex; justify-content: space-between; font-size: 16px; padding: 2px 4px; }
.col .mini { background: var(--card); border-radius: 12px; padding: 10px 12px; font-size: 14px; display: grid; gap: 2px; }
.col .mini b { font-weight: 600; font-size: 15px; line-height: 1.25; }
.col .mini span { color: var(--muted); }
.track { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.track i { display: block; height: 100%; background: var(--ink); width: 0; }
.names { display: flex; flex-wrap: wrap; gap: 6px; }

@media (min-width: 760px) {
  :root { --gut: 28px; }
  .card { padding: 22px; }
  main { gap: 36px; }
}

/* A whole card is one tap target; links inside it sit above that target. */
.fc { position: relative; }
.fc .go { color: inherit; text-decoration: none; }
.fc .go::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.fc .out { position: relative; z-index: 1; font-weight: 600; font-size: 14px; }
.fc.own .go::after { content: none; }

/* Single-column grids never grow past their container, whatever is inside them. */
main, section, .hero, .stackv, .card, .list, .item, .field, .fc, .feed, .formgrid, .opts, .pack, .tl, .tile, .col, .board, .cols {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 700px) { .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .feed.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 760px) { .formgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 920px) { .cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.filters { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (min-width: 900px) { .col { min-height: 330px; } }

/* Plans: one column on a phone, then two, then all five in a row */
@media (min-width: 700px) { .feed.plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) {
  .feed.plans { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .feed.plans .card { padding: 18px; align-content: start; }
}
.big { font-size: clamp(32px, 6vw, 44px); line-height: 1.05; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
/* A recipe for an assistant, shown whole so it can be read like code */
pre.recipe { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--raise); font: 500 14px/1.5 var(--f); white-space: pre-wrap; max-height: 380px; overflow: auto; }
.promise { display: grid; gap: 4px; font-size: 14px; }
.promise li { padding-left: 14px; border-left: 2px solid var(--line-2); }
a.chip { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }

/* A profile: the picture, and posts as a grid of pictures */
.avatar { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; background: var(--raise); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ptile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ptile img { width: 100%; height: 100%; object-fit: cover; }
.ptile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; font-size: 14px; font-weight: 600; line-height: 1.25; background: var(--card); }
.ptile.text .cap { position: static; display: block; padding: 14px; font-size: 17px; }

/* Uploads: the file picker, and the picture or video once it is there */
input[type=file] { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--card); font-size: 15px; font-weight: 500; }
.upl { border-radius: 12px; overflow: hidden; background: var(--raise); }
.upl img, .upl video { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 600; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }

/* A delivery: the work beside what the task started from, a strip of files, earlier versions. */
.dv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.dv-one { display: grid; }
.dv-fig { margin: 0; display: grid; grid-template-rows: auto auto; align-content: start; gap: 6px; min-width: 0; }
.dv-fig img, .dv-fig video { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: rgba(0,0,0,.06); }
.dv-fig figcaption { display: grid; gap: 2px; font-size: 14px; }
.dv-empty { display: grid; place-items: center; min-height: 160px; border-radius: 10px; background: rgba(0,0,0,.06); font-size: 14px; }
.dv-strip { flex-wrap: wrap; gap: 6px; }
.dv-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dv-thumb { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.dv-thumb img, .dv-thumb video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
@media (max-width: 420px) { .dv-pair { gap: 6px; } .dv-fig figcaption { font-size: 13px; } }
.dv-strip .chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
