/* formit studio portal: tokens, type, shared components, client screens */

@font-face {
  font-family: "HN LT Std";
  src: url("../fonts/Helvetica%20Neue%20LT%20Std%2035%20Thin/Helvetica%20Neue%20LT%20Std%2035%20Thin.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "HN LT Std";
  src: url("../fonts/Helvetica%20Neue%20LT%20Std%2075%20Bold/Helvetica%20Neue%20LT%20Std%2075%20Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --fg: #111111;
  --muted: #6e6e73;
  --line: rgba(0,0,0,0.10);
  --line-soft: rgba(0,0,0,0.06);
  --danger: #ff3b30;
  --card-line: rgba(0,0,0,0.08);
  --shadow: 0 20px 60px rgba(0,0,0,0.10);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "HN LT Std", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.modal-open { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-weight: 300; font-size: 1.05rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, b, strong { font-weight: 700; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.25; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
s { color: var(--muted); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 48px); }
.main { padding-top: clamp(20px, 4vw, 44px); }
.label { font-weight: 700; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.meta { color: var(--muted); font-size: 0.95rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); flex: none; }

/* wordmark */
.wm { font-size: 1.35rem; letter-spacing: -0.03em; font-weight: 300; white-space: nowrap; }
.wm b { font-weight: 700; }

/* header */
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.top-r { display: flex; align-items: center; gap: 18px; min-width: 0; }
.who { color: var(--muted); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid var(--fg); background: var(--fg); color: #fff;
  font-weight: 700; font-size: 0.95rem; padding: 12px 22px; cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn.sec { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.sec:hover { border-color: var(--fg); }
.btn.sm { padding: 8px 16px; font-size: 0.85rem; }
.link { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; font-size: 0.95rem; }
.link:hover, .back:hover { text-decoration: underline; }
.back { display: inline-block; font-weight: 700; font-size: 0.95rem; margin-bottom: 28px; }

/* inputs */
.field { display: block; margin-bottom: 16px; }
.field span { display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; outline: none; transition: border-color 0.25s var(--ease);
}
input:focus, textarea:focus { border-color: var(--fg); }
textarea { resize: vertical; min-height: 96px; display: block; }

/* cards */
.card {
  display: block; background: var(--card); border: 1px solid var(--card-line); border-radius: 22px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
a.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.pad { padding: clamp(20px, 3vw, 30px); }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 100%; max-width: 380px; }
.login .wm { font-size: 2.2rem; display: block; line-height: 1; }
.login-sub { color: var(--muted); margin: 6px 0 40px; }
.login .btn { width: 100%; margin-top: 8px; }
.login-err { min-height: 1.5em; margin-top: 12px; }
.demo { display: flex; gap: 10px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.demo .btn { margin: 0; flex: 1; }

/* project choice */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 32px; }
.pcard { padding: clamp(24px, 4vw, 40px); min-height: 240px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.pcard h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.5rem, 3vw, 2rem); }

/* decisions */
.dlist > * + * { margin-top: 14px; }
.dcard { padding: clamp(20px, 3vw, 28px); }
.dcard .meta { display: flex; align-items: center; gap: 10px; }
.dcard h3 { margin: 6px 0 8px; font-size: 1.3rem; }
.dcard .foot { margin-top: 14px; }

/* status */
.status { display: inline-block; border-radius: 999px; border: 1px solid var(--line); padding: 4px 12px; font-weight: 700; font-size: 0.8rem; white-space: nowrap; }
.status.selected { background: var(--fg); color: #fff; border-color: var(--fg); }
.reason { border-left: 2px solid var(--fg); padding-left: 14px; }

/* concepts */
.cgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ccard { overflow: hidden; }
.ph { aspect-ratio: 4 / 3; background: #e9e9ed; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ccard .body { padding: 20px 22px 24px; }
.ccard .head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ccard .head h3 { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.ccard .reason { margin-top: 12px; }
.ccard.rejected .ph { opacity: 0.45; }
.ccard.rejected .body { opacity: 0.6; }

/* concept and decision pages */
.cp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.cp .ph { border-radius: 22px; border: 1px solid var(--card-line); }
.thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { width: 84px; padding: 0; border: 1px solid var(--card-line); border-radius: 12px; overflow: hidden; cursor: pointer; background: none; opacity: 0.55; transition: opacity 0.25s var(--ease); }
.thumbs button.on, .thumbs button:hover { opacity: 1; border-color: var(--fg); }
.cp-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.sect { margin-top: 32px; }
.sect > .label { display: block; margin-bottom: 10px; }
.article { max-width: 760px; }
.article h1 { margin: 8px 0 0; }
.lead { font-size: 1.25rem; line-height: 1.45; }
.links > * + * { margin-top: 10px; }
.mini { display: flex; align-items: center; gap: 16px; padding: 10px 18px 10px 10px; border-radius: 18px; }
.mini .ph { width: 76px; border-radius: 10px; flex: none; }
.mini b { flex: 1; min-width: 0; }
.mini.text { padding: 16px 20px; }

/* file pills and rows */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.fpill {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 16px;
  font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: border-color 0.25s var(--ease);
}
.fpill:hover { border-color: var(--fg); }
.fpill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpill i { font-style: normal; color: var(--muted); }
.rows > * + * { margin-top: 10px; }
.row {
  display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--card-line);
  border-radius: 22px; padding: 10px 14px 10px 24px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.row:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.row-main { flex: 1; min-width: 0; display: grid; align-items: center; gap: 4px 20px; padding: 8px 0; }
.row-main.f { grid-template-columns: minmax(0, 1fr) 110px 170px; }
.row-main.i { grid-template-columns: 100px 170px minmax(0, 1fr) auto; }
.row-main b { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-main b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amount { font-weight: 700; white-space: nowrap; text-align: right; }
.inv-total { margin-bottom: 24px; }

/* modal: solid white panel on a plain overlay */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade 0.25s var(--ease);
}
.modal {
  position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 36px); animation: rise 0.4s var(--ease);
}
.modal.wide { max-width: 1080px; }
.x {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.2rem; line-height: 1; z-index: 2;
  transition: border-color 0.25s var(--ease);
}
.x:hover { border-color: var(--fg); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.ms-date { font-weight: 300; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 0; }
.modal h2 { margin: 8px 48px 0 0; overflow-wrap: anywhere; }
.mv { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.mv p { margin-top: 6px; }

.pv { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.pv.solo { grid-template-columns: 1fr; }
.pv-media { background: var(--bg); border-radius: 18px; overflow: hidden; }
.pv-media img { width: 100%; max-height: 76vh; object-fit: contain; }
.pv-media iframe { display: block; width: 100%; height: 72vh; border: 0; background: #fff; }
.pv-none { padding: 60px 20px; text-align: center; }
.pv-side > .label { display: block; margin-right: 48px; }
.pv-side .btn { margin-top: 18px; }
.pv-side .thread { border-top: 1px solid var(--line); }

.center { text-align: center; padding: 80px 0; }
.center .btn { margin-top: 20px; }

/* tablet */
@media (max-width: 900px) {
  .cgrid { grid-template-columns: repeat(2, 1fr); }
  .cp, .pv { grid-template-columns: 1fr; }
  .pv-media iframe { height: 56vh; }
  .row-main.i { grid-template-columns: 90px minmax(0, 1fr) auto; }
  .row-main.i .d { grid-column: 1 / -1; grid-row: 2; }
}

/* phone */
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .top-in { height: 64px; }
  .who { display: none; }
  .figs, .pgrid, .cgrid { grid-template-columns: 1fr; }
  .row { padding: 8px 10px 8px 18px; gap: 8px; }
  .row-main.f { grid-template-columns: minmax(0, 1fr); }
  .row-main.f .ty { display: none; }
  .row-main.i { grid-template-columns: minmax(0, 1fr) auto; }
  .row-main.i .dt { grid-column: 1 / -1; grid-row: 2; }
  .row-main.i .d { grid-column: 1 / -1; grid-row: 3; }
  .row-main.i .amount { grid-column: 2; grid-row: 1; }
  .pcard { min-height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.fig { font-weight: 300; font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.03em; line-height: 1.05; margin-top: 10px; }
.fig small { font-size: 0.95rem; letter-spacing: 0; color: var(--muted); margin-left: 8px; white-space: nowrap; }

/* ================= round 2: timeline as the backbone ================= */

@font-face {
  font-family: "Patrick Hand";
  src: url("../fonts/Patrick%20Hand/PatrickHand-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* the one accent: full tint for the selected node, light tint as post-it paper */
  --blue: #2f6fb5;
  --paper: #e4eef8;
  --ink: #1c4068;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
  --colw: 360px;
  --colgap: 32px;
}

.main { padding-bottom: 130px; }

/* project header */
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 48px; flex-wrap: wrap; }
.phead .meta { margin-top: 6px; }
.facts { display: flex; gap: 40px; }
.fact { display: block; }
.fact .label { display: block; font-size: 0.72rem; }
.fact .val { display: block; font-weight: 300; font-size: 1.25rem; margin-top: 4px; white-space: nowrap; }
.fact .go { display: inline-block; font-style: normal; transition: transform 0.25s var(--ease); }
a.fact:hover .val { text-decoration: underline; text-underline-offset: 4px; }
a.fact:hover .go { transform: translateX(4px); }
.tabs { display: flex; gap: 8px; margin: 30px 0 30px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); padding: 12px 22px; font-weight: 700; font-size: 0.95rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease); }
.tab:hover { border-color: var(--fg); }
.tab.on { background: var(--fg); color: #fff; border-color: var(--fg); }
.inv-total { margin-bottom: 28px; }

/* icons: one small download icon per file */
.ic { display: block; }
.btn .ic { width: 16px; height: 16px; }
.ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card); transition: border-color 0.25s var(--ease);
}
.ico:hover { border-color: var(--fg); }

/* ---- timeline ---- */
.tlx {
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  outline: none; cursor: grab; padding: 4px 0 48px;
}
.tlx.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.tlx-track {
  position: relative; display: flex; align-items: flex-start; gap: var(--colgap);
  width: max-content; padding: 0 calc(50% - var(--colw) / 2);
}
.tlx-line, .tlx-past { position: absolute; top: 13px; height: 2px; border-radius: 2px; }
.tlx-line { background: rgba(0,0,0,0.14); }
.tlx-past { background: var(--fg); }

.col {
  position: relative; flex: 0 0 var(--colw); width: var(--colw); scroll-snap-align: center;
  padding-top: 20px; display: flex; flex-direction: column; gap: 14px;
}
/* the thin line that ties the cards to their node */
.col::before { content: ""; position: absolute; left: 50%; top: 14px; bottom: 0; width: 1px; background: rgba(0,0,0,0.14); }
.col > .card { position: relative; z-index: 1; }
.col > a.card:hover, .col > .card:hover { transform: none; }
.col > a.card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

.node {
  position: absolute; left: 50%; top: 14px; z-index: 4; width: 18px; height: 18px; margin: -9px 0 0 -9px; padding: 0;
  border-radius: 50%; border: 2px solid var(--fg); background: var(--fg); cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.col.todo .node { background: var(--bg); border-color: #b4b4ba; }
/* the most recent finished milestone is the one blue node, whatever is clicked */
.col.cur .node { background: var(--blue); border-color: var(--blue); transform: scale(1.35); }
.node .dot { position: absolute; top: -7px; right: -9px; width: 7px; height: 7px; box-shadow: 0 0 0 2px var(--bg); }

/* head card: the node sits in a round notch cut out of its top edge */
.hcard { padding: 38px 22px 22px; text-align: center; }
.notch {
  position: absolute; left: 50%; top: -31px; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--card-line); clip-path: inset(30px 0 0 0);
}
.hcard h3 { font-size: 1.2rem; }
.hcard .meta { margin-top: 4px; }
.hcard .desc { margin-top: 12px; }
.moved { margin-top: 8px; }
.moved p + p { margin-top: 6px; }
.zipbtn { margin-top: 16px; }
.col.sel .hcard { box-shadow: 0 14px 40px rgba(0,0,0,0.10); }
.col.todo .hcard { background: var(--bg); }
.col.todo::before { display: none; }

.pres { padding: 10px; }
.pres-open { display: block; }
.cover { display: block; width: 100%; aspect-ratio: 842 / 595; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); }
.pres-t { display: block; padding: 12px 56px 6px 10px; }
.pres-t b { display: block; }
.pres .ico { position: absolute; right: 16px; bottom: 16px; }

.photos { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; }
.stack { display: flex; padding-left: 4px; }
.stack img {
  width: 78px; height: 58px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; margin-left: -46px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.16); transform: rotate(calc((var(--i) - 1.5) * 3deg));
  transition: margin 0.4s var(--ease), transform 0.4s var(--ease);
}
.stack img:first-child { margin-left: 0; }
.photos:hover .stack img { margin-left: -34px; transform: rotate(calc((var(--i) - 1.5) * 5deg)); }
.photos:hover .stack img:first-child { margin-left: 0; }

.others { padding: 6px 10px 6px 22px; }
.orow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.orow + .orow { border-top: 1px solid var(--line-soft); }
.olink { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 8px 0; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olink:hover { text-decoration: underline; }

.dec, .react { padding: 20px 22px 22px; }
.ditem { margin-top: 12px; }
.ditem + .ditem { padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ditem b { display: block; margin-bottom: 4px; }
.clinks { margin-top: 6px; }
.clinks a { font-weight: 700; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; }

/* ---- post-its (the client) and white notes (formit studio) ---- */
.thread { margin-top: 16px; }
.notes { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.notes:empty { display: none; }
.postit, .note { position: relative; max-width: 92%; }
.postit p, .note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.postit {
  align-self: flex-start; background: var(--paper); color: var(--ink); padding: 16px 18px 12px;
  border-radius: 2px 2px 14px 2px; font-family: var(--hand); font-weight: 400; font-size: 1.28rem; line-height: 1.3;
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 1px 1px rgba(0,0,0,0.08), 0 14px 22px -8px rgba(0,0,0,0.30);
}
.note { align-self: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; }
.by { font-family: var(--font); font-weight: 700; font-size: 0.72rem; line-height: 1.3; margin-top: 10px; }
.note .by { color: var(--muted); }
.clips { position: absolute; top: -12px; right: 12px; display: flex; gap: 2px; }
.clip { background: none; border: 0; padding: 4px; cursor: pointer; color: inherit; transform: rotate(-10deg); transition: transform 0.25s var(--ease); }
.clip:hover { transform: rotate(-10deg) translateY(-2px); }
.clip .ic { width: 24px; height: 24px; }
.com-form textarea { min-height: 76px; }
.com-form .pills { margin-top: 10px; }
.com-form .pills:empty { display: none; }
.com-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.com-actions input { display: none; }
.cp .thread { max-width: 520px; }


/* ---- panels over the timeline ---- */
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 56px 20px 0; }
.panel-head h2 { margin: 6px 0 0; }
.pdf-pages { display: flex; flex-direction: column; gap: 14px; }
.pdf-page { display: block; width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.gal-main { position: relative; background: var(--bg); border-radius: 18px; overflow: hidden; }
.gal-img { width: 100%; max-height: 64vh; object-fit: contain; }
.gal-nav {
  position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem; transition: border-color 0.25s var(--ease);
}
.gal-nav:hover { border-color: var(--fg); }
.gal-nav[data-go="-1"] { left: 12px; }
.gal-nav[data-go="1"] { right: 12px; }
.gal-strip { display: flex; gap: 10px; margin-top: 14px; padding: 4px; overflow-x: auto; }
.gal-strip button {
  flex: none; width: 92px; padding: 0; border: 1px solid var(--card-line); border-radius: 12px; overflow: hidden; background: none; cursor: pointer; opacity: 0.55;
  animation: fan 0.55s var(--ease) backwards; animation-delay: calc(var(--i) * 50ms); transition: opacity 0.25s var(--ease);
}
.gal-strip button.on, .gal-strip button:hover { opacity: 1; border-color: var(--fg); }
.gal.single .gal-nav, .gal.single .gal-strip { display: none; }
@keyframes fan { from { transform: translateX(calc(var(--i) * -72px)) rotate(-7deg); opacity: 0; } }

@media (max-width: 620px) {
  :root { --colw: calc(100vw - 56px); --colgap: 14px; }
  .facts { gap: 24px; width: 100%; }
  .fact .val { font-size: 1.1rem; }
  .tabs { display: flex; margin: 24px 0; }
  .tab { flex: 1; justify-content: center; padding: 12px 8px; }
  .panel-head { margin-right: 48px; }
  .gal-nav { width: 38px; height: 38px; margin-top: -19px; }
}

/* ================= round 2b: slim project bar, left rail, collapsed timeline, full-screen milestone ================= */

:root { --colw: 280px; --colgap: 24px; }
html.phase-open { overflow: hidden; }
.ptitle { margin-bottom: 28px; }

/* slim bar: wordmark, project, the two facts, sign out */
.pbar { display: flex; align-items: center; gap: 28px; min-height: 76px; padding: 0 28px; }
.pname { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; padding-left: 28px; border-left: 1px solid var(--line); }
.pname b { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pname span { font-weight: 700; font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar .facts { margin-left: auto; gap: 32px; width: auto; }
.pbar .fact .label { font-size: 0.66rem; }
.pbar .fact .val { font-size: 1.05rem; margin-top: 2px; }
.pbar .top-r { padding-left: 28px; border-left: 1px solid var(--line); }

/* left rail: replaces the pills */
.rail { position: fixed; left: 20px; top: 50%; transform: translateY(-50%); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rail-set { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--card-line); border-radius: 40px; padding: 10px 6px; }
.rail-i { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 68px; padding: 6px 0; font-weight: 700; font-size: 0.64rem; color: var(--muted); }
.rb { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid transparent; color: var(--fg);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease); }
.rail-i:hover .rb { border-color: var(--fg); }
.rail-i.on { color: var(--fg); }
.rail-i.on .rb { background: var(--fg); color: #fff; border-color: var(--fg); }
.rail-back .rb { background: #fff; border-color: var(--card-line); }
.main.railed { padding-left: 104px; padding-top: 28px; }

/* collapsed timeline: only the title cards; scrolling moves it sideways, nothing snaps */
.tlx { scroll-snap-type: none; display: flex; align-items: center; padding: 40px 0; min-height: calc(100vh - 76px - 28px - 136px); }
.tlx-track { align-items: stretch; }
.col { scroll-snap-align: none; gap: 0; color: inherit; cursor: pointer; }
.col::before { display: none; }
.node { cursor: pointer; }
.hcard { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 150px; padding: 40px 20px 26px; }
.hcard h3 { font-size: 1.15rem; }
.hcard .meta { display: block; margin-top: 6px; }
.col > .card.hcard { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.col:hover > .card.hcard { transform: translateY(-3px); box-shadow: var(--shadow); }
.col.sel .hcard { box-shadow: none; }
.col.sel:hover .hcard { box-shadow: var(--shadow); }
.tlx.dragging .col { cursor: grabbing; }

/* a milestone opened over the full screen */
.phase { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; animation: phase-in 0.45s var(--ease); }
@keyframes phase-in { from { opacity: 0; transform: scale(0.97); } }
.phase-x { position: fixed; top: 20px; right: 26px; z-index: 41; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease); }
.phase-x:hover { background: rgba(0,0,0,0.07); }
.phase-x .ic { width: 26px; height: 26px; }
.phase-in { max-width: 1180px; margin: 0 auto; padding: clamp(28px, 7vh, 80px) clamp(18px, 5vw, 48px) 96px; }
.phase-head { max-width: 720px; margin-bottom: 36px; padding-right: 48px; }
.phase-head h1 { margin-top: 8px; font-size: clamp(2rem, 5vw, 3.2rem); }
.phase-date { font-size: 1.25rem; margin-top: 10px; }
.phase-head .moved { margin-top: 14px; }
.phase-head .desc { margin-top: 14px; font-size: 1.15rem; }
.phase-head .zipbtn { margin-top: 22px; }
.phase-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.phase-grid.one { grid-template-columns: minmax(0, 720px); }
.phase-col { display: flex; flex-direction: column; gap: 16px; }
.phase .card { position: relative; }
.phase a.card:hover { transform: none; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.phase .stack img { width: 104px; height: 78px; margin-left: -58px; }
.phase .stack img:first-child { margin-left: 0; }
.phase .photos:hover .stack img { margin-left: -40px; }
.phase .photos:hover .stack img:first-child { margin-left: 0; }

@media (max-width: 1000px) {
  .who { display: none; }
  .pbar .top-r { padding-left: 0; border: 0; }
}
@media (max-width: 900px) {
  .phase-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  :root { --colw: 220px; --colgap: 16px; }
  .pbar { flex-wrap: wrap; padding: 14px 18px 6px; gap: 10px 16px; }
  .pbar .wm { order: 1; }
  .pbar .top-r { order: 2; margin-left: auto; }
  .pname { order: 3; flex: 1 1 100%; padding: 0; border: 0; }
  .pbar .facts { order: 4; margin: 0; width: 100%; gap: 24px; }
  .rail { position: static; transform: none; flex-direction: row; justify-content: center; gap: 8px; padding: 10px 12px 0; }
  .rail-set { flex-direction: row; padding: 4px 8px; }
  .rail-i { width: 72px; }
  .main.railed { padding-left: 0; padding-top: 12px; }
  .tlx { min-height: 300px; padding: 28px 0; }
  .phase-x { top: 8px; right: 8px; }
  .phase-head { padding-right: 40px; }
}
@media (max-width: 620px) {
  .phase .stack img { width: 74px; height: 56px; margin-left: -46px; }
  .phase .photos:hover .stack img { margin-left: -46px; }
  .phase .stack img:first-child, .phase .photos:hover .stack img:first-child { margin-left: 0; }
  .photos b { white-space: nowrap; }
}

/* ================= round 2c: no top bar; the rail runs the full height and holds everything ================= */
.rail { left: 16px; top: 16px; bottom: 16px; transform: none; justify-content: space-between; gap: 12px; }
.rail-set { flex: 1; justify-content: flex-start; padding: 14px 6px; border-radius: 44px; }
.rail-solo { background: none; border: 0; cursor: pointer; font-family: inherit; }
.rail-solo .rb { background: #fff; border-color: var(--card-line); }
.main.railed { padding-left: 116px; padding-top: 0; }
.phd { display: flex; flex-direction: column; line-height: 1.25; padding: 26px 0 22px; }
.phd b { font-size: 1.3rem; letter-spacing: -0.02em; }
.phd span { font-weight: 700; font-size: 0.78rem; color: var(--muted); }
/* the timeline runs out softly at both edges instead of being cut off */
.tlx {
  min-height: calc(100vh - 96px - 136px);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%);
}
@media (max-width: 620px) {
  .rail { position: static; justify-content: center; align-items: flex-start; gap: 2px; padding: 10px 4px 0; }
  .rail-set { flex: 0 1 auto; flex-direction: row; padding: 4px; gap: 0; border-radius: 40px; }
  .rail-i { width: 56px; font-size: 0.58rem; }
  .rail-solo { padding-top: 10px; }
  .main.railed { padding-left: 0; }
  .phd { padding: 14px 0 10px; }
  .tlx { min-height: 300px; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%); }
}

/* ================= round 2d: files per milestone, previews ================= */
.row { padding-right: 10px; }
.pv-media.pdf { background: none; overflow: visible; }
.pv-media img { max-height: 78vh; }
.aspill {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 45; white-space: nowrap;
  background: var(--fg); color: #fff; border-radius: 999px; padding: 8px 16px; font-size: 0.8rem; font-weight: 300;
}
.aspill b { text-decoration: underline; text-underline-offset: 3px; }

/* ================= home ================= */
.home { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 8px; }
.hcell { position: relative; display: flex; flex-direction: column; min-height: 220px; padding: clamp(22px, 3vw, 34px); border-radius: 22px; }
.hcell.dark { background: var(--fg); color: #fff; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.hcell.dark:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.hcell.dark .label { color: rgba(255,255,255,0.65); }
.hcell.dark .dot { background: #fff; }
.hbig { display: flex; align-items: center; gap: 14px; font-weight: 300; font-size: clamp(1.9rem, 4.2vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.08; margin-top: auto; padding-top: 28px; }
.hcell.dark .hbig { font-weight: 700; letter-spacing: -0.02em; }
.hsub { margin-top: 8px; }
.hcell .label + .hbig { margin-top: auto; }
.hcell .go { position: absolute; top: clamp(18px, 3vw, 30px); right: clamp(22px, 3vw, 34px); font-style: normal; font-size: 1.4rem; transition: transform 0.25s var(--ease); }
a.hcell:hover .go { transform: translateX(4px); }
@media (max-width: 620px) {
  .home { grid-template-columns: 1fr; gap: 14px; }
  .hcell { min-height: 150px; }
  .rail-i { width: 48px; font-size: 0.54rem; }
}

/* ================= round 2e: centred project title like the wordmark, calmer home ================= */
.phd { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 0.3em; text-align: center; padding: 26px 0 30px; line-height: 1.2; }
.phd b, .phd span { font-size: 1.35rem; letter-spacing: -0.03em; color: var(--fg); }
.phd b { font-weight: 700; }
.phd span { font-weight: 300; }
.hcell { min-height: 150px; padding: 24px 26px; }
.hbig { font-size: clamp(1.3rem, 2.1vw, 1.65rem); letter-spacing: -0.02em; line-height: 1.2; padding-top: 22px; }
.hcell.dark .hbig { letter-spacing: -0.01em; }
.hsub { margin-top: 4px; font-size: 0.95rem; }
.hcell .go { top: 20px; right: 24px; font-size: 1.1rem; }
@media (max-width: 620px) {
  .phd { padding: 14px 0 14px; }
  .phd b, .phd span { font-size: 1.15rem; }
  .hcell { min-height: 120px; }
}

/* the project title and client name stay together on one line, centred on the whole page (not on the area beside the rail) */
.phd { flex-wrap: nowrap; white-space: nowrap; transform: translateX(-58px); }
@media (max-width: 620px) {
  .phd { transform: none; flex-wrap: wrap; white-space: normal; }
}

/* home: milestone name in bold above its date */
.hname { font-weight: 700; letter-spacing: -0.01em; }
.hbig + .hbig { margin-top: 2px; padding-top: 0; }


/* the rail always fits the screen height: sign out stays visible, the middle part shrinks first and scrolls as a last resort */
.rail-solo { flex: none; }
.rail-set { min-height: 0; overflow-y: auto; scrollbar-width: none; }
.rail-set::-webkit-scrollbar { display: none; }
.rail-set .rail-i { flex: none; }
@media (max-height: 820px) and (min-width: 621px) {
  .rail { top: 10px; bottom: 10px; gap: 8px; }
  .rail-set { padding: 8px 6px; gap: 0; }
  .rail-i { padding: 4px 0; gap: 2px; }
  .rb { width: 38px; height: 38px; }
}
@media (max-height: 620px) and (min-width: 621px) {
  .rail { gap: 4px; }
  .rail-i { font-size: 0.58rem; padding: 2px 0; }
  .rb { width: 32px; height: 32px; }
  .rb .ic { width: 17px; height: 17px; }
}

/* ================= round 2f: thin rail, as wide as the circles; a knob in a notch marks the current page ================= */
.rail { --rb: 44px; }
.rb { width: var(--rb); height: var(--rb); }
.rail-set { padding: 8px 0; gap: 2px; overflow: visible; border-radius: 999px; width: calc(var(--rb) + 2px); align-items: center; }
.rail-set .rail-i { position: relative; width: var(--rb); padding: 0; gap: 0; }
.rail-set .rail-i > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rail-set .rail-i .rb, .rail-set .rail-i.on .rb { background: none; color: var(--fg); border-color: transparent; }
.rail-set .rail-i:not(.on):hover .rb { border-color: var(--line); }
.rail-set .rail-i.on::after {
  content: ""; position: absolute; right: -12px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 50%; background: var(--fg); box-shadow: 0 0 0 5px var(--bg);
}
.rail-set .rail-i.on .rb { transform: translateX(-5px); }
@media (max-height: 820px) and (min-width: 621px) { .rail { --rb: 38px; } .rail-set { padding: 6px 0; } .rail-set .rail-i { padding: 0; } }
@media (max-height: 620px) and (min-width: 621px) { .rail { --rb: 32px; } }
@media (max-width: 620px) {
  .rail { --rb: 40px; align-items: flex-start; }
  .rail-set { width: auto; height: calc(var(--rb) + 2px); padding: 0 8px; gap: 2px; margin-top: 10px; }
  .rail-set .rail-i { width: var(--rb); }
  .rail-set .rail-i.on::after { right: auto; left: 50%; top: auto; bottom: -12px; margin: 0 0 0 -11px; }
  .rail-set .rail-i.on .rb { transform: translateY(-4px); }
  .phd { padding-top: 22px; }
}

/* ================= round 2g: wider rail; the bar is only as tall as its icons and sits in the middle ================= */
@media (min-width: 621px) {
  .rail { --rb: 56px; left: 20px; width: 84px; justify-content: space-between; }
  .rail-solo { width: 84px; font-size: 0.7rem; }
  .rail > [data-action="logout"] { margin-top: auto; }
  .rail-set { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); flex: none; padding: 10px 0; gap: 6px; }
  .rail .ic { width: 24px; height: 24px; }
  .rail-set .rail-i.on::after { right: -14px; width: 26px; height: 26px; margin-top: -13px; box-shadow: 0 0 0 6px var(--bg); }
  .rail-set .rail-i.on .rb { transform: translateX(-6px); }
  .main.railed { padding-left: 132px; }
  .phd { transform: translateX(-66px); }
}
@media (max-height: 820px) and (min-width: 621px) { .rail { --rb: 48px; } .rail-set { gap: 4px; padding: 8px 0; } }
@media (max-height: 620px) and (min-width: 621px) { .rail { --rb: 40px; } .rail-set { gap: 0; padding: 6px 0; } .rail .ic { width: 20px; height: 20px; } }

/* ================= round 2h: the bar is one drawn shape; its outline follows the notch of the knob ================= */
@media (min-width: 621px) {
  .rail { --w: 72px; --rb: 48px; width: var(--w); left: 20px; align-items: center; justify-content: flex-start; gap: 12px; }
  .rail-solo { width: var(--w); flex: none; font-size: 0.68rem; }
  .rail-solo .rb { width: var(--w); height: var(--w); }
  .rail > [data-action="logout"] { margin-top: 0; }
  .rail-set {
    position: relative; top: auto; left: auto; transform: none; flex: 1; min-height: 0; width: var(--w);
    padding: calc(var(--w) / 2 + 8px) 0; gap: 10px; justify-content: center;
    background: none; border: 0; border-radius: 0; overflow: visible;
  }
  .rail-bg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
  .rail-set .rail-i { z-index: 1; }
  .rail-set .rail-i.on .rb { transform: none; }
  .rail-set .rail-i:not(.on):hover .rb { border-color: transparent; }
  .rail-set .rail-i::before { content: none; }
  .rail-set .rail-i.on::after, .rail-set .rail-i.hov::after {
    content: ""; position: absolute; right: calc((var(--rb) - var(--w)) / 2 - 14px); top: 50%; width: 26px; height: 26px; margin-top: -13px;
    border-radius: 50%; background: var(--fg); box-shadow: none;
  }
  .rail-set .rail-i.hov:not(.on)::after { background: #b4b4ba; }
  .main.railed { padding-left: 124px; }
  .phd { transform: translateX(-62px); }
}
@media (max-height: 700px) and (min-width: 621px) {
  .rail { --w: 60px; --rb: 40px; gap: 8px; }
  .rail-set { gap: 4px; padding: calc(var(--w) / 2 + 4px) 0; }
  .rail-solo { font-size: 0.6rem; }
}
@media (min-width: 621px) { .rail-set .rail-i.hov.nohov:not(.on)::after { content: none; } }

/* home: every date the same size; smaller Projecten and Afmelden circles */
.hcell.dark .hbig { font-weight: 300; letter-spacing: -0.02em; }
.hcell.dark .hbig.hname { font-weight: 700; letter-spacing: -0.01em; }
@media (min-width: 621px) {
  .rail-solo .rb { width: 52px; height: 52px; }
}
@media (max-height: 700px) and (min-width: 621px) {
  .rail-solo .rb { width: 44px; height: 44px; }
}

/* home: "excl. btw" sits behind the amount, on the same line */
.hbig.hline { align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hbig.hline small { font-size: 0.95rem; letter-spacing: 0; white-space: nowrap; }

img.cover { object-fit: cover; height: auto; }
img.pdf-page { height: auto; }

/* ================= scrollbars: thin, rounded, no arrows ================= */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 999px; border: 4px solid transparent; background-clip: padding-box; min-height: 48px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.38); border: 4px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
/* inside a rounded panel the scrollbar stays clear of the rounded corners */
.modal::-webkit-scrollbar-track { margin: 26px 0; }
.modal { scrollbar-gutter: stable; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.25) transparent; }
}

/* an opened milestone: a clear way back, top left */
.phase-back { margin-bottom: 28px; background: var(--card); }
.phase-head { padding-right: 0; }
.phase-in { padding-top: clamp(22px, 4vh, 44px); }

/* ================= project choice and login: centred title, image per project, small wordmark at the bottom ================= */
.ppage { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 48px) 130px; }
.phd.phd-solo { transform: none; padding-bottom: 34px; }
.pcard { padding: 0; min-height: 0; display: block; overflow: hidden; }
.pimg { aspect-ratio: 16 / 9; background: #e9e9ed; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pbody { padding: 22px 26px 26px; }
.pcard h2 { display: block; font-size: 1.35rem; }
.pbody .meta { margin-top: 4px; }
.foot-wm { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); font-size: 1.05rem; pointer-events: none; }
.solo-out { position: fixed; left: 20px; bottom: 16px; z-index: 30; width: 72px; font-size: 0.68rem; }
.solo-out .rb { width: 52px; height: 52px; }
.login-sub { margin: 0 0 28px; }
@media (max-width: 620px) {
  .solo-out { left: 8px; bottom: 8px; }
  .foot-wm { bottom: 28px; }
}
/* project choice: the wordmark closes the page, under the last project; with few projects it sits at the bottom of the screen */
.ppage { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 0; }
.ppage .foot-wm { position: static; transform: none; display: block; margin-top: auto; padding: 64px 0 22px; text-align: center; }
@media (max-width: 620px) {
  .ppage .foot-wm { padding: 72px 0 28px; }
}

/* login: the portal name in Bold */
.login .login-sub { font-weight: 700; color: var(--fg); font-size: 1.35rem; letter-spacing: -0.03em; }

/* project choice: a larger page title */
.phd.phd-solo { padding-top: 34px; }
.phd.phd-solo b { font-size: clamp(1.9rem, 3.4vw, 2.4rem); }

/* ================= home: the latest milestone as the main picture, then a quiet row of three ================= */
.home2 { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.pcard.hero .pimg { aspect-ratio: 16 / 7; }
.hero-b { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.hero-b .label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hero-date { margin-top: 4px; }
.hero-b .go { font-style: normal; font-size: 1.2rem; transition: transform 0.25s var(--ease); }
a.hero:hover .go { transform: translateX(4px); }
.hero-dark { min-height: 170px; }
.hrow { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.hrow.two { grid-template-columns: 1fr 1fr; }
.hsm { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 104px; padding: 18px 22px; }
.hsm .label { padding-right: 28px; }
.hsm-title { display: block; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.25; margin-top: auto; }
.hsm-val { display: block; }
.hsm-title + .hsm-val { margin-top: -6px; }
.hsm-val small { font-size: 0.85rem; white-space: nowrap; }
.hsm .go { position: absolute; top: 14px; right: 20px; font-style: normal; font-size: 1.05rem; transition: transform 0.25s var(--ease); }
a.hsm:hover .go { transform: translateX(4px); }
@media (max-width: 900px) { .hrow, .hrow.two { grid-template-columns: 1fr 1fr; } .hrow > :first-child:nth-last-child(3) { grid-column: 1 / -1; } }
@media (max-width: 620px) {
  .home2 { gap: 14px; }
  .hrow, .hrow.two { grid-template-columns: 1fr; gap: 14px; }
  .pcard.hero .pimg { aspect-ratio: 16 / 10; }
  .hero-dark { min-height: 140px; }
}

/* ================= decisions and comments are one: post-its, each with its own colour ================= */
.postit.right { align-self: flex-end; }
.ptitle2 { display: block; font-family: var(--font); font-weight: 700; font-size: 0.95rem; line-height: 1.3; margin-bottom: 6px; }
.plinks { font-family: var(--font); font-weight: 700; font-size: 0.8rem; margin-top: 8px; }
.plinks a { text-decoration: underline; text-underline-offset: 3px; }

/* invoices: the total as a quiet sum under the list */
.inv-sum { display: flex; align-items: baseline; justify-content: flex-end; gap: 20px; margin-top: 18px; padding: 18px 74px 0 24px; border-top: 1px solid var(--line); }
.inv-sum-v small { font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 620px) { .inv-sum { padding: 16px 18px 0; justify-content: space-between; } }

/* ================= concepts live in a milestone ================= */

/* the compact block under the presentation: small tiles, the whole card opens the gallery */
.cblock { display: block; padding: 18px 20px 20px; }
.cb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cb-head .label { display: flex; align-items: center; gap: 8px; }
.cb-head .ic { width: 16px; height: 16px; }
.cb-head .go { font-style: normal; font-size: 1.1rem; transition: transform 0.25s var(--ease); }
a.cblock:hover .go { transform: translateX(4px); }
.cb-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 12px; }
.ct { display: block; min-width: 0; }
.ct-im { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e9e9ed; font-size: 1.05rem; }
.ct-im img { width: 100%; height: 100%; object-fit: cover; }
.ct b { display: block; margin-top: 8px; font-size: 0.85rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct b .dot { margin-left: 6px; vertical-align: middle; }
.ct > i { display: block; min-height: 1.2em; font-style: normal; font-weight: 700; font-size: 0.72rem; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct > i.on { color: var(--fg); }
.ct.rejected .ct-im, .ct.rejected b { opacity: 0.45; }
.ct.more.m { display: none; }
.cb-grid.over-d .ct:nth-child(10) { display: none; }

/* the gallery and one concept large, in the white panel */
.status.earlier { color: var(--muted); }
.modal .cgrid { margin-top: 4px; }
.cback { margin-bottom: 18px; }
.cname { font-size: clamp(1.5rem, 3vw, 2rem); }
.modal .cp-title h2 { margin: 0; }
.modal .cp .thread { max-width: none; }

/* the evolution of a concept: one tile per milestone, oldest first */
.vstrip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 16px; }
.vs { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); cursor: pointer; text-align: left; opacity: 0.6; transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease); }
.vs.on, .vs:hover { opacity: 1; border-color: var(--fg); }
.vs-im { flex: none; width: 52px; height: 40px; border-radius: 10px; overflow: hidden; background: #e9e9ed; }
.vs-im img { width: 100%; height: 100%; object-fit: cover; }
.vs-t { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.vs-t b { font-size: 0.85rem; }
.vs-t span { font-weight: 700; font-size: 0.72rem; color: var(--muted); }

@media (max-width: 620px) {
  .cb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cb-grid.over-m .ct:nth-child(n+9) { display: none; }
  .cb-grid.over-m .ct.more.m { display: block; }
  .ct.more.d { display: none; }
}

/* on a narrow tile the status may take two lines instead of being cut off */
.ct > i { white-space: normal; overflow: visible; }

/* previous / next milestone, in one row with the back button of an opened milestone */
.phase-top { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.phase-top .phase-back { margin: 0 6px 0 0; }
.pnav {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  display: flex; align-items: center; justify-content: center; transition: border-color 0.25s var(--ease);
}
.pnav:hover { border-color: var(--fg); }
.pnav.off { visibility: hidden; }

/* from one milestone to the next: the row with the buttons stays, the content slides.
   The old milestone stays underneath until the new one is in place, so the page behind never shows. */
.phase { overflow-x: hidden; }
.phase.swap { animation: none; }
.phase.from-l, .phase.from-r { background: transparent; }
.phase.to-l, .phase.to-r { pointer-events: none; }
.phase.to-l .phase-top, .phase.to-r .phase-top { visibility: hidden; }
.phase.from-r .phase-head, .phase.from-r .phase-grid { animation: ph-in-r 0.55s var(--ease) both; }
.phase.from-l .phase-head, .phase.from-l .phase-grid { animation: ph-in-l 0.55s var(--ease) both; }
.phase.to-l .phase-head, .phase.to-l .phase-grid { animation: ph-out-l 0.55s var(--ease) both; }
.phase.to-r .phase-head, .phase.to-r .phase-grid { animation: ph-out-r 0.55s var(--ease) both; }
@keyframes ph-in-r { from { transform: translateX(100vw); } }
@keyframes ph-in-l { from { transform: translateX(-100vw); } }
@keyframes ph-out-l { to { transform: translateX(-100vw); } }
@keyframes ph-out-r { to { transform: translateX(100vw); } }
@media (prefers-reduced-motion: reduce) {
  .phase.from-l, .phase.from-r { background: var(--bg); }
}

/* timeline: no overview bar; the line scrolls sideways with the same thin scrollbar as the presentation viewer */
.main:has(> .tlx) { padding-bottom: 14px; }
.tlx { min-height: calc(100vh - 96px - 14px); }
.tlx::-webkit-scrollbar-track { margin: 0 72px; }
@media (max-width: 620px) {
  .tlx { min-height: 300px; }
  .tlx::-webkit-scrollbar-track { margin: 0 24px; }
}

/* opened milestone: the back button is white like the arrows, and all three are a little larger */
.phase-top { gap: 10px; }
.phase-top .phase-back { background: var(--card); min-height: 46px; padding: 0 22px; font-size: 0.95rem; margin-right: 4px; }
.pnav { width: 46px; height: 46px; }
.pnav .ic { width: 22px; height: 22px; }

/* the bar is only as tall as its icons (plus room for the notch) and sits in the middle, between Projects and Sign out */
@media (min-width: 621px) {
  .rail-set { flex: 0 0 auto; margin: auto 0; }
}

/* photos of a milestone: the card opens the gallery, the round icon beside the count downloads them */
.photos { padding: 0 16px 0 0; gap: 14px; }
.photos-open { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 2px 20px 22px; }
.photos .ico { cursor: pointer; color: inherit; padding: 0; }
.phase .photos:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

/* the content sits in the middle of the whole page, like the title above it, not in the middle of the area beside the rail.
   The same room as the rail takes on the left is kept free on the right; the timeline still runs to the edge of the screen. */
@media (min-width: 1100px) {
  .main.railed { padding-right: 124px; }
  .main.railed > .tlx { margin-right: -124px; }
  .main.railed .phd { transform: none; }
}

/* ---- pictures under a milestone card: three peek out from under it; hovering deals them all out, like cards ---- */
.peek {
  --gap: 8px;
  --tw: calc((var(--colw) - (var(--cols) - 1) * var(--gap)) / var(--cols));
  --th: calc(var(--tw) * 0.72);
  position: absolute; left: 0; right: 0; top: 100%; z-index: 0; pointer-events: none;
  height: calc(var(--rows) * (var(--th) + var(--gap)) + 14px);
}
.peek img {
  position: absolute; left: 50%; top: 0; width: 64px; height: 46px; object-fit: cover; pointer-events: auto;
  border-radius: 10px; border: 2px solid #fff; background: #e9e9ed; box-shadow: 0 3px 10px rgba(0,0,0,0.14);
  transform: translate(calc(-50% + var(--s) * 38px), calc(-11px - var(--s) * var(--s) * 5px)) rotate(calc(var(--s) * 7deg));
  transition: transform 0.55s var(--ease), width 0.55s var(--ease), height 0.55s var(--ease), opacity 0.3s var(--ease), box-shadow 0.55s var(--ease);
}
.peek img:nth-child(2) { z-index: 1; }
.peek img.more { opacity: 0; }
.peek-n {
  position: absolute; left: calc(50% + 82px); top: 9px; font-style: normal; font-weight: 700; font-size: 0.68rem; color: var(--muted);
  transition: opacity 0.25s var(--ease);
}
/* only with a real pointer and on the lying timeline: on a phone the milestones are stacked and there is no hover */
@media (hover: hover) and (min-width: 621px) {
  .col:hover .peek { pointer-events: auto; }
  .col:hover .peek img {
    width: var(--tw); height: var(--th); opacity: 1; box-shadow: 0 8px 22px rgba(0,0,0,0.14);
    transform: translate(calc(-50% + var(--c) * (var(--tw) + var(--gap))), calc(14px + var(--r) * (var(--th) + var(--gap)))) rotate(calc(var(--t) * 1deg));
    transition-delay: calc(var(--i) * 28ms);
  }
  .col:hover .peek-n { opacity: 0; }
  .tlx.dragging .peek { pointer-events: none; }
}

/* timeline: the nodes on the line a little smaller */
.node { width: 14px; height: 14px; margin: -7px 0 0 -7px; }

/* ================= phone: everything in one column, and the timeline stands upright ================= */
@media (max-width: 620px) {
  /* timeline: the line runs down the left, one milestone under the other; the page scrolls, the timeline itself does not */
  .tlx { display: block; overflow: visible; min-height: 0; padding: 6px 0 20px; cursor: default; -webkit-mask-image: none; mask-image: none; }
  .tlx-track { flex-direction: column; align-items: stretch; width: auto; gap: 14px; padding: 0 16px 0 46px; }
  .tlx-line, .tlx-past { left: 22px; width: 2px; top: auto; height: auto; }
  .col { flex: none; width: auto; padding-top: 0; }
  .node { left: -23px; top: 50%; }
  .notch { display: none; }
  .hcard { min-height: 0; padding: 16px 18px; text-align: left; align-items: flex-start; }
  .hcard h3 { font-size: 1.1rem; }
  .hcard .meta { margin-top: 3px; }
  /* the pictures tucked under a card need room of their own in the column */
  .col:has(.peek) { margin-bottom: 36px; }
  .peek { --tw: 64px; }

  /* project choice and users: the round buttons sit at the top of the page and scroll away with it */
  .ppage { position: relative; }
  .solo-out, .solo-users, .solo-back { position: absolute; top: 10px; bottom: auto; width: 60px; font-size: 0.58rem; }
  .solo-out { left: auto; right: 6px; }
  .solo-users, .solo-back { left: 6px; right: auto; }
  .solo-out .rb, .solo-users .rb, .solo-back .rb { width: 44px; height: 44px; }
  .phd.phd-solo { padding-top: 78px; }
}

/* phone and touch: nothing lifts, fans out or slides on hover. A finger has no hover, and after a tap the effect would stay stuck. */
@media (max-width: 620px), (hover: none) {
  .btn:hover, a.card:hover, .row:hover, .col:hover > .card.hcard, .hcell.dark:hover, .clip:hover { transform: none; }
  a.card:hover, .row:hover, .col:hover > .card.hcard, .col.sel:hover .hcard, .col > a.card:hover, .phase a.card:hover, .hcell.dark:hover, .phase .photos:hover { box-shadow: none; }
  a.fact:hover .go, a.hcell:hover .go, a.hero:hover .go, a.hsm:hover .go, a.cblock:hover .go { transform: none; }
  .photos:hover .stack img { transform: rotate(calc((var(--i) - 1.5) * 3deg)); }
}
@media (hover: none) and (min-width: 621px) {
  .phase .photos:hover .stack img { margin-left: -58px; }
  .phase .photos:hover .stack img:first-child { margin-left: 0; }
}

/* phone, inside a project: Projects in the left corner, Sign out in the right corner, a roomier bar between them, no project title */
@media (max-width: 620px) {
  .rail { position: relative; left: 0; top: 0; bottom: auto; width: auto; justify-content: flex-start; padding: 10px 10px 0; min-height: 80px; }
  .rail > [data-action="logout"] { margin-left: auto; }
  .rail-set { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 0 18px; gap: 14px; }
  .main.railed .phd { display: none; }
  .main.railed { padding-top: 16px; }
}

/* phone: the bar is taller, so the current page's knob has room under the icon and the icon itself stays where it is */
@media (max-width: 620px) {
  .rail { min-height: 92px; }
  .rail-set { height: 58px; align-items: flex-start; }
  .rail-set .rail-i.on .rb { transform: none; }
  .rail-set .rail-i.on::after { bottom: -28px; }
}

/* login and password pages: the rule under a password field, the privacy link, a refused file in a note */
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 0.8rem; font-weight: 300; }
.login-priv { margin-top: 22px; text-align: center; font-size: 0.8rem; }
.login-priv a { color: var(--muted); }
.login-priv a:hover { text-decoration: underline; }
.com-err { color: var(--danger); font-size: 0.85rem; }

/* a note with files: a file that is still on its way, and "post" that waits for it */
.fpill.up { opacity: .65; cursor: default; }
.com-form .btn:disabled { opacity: .5; cursor: default; }

/* the sign-in button while it waits for the server */
.login-box .btn:disabled { opacity: .6; cursor: default; }
