/* What both sites share on screen: the way out of a full page, the clients as logos, the review links panel,
   Posting Notes (the editor and the note), and a page's own buttons in the player bar. Loaded by both pages before
   their own styles; deploy-review.sh copies it into the portal like shared.js. Colours come from each site's tokens. */

/* The base both sites share: reset, buttons, the bar logo, toast, picture tiles, boards, cut rows and the review
   toggle. Anything a site tunes differently stays in its own styles.css, after this file. */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0; min-height: 100vh; background: var(--ground); color: var(--text);
  font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--parchment); outline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  background: var(--nested); color: var(--text); border: 0; border-radius: 18px;
  font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.12s, transform 0.08s;
}
.btn:hover { background: #363636; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--primary { background: var(--text); color: #000; }
.btn--primary:hover { background: #e2e2e2; }
.btn--quiet { background: transparent; color: var(--muted); padding: 0 10px; }
.btn--quiet:hover { background: var(--raised); color: var(--text); }
.bar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.bar-logo img { height: 18px; width: auto; display: block; }
.ctab-client { height: 44px; }
.ctab-client img { height: 20px; }
.bar-menu { display: none; }
.head-line strong { color: var(--hue); font-weight: 500; }
.head-actions { display: flex; gap: 8px; flex: none; }
#toast.is-error { background: #ffd9d4; color: #4a0e0a; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.pic img, .pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rswitch--on[aria-pressed="true"] { background: var(--on); color: #00210d; }
.rswitch--off[aria-pressed="true"] { background: var(--off); color: #2a0503; }
.boards { display: grid; gap: 10px; }
.boards-bar { display: flex; align-items: center; gap: 10px; }
.boards-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.board:hover, .board[aria-current="true"] { opacity: 1; }
.cut:hover { background: var(--raised); }
.cut.is-on { background: var(--nested); }
.cut-meta { color: var(--meta); font-size: 12px; }
.cut.is-on .rtoggle { background: var(--panel); }
.rtoggle:hover { color: var(--text); }
.rtoggle.is-review, .cut.is-on .rtoggle.is-review { background: var(--on); color: #00210d; }
.rtoggle.is-review i { background: #00210d; }
.rtoggle.is-static { cursor: default; background: transparent; padding-left: 0; }
.rtoggle.is-static.is-review { background: transparent; color: var(--on); }
.rtoggle.is-static.is-review i { background: var(--on); }

/* The way out of a full page: a white pill nobody can miss. */
.head--exit { align-items: center; margin-bottom: 20px; }
.exit { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px 0 16px; border-radius: 22px; background: var(--text); color: #000; font: 500 16px/1 var(--body); text-decoration: none; }
.exit span { font-size: 18px; }
.exit kbd { font: 500 11px/1 var(--body); color: #000; opacity: 0.55; padding: 3px 5px; border-radius: 4px; background: rgba(0,0,0,0.1); }
.exit:hover { background: var(--parchment); }

/* The clients as logos (white on transparent), dimmed until current. */
.ctab-client { display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; opacity: 0.5; transition: opacity 0.12s; }
.ctab-client img { width: auto; display: block; }
.ctab-client:hover { opacity: 0.85; color: var(--text); }
.ctab-client[aria-current="page"] { opacity: 1; color: var(--text); }

/* Review links: one row per person. */
.link-rows { display: grid; gap: 4px; }
.link-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 16px; align-items: center; min-height: 52px; padding: 8px 12px; border-radius: var(--r-row, 8px); background: var(--raised); }
.link-row.is-off { background: transparent; }
.link-who { display: grid; }
.link-who b { font-weight: 500; }
.link-who span { font-size: 13px; color: var(--meta); }
.link-seen { font-size: 13px; color: var(--muted); }
.link-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.link-add { display: flex; gap: 8px; margin-top: 12px; }
.link-add input { flex: 1; min-width: 0; }
@media (max-width: 640px) { .link-row { grid-template-columns: 1fr; gap: 8px; } .link-add { flex-wrap: wrap; } .link-add input { flex: 1 1 40%; } }

/* Posting Notes: the list buttons, the editor, and the note as clients read it. */
.list-tools { display: flex; gap: 4px; }
.list-tools button { width: 32px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: var(--raised); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.list-tools button:hover { color: var(--text); background: var(--nested); }
.list-tools svg { width: 18px; height: 18px; }
.note { display: grid; gap: 8px; color: var(--text); }
.note p { margin: 0; white-space: pre-wrap; }
.note ul, .note ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.note-edit { position: relative; min-height: 72px; background: var(--ground); border: 1px solid var(--control); border-radius: 8px; padding: 9px 11px; font-size: 15px; line-height: 1.5; outline: none; }
.note-edit:focus { border-color: var(--parchment); }
.note-edit p { margin: 0; }
.note-edit ul, .note-edit ol { margin: 0; padding-left: 22px; }
.note-edit ul ul, .note-edit ol ol, .note-edit ul ol, .note-edit ol ul, .note ul ul, .note ol ol, .note ul ol, .note ol ul { margin-top: 2px; }
.note-edit[data-placeholder]:not(:focus):has(> p:only-child > br:only-child)::before { content: attr(data-placeholder); color: var(--meta); position: absolute; }
/* Numbered lists: 1. at the top, a. nested, i. nested twice; an indented line or list keeps its margin. */
.note-edit ol[type="a"], .note ol[type="a"] { list-style: lower-alpha; }
.note-edit ol[type="i"], .note ol[type="i"] { list-style: lower-roman; }
.note-edit [data-indent="1"], .note [data-indent="1"] { margin-left: 22px; }
.note-edit [data-indent="2"], .note [data-indent="2"] { margin-left: 44px; }
.note-edit [data-indent="3"], .note [data-indent="3"] { margin-left: 66px; }
.note-edit [data-indent="4"], .note [data-indent="4"] { margin-left: 88px; }

/* View full page, by a cut's title. */
.page-open { height: 40px; padding: 0 18px; font-size: 15px; gap: 8px; }
.page-open span { font-size: 17px; }

/* Touch screens: no keyboard hints (esc, arrow keys, drag to scrub). */
@media (hover: none) { .exit kbd, .pb-hint { display: none; } }
