/* The client portal. After Jack's client-view mock (23 Oct 2026), with less
   colour: coral is the only accent; amber and green are status only. */
:root {
  --bg: #0F0F0F;
  --tile: #161616;
  --card: #1C1C1C;
  --card-hover: #222222;
  --border: #2A2A2A;
  --text: #F1ECE1;
  --muted: #8C877E;
  --coral: #FF5139;
  --green: #10B981;
  --amber: #E8A13A;
  --radius: 18px;
  --heading: 'Archivo Black', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --body: 'Space Grotesk', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--coral); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* ── header ── */
.top { padding: 22px 0 6px; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.eyebrow, .label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* The real wordmark (control-room/public), never a redrawn one. The file has
   generous transparent margins, so it is cropped by its box, not resized. */
.wordmark { height: 58px; width: auto; margin: -10px -12px -8px -14px; }
.brand-rule { width: 1px; height: 30px; background: var(--border); }
h1 { font-family: var(--body); font-weight: 700; font-size: 15px; margin: 2px 0 0; letter-spacing: 0; line-height: 1.2; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.who-name { color: var(--muted); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border); font-weight: 700; font-size: 13px; letter-spacing: .5px;
}

main { padding-top: 16px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 16px; }

/* ── tiles and their headings ── */
.tile { background: var(--tile); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 20px; min-width: 0; }
.tile.lead { border-color: var(--coral); }
.thead { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.thead-ic .ic { width: 24px; height: 24px; color: var(--coral); margin-top: 2px; }
.thead-text { flex: 1; min-width: 0; }
h2 { font-family: var(--body); font-weight: 700; font-size: 20px; letter-spacing: -.2px; margin: 0; line-height: 1.25; }
.sub { color: var(--muted); font-size: 14px; margin: 3px 0 0; }
.empty { color: var(--muted); font-size: 14px; margin: 0; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic.chev { width: 18px; height: 18px; color: var(--muted); transition: transform .18s ease-out, color .18s ease-out; }
.itile {
  width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: #242424; border: 1px solid #303030; color: var(--text); flex-shrink: 0;
}
.itile .ic { width: 21px; height: 21px; }
.itile.sm { width: 32px; height: 32px; border-radius: 9px; }
.itile.sm .ic { width: 16px; height: 16px; }
.itile.lg { width: 54px; height: 54px; border-radius: 14px; }
.itile.lg .ic { width: 26px; height: 26px; color: var(--coral); }

/* ── welcome band ── */
.hero {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--tile); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 3.2vw, 36px) clamp(22px, 4vw, 44px);
}
.hero-text { min-width: 0; flex: 1 1 420px; }
.hello { font-size: 18px; color: var(--muted); }
.hero-name {
  font-family: var(--heading); text-transform: uppercase; letter-spacing: -1.5px; line-height: .95;
  font-size: clamp(36px, 6vw, 64px); margin: 8px 0 14px; overflow-wrap: anywhere;
}
.hero-sub { font-size: 17px; color: var(--text); opacity: .85; margin: 0; max-width: 46ch; }
.hero-counts {
  margin-top: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--coral); font-variant-numeric: tabular-nums;
}
.meetcard {
  flex: 0 1 300px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
}
.meetcard-top { display: flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 10px; }
.meetcard-top .ic { color: var(--coral); }
.meetcard-title { font-weight: 700; font-size: 17px; }
.meetcard-when { color: var(--muted); font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ── build queue ── */
.queue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.queue.cols-1 { grid-template-columns: 1fr; }
.queue.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qcol { border: 1px solid var(--border); border-radius: 14px; padding: 16px 14px 14px; background: var(--bg); min-width: 0; }
.qcol.lead { border-color: rgba(255, 81, 57, .55); }
.qhead { display: flex; gap: 12px; align-items: center; margin: 0 4px 14px; }
.qnum {
  font-weight: 700; font-size: 15px; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; background: #262626; color: var(--text);
}
.qcol.lead .qnum { background: var(--coral); color: #0F0F0F; }
.qname { font-weight: 700; font-size: 17px; }
.qsub { color: var(--muted); font-size: 13px; }
.cards { display: flex; flex-direction: column; gap: 8px; }
.card {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-width: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  color: inherit; text-decoration: none; transition: background .18s ease-out, border-color .18s ease-out;
}
a.card:hover, .card:hover { background: var(--card-hover); border-color: #383838; }
a.card:hover .chev, .card:hover .chev { color: var(--text); transform: translateX(2px); }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; }
.card-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.chev-link { display: inline-flex; color: inherit; }
.card.dragging { opacity: .4; }
.card.over { border-color: var(--coral); }
.qgroup { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 4px 0; }
.cards > .qgroup:first-child { padding-top: 0; }
.arrows { display: inline-flex; flex-direction: column; gap: 2px; }
.arrows button.small { padding: 0 6px; font-size: 10px; line-height: 1.5; }

.dot { font-size: 13px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dot.amber { color: var(--amber); } .dot.amber::before { background: var(--amber); }
.dot.green { color: var(--green); } .dot.green::before { background: var(--green); }

/* ── live builds, shipped ── */
.pair { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lives { display: flex; flex-direction: column; }
.live {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, .9fr) auto; gap: 16px; align-items: center;
  padding: 14px 4px; border-top: 1px solid var(--border); color: inherit; text-decoration: none;
}
.lives > .live:first-child { border-top: 0; padding-top: 2px; }
.live:hover .live-title { text-decoration: underline; text-underline-offset: 3px; }
.live:hover .chev { color: var(--text); transform: translateX(2px); }
.live-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.live-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.live-bar { display: flex; align-items: center; gap: 12px; }
.live-bar .bar { flex: 1; margin: 0; }
.live-next { border-left: 1px solid var(--border); padding-left: 16px; min-width: 0; }
.live-next-text { font-size: 14px; color: var(--text); opacity: .9; margin-top: 3px; }
.num { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.num.muted { color: var(--muted); }
.bar { height: 6px; background: #2C2C2C; border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--coral); border-radius: 3px; }
.gist { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live.shipped { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.shipped-on { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

/* ── meetings and documents ── */
.meets { display: flex; flex-direction: column; gap: 8px; }
.meet { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.meet summary, .meet.plain { display: flex; gap: 12px; align-items: center; list-style: none; cursor: pointer; }
.meet.plain { cursor: default; }
.meet summary::-webkit-details-marker { display: none; }
.meet-title { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.meet-date { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip { font-size: 12px; border: 1px solid #3A3A3A; border-radius: 999px; padding: 2px 10px; color: var(--text); }
.meet[open] .chip { border-color: var(--coral); color: var(--coral); }
.meet-notes { font-size: 14px; white-space: pre-wrap; margin: 12px 2px 4px; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.folder {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; color: inherit; text-decoration: none; min-width: 0;
}
.folder:hover { background: var(--card-hover); }
.folder-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.folder-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-count { color: var(--muted); font-size: 12px; }

/* ── a build's own page ── */
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--text); }
.detail { padding: 26px; }
.detail-head { display: flex; gap: 18px; align-items: center; }
.detail-title { font-family: var(--body); font-weight: 700; font-size: clamp(22px, 3vw, 28px); margin: 4px 0 4px; }
.meta { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.detail-next {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border);
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: 15px;
}
.detail-summary { font-size: 16px; line-height: 1.65; margin: 18px 0 0; white-space: pre-wrap; max-width: 72ch; }

/* ── the forms, the feed, the bits around them ── */
.docs { display: flex; flex-wrap: wrap; gap: 8px; }
.doc { font-size: 13px; border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; text-decoration: none; color: var(--text); }
.doc:hover { border-color: var(--text); }
.state { font-size: 14px; }
.state.approved { color: var(--green); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

button, .btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border-radius: 999px; padding: 8px 18px; border: 1px solid var(--border);
  background: transparent; color: var(--text); transition: border-color .15s ease-out, background .15s ease-out;
}
button:hover { border-color: var(--text); }
button.primary { background: var(--coral); border-color: var(--coral); color: #0F0F0F; font-weight: 700; }
button.primary:hover { background: #FF6A55; }
button.small, .btn.small { padding: 4px 12px; font-size: 12px; }
button:disabled { opacity: .45; cursor: default; }
a.btn { text-decoration: none; display: inline-block; }

form.inline { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }
label.field { display: flex; flex-direction: column; gap: 4px; }
.tile.signin { max-width: 520px; width: 100%; margin: 6vh auto 0; }
input.code { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; }
input[type=text], input[type=email], textarea {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; width: 100%;
}
input[type=text]:focus, input[type=email]:focus, textarea:focus { outline: none; border-color: var(--coral); }
label.confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.error { color: var(--coral); font-size: 13px; margin: 0; }
.error:empty { display: none; }
.note { color: var(--muted); font-size: 12px; margin: 8px 0 0; }

.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed .when { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; margin-right: 8px; }

.devbar { border: 1px dashed var(--amber); color: var(--amber); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.pick { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pick button { text-align: left; border-radius: 12px; }

.flash {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--green); color: #0F0F0F; font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; max-width: calc(100% - 32px); text-align: center;
}

/* Sections arrive once, in a short stagger; the class is added by the script. */
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.arrive { animation: arrive .5s cubic-bezier(.2, .8, .2, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .arrive { animation: none; }
  * { transition: none !important; }
}

/* ── narrower screens ── */
@media (max-width: 980px) {
  .pair { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .queue, .queue.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tile { padding: 18px 16px; }
  .who-name { display: none; }
  .live, .live.shipped { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
  .live-next { grid-column: 2 / 3; border-left: 0; padding-left: 0; }
  .live > .chev { grid-row: 1; grid-column: 3; }
  .shipped-on { grid-column: 2 / 3; align-items: flex-start; flex-direction: row; gap: 8px; }
  .row2 { grid-template-columns: 1fr; }
  button.small { min-width: 36px; min-height: 36px; font-size: 14px; }
  .meet-date { display: none; }
}
