/* Forms, account pages and the newsroom. Tokens come from styles.css. */
.narrow { max-width: 560px; }
.form-title { font: 800 condensed clamp(40px, 6vw, 60px)/1.04 var(--display); margin-bottom: 14px; }
.lead-in { color: var(--soft); margin-bottom: 22px; }
.stack { display: grid; gap: 20px; align-content: start; }
.narrow-form { max-width: 620px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-weight: 600; font-size: 15px; }
.studio input:not([type]), .field input:not([type='radio'], [type='checkbox'], [type='file']), .field textarea, .field select, .user-acts select, .searchline input, .copybox { width: 100%; min-width: 0; min-height: 46px; background: var(--raise); border: 1px solid var(--line); padding: 9px 14px; font: 400 16px/1.5 var(--text); color: var(--fg); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
.field input[readonly] { color: var(--soft); }
.hint { color: var(--soft); font-size: 14px; line-height: 1.5; }
.narrow > .hint { margin-top: 22px; }
.hint a, .note a, .lead-in a { color: var(--red-text); text-decoration: underline; text-underline-offset: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.check input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.alert, .notice { padding: 14px 18px; margin-bottom: 24px; background: var(--surface); }
.alert { background: color-mix(in srgb, var(--red) 16%, var(--bg)); }
.notice { background: color-mix(in srgb, #1f9d55 22%, var(--bg)); }
.copybox { margin-top: 10px; }
.sub { font: 800 condensed 28px/1.1 var(--display); margin: 40px 0 14px; }
.two > div > .sub:first-child { margin-top: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.plain li { padding-block: 11px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.plain a { font-weight: 600; }
.plain a:hover { text-decoration: underline var(--red) 2px; text-underline-offset: 5px; }
.plain p { color: var(--soft); font-size: 15px; }

.tabs, .filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.tabs a, .filters a { background: var(--raise); padding: 8px 22px; font-weight: 500; font-size: 15px; clip-path: var(--slant); }
.tabs a:hover, .filters a:hover { background: var(--line); }
.tabs a[aria-current] { background: #d90713; color: #fff; }
.filters a[aria-current] { background: var(--fg); color: var(--bg); }
.studio-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.studio-head h1 { font: 800 condensed clamp(40px, 6vw, 64px)/1.04 var(--display); }

.rowlist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 15px; border-bottom: 1px solid var(--line); }
.rl-t { display: grid; gap: 3px; min-width: min(100%, 260px); flex: 1; }
.rl-t > a, .rl-t > b { font-weight: 600; font-size: 18px; line-height: 1.35; }
.rl-t > a:hover { text-decoration: underline var(--red) 2px; text-underline-offset: 5px; }
.rl-t span { color: var(--soft); font-size: 14px; overflow-wrap: anywhere; }
.rl-t span a { text-decoration: underline; text-underline-offset: 3px; }
.rl-t .mail { text-align: right; }
.rl-t .returned { color: var(--red-text); }
.pill { flex: none; padding: 4px 16px 5px; font-size: 14px; font-weight: 600; background: var(--raise); clip-path: var(--slant); }
.pill.review { background: #b97700; color: #fff; }
.pill.published { background: #17733f; color: #fff; }
.user-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.user-acts form { display: flex; gap: 8px; align-items: center; }
.user-acts select { width: auto; min-height: 42px; padding-block: 6px; }
.user-acts .btn, .rowlist .btn { padding: 8px 18px; font-size: 14px; }
.searchline { display: flex; gap: 8px; max-width: 460px; margin-bottom: 14px; }
.perms { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; }
.perms th, .perms td { text-align: start; padding: 10px 0 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.perms thead th { color: var(--soft); font-weight: 500; }
.perms tbody th { font-weight: 500; }
.perms .yes { color: #35b56d; font-weight: 600; }
.perms .no { color: var(--soft); }
.log td { overflow-wrap: anywhere; }
.log td:first-child { white-space: nowrap; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.ed-main, .ed-side { display: grid; gap: 22px; min-width: 0; }
.field input.big:not([type='radio']) { font-size: 24px; font-weight: 700; padding-block: 12px; }
.body-head { display: flex; justify-content: space-between; align-items: baseline; }
.tool { display: flex; flex-wrap: wrap; gap: 4px; }
.tool button { border: 0; background: var(--raise); padding: 7px 14px; font-size: 14px; font-weight: 500; cursor: pointer; }
.tool button:hover { background: var(--line); }
.tool #preview-btn { margin-inline-start: auto; }
.tool [aria-pressed='true'] { background: #d90713; color: #fff; }
.field #body { min-height: 420px; font-size: 17px; line-height: 1.7; }
.preview { max-width: none; border: 1px solid var(--line); padding: 20px 24px; min-height: 420px; }
fieldset { border: 0; margin: 0; padding: 20px; background: var(--surface); display: grid; gap: 16px; min-width: 0; }
fieldset legend:not(.vh) { float: right; width: 100%; padding: 0; font: 800 condensed 24px/1 var(--display); }
.actions { position: sticky; top: 92px; z-index: 5; justify-items: start; }
.actions .btn { width: 100%; }
.textlink { color: var(--red-text); text-decoration: underline; text-underline-offset: 4px; font-size: 15px; }
.cover { aspect-ratio: 16 / 9; background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 18px 18px, var(--raise); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.field .upload { background: var(--raise); border: 1px dashed var(--soft); text-align: center; padding: 11px; cursor: pointer; }
.field .upload:hover { background: var(--line); }
.field:focus-within > .upload:has(+ input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.frames input { position: absolute; opacity: 0; }
.frames img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 3px solid transparent; cursor: pointer; background: var(--raise); }
.frames input:checked + img { border-color: var(--red); }
.frames input:focus-visible + img { outline: 3px solid var(--fg); }
.moves { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); align-items: flex-end; }
.moves form { display: grid; gap: 10px; max-width: 360px; justify-items: start; }
.moves .field { width: 340px; max-width: 100%; }
.draft-bar { padding-block: 18px 0; }
.draft-bar > p { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; background: var(--surface); padding: 12px 18px; }
.draft-bar a { color: var(--red-text); text-decoration: underline; text-underline-offset: 4px; }
.draft-bar .moves { margin-top: 12px; padding-top: 0; border: 0; }
@media (max-width: 900px) {
  .two, .editor { grid-template-columns: minmax(0, 1fr); }
  .actions { position: static; }
}

/* ---------- social posts ---------- */
.pill.bad { background: #8f0713; color: #fff; }
.res { display: block; }
.res a { text-decoration: underline; }
.res.failed, .res.unknown, .hint.bad { color: var(--red-text) !important; }
.post-state { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 24px; font-size: 15px; }
.composer { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.stage { position: sticky; top: 96px; display: grid; gap: 12px; }
.stage canvas { width: 100%; height: auto; max-height: calc(100vh - 230px); object-fit: contain; background: #000; justify-self: center; }
.play-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.play-row .btn { padding: 8px 20px; font-size: 14px; }
.ctrl { display: grid; gap: 20px; min-width: 0; }
.ctrl .row, .studio-head > div, #confirm .row { display: flex; flex-wrap: wrap; gap: 10px; }
.ctrl .btn { justify-self: start; }
input[type='range'] { width: 100%; accent-color: var(--red); }
.field input[type='range'] { padding: 0 !important; min-height: 28px !important; background: none !important; border: 0 !important; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { cursor: pointer; background: var(--raise); padding: 9px 22px; font-weight: 600; font-size: 15px; clip-path: var(--slant); }
.seg input { position: absolute; opacity: 0; }
.seg label:has(:checked) { background: #d90713; color: #fff; }
.seg label:has(:focus-visible) { outline: 3px solid var(--fg); }
.slides { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.slides li { display: flex; gap: 4px; }
.sl, .mini { border: 0; background: var(--raise); padding: 9px 14px; font-size: 15px; cursor: pointer; }
.sl { flex: 1; min-width: 0; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slides .on .sl { background: var(--fg); color: var(--bg); font-weight: 600; }
.mini:disabled { opacity: .35; cursor: default; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tgt .hint { display: block; }
.tgt:has(:disabled) { opacity: .6; }
progress { width: 100%; accent-color: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }
.steps { padding-inline-start: 22px; display: grid; gap: 8px; font-size: 16px; line-height: 1.5; }
.steps li::marker { color: var(--red-text); font-weight: 700; }
.studio-head .searchline { margin: 0; }
.studio-head select { max-width: 320px; min-height: 46px; background: var(--raise); border: 1px solid var(--line); color: var(--fg); padding: 8px 12px; font: 400 15px var(--text); }
@media (max-width: 900px) { .composer { grid-template-columns: minmax(0, 1fr); } .stage { position: static; } .stage canvas { max-height: 60vh; } .searchline { flex-wrap: wrap; } }
fieldset, .ctrl, .slides, .stage, .narrow-form { grid-template-columns: minmax(0, 1fr); }
.stack { grid-template-columns: minmax(0, 1fr); }
.slides li { min-width: 0; }
.studio select { max-width: 100%; }
.studio-head .searchline { min-width: 0; max-width: 100%; }
.studio-head .searchline select { flex: 1 1 160px; min-width: 0; width: 160px; }
.studio-head .searchline .btn { white-space: nowrap; }

/* ---------- simple editor ---------- */
.more { background: var(--surface); }
.more summary { padding: 16px 20px; cursor: pointer; font-weight: 600; }
.more summary:hover { background: var(--raise); }
.more > .stack { padding: 6px 20px 22px; gap: 16px; }
.ed-side .seg label { padding: 8px 18px; }

.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 22px; align-items: start; }
.sections fieldset { gap: 8px; }
.sub-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 28px; gap: 8px; align-items: center; }
.sub-row input:not([type='hidden']) { width: 100%; min-height: 42px; background: var(--raise); border: 1px solid var(--line); padding: 6px 10px; font: 400 16px var(--text); color: var(--fg); }

.wide-form { max-width: 860px; }
.eula { max-height: 52vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); padding: 20px 24px; max-width: none; font-size: 16px; }
.eula > p:first-child { font-size: 17px; }
.eula h2 { font-size: 24px; }
.eula:focus-visible { outline: 2px solid var(--red); }
.check a { color: var(--red-text); text-decoration: underline; text-underline-offset: 4px; }

.cal-state { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; background: var(--surface); padding: 16px 20px; margin-bottom: 20px; }
.cal-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; align-items: end; }
