/* The client portal (S75; specs/client-portal.md section 7, specs/ui.md "The client portal").
   The UI v3 look: every colour, radius, shadow and size comes from /assets/os-tokens.css (light,
   and dark under [data-theme="dark"], which theme.js sets). Nothing here names a colour.
   Phone first: one column, 16 px gutters, no sideways scroll at 360 px; from 1100 px the review
   puts its notes beside the page. Sizes that change at run time (the preview frame) are set
   through the CSSOM, never a style attribute (the CSP refuses those). */

/* Manrope, served from Studio's assets (the files of css/os-fonts.css, copied rules). */
@font-face {
  font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/assets/fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/assets/fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--os-bg); color: var(--os-ink); font-family: var(--os-font); font-size: var(--os-t-15); font-weight: var(--os-w-regular); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--os-accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- the shell: a small top bar, then the page ---------- */
.cp-app { min-height: 100vh; min-height: 100dvh; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.cp-top { display: flex; align-items: center; gap: var(--os-s-2); max-width: 1440px; margin: 0 auto; padding: var(--os-s-3) 16px; }
.cp-brand { flex: none; display: flex; align-items: center; gap: var(--os-s-2); margin-right: auto; text-decoration: none; color: var(--os-ink); border-radius: var(--os-r-sm); }
.cp-lockup { flex: none; display: block; width: 110px; height: 18px; background: var(--os-ink); -webkit-mask: url(/assets/logo/oction-agency-lockup.svg) left center / contain no-repeat; mask: url(/assets/logo/oction-agency-lockup.svg) left center / contain no-repeat; }
.cp-tool { flex: none; padding: 3px 9px; border-radius: var(--os-r-pill); background: var(--os-surface-soft); color: var(--os-muted); font-size: var(--os-t-11); font-weight: var(--os-w-heavy); letter-spacing: .04em; white-space: nowrap; }
/* On a phone the bar holds the lockup, the pill, light or dark and Sign out; the name joins them from 640 px. */
.cp-top > .cp-btn { flex: none; white-space: nowrap; }
.cp-who { display: none; min-width: 0; font-size: var(--os-t-13); font-weight: var(--os-w-semi); color: var(--os-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-main { max-width: 1440px; margin: 0 auto; padding: var(--os-s-2) 16px var(--os-s-8); outline: 0; }
.cp-narrow { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--os-s-4); }

.cp-icon { flex: none; display: block; width: 20px; height: 20px; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.cp-icon--moon { -webkit-mask-image: url(/assets/icons/moon.svg); mask-image: url(/assets/icons/moon.svg); }
.cp-icon--back { -webkit-mask-image: url(/assets/icons/back.svg); mask-image: url(/assets/icons/back.svg); }
.cp-icon--chevron { -webkit-mask-image: url(/assets/icons/chevron.svg); mask-image: url(/assets/icons/chevron.svg); }
.cp-iconbtn { flex: none; width: var(--os-touch); height: var(--os-touch); padding: 0; border-radius: var(--os-r-pill); border: 1px solid var(--os-line); background: var(--os-surface); color: var(--os-ink); box-shadow: var(--os-shadow-card); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- type, cards, buttons, chips ---------- */
.cp-head { display: flex; align-items: center; gap: var(--os-s-3); min-width: 0; margin: var(--os-s-2) 0 var(--os-s-4); }
.cp-h1 { flex: 1; min-width: 0; margin: 0; font-size: var(--os-t-24); line-height: 1.2; font-weight: var(--os-w-heavy); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.cp-h2 { margin: 0; font-size: var(--os-t-17); line-height: 1.3; font-weight: var(--os-w-heavy); }
.cp-kicker { margin: 0; font-size: var(--os-t-12); font-weight: var(--os-w-bold); letter-spacing: .1em; text-transform: uppercase; color: var(--os-muted); }
.cp-note { margin: 0; min-width: 0; font-size: var(--os-t-13); font-weight: var(--os-w-semi); line-height: 1.45; color: var(--os-muted); overflow-wrap: anywhere; }
.cp-empty { margin: var(--os-s-8) 0; font-size: var(--os-t-15); font-weight: var(--os-w-semi); color: var(--os-muted); text-align: center; }
.cp-card { min-width: 0; background: var(--os-surface); color: var(--os-ink); border: 1px solid var(--os-line); border-radius: var(--os-r-xl); box-shadow: var(--os-shadow-card); }
.cp-card--pad { padding: var(--os-s-6); display: flex; flex-direction: column; gap: var(--os-s-4); }
.cp-section { display: flex; flex-direction: column; gap: var(--os-s-3); min-width: 0; margin-top: var(--os-s-6); }

.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--os-s-2); min-height: var(--os-touch); max-width: 100%; padding: 0 var(--os-s-5); border-radius: var(--os-r-sm); border: 1px solid var(--os-line); background: var(--os-surface); color: var(--os-ink); font-size: var(--os-t-14); font-weight: var(--os-w-bold); line-height: 1.2; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere; }
.cp-btn--primary { background: var(--os-ink); border-color: var(--os-ink); color: var(--os-bg); }
.cp-btn--block { width: 100%; }
.cp-btn--small { min-height: 40px; padding: 0 var(--os-s-3); font-size: var(--os-t-13); }
.cp-btn--quiet { border-color: transparent; background: transparent; color: var(--os-muted); }
.cp-btn[disabled] { opacity: .55; cursor: default; }
.cp-btn[aria-pressed="true"] { background: var(--os-accent); border-color: var(--os-accent); color: var(--os-on-accent); }
.cp-actions { display: flex; flex-wrap: wrap; gap: var(--os-s-2); }
.cp-actions > .cp-btn { flex: 1 1 140px; }

.cp-chip { flex: none; display: inline-block; max-width: 100%; padding: 4px 9px; border-radius: var(--os-r-pill); font-size: var(--os-t-11); font-weight: var(--os-w-heavy); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--os-accent-strong); background: var(--os-accent-soft); }
.cp-chip--grey { color: var(--os-ink); background: var(--os-surface-soft); }
.cp-chip--warn { color: var(--os-on-accent); background: var(--os-warn-soft); }

.cp-alert { margin: 0; padding: var(--os-s-3) var(--os-s-4); border-radius: var(--os-r-md); background: var(--os-warn-soft); color: var(--os-on-accent); font-size: var(--os-t-14); font-weight: var(--os-w-semi); overflow-wrap: anywhere; }
.cp-notice { margin: 0; padding: var(--os-s-3) var(--os-s-4); border-radius: var(--os-r-md); background: var(--os-surface-soft); color: var(--os-ink); font-size: var(--os-t-14); font-weight: var(--os-w-semi); overflow-wrap: anywhere; }
.cp-error { margin: 0; color: var(--os-ink); font-size: var(--os-t-13); font-weight: var(--os-w-bold); overflow-wrap: anywhere; }
.cp-error::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--os-alert); vertical-align: middle; }

.cp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: var(--os-t-13); font-weight: var(--os-w-bold); color: var(--os-muted); }
.cp-input, .cp-text { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--os-line); border-radius: var(--os-r-sm); background: var(--os-surface); color: var(--os-ink); font-size: 16px; font-weight: var(--os-w-regular); line-height: 1.4; }
.cp-input { min-height: var(--os-touch); }
.cp-text { min-height: 88px; resize: vertical; }
.cp-input::placeholder, .cp-text::placeholder { color: var(--os-placeholder); }

/* ---------- sign in ---------- */
.cp-signin { max-width: 440px; margin: var(--os-s-8) auto 0; }
.cp-signin .cp-h1 { font-size: var(--os-t-28); }
.cp-or { margin: 0; text-align: center; font-size: var(--os-t-12); font-weight: var(--os-w-bold); color: var(--os-muted); text-transform: uppercase; letter-spacing: .1em; }
.cp-devlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--os-s-2); }

/* ---------- lists of projects and versions ---------- */
.cp-rows { list-style: none; margin: 0; padding: 0; }
.cp-row { display: flex; align-items: center; gap: var(--os-s-3); min-height: 64px; padding: 10px var(--os-s-4); border-bottom: 1px solid var(--os-line-soft); color: var(--os-ink); text-decoration: none; }
.cp-rows > li:last-child .cp-row { border-bottom: 0; }
.cp-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-row__title { font-size: var(--os-t-15); font-weight: var(--os-w-bold); line-height: 1.3; overflow-wrap: anywhere; }
.cp-row__meta { font-size: var(--os-t-13); color: var(--os-muted); overflow-wrap: anywhere; }
.cp-row .cp-icon--chevron { color: var(--os-muted); }
.cp-hero { background: var(--os-hero); color: var(--os-on-hero); border-color: var(--os-hero); }
[data-theme="dark"] .cp-hero { border-color: var(--os-hero-line); }
.cp-hero .cp-kicker, .cp-hero .cp-note { color: var(--os-on-hero-muted); }
.cp-hero .cp-btn--primary { background: var(--os-accent); border-color: var(--os-accent); color: var(--os-on-accent); }
.cp-hero__title { margin: 0; font-size: var(--os-t-19); font-weight: var(--os-w-heavy); line-height: 1.25; overflow-wrap: anywhere; }
.cp-live { font-weight: var(--os-w-bold); color: var(--os-accent-strong); overflow-wrap: anywhere; }

/* ---------- the review ---------- */
.cp-review__title { margin: calc(-1 * var(--os-s-2)) 0 var(--os-s-4); }
.cp-review { display: flex; flex-direction: column; gap: var(--os-s-4); min-width: 0; }
.cp-review__main, .cp-review__side { display: flex; flex-direction: column; gap: var(--os-s-4); min-width: 0; }
.cp-stage { padding: var(--os-s-3) 0 var(--os-s-3); display: flex; flex-direction: column; gap: var(--os-s-3); overflow: hidden; }
.cp-stage > .cp-notice, .cp-stage > .cp-alert { margin: 0 var(--os-s-3); }
.cp-seg { display: flex; gap: var(--os-s-1); margin: 0 var(--os-s-3); padding: var(--os-s-1); background: var(--os-track); border-radius: var(--os-r-pill); }
.cp-seg__item { flex: 1; min-width: 0; height: 40px; padding: 0 var(--os-s-2); border: 0; border-radius: var(--os-r-pill); background: transparent; color: var(--os-muted); font-size: var(--os-t-14); font-weight: var(--os-w-bold); }
.cp-seg__item[aria-pressed="true"] { background: var(--os-surface); color: var(--os-ink); box-shadow: var(--os-shadow-card); }
.cp-frame { padding: 0 var(--os-s-3); min-width: 0; }
.frame-wrap { width: 100%; min-width: 0; }
.urlbar { display: flex; justify-content: space-between; gap: var(--os-s-2); max-width: 100%; margin: 0 auto; padding: var(--os-s-2) var(--os-s-3); border: 1px solid var(--os-line); border-bottom: 0; border-radius: var(--os-r-md) var(--os-r-md) 0 0; background: var(--os-surface-soft); font-size: var(--os-t-12); font-weight: var(--os-w-semi); color: var(--os-muted); white-space: nowrap; overflow: hidden; }
.urlbar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.frame-box { position: relative; max-width: 100%; margin: 0 auto; overflow: hidden; border: 1px solid var(--os-line); border-radius: 0 0 var(--os-r-md) var(--os-r-md); background: var(--os-surface); }
.frame-box iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; }

.cp-decision__mine { margin: 0; font-size: var(--os-t-15); font-weight: var(--os-w-bold); overflow-wrap: anywhere; }
.cp-decisions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cp-said { margin: 0; padding: var(--os-s-3); border-radius: var(--os-r-md); background: var(--os-surface-soft); font-size: var(--os-t-14); white-space: pre-wrap; overflow-wrap: anywhere; }

.panel { display: flex; flex-direction: column; gap: 0; }
.panel > .status { margin: 0; padding: 0 var(--os-s-4) var(--os-s-3); font-size: var(--os-t-13); font-weight: var(--os-w-semi); color: var(--os-muted); }
.panel > .status:empty { display: none; }
.cp-notes { list-style: none; margin: 0; padding: 0; }
.note { display: flex; flex-direction: column; gap: var(--os-s-2); padding: var(--os-s-4); border-bottom: 1px solid var(--os-line-soft); min-width: 0; }
.note.is-selected { background: var(--os-surface-soft); }
.note__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.note__num { flex: none; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--os-r-pill); background: var(--os-ink); color: var(--os-bg); font-size: var(--os-t-12); font-weight: var(--os-w-heavy); display: inline-flex; align-items: center; justify-content: center; }
.note.is-done .note__num { background: var(--os-off); color: var(--os-on-accent); }
.note__who { min-width: 0; font-size: var(--os-t-14); font-weight: var(--os-w-bold); overflow-wrap: anywhere; }
.note__when { font-size: var(--os-t-12); color: var(--os-muted); }
.note__body, .reply__body { margin: 0; font-size: var(--os-t-15); white-space: pre-wrap; overflow-wrap: anywhere; }
.note__quote { margin: 0; padding-left: var(--os-s-3); border-left: 3px solid var(--os-accent); font-size: var(--os-t-14); color: var(--os-muted); overflow-wrap: anywhere; }
.note__where { margin: 0; font-size: var(--os-t-12); font-weight: var(--os-w-semi); color: var(--os-muted); overflow-wrap: anywhere; }
.note__where button { padding: 0; border: 0; background: none; color: var(--os-accent-strong); font: inherit; text-decoration: underline; }
.replies { list-style: none; margin: 0; padding: 0 0 0 var(--os-s-4); border-left: 2px solid var(--os-line); display: flex; flex-direction: column; gap: var(--os-s-3); }
.reply { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reply__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.note__actions { display: flex; flex-wrap: wrap; gap: var(--os-s-2); }
.reply-box { display: flex; flex-direction: column; gap: var(--os-s-2); }

.composer { display: flex; flex-direction: column; gap: var(--os-s-3); padding: var(--os-s-4); border-top: 1px solid var(--os-line-soft); }
.composer-label { margin: 0; font-size: var(--os-t-14); font-weight: var(--os-w-heavy); }
.point-words { margin: 0; font-size: var(--os-t-13); font-weight: var(--os-w-semi); color: var(--os-muted); }
.point-words:empty { display: none; }

@media (max-width: 419px) {
  .cp-top { gap: 6px; }
  .cp-lockup { width: 92px; height: 15px; }
  .cp-top > .cp-iconbtn { width: 40px; height: 40px; }
  .cp-top > .cp-btn { padding: 0 10px; }
}
@media (min-width: 640px) {
  .cp-who { display: block; }
}
@media (min-width: 1100px) {
  .cp-review { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .cp-top, .cp-main { padding-left: 24px; padding-right: 24px; }
}
@media (hover: hover) {
  .cp-btn:hover, .cp-iconbtn:hover { border-color: var(--os-muted); }
  a.cp-row:hover { background: var(--os-surface-soft); }
}
