/* Creator Portal desk: only what the shared kit (/ui/dpr-ui.css) does not give, written with the kit's tokens.
   Parts marked [kit] would serve the other portals too and should move into the kit. */

/* ───── frame ───── */
.boot { padding: var(--s12) var(--gutter); text-align: center; color: var(--muted); }
.skip-link { position: absolute; left: var(--s4); top: -100px; z-index: 100; padding: 10px 16px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-2); font-weight: 600; }   /* [kit] */
.skip-link:focus { top: var(--s2); }
#main:focus-visible, h1:focus-visible { box-shadow: none; }
.nav-quiet { color: var(--muted); margin-top: auto; }
.nav-quiet .icon-sm { width: 16px; height: 16px; }
.side-foot .nav-item { min-height: 36px; }
.server-words { margin-top: 2px; overflow-wrap: anywhere; }
.auth h1 { font-size: var(--fs-2xl); }

/* ───── small parts ───── */
/* [kit] loading lines */
.skel-line { height: 14px; line-height: 14px; }
.w-30 { width: 30%; }  .w-40 { width: 40%; }  .w-60 { width: 60%; }
/* [kit] a filter chip that opens the phone's own picker: a native select laid over the pill */
.filter-pick { position: relative; cursor: pointer; }
.filter-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 1rem; }
.filter-pick:has(select:focus-visible) { box-shadow: var(--focus); }
/* [kit] "show" beside a password label */
.field-pw { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
.field-pw > :not(.label):not(.link-btn) { grid-column: 1 / -1; }
.spark { width: 120px; height: 32px; color: var(--b600); flex: none; }
/* the practice line inside the main column */
.main > .banner { justify-content: flex-start; padding-inline: var(--s6); }
@media (max-width: 900px) {
  .main > .banner { justify-content: center; padding-inline: var(--gutter); }
}
/* on a phone the English practice line must stay on one line at 390 px: less room at the sides, a smaller gap */
@media (max-width: 480px) { .main > .banner { padding-inline: var(--s2); gap: 6px; } }
@media (max-width: 900px) {
  /* [kit] the closed side menu must not be reachable by Tab, and its shadow must not show at the screen edge */
  .side:not(.is-open) { visibility: hidden; box-shadow: none; transition: transform .22s var(--ease), visibility 0s .22s; }
}

/* ───── the review queue ───── */
.ld-back { display: none; }
@media (max-width: 1100px) { .ld.is-open .ld-back { display: inline-flex; margin-bottom: 0; } }
.icon-btn-gap { width: 40px; height: 40px; flex: none; }
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { color: var(--b700); text-decoration: underline; }
.plain-list { display: flex; flex-direction: column; gap: 6px; padding-left: 1.1em; list-style: disc; }   /* [kit] a simple bulleted list */
.fact-list { display: flex; flex-direction: column; gap: var(--s3); }
.fact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; justify-items: start; font-weight: 400; }
.transcript { white-space: pre-wrap; color: var(--n700); font-size: var(--fs-sm); max-height: 320px; overflow: auto; }
.decide-extra { padding-top: 0; }
.decide-rule { border: 0; background: none; }
.decide-rule > summary { padding-inline: 0; min-height: 44px; }
.decide-rule > div { padding: 0 0 var(--s2); }
.ld-detail .summary-row { grid-template-columns: minmax(0, 30%) minmax(0, 1fr) auto; }
@media (max-width: 720px) { .ld-detail .summary-row { grid-template-columns: minmax(0, 1fr) auto; }  .ld-detail .summary-row dt { grid-column: 1; font-weight: 600; color: var(--ink); }  .ld-detail .summary-row dd { grid-column: 1 / -1; grid-row: 2; } }
/* on a phone the chosen item is its own screen: the page's intro and side actions step back */
@media (max-width: 1100px) { .has-detail .page-head p, .has-detail .page-head .btn-row { display: none; }  .has-detail .page-head { margin-bottom: var(--s3); } }
.dialog h2:focus-visible { box-shadow: none; }

/* ───── creators ───── */
.row-link { color: inherit; text-decoration: none; border-radius: var(--r-sm); }
.row-link:hover b { color: var(--b700); text-decoration: underline; }
.table .cell-main > div > b .tag { margin-left: 4px; vertical-align: 1px; }
.idbar-page h1 { font-size: var(--fs-2xl); }
.idbar-next { flex: none; }
@media (max-width: 720px) {
  .idbar-page { flex-wrap: wrap; }
  .idbar-page h1 { font-size: var(--fs-xl); }
  .idbar-next { flex: 1 1 100%; }
  .idbar-next .btn { width: 100%; }
}
.acct { align-items: flex-start; }
.acct .list-end { align-self: center; }
@media (max-width: 720px) { .acct { flex-wrap: wrap; }  .acct .list-end { margin-left: 36px; } }
.task-plain { color: var(--ink); }
#c-sched td.wk { white-space: nowrap; }
#c-sched td.wk a { text-decoration: none; }
.card > .empty { padding-block: var(--s8); }
#cr-miss:empty { display: none; }

/* ---------- briefs ---------- */
.brief-body { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; color: var(--n800); }
.file-link { max-width: 30rem; color: inherit; text-decoration: none; }
.file-link:hover { border-color: var(--n700); color: inherit; }
.file-link > .icon { color: var(--n500); flex: none; }
.file-pick { cursor: pointer; }                                         /* [kit] a file chooser as a button: the native input stays inside the label */
.file-pick:has(input:focus-visible) { box-shadow: var(--focus); }
.card-head-wrap { flex-wrap: wrap; }
.seg-wrap { flex-wrap: wrap; max-width: 100%; }                         /* [kit] a segmented control that may wrap on a phone */
.funnel-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }         /* [kit] a funnel with four steps */
.funnel-4 > div:nth-child(4) { background: var(--g600); }
@media (max-width: 720px) { .funnel-4 { grid-template-columns: minmax(0, 1fr); } }
.table td.row-act { text-align: end; white-space: nowrap; }
.wk-brief > summary { align-items: flex-start; color: var(--ink); gap: var(--s3); }
.wk-brief > summary::after { margin-top: 8px; flex: none; }
.wk-title { display: block; font-weight: 600; line-height: 1.4; }
.wk-meta { display: block; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }
/* the picker: one creator per row, the whole row is the tick target [kit] */
.pick { cursor: pointer; }
.pick:hover { background: var(--n25); }
.pick:has(input:checked) { background: var(--accent-soft); }
.pick input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--b600); }
.pick .list-title, .pick .list-meta { display: block; }
.pick-meta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; text-align: end; }
.pick-list { border-top: 1px solid var(--line-soft); }
.pick-bar { align-items: center; gap: var(--s3); }
@media (max-width: 720px) {
  .pick { flex-wrap: wrap; padding-inline: var(--s4); }
  .pick-meta { flex-basis: 100%; margin-left: 70px; align-items: flex-start; text-align: start; flex-direction: row; flex-wrap: wrap; gap: 2px 8px; }
}
/* the brief as the creator's phone shows it [kit] */
.phone-view { max-width: 380px; padding: var(--s4); border-radius: var(--r-xl); background: var(--n100); border: 1px solid var(--line); }
.phone-card { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.phone-title { font-size: var(--fs-lg); font-weight: 700; color: var(--ink); line-height: 1.35; }
@media (max-width: 900px) { .has-tabbar .actionbar.is-stuck { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); } }   /* [kit] a stuck action bar sits above the bottom bar of a console */
a.filter { text-decoration: none; }
.table-cards td.row-act a { display: inline-flex; align-items: center; }
@media (max-width: 720px) {
  .notice-act { flex-wrap: wrap; }                                       /* [kit] a notice with a button: on a phone the button goes under the words */
  .notice-act > .grow { flex: 1 1 0; }
  .notice-act > .btn { margin-left: calc(20px + var(--s3)); }
  .table-cards td.row-act { flex-basis: 100%; text-align: start; }
  .table-cards td.row-act::before { content: none !important; }
  .table-cards td.row-act a { min-height: 44px; }
}

/* ---------- discover ---------- */
.tile-head { display: flex; align-items: flex-start; gap: var(--s2); }
.tile-head .tag { flex: none; margin-top: 1px; }
.tile-name { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.tile-name:hover { color: var(--b700); text-decoration: underline; }
.tile-why { display: flex; gap: 6px; align-items: flex-start; color: var(--n800); }
.tile-why .icon { flex: none; margin-top: 3px; color: var(--g600); }
.tile-foot { align-items: center; }
.tile-stage { margin-right: auto; }
.tile-foot .tile-stage + .btn { flex: none; }
.d-search { max-width: 26rem; }
.d-scan { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }  .d-scan p { margin: 0; }  .d-scan p + p { margin-top: 2px; }

/* ---------- today ---------- */
.days-n { display: block; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }   /* [kit] the value written under each day of a .days chart */
@media (max-width: 1100px) { .today-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .hero-split { grid-template-columns: minmax(0, 1fr); } .hero-facts { flex-wrap: wrap; gap: var(--s3) var(--s5); } }

/* ---------- payments ---------- */
.pay { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.pay-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.pay-top .cell-main { display: flex; align-items: center; gap: var(--s3); min-width: 0; color: inherit; text-decoration: none; }
.pay-top .cell-main b { display: block; color: var(--ink); font-weight: 600; }
.pay-top .cell-main span { color: var(--muted); font-size: var(--fs-sm); }
.pay-amount { text-align: end; flex: none; }
.pay-amount b { display: block; font-size: var(--fs-2xl); font-weight: 700; line-height: 1.15; color: var(--ink); }
.pay-amount span { color: var(--muted); font-size: var(--fs-sm); }
.pay-rule { font-weight: 400; color: var(--n800); }
.pay-foot { display: flex; justify-content: flex-end; }
@media (max-width: 720px) { .pay-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }  .pay-facts dd { margin-bottom: var(--s3); }  .pay-foot .btn { flex: 1; } }
/* bars with a long label: the label may carry a second quiet line [kit] */
.bars-label { min-width: 0; overflow-wrap: anywhere; }
.bars-label small { display: block; color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 720px) { .bars { grid-template-columns: minmax(72px, 38%) minmax(0, 1fr) max-content; } }
/* the rules: a numbered list, one rule per row [kit] */
.rules { list-style: none; counter-reset: rule; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.rules > li { counter-increment: rule; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line-soft); }
.rules > li:last-child { border-bottom: 0; }
.rules > li::before { content: counter(rule); grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--n100); color: var(--n700); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.rules > li > p { grid-column: 2; overflow-wrap: anywhere; }
.rank { width: 24px; flex: none; text-align: center; color: var(--muted); font-weight: 600; }

/* [kit] a person's picture over their first letter: the letter shows until the picture has loaded, and stays if it cannot be loaded */
.avatar > span, .avatar > img { grid-area: 1 / 1; }
.avatar > img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* [kit] card tables with a picture: every line after the first starts under the name, also when it wraps */
@media (max-width: 720px) {
  .table-cards.has-avatar tr { padding-left: calc(var(--s4) + 44px); }
  .table-cards.has-avatar td.cell-first { margin-left: -44px; }
  .table-cards.has-avatar td.cell-first + td { margin-left: 0; }
}

/* ---------- impact ---------- */
.block { display: block; }
.th-sort { display: inline-flex; align-items: center; gap: 2px; color: inherit; text-decoration: none; min-height: 28px; }   /* [kit] a column heading that sorts */
.th-sort:hover { color: var(--ink); text-decoration: underline; }
th[aria-sort] .th-sort { color: var(--ink); }
.table-wide { min-width: 880px; }
.table-wide .cell-title { max-width: 22rem; }

/* ---------- questions, settings ---------- */
.q-top { align-items: center; gap: var(--s2) var(--s3); }
.q-text { font-size: var(--fs-md); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.q-answer { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--n25); border: 1px solid var(--line-soft); }
.q-answer p { white-space: pre-wrap; overflow-wrap: anywhere; }
.settings > section > h2 { padding-top: var(--s2); scroll-margin-top: calc(var(--topbar-h, 64px) + var(--s4)); }
.settings > section > h2:focus { outline: none; }
.settings-jump { margin-bottom: var(--s5); }
.settings-save { align-items: center; }
@media (max-width: 720px) { .settings-save .grow { display: none; } }
.settings .hint.block { margin-top: 2px; font-weight: 400; }
.reason-row { display: flex; align-items: flex-start; gap: var(--s3); }
.reason-n { width: 28px; height: 28px; margin-top: 8px; flex: none; border-radius: 50%; background: var(--n100); color: var(--n700); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 600; }
.sources { display: flex; flex-direction: column; }
.source { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line-soft); }
.source:last-child { border-bottom: 0; }
.source .status { flex: none; }
@media (max-width: 720px) { .table-wide td:first-child, .table-wide th:first-child { min-width: 42vw; max-width: 46vw; white-space: normal; } }

/* ---------- staff, ready to open ---------- */
.otp { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-xl); font-weight: 600; letter-spacing: .04em; color: var(--ink); user-select: all; overflow-wrap: anywhere; }   /* [kit] a secret shown once */
.st-more { padding-top: var(--s4); border-top: 1px solid var(--line-soft); }
.gl-row .task-name, .gl-job .task-name { color: var(--ink); }
@media (max-width: 720px) { .task .task-name { flex-basis: 100%; }  .table-cards td.row-act .btn { margin-top: var(--s2); } }   /* [kit] the kit's own phone rule for .task-name loses to the rule after it */
.gl-row .task-name small + small { margin-top: 2px; }
.gl-msg { color: var(--ink); }
.gl-reg-head { align-items: center; justify-content: space-between; }
.gl-bad { color: var(--r700); }
.copy-box { margin: 0; padding: var(--s3); background: var(--n50); border: 1px solid var(--line); border-radius: var(--r-sm); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }   /* [kit] a text to copy word for word */
.copy-box:focus-visible { outline: none; box-shadow: var(--focus); }
.gl-tpl { margin-top: var(--s2); font-weight: 400; }
h2 > .count { vertical-align: middle; }

/* ---------- YouTube's plain counts only ---------- */
.kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* [kit] two numbers in a row */
.stat-date { font-size: var(--fs-xl); }

/* ---------- short windows: office laptops at 1366×768 and 1280×720 ---------- */
/* [kit] the whole menu and the person block fit without scrolling; if a window is shorter still, the list scrolls inside itself and the person block stays put */
.side .nav { min-height: 0; overscroll-behavior: contain; }
.side-foot { flex: none; }
@media (min-width: 901px) and (max-height: 800px) {
  .side .brand { min-height: 56px; padding-block: 10px; }
  .side .nav { padding-top: 4px; padding-bottom: var(--s2); gap: 1px; }
  .side .nav-item { min-height: 36px; padding-block: 6px; }
  .side .nav-group { padding-top: var(--s3); padding-bottom: 4px; }
  .side-foot { padding-block: var(--s2); }
  .side-foot .nav-item { min-height: 34px; margin-top: 4px; }
}
