/* Soft gradient backdrop, a floating menu bar, frosted rounded cards, and one
   color per kind of work (pink = social, orange = Meta ads, green = virtual assistant).
   Nothing tilts; hover is a gentle lift. */
:root {
  --ink: #16121f;
  --muted: #5d5670;
  --line: rgba(22, 18, 31, 0.1);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-edge: rgba(255, 255, 255, 0.95);
  --field: rgba(255, 255, 255, 0.8);
  --panel: #fdfbff;
  --base: #fbf8ff;
  --g1: #ffd6c4; --g2: #d9ccff; --g3: #c6ecff;
  --hi: linear-gradient(90deg, #ff6a3d, #ff3d9a, #7b5cff);
  --accent: #e0367f;
  --accent-ink: #ffffff;
  --danger: #c0262d;
  --scrim: rgba(22, 18, 31, 0.45);
  --shadow: 0 10px 30px rgba(60, 40, 120, 0.08);
  --shadow-hover: 0 22px 44px rgba(60, 40, 120, 0.16);
  --pink-bg: #ffe0ef;   --pink-ink: #a3175b;   --pink: #ff5ca8;
  --orange-bg: #ffe6d6; --orange-ink: #a3410f; --orange: #ff8a3d;
  --green-bg: #dcf6ea;  --green-ink: #0c6b45;  --green: #3ddc97;
  --purple-bg: #ebe4ff; --purple-ink: #5a33c7; --purple: #8b6cff;
  --blue-bg: #dcefff;   --blue-ink: #0f5596;   --blue: #4fa8ff;
  --yellow-bg: #fff3c4; --yellow-ink: #7a5600; --yellow: #ffd23f;
  --gray-bg: #ecebf0;   --gray-ink: #4a4558;   --gray: #a9a4b8;
  --f-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3effa; --muted: #a9a2bd; --line: rgba(255, 255, 255, 0.1);
    --glass: rgba(32, 27, 44, 0.62); --glass-strong: rgba(32, 27, 44, 0.9); --glass-edge: rgba(255, 255, 255, 0.08); --field: rgba(255, 255, 255, 0.06); --panel: #1c1828;
    --base: #0e0c14; --g1: #3d1f2c; --g2: #2a2152; --g3: #12324a;
    --accent: #ff6aa9; --accent-ink: #1a0d14; --danger: #ff8a80; --scrim: rgba(0, 0, 0, 0.6);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35); --shadow-hover: 0 22px 44px rgba(0, 0, 0, 0.5);
    --pink-bg: #4a1630; --pink-ink: #ffb3d4; --orange-bg: #4a2412; --orange-ink: #ffc29e; --green-bg: #0f3d2b; --green-ink: #8ff0c3; --purple-bg: #2f2160; --purple-ink: #cbbcff; --blue-bg: #0f2f4f; --blue-ink: #a9d6ff; --yellow-bg: #43360a; --yellow-ink: #ffe28a; --gray-bg: #2a2733; --gray-ink: #cfcad9;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f3effa; --muted: #a9a2bd; --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(32, 27, 44, 0.62); --glass-strong: rgba(32, 27, 44, 0.9); --glass-edge: rgba(255, 255, 255, 0.08); --field: rgba(255, 255, 255, 0.06); --panel: #1c1828;
  --base: #0e0c14; --g1: #3d1f2c; --g2: #2a2152; --g3: #12324a;
  --accent: #ff6aa9; --accent-ink: #1a0d14; --danger: #ff8a80; --scrim: rgba(0, 0, 0, 0.6);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35); --shadow-hover: 0 22px 44px rgba(0, 0, 0, 0.5);
  --pink-bg: #4a1630; --pink-ink: #ffb3d4; --orange-bg: #4a2412; --orange-ink: #ffc29e; --green-bg: #0f3d2b; --green-ink: #8ff0c3; --purple-bg: #2f2160; --purple-ink: #cbbcff; --blue-bg: #0f2f4f; --blue-ink: #a9d6ff; --yellow-bg: #43360a; --yellow-ink: #ffe28a; --gray-bg: #2a2733; --gray-ink: #cfcad9;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60vw 60vw at 0% 0%, var(--g1) 0%, transparent 60%),
    radial-gradient(55vw 55vw at 100% 10%, var(--g2) 0%, transparent 60%),
    radial-gradient(70vw 50vw at 50% 100%, var(--g3) 0%, transparent 60%),
    var(--base);
  background-attachment: fixed;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mono { font-family: var(--f-mono); font-size: 12px; }
.glass { background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); }

/* floating menu bar */
.nav { position: sticky; top: 12px; z-index: 30; margin: 12px auto 0; max-width: 1100px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 20px; border-radius: 999px; }
.nav .brand { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#bar { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; min-width: 0; }
#bar::-webkit-scrollbar { display: none; }
.chip { border: 0; background: transparent; border-radius: 999px; padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; transition: background 0.15s, color 0.15s; }
.chip:hover { color: var(--ink); background: var(--glass-strong); }
.chip .n { font-size: 11px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--base); }
@media (max-width: 560px) { .nav .brand { display: none; } .nav { padding-left: 8px; } }

.wrap { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 36px; padding-block: 8px 48px; }

/* header: round headshot on the left, name, tagline and button on the right */
#hd { display: flex; align-items: center; gap: clamp(18px, 4vw, 40px); padding: clamp(40px, 7vw, 88px) clamp(4px, 2vw, 24px) 8px; max-width: 900px; }
.headshot { flex: 0 0 auto; width: clamp(96px, 16vw, 168px); aspect-ratio: 1; border-radius: 50%; padding: 4px; background: conic-gradient(from 200deg, #ff7a59, #ff4fa3, #8b5cff, #4fc3ff, #ff7a59); box-shadow: var(--shadow); }
.headshot img, .headshot span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--base); border: 3px solid var(--base); }
.headshot span { font-weight: 800; font-size: clamp(28px, 5vw, 48px); letter-spacing: -0.02em; }
.intro { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
h1 { margin: 0; font-weight: 800; font-size: clamp(2.2rem, 6vw, 4.4rem); letter-spacing: -0.045em; line-height: 1; text-wrap: balance; background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 55%, #b83a8a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.06em; }
.tag { margin: 0; font-size: clamp(1rem, 1.9vw, 1.25rem); color: var(--muted); max-width: 46ch; line-height: 1.45; }
.cta { margin-top: 4px; padding: 12px 22px; font-size: 15px; box-shadow: 0 8px 24px rgba(224, 54, 127, 0.25); }
@media (max-width: 560px) {
  #hd { gap: 16px; align-items: flex-start; }
  .headshot { width: 84px; padding: 3px; }
  .headshot img, .headshot span { border-width: 2px; }
  h1 { font-size: 2rem; }
  .cta { align-self: stretch; justify-content: center; }
}
.eyebrow { margin: 0; }

/* category pills: pale color with dark text of the same color */
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; background: var(--gray-bg); color: var(--gray-ink); }
[data-color="pink"] { --c-bg: var(--pink-bg); --c-ink: var(--pink-ink); --c: var(--pink); }
[data-color="orange"] { --c-bg: var(--orange-bg); --c-ink: var(--orange-ink); --c: var(--orange); }
[data-color="green"] { --c-bg: var(--green-bg); --c-ink: var(--green-ink); --c: var(--green); }
[data-color="purple"] { --c-bg: var(--purple-bg); --c-ink: var(--purple-ink); --c: var(--purple); }
[data-color="blue"] { --c-bg: var(--blue-bg); --c-ink: var(--blue-ink); --c: var(--blue); }
[data-color="yellow"] { --c-bg: var(--yellow-bg); --c-ink: var(--yellow-ink); --c: var(--yellow); }
[data-color="gray"] { --c-bg: var(--gray-bg); --c-ink: var(--gray-ink); --c: var(--gray); }
.pill[data-color] { background: var(--c-bg); color: var(--c-ink); }

/* grid */
/* mixed-height grid: common.js deals the cards into columns */
#grid { display: flex; gap: 22px; align-items: flex-start; }
#grid .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; border-radius: 24px; padding: 10px; background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.cover { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--glass-strong); }
.cover[data-shape="reel"] { aspect-ratio: 9 / 16; }
.cover[data-shape="doc"] { aspect-ratio: 8.5 / 11; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kind { position: absolute; right: 10px; top: 10px; z-index: 1; background: rgba(22, 18, 31, 0.7); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s; animation: rise 0.5s cubic-bezier(.2,.7,.2,1) both; }
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
  .cover img { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
  .card:hover .cover img { transform: scale(1.03); }
  .card:nth-child(2) { animation-delay: 0.05s; } .card:nth-child(3) { animation-delay: 0.1s; }
  .card:nth-child(4) { animation-delay: 0.15s; } .card:nth-child(n+5) { animation-delay: 0.2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 6px 0; }
.meta .date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.card h3 { margin: 0; padding: 4px 6px 6px; font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; gap: 6px; color: var(--ink); }
.ph { background: linear-gradient(160deg, var(--c-bg, var(--gray-bg)), var(--c, var(--gray))); }
.ph b { font-size: 1.4rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.ph span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--glass-strong); color: var(--ink); font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.badge.off { background: var(--danger); color: #fff; }
.empty, .loading { flex: 1; grid-column: 1 / -1; padding: 64px 0; color: var(--muted); text-align: center; }

/* footer */
#ft { max-width: 1100px; margin: 0 auto; padding: 8px 0 48px; color: var(--muted); font-size: 13px; text-align: center; }

/* owner panel */
#owner { border-radius: 28px; padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 20px; background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); }
#owner[hidden] { display: none; }
.op-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.op-head h2 { margin: 0; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; }
.form { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
@media (max-width: 640px) { .form { grid-template-columns: minmax(0, 1fr); } }
.drop { border: 1.5px dashed var(--line); border-radius: 18px; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; cursor: pointer; position: relative; overflow: hidden; color: var(--muted); font-size: 13px; background: var(--field); max-width: 220px; transition: border-color 0.15s; }
.drop.over, .drop:hover { border-color: var(--accent); color: var(--ink); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; }
@media (max-width: 640px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.fields .wide { grid-column: 1 / -1; }
label.f, div.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
input[type="text"], input[type="url"], input[type="date"], select, textarea { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0; font-family: var(--f-body); font-size: 15px; font-weight: 400; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; }
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); font-weight: 500; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.btn { border: 1px solid var(--ink); background: var(--ink); color: var(--base); border-radius: 999px; padding: 10px 20px; font-weight: 700; font-size: 14px; cursor: pointer; transition: opacity 0.15s, background 0.15s, border-color 0.15s, transform 0.15s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:hover { opacity: 0.9; }
.btn.accent { background: var(--hi); border-color: transparent; color: #fff; }
.btn.ghost { background: var(--glass-strong); color: var(--ink); border-color: var(--line); font-weight: 600; }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: progress; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.note { font-size: 13px; color: var(--muted); margin: 0; }
.note.warn { color: var(--danger); }
#status { min-height: 1.4em; font-size: 13px; color: var(--muted); }
.share { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; margin: 0; }
.share code { font-family: var(--f-mono); font-size: 12px; color: var(--ink); background: var(--field); padding: 2px 6px; border-radius: 6px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }
.top-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.top-links a { color: var(--accent); text-decoration: none; }
.top-links a:hover { text-decoration: underline; }

/* detail view */
#lb { position: fixed; inset: 0; z-index: 50; background: var(--scrim); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
#lb[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .lb-in { animation: pop 0.25s cubic-bezier(.2,.7,.2,1); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
.lb-in { position: relative; display: grid; grid-template-columns: minmax(0, auto) minmax(240px, 340px); gap: 32px; align-items: center; max-width: 1040px; width: 100%; margin: auto; background: var(--panel); border: 1px solid var(--glass-edge); border-radius: 28px; padding: clamp(14px, 3vw, 24px); box-shadow: 0 30px 80px rgba(30, 20, 60, 0.3); }
@media (max-width: 760px) {
  .lb-in { grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
  .lb-img img { max-height: 62vh; }
}
.lb-img { max-width: 100%; }
.lb-img img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: 18px; margin: 0 auto; }
.lb-in[data-shape="reel"] .lb-img .ph { aspect-ratio: 9 / 16; }
.lb-in[data-shape="doc"] .lb-img .ph { aspect-ratio: 8.5 / 11; }
.lb-img .ph { aspect-ratio: 4 / 5; width: min(100%, 440px); border-radius: 18px; margin: 0 auto; }
.lb-info { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; padding: 4px 8px 4px 0; }
.lb-info h2 { margin: 0; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.desc { margin: -4px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.lb-nav { display: flex; gap: 8px; margin-top: 4px; }
.lb-nav .btn { padding: 10px 16px; }
.lb-owner { align-self: stretch; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.lb-owner .file-btn { position: relative; overflow: hidden; }
.lb-owner .file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lb-owner select#lb-fit { width: auto; }
.x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 20px; line-height: 1; }
@media (max-width: 760px) { .x { top: 22px; right: 22px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); } }

/* category manager (private page) */
.cats { display: flex; flex-direction: column; gap: 10px; }
.cat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 130px auto; gap: 8px; align-items: center; padding: 8px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); }
.cat-row .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); margin: 0 4px; }
.cat-row .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-row .btn { padding: 8px 12px; font-size: 13px; }
.cat-row .count { font-size: 12px; color: var(--muted); }
.cat-row .move { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--danger); }
.cat-row .move select { width: auto; }
@media (max-width: 640px) { .cat-row { grid-template-columns: auto minmax(0, 1fr); } .cat-row select, .cat-row .acts { grid-column: 1 / -1; } }
details.panel > summary { cursor: pointer; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; list-style: none; display: flex; align-items: center; gap: 8px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: "▸"; font-size: 0.8em; transition: transform 0.15s; }
details.panel[open] > summary::before { transform: rotate(90deg); }
details.panel > .cats { margin-top: 14px; }

/* video and carousel marks on cards */
.play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(22, 18, 31, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); transition: transform 0.2s, background 0.2s; }
.play::after { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
.card:hover .play { transform: scale(1.08); background: rgba(224, 54, 127, 0.85); }
.kind.stack { display: inline-flex; align-items: center; gap: 5px; }
.kind.stack::before { content: ""; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 3px; box-shadow: 3px -3px 0 -1px rgba(22, 18, 31, 0.7), 3px -3px 0 1px #fff; }

/* detail view media: shown whole, at its own shape */
.lb-media { min-width: 0; display: flex; justify-content: center; }
.frame { width: min(100%, calc(80vh * var(--wr, 0.8))); }
.frame img, .frame video { display: block; width: 100%; height: auto; max-height: 80vh; border-radius: 18px; background: #000; object-fit: contain; }
.frame img { background: transparent; }
@media (max-width: 760px) { .frame { width: min(100%, calc(62vh * var(--wr, 0.8))); } .frame img, .frame video { max-height: 62vh; } }

/* carousel: swipe or use the arrows */
.car { position: relative; width: min(100%, calc(78vh * var(--wr, 0.8))); }
.car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 18px; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: var(--wr, 0.8); display: grid; place-items: center; background: var(--field); }
.slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: #16121f; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); display: grid; place-items: center; padding: 0 0 3px; transition: opacity 0.15s; }
.car-btn.prev { left: 10px; } .car-btn.next { right: 10px; }
.car-btn:disabled { opacity: 0; pointer-events: none; }
.car-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.car-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); transition: width 0.2s, background 0.2s; }
.car-dots span.on { width: 20px; border-radius: 4px; background: #fff; }
@media (max-width: 760px) { .car { width: min(100%, calc(60vh * var(--wr, 0.8))); } .car-btn { width: 34px; height: 34px; font-size: 22px; } }

/* private page: upload tray and settings */
.tray { display: flex; flex-wrap: wrap; gap: 8px; }
.tray .t { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--field); border: 1px solid var(--line); }
.tray .t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray .t button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(22, 18, 31, 0.75); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.tray .t .mv { top: auto; bottom: 3px; }
.tray .t .mv.l { right: auto; left: 3px; }
.drop.wide-drop { max-width: none; aspect-ratio: auto; min-height: 170px; flex-direction: column; gap: 6px; }
.drop.wide-drop b { color: var(--ink); font-size: 15px; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--hi); transition: width 0.2s; }
.links { display: grid; gap: 8px; }
.links .row code { font-family: var(--f-mono); font-size: 12px; background: var(--field); padding: 6px 10px; border-radius: 8px; overflow-wrap: anywhere; }
.hs-edit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hs-edit .headshot { width: 72px; padding: 3px; }

/* owner-only shortcut to the add page (see public.js) */
.edit-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 40; box-shadow: var(--shadow-hover); padding: 10px 16px; font-size: 13px; }

/* case studies: designed cover (no pictures needed) */
.case-cover { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; color: var(--c-ink, var(--ink));
  background: radial-gradient(120% 80% at 100% 0%, var(--c, var(--gray)) 0%, transparent 60%), linear-gradient(160deg, var(--c-bg, var(--gray-bg)), var(--base)); }
.case-cover .cc-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.case-cover b { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); }
.case-cover .cc-stat { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.case-cover .cc-stat strong { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--c-ink, var(--ink)); }
.case-cover .cc-stat em { font-style: normal; color: #0c6b45; }
.case-cover .cc-client { font-size: 13px; font-weight: 600; color: var(--muted); }
.kind.case { left: 10px; right: auto; background: var(--hi); }

/* case study page: one readable column, clear spacing, empty parts left out */
.lb-in.lb-case { display: block; max-width: 820px; padding: clamp(20px, 4vw, 44px); }
.cs { display: flex; flex-direction: column; gap: 30px; }
.cs header { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-right: 44px; }
.cs-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kind-inline { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.cs h2 { margin: 0; font-weight: 800; font-size: clamp(1.45rem, 3.4vw, 2.25rem); line-height: 1.12; letter-spacing: -0.035em; text-wrap: balance; overflow-wrap: anywhere; }
.cs h2.long { font-size: clamp(1.3rem, 2.9vw, 1.95rem); }
.cs-client { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.cs-role { margin: -4px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cs-role b { font-weight: 700; color: var(--ink); }
.cs-role span { margin: 0 2px; }
.cs-results { display: flex; flex-direction: column; gap: 14px; }
.cs-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cs-stats[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 340px) { .cs-stats { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .cs-stat { padding: 14px; } .cs-stat strong { font-size: 1.5rem; } }
.cs-stat { border-radius: 18px; padding: 18px 20px; background: var(--field); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cs-stat strong { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; background: var(--hi); -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; }
.m-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.m-sub { font-size: 12px; color: var(--muted); }
.m-sub b { font-weight: 700; color: var(--ink); }
.cs-more { border-radius: 14px; border: 1px solid var(--line); background: var(--field); }
.cs-more summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 14px; }
.cs-more > div { display: flex; flex-direction: column; padding: 0 16px 8px; }
.cs-more-row { display: grid; grid-template-columns: minmax(70px, auto) minmax(0, 1fr); gap: 2px 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.cs-more-row strong { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; grid-row: span 2; }
.cs-more-row .m-sub { grid-column: 2; }
.cs-sec h3, .cs-tools h3 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.cs-sec p, .cs-note p { margin: 0 0 10px; line-height: 1.65; max-width: 68ch; }
.cs-sec ul { margin: 0 0 10px; padding-left: 1.2em; line-height: 1.6; max-width: 68ch; }
.cs-sec li { margin-bottom: 4px; }
.cs-note { color: var(--muted); font-size: 15px; }
.cs-quote { margin: 0; padding: 22px 26px; border-radius: 20px; background: linear-gradient(135deg, var(--pink-bg), var(--purple-bg)); border: 1px solid var(--line); position: relative; }
.cs-quote p { margin: 0; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.2rem, 2.6vw, 1.5rem); line-height: 1.45; color: var(--ink); }
.cs-quote cite { display: block; margin-top: 12px; font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); }
.cs-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .cs-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .cs-gallery { grid-template-columns: minmax(0, 1fr); } }
.cs-gallery figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cs-thumb { all: unset; box-sizing: border-box; cursor: zoom-in; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform 0.2s, box-shadow 0.2s; }
.cs-thumb:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cs-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cs-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cs-gallery figcaption { font-size: 12px; color: var(--muted); line-height: 1.4; }
.cs-tools { padding-top: 6px; border-top: 1px solid var(--line); }
.cs-tools h3 { font-size: 11px; }
.cs-tools div { display: flex; flex-wrap: wrap; gap: 6px; }
.cs > .btn { align-self: flex-start; }
.lb-case .lb-nav, .lb-case .lb-owner { margin-top: 22px; }
/* cards: long titles stop at two lines */
.card h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.case-cover b { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* full-size picture viewer */
#gv { position: fixed; inset: 0; z-index: 60; background: rgba(12, 10, 18, 0.94); display: flex; flex-direction: column; color: #fff; }
#gv[hidden] { display: none; }
.gv-bar { display: flex; align-items: center; gap: 12px; padding: max(10px, env(safe-area-inset-top, 0px)) 14px 10px; font-size: 13px; font-weight: 700; }
.gv-bar .gv-hint { flex: 1; color: rgba(255, 255, 255, 0.6); font-weight: 500; }
.gv-bar .btn { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 20px; }
.gv-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 56px 12px; overflow: hidden; }
.gv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; cursor: zoom-in; background: #fff; }
#gv.zoom .gv-stage { overflow: auto; display: block; padding: 0 12px 12px; }
#gv.zoom .gv-stage img { max-width: none; max-height: none; cursor: zoom-out; }
.gv-cap { margin: 0; padding: 0 16px max(14px, env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.gv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: #16121f; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 0 4px; }
.gv-nav.prev { left: 8px; } .gv-nav.next { right: 8px; }
@media (max-width: 560px) { .gv-stage { padding: 0 8px 10px; } .gv-nav { width: 36px; height: 36px; font-size: 22px; top: auto; bottom: 70px; transform: none; } .gv-bar .gv-hint { display: none; } }

/* case study builder (private page) */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--base); }
.case-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; border-radius: 18px; background: var(--field); border: 1px solid var(--line); }
@media (max-width: 640px) { .case-fields { grid-template-columns: minmax(0, 1fr); } }
.case-fields .wide { grid-column: 1 / -1; }
.res-head, .res-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.7fr) minmax(0, 1.4fr) 44px auto; gap: 6px; align-items: center; }
.res-head { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.res-head span:nth-child(5) { text-align: center; }
.res-row { margin-top: 6px; }
.res-row input[type="text"] { padding: 8px 10px; font-size: 14px; }
.r-feat { display: grid; place-items: center; cursor: pointer; }
.r-feat input { position: absolute; opacity: 0; pointer-events: none; }
.r-feat span { font-size: 20px; color: var(--line); transition: color 0.15s; }
.r-feat input:checked + span { color: #f5a524; }
.r-feat input:focus-visible + span { outline: 2px solid var(--accent); border-radius: 4px; }
.r-acts { display: flex; gap: 4px; }
.r-acts button { width: 32px; height: 32px; padding: 0; justify-content: center; }
@media (max-width: 700px) {
  .res-head { display: none; }
  .res-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
  .res-row .r-label, .res-row .r-context { grid-column: span 2; }
  .res-row .r-acts { grid-column: 1 / -1; justify-content: flex-end; }
}
.count-note { font-size: 12px; font-weight: 500; color: var(--muted); }
.count-note.over { color: #a3410f; }
.gtray { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gt { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); }
.gt-img { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #fff; }
.gt-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gt .cap { padding: 6px 8px; font-size: 13px; }
.gt-acts { display: flex; align-items: center; gap: 4px; }
.gt-acts .note { flex: 1; text-align: center; }
.gt-acts button { width: 30px; height: 30px; padding: 0; justify-content: center; }
.editing-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: var(--pink-bg); color: var(--pink-ink); font-weight: 600; font-size: 14px; }

/* client testimonial cards and modal */
.qcard .qbody { position: relative; aspect-ratio: 1 / 1.1; border-radius: 16px; overflow: hidden; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 10px;
  background: radial-gradient(120% 70% at 100% 0%, var(--purple-bg) 0%, transparent 60%), linear-gradient(160deg, var(--pink-bg), var(--field)); border: 1px solid var(--glass-edge); }
.qmark { font-family: var(--f-serif); font-style: italic; line-height: 1; color: var(--accent); }
.qmark.big { font-size: 64px; height: 34px; margin: -6px 0 0 -4px; opacity: 0.55; }
.qtext { margin: 0; flex: 1; min-height: 0; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.45; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.qwho { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qwho > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.qwho b { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qwho small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qav { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--base); border: 2px solid var(--glass-edge);
  box-shadow: 0 0 0 2px var(--pink-bg); font-weight: 800; font-size: 13px; color: var(--accent); }
.qav img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.qav .qmark { font-size: 26px; margin-top: 8px; }
.qpill { background: linear-gradient(90deg, var(--pink-bg), var(--purple-bg)); color: var(--pink-ink); }
.qcard .badge { top: 12px; right: 12px; left: auto; }
.lb-quote { max-width: 720px; }
.qmodal { gap: 24px; }
.cs-quote.qfull { padding: 28px 30px; }
.cs-quote.qfull p { font-size: clamp(1.25rem, 2.8vw, 1.7rem); white-space: normal; }
.cs-quote.qfull .qmark.big { display: block; }
.qwho.big .qav { width: 56px; height: 56px; font-size: 18px; }
.qwho.big b { font-size: 16px; white-space: normal; }
.qwho.big small { font-size: 14px; white-space: normal; }
.qmodal .related { align-self: flex-start; }
.cs-quote.qfull p + p { margin-top: 12px; }
.seg label { border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg label:has(input:checked) { background: var(--ink); color: var(--base); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.q-preview { max-width: 280px; pointer-events: none; }
.q-preview .card { width: 100%; }
/* testimonial card refinements: whole lines only, names may wrap to two lines */
.qtext { -webkit-line-clamp: 5; font-size: clamp(1rem, 1.45vw, 1.12rem); max-height: calc(1.45em * 5); flex: 0 1 auto; }
.qbody .qwho { margin-top: auto; }
.qwho b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
@media (max-width: 560px) { .qtext { -webkit-line-clamp: 6; max-height: calc(1.45em * 6); } }
.qtext { -webkit-line-clamp: 4; max-height: calc(1.45em * 4); flex: 0 0 auto; }
@media (max-width: 560px) { .qtext { -webkit-line-clamp: 6; max-height: calc(1.45em * 6); } }
