/* LaunchCo Content Studio. House style: accent #D8327C, Manrope + JetBrains Mono. */
:root {
  --bg: #f6f5f7; --surface: #ffffff; --ink: #1e232b; --muted: #5f5b66; --line: #dcd8df;
  --soft: #efecf1; --soft-2: #e1dde5;
  --accent: #d8327c; --accent-hover: #bf2a6c; --accent-soft: #fbe8f1; --on-accent: #ffffff;
  --ok: #2e7a4d; --ok-soft: #e3f2e8; --warn: #946000; --warn-soft: #fbf0dc; --bad: #b3261e; --bad-soft: #fbe4e2;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: var(--font);
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --r: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; line-height: 1.2; text-wrap: balance; font-family: var(--font-head); }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 14.5px; font-weight: 700; }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.label { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.stack.tight { gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* Layout */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brandmark { font-weight: 800; font-size: 15px; padding: 4px 10px 14px; }
.side .brandmark span { display: block; font: 500 10.5px var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.side .brandmark .applogo { display: block; max-width: 100%; max-height: 56px; object-fit: contain; object-position: left center; }
.auth .applogo { display: block; max-width: 220px; max-height: 64px; object-fit: contain; }
.logo-box.applogo-box { height: 120px; place-items: center start; padding: 0 18px; }
.logo-box.favicon-box { width: 96px; height: 96px; flex: none; }
.logo-box.favicon-box img { width: 64px; height: 64px; }
/* How the favicon looks in a browser tab. */
.tab-sample { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px 8px 0 0; font-size: 13px; max-width: 240px; }
.tab-sample img { width: 16px; height: 16px; flex: none; }
.tab-sample span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* How a pasted link shows on Facebook or LinkedIn: image on top, the site, title and text under it. */
.share-sample { max-width: 520px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.share-sample img, .share-empty { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.share-empty { display: grid; place-items: center; background: var(--soft); }
.share-meta { display: grid; gap: 2px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--soft); }
.colour-pair { display: flex; gap: 8px; align-items: center; }
.colour-pair input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; flex: none; }
.colour-pair input[type=text] { width: 9em; }
.font-sample { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 6px; }
.nav { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 600; border: 0; background: none; text-align: left; cursor: pointer; width: 100%; }
.nav:hover { background: var(--soft); color: var(--ink); }
.nav.on { background: var(--accent-soft); color: var(--ink); }
.nav.disabled { cursor: default; opacity: .55; }
.nav.disabled:hover { background: none; color: var(--muted); }
.nav .soon { margin-left: auto; font: 500 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.side .foot { margin-top: auto; display: grid; gap: 6px; padding: 10px; font-size: 12px; color: var(--muted); }
.cog { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); flex: none; }
.cog:hover { color: var(--ink); background: var(--soft); }
.cog.on { color: var(--ink); background: var(--accent-soft); border-color: transparent; }
.nav.cog-m { display: none; }
.version { font: 500 11px var(--mono); }
.version.warn { color: var(--bad); }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.page { padding: 26px 28px 60px; max-width: 1080px; display: grid; gap: 22px; }
.page.narrow { max-width: 760px; }
@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; align-items: center; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brandmark { padding: 6px 10px; white-space: nowrap; }
  .side .brandmark .applogo { max-height: 28px; max-width: 140px; }
  .side .foot, .nav.disabled { display: none; }
  .nav.cog-m { display: flex; margin-left: auto; }
  .nav { width: auto; flex: none; white-space: nowrap; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .topbar select { min-width: 0 !important; max-width: 60vw; }
  .list > div .grow { flex: 1 1 180px; }
  .savebar { padding: 10px 16px; }
  .savebar input { width: 100% !important; }
}

/* Controls */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ink); background: var(--surface); border-radius: 6px; padding: 7px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.quiet { border-color: var(--line); color: var(--muted); }
.btn.quiet:hover { color: var(--ink); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.has-tip { position: relative; }
.has-tip:hover::after, .has-tip:focus-visible::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; width: 300px; max-width: 80vw; padding: 10px 12px; border-radius: 6px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 500; line-height: 1.4; text-align: left; white-space: pre-line; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); pointer-events: none; }
.btn .spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn .spin { animation-duration: 3s; } }
/* align-content: start keeps label and box together when the field beside it is taller (it has a hint);
   without it the grid shares the spare height out and the box grows and drops. */
.field { display: grid; gap: 5px; align-content: start; }
.field > span:first-child { font-weight: 600; font-size: 13px; }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 10px; }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 220px; }
textarea.mono { font: 12.5px/1.55 var(--mono); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.count { font: 500 11px var(--mono); color: var(--muted); text-align: right; }
.count.over { color: var(--bad); }

/* Cards and lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; }
.card.flat { padding: 0; overflow: hidden; }
.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 24px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.list > div { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list > div:last-child { border-bottom: 0; }
/* Short guides: a label column, then the explanation. */
.list.defs > div { align-items: flex-start; padding: 10px 0; }
.list.defs b { flex: 0 0 170px; }
.list .user-row { display: flex; gap: 10px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; flex-wrap: wrap; }
.list .user-row:last-child { border-bottom: 0; }
.list .user-row:hover { background: var(--soft); }
.chip { font: 500 10.5px var(--mono); padding: 2px 7px; border-radius: 4px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.notice { border-radius: 6px; padding: 10px 12px; font-size: 13.5px; background: var(--soft); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.keystat { font-size: 13.5px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin-top: -4px; }
.keystat.ok { color: var(--ok); }
.keystat.bad { color: var(--bad); }
.keystat b { font-size: 15px; }

/* Tabs and stepper */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.stepper { display: flex; gap: 8px; flex-wrap: wrap; }
.stepper span { font: 600 11.5px var(--mono); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.stepper .on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.stepper .done { border-color: var(--ok); color: var(--ok); }
.stepper .done::before { content: "\2713  "; }

/* Pink +/- toggle (house convention for every expand/collapse) */
.toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 0; color: var(--muted); font-weight: 600; }
.toggle i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 14px/1 var(--font); font-style: normal; }

/* Brand kit pieces */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatch { border: 1px solid var(--line); border-radius: 6px; padding: 8px; display: grid; gap: 6px; }
.swatch .chipcolour { height: 40px; border-radius: 4px; border: 1px solid var(--line); }
.swatch input[type=color] { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 4px; padding: 0; background: none; cursor: pointer; }
.swatch .row input { font: 12px var(--mono); }
.logos { display: flex; gap: 12px; flex-wrap: wrap; }
.logo-slot { width: 210px; display: grid; gap: 6px; }
.logo-box { height: 96px; border: 1px dashed var(--line); border-radius: 6px; display: grid; place-items: center; background: repeating-conic-gradient(var(--soft) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; overflow: hidden; }
.logo-box.dark { background: #1e232b; }
.logo-box img { max-width: 90%; max-height: 80px; object-fit: contain; }
.pick { border: 1px solid var(--line); border-radius: 6px; padding: 6px; display: grid; gap: 4px; cursor: pointer; background: var(--surface); width: 140px; text-align: left; }
.pick.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pick .logo-box { height: 70px; }
.files { display: grid; gap: 6px; }
.file { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; flex-wrap: wrap; }
.file .grow { overflow-wrap: anywhere; }
.drop { border: 1.5px dashed var(--line); border-radius: 6px; padding: 14px; text-align: center; color: var(--muted); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--ink); }
.idea-source { justify-self: start; overflow-wrap: anywhere; }
.savebar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 28px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; z-index: 4; }
.savebar .grow { color: var(--muted); font-size: 13px; }

/* Auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: min(420px, 100%); }

/* Overlays */
.overlay { position: fixed; inset: 0; background: rgba(20, 22, 27, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.dialog { background: var(--surface); border-radius: 10px; padding: 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; display: grid; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dialog.wide { width: min(760px, 100%); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; display: flex; gap: 14px; align-items: center; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.toast button { background: none; border: 0; color: #ff8fc0; font-weight: 700; cursor: pointer; }
.toast.bad { background: var(--bad); }
.toast.bad button { color: #fff; }
.feed > div { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.feed > div:last-child { border-bottom: 0; }
.feed time { margin-left: auto; font: 500 11px var(--mono); color: var(--muted); }
.versions > div { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }

/* Writing loop */
.chk { width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 4px; display: inline-grid; place-items: center; flex: none; margin-top: 2px; font-size: 11px; line-height: 1; }
.chk.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chk.on::after { content: "\2713"; }
.idea { cursor: pointer; padding: 14px 16px; gap: 8px; }
.idea:hover { border-color: var(--muted); }
.idea.picked { border-color: var(--accent); background: var(--accent-soft); }
.pchip { font: 500 11px var(--mono); padding: 3px 9px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); background: var(--surface); cursor: pointer; }
.pchip.on { border: 1px solid var(--accent); color: var(--accent); }
.qfix { font-size: 12.5px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; }
.qfix:hover { border-color: var(--accent); }
.checks { display: grid; gap: 4px; font-size: 13px; }
.checks > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.checks .ok > span:first-child { color: var(--ok); font-weight: 700; }
.checks .no { color: var(--bad); }
.checks .no > span:first-child { font-weight: 700; }
textarea.xtall { min-height: 480px; }
/* A platform tab: the finished post on the left, the text to edit on the right. */
.post-work { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1180px) { .post-work { grid-template-columns: minmax(0, 1fr); } }
.pv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 14px; line-height: 1.45; color: var(--ink); }
.pv-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; }
.pv-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--soft); border: 1px solid var(--line); font-weight: 700; }
.pv-avatar img { width: 100%; height: 100%; object-fit: contain; }
.pv-who { display: grid; min-width: 0; overflow-wrap: anywhere; }
.pv-meta { font-size: 12px; color: var(--muted); }
.pv-pad { padding: 0 14px 12px; }
.pv-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-tag { color: #0a66c2; font-weight: 600; }
.pv .seemore { color: var(--muted); font-weight: 600; }
.pv .after { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); }
.pv-img { display: block; width: 100%; height: auto; }
.pv-carousel { display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x mandatory; }
.pv-carousel img { flex: 0 0 88%; width: 88%; height: auto; display: block; scroll-snap-align: start; }
.pv-noimg { margin: 0 14px 12px; padding: 34px 12px; text-align: center; font-size: 12.5px; color: var(--muted); background: var(--soft); border-radius: 6px; }
.pv-actions { display: flex; justify-content: space-around; gap: 8px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pv-article .pv-img, .pv-article .pv-carousel { margin-bottom: 12px; }
.pv-article .pv-noimg { margin-top: 14px; }
.pv-article h3 { font-size: 21px; line-height: 1.25; margin: 0 0 6px; overflow-wrap: anywhere; }
.pv-article .pv-head { padding: 6px 0 10px; }
.pv-md { overflow-wrap: anywhere; margin-top: 10px; }
.pv-md h4 { font-size: 15.5px; margin: 14px 0 4px; }
.pv-md p { margin: 0 0 9px; }
.pv-md ul, .pv-md ol { margin: 0 0 9px; padding-left: 20px; }
.regen .muted { flex: 1 1 140px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
.spin.big { width: 22px; height: 22px; color: var(--accent); }

/* Visual loop */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; border-right: 1px solid var(--line); background: var(--surface); padding: 3px 10px; cursor: pointer; color: var(--muted); font: inherit; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; font-weight: 700; }
.seg.src-seg { display: flex; flex-wrap: wrap; justify-self: start; }
.seg.src-seg button { padding: 7px 12px; }
.vpane { display: grid; gap: 14px; padding-top: 6px; min-width: 0; }
.vsplit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.vgroup { display: grid; gap: 14px; align-content: start; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); }
.vown .thumbs { grid-template-columns: repeat(auto-fill, 110px); }
.vown .thumb { align-content: start; }
.vtools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.vtools .row, .idea-style { flex-wrap: nowrap; }
.vtools .label, .idea-style .label { white-space: nowrap; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; align-items: start; }
.videa { border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; display: grid; gap: 6px; }
.videa.on { border-color: var(--accent); background: var(--accent-soft); }
.videa button.chk { cursor: pointer; padding: 0; background: var(--surface); }
.videa button.chk.on { background: var(--accent); }
.toggle.small { font-size: 12.5px; }
.toggle.small i { width: 16px; height: 16px; font-size: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumbs.strip { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.thumbs img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); display: block; background: var(--soft); }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pv-carousel .zoom { flex: 0 0 88%; width: 88%; scroll-snap-align: start; }
.pv-carousel .zoom img { width: 100%; }
.lightbox { padding: 24px; background: rgba(20, 22, 27, .85); cursor: zoom-out; }
.lightbox img { display: block; max-width: calc(100vw - 48px); max-height: calc(100vh - 48px); border-radius: 6px; box-shadow: 0 24px 70px rgba(0, 0, 0, .4); }
.lightbox .btn { position: fixed; top: 16px; right: 16px; }
.zoom[data-action="edit-image"] { cursor: pointer; }
.modal.studio { width: min(1400px, 100%); height: calc(100vh - 32px); }
.studio .modal-head { padding: 18px 28px 14px; }
.studio .modal-head h2 { font-size: 22px; }
.studio .modal-foot { padding: 12px 28px; }
.studio-work { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.studio-stage { min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; background: #22252b; }
.studio-stage canvas { display: block; touch-action: none; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.studio-stage canvas:focus { outline: none; }
.studio-tools { min-height: 0; overflow-y: auto; padding: 20px 24px 28px; display: grid; gap: 22px; align-content: start; border-left: 1px solid var(--line); }
.studio-tools section + section { padding-top: 20px; border-top: 1px solid var(--line); }
.studio-tools h3 { margin: 0; font-size: 16px; font-weight: 800; }
.studio-tools textarea { min-height: 64px; }
.studio-tools select, .studio-tools textarea { width: 100%; }
.studio-tools input[type="range"] { width: 100%; accent-color: var(--accent); }
.studio-tools .seg button { padding: 6px 12px; }
.studio-name { font-size: 13px; font-weight: 600; }
.studio-font-warn { color: var(--warn); }
.studio-colours { gap: 6px; }
.studio-swatch { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.studio-swatch.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.studio-colours input[type="color"] { width: 40px; height: 28px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.studio-logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.studio-logo { height: 64px; padding: 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #9a9ea8; cursor: pointer; min-width: 0; }
.studio-logo.none { background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; }
.studio-logo img { max-width: 100%; max-height: 46px; display: block; }
.studio-logo.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.studio-pictures { max-height: 220px; overflow-y: auto; padding: 3px; }
@media (max-width: 900px) {
  .studio .modal-head, .studio .modal-foot { padding-left: 16px; padding-right: 16px; }
  .studio .modal-foot .grow { display: none; }
  .studio-work { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow-y: auto; align-content: start; }
  .studio-stage { height: 42vh; position: sticky; top: 0; z-index: 1; }
  .studio-tools { overflow: visible; border-left: 0; padding: 16px; }
}
.thumb { display: grid; gap: 4px; justify-items: start; }
.thumb.chosen img { outline: 2px solid var(--accent); outline-offset: 2px; }
.job { border-top: 1px dashed var(--line); padding-top: 6px; }
.slide-edit { border-left: 2px solid var(--line); padding-left: 8px; }

/* Create: big +, Drafts / Published, post cards */
.page.wide { max-width: 1440px; }
.page.kit-page { max-width: max(1080px, 85%); }
.cards-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.fab { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 300 36px/1 var(--font); text-decoration: none; box-shadow: 0 6px 18px rgba(216, 50, 124, .35); flex: none; }
.fab:hover { background: var(--accent-hover); }
.bigtabs { display: flex; gap: 10px; flex-wrap: wrap; }
.bigtabs button { min-width: 200px; padding: 10px 22px; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; font-weight: 700; font-size: 18px; color: var(--muted); cursor: pointer; display: inline-flex; gap: 10px; align-items: center; justify-content: center; }
.bigtabs button:hover { color: var(--ink); }
.bigtabs button.on { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.bigtabs .n { font: 500 11px var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.style-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.style-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 104px; padding: 12px 14px; text-align: left; background: var(--surface); color: inherit; font: inherit; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.style-card:hover { border-color: var(--soft-2); box-shadow: 0 4px 14px rgba(30, 35, 43, .08); }
.style-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* A reference image fills the whole card, with the name and text on a dark fade at the bottom. */
.style-card.has-img { min-height: 170px; justify-content: flex-end; color: #fff; }
.style-card.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.style-card.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 22, 28, .85), rgba(20, 22, 28, 0) 70%); }
.style-card.has-img > span { position: relative; z-index: 1; }
.style-card.has-img .style-card-text { color: rgba(255, 255, 255, .85); -webkit-line-clamp: 2; }
.style-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
.style-card-head b { min-width: 0; overflow-wrap: anywhere; }
.style-card-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.style-card.add { align-items: center; justify-content: center; text-align: center; border-style: dashed; color: var(--muted); }
.style-card.add i { font: 400 28px/1 var(--font); color: var(--accent); }
.style-card.add:disabled { opacity: .5; cursor: default; }
.field-guide { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); max-width: 80ch; }
.guide-tokens { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 10px; }
.style-edit { border-top: 1px solid var(--line); padding-top: 14px; }
.idea-style { gap: 8px; }
.idea-style select { min-width: 0; max-width: 100%; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.media-img { display: block; aspect-ratio: 3 / 2; max-width: 100%; overflow: hidden; border-radius: 6px; background: var(--soft); }
.media-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-img.contain img { object-fit: contain; }
.media-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.media-url { display: flex; gap: 6px; }
.media-url input { flex: 1; min-width: 0; font-size: 12px; padding: 4px 8px; }
.media-actions { display: flex; gap: 6px; margin-top: auto; }
.media-actions .btn { flex: 1; justify-content: center; text-align: center; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: box-shadow .15s, border-color .15s; min-height: 380px; }
.pcard:hover { box-shadow: 0 12px 32px rgba(30, 35, 43, .12); border-color: var(--soft-2); }
.pcard-img { position: relative; aspect-ratio: 2 / 1; max-width: 100%; overflow: hidden; background: var(--soft); flex: none; }
/* The photo is pinned inside the 2:1 box and cropped, so cards with and without an image line up. */
.pcard-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-img.none { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--soft-2)); color: var(--muted); font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pcard-img.ideas { background: repeating-linear-gradient(135deg, var(--soft) 0 12px, var(--surface) 12px 24px); }
.pcard-edit { position: absolute; right: 14px; bottom: 10px; font: 700 16px var(--font); letter-spacing: 0; text-transform: none; padding: 6px 24px; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.pcard-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pcard-head h3 { font-size: 18px; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-head time { font-size: 11.5px; color: var(--muted); white-space: nowrap; flex: none; }
.pcard-text { margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; font-size: 14px; }
.pcard-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); }
.pcard-foot .btn { margin-left: auto; flex: none; }
.pcard-status { min-width: 0; font-size: 12.5px; color: var(--muted); }
.ptags { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard-text + .ptags { margin-top: auto; }
.ptag { font: 600 10.5px var(--mono); padding: 2px 12px; border-radius: 3px; color: #fff; letter-spacing: .02em; white-space: nowrap; }
.ptag.linkedin, .cal-chip.linkedin { --pc: #0a66c2; }
.ptag.linkedin_article, .cal-chip.linkedin_article { --pc: #004182; }
.ptag.facebook, .cal-chip.facebook { --pc: #4a8fe0; }
.ptag.instagram, .cal-chip.instagram { --pc: #f2b400; }
.ptag.blog, .cal-chip.blog { --pc: var(--accent); }
.ptag { background: var(--pc); }
.ptag.instagram { color: var(--ink); }
.ptag.failed { box-shadow: 0 0 0 2px var(--bad); }

/* Modals that are part of a page (New post, ideas, the edit window, the Schedule picker) */
body.modal-open { overflow: hidden; }
.modal-ov { z-index: 40; grid-template-columns: minmax(0, 1fr); }
.cal-ov { z-index: 45; }
.modal { background: var(--surface); border-radius: 22px; width: min(1040px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0, 0, 0, .3); overflow: hidden; }
.modal.wide { width: min(1180px, 100%); }
.modal.xl { width: max(75vw, min(1320px, 100%)); height: calc(100vh - 32px); }
.modal-set { display: flex; gap: 14px; align-items: stretch; width: fit-content; max-width: 100%; }
.modal-set > .modal { flex: 0 1 740px; width: 740px; min-width: 0; }
.modal-set > .modal.modal-panel { flex: 0 0 320px; width: 320px; }
.modal.modal-panel .modal-head { min-height: 74px; }
.modal.modal-panel .modal-head, .modal.modal-panel .modal-body { padding-left: 20px; padding-right: 20px; }
.modal.modal-panel .modal-body { gap: 14px; }
.modal.modal-panel .modal-body > .btn { max-width: 100%; white-space: normal; }
@media (max-width: 1180px) {
  .modal-ov { overflow-y: auto; }
  .modal-set { flex-direction: column; width: min(740px, 100%); margin: auto; }
  .modal-set > .modal, .modal-set > .modal.modal-panel { flex: none; width: 100%; height: auto; max-height: none; }
}
.modal-head { display: flex; gap: 12px; align-items: flex-start; padding: 24px 34px 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 26px; font-weight: 800; margin-top: 2px; }
.modal-body { padding: 22px 34px 30px; overflow: auto; display: grid; gap: 18px; flex: 1; align-content: start; }
.modal-foot { border-top: 1px solid var(--line); padding: 14px 34px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; background: var(--surface); }
.modal-foot .grow { color: var(--muted); font-size: 13px; }
.pane-tabs { margin-bottom: 6px; }
.pane-tabs .btn.on, .pane-tabs .btn.on:hover { background: var(--ink); color: var(--surface); }
.ptabs { border-bottom: 0; }
.ptabs.subtabs { border-bottom: 1px solid var(--line); }
.ptabs.subtabs button { font-size: 14px; }
.ptabs button { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; }
.ptabs button.add { color: var(--muted); font-weight: 500; font-size: 13.5px; border-bottom: 2px dashed transparent; }
.ptabs button.add:hover { color: var(--accent); border-bottom-color: var(--accent-soft); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pc, var(--muted)); display: inline-block; }
.dot.linkedin { --pc: #0a66c2; } .dot.linkedin_article { --pc: #004182; } .dot.facebook { --pc: #4a8fe0; } .dot.instagram { --pc: #f2b400; } .dot.blog { --pc: var(--accent); }
@media (max-width: 640px) {
  .modal-ov { padding: 0; }
  .modal, .modal.wide, .modal.xl { border-radius: 0; max-height: 100vh; height: 100vh; width: 100%; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .bigtabs button { min-width: 0; flex: 1; font-size: 15px; }
}

/* Calendar (the Schedule picker and the Calendar page) */
input[type=time] { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 2px 6px; }
.cal-day { min-height: 104px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 6px; display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: inherit; min-width: 0; }
.modal .cal-day { min-height: 70px; }
button.cal-day { cursor: pointer; }
button.cal-day:hover:not([disabled]) { border-color: var(--accent); }
.cal-day.other { opacity: .5; }
.cal-day[disabled] { cursor: not-allowed; background: var(--soft); opacity: .45; }
.cal-day .n { font: 600 12px var(--mono); align-self: flex-start; padding: 0 6px; border-radius: 999px; }
.cal-day.today .n { background: var(--ink); color: #fff; }
.cal-day.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.cal-chip { display: block; width: 100%; font: 500 11.5px/1.3 var(--font); padding: 2px 6px; border-radius: 4px; background: var(--soft); border: 0; border-left: 3px solid var(--pc, var(--accent)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
button.cal-chip { cursor: pointer; }
button.cal-chip:hover { background: var(--accent-soft); }
.cal-chip.this { background: var(--accent); color: var(--on-accent); }
@media (max-width: 640px) {
  .cal-day, .modal .cal-day { min-height: 52px; padding: 3px; }
  .cal-chip { font-size: 0; padding: 0; height: 6px; }
}
.modal textarea.tall { min-height: 340px; }
.list.bank .grow { display: grid; gap: 2px; }

/* "Needs you" (Home merged into Create) */
.pcard-img .needs { position: absolute; left: 12px; top: 10px; z-index: 1; }
.needs { font: 700 11px var(--font); letter-spacing: 0; text-transform: none; background: var(--accent); color: var(--on-accent); padding: 3px 10px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.needs-count { font-weight: 700; color: var(--accent); }
.notice.setup { display: grid; gap: 8px; }
#create-seed { min-height: 150px; font-size: 16px; }
@media (max-width: 640px) { .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; } }
/* App brand: find more fonts */
.font-results { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.font-result { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.font-result:first-child { border-top: 0; }
.font-result .font-name { font-size: 20px; min-width: 0; overflow-wrap: anywhere; }
