/* Account pages: sign up, log in, reset, verify, setup, and the super admin's
   screens. Built from the prototype's design system (tokens.css, and the base,
   button and sign-in rules of src/app.css and src/login.html), with no inline
   styles anywhere, because the pages' Content-Security-Policy forbids them. */

*,
*::before,
*::after {
  box-sizing: border-box;
}
:root {
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t: 0.16s;
  --ac-ring: rgba(34, 118, 201, 0.28);
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  background-image: var(--wash);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--tx);
  font-family: var(--font-ui);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin: 0;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  color: var(--ac-tx);
  font-weight: 600;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
svg {
  display: block;
  flex: none;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--ac-tx);
  outline-offset: 2px;
  border-radius: 8px;
}
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 46px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    background var(--t) var(--ease),
    border-color var(--t) var(--ease),
    filter var(--t) var(--ease);
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn--a {
  background: var(--ac);
  color: var(--on-ac);
  font-weight: 700;
}
.btn--a:hover {
  filter: brightness(1.07);
}
.btn--g {
  border-color: var(--line-2);
  background: var(--pane);
  color: var(--tx);
}
.btn--g:hover {
  background: var(--pane-2);
}
.btn--d {
  border-color: var(--bad-line);
  color: var(--bad);
  background: var(--pane);
}
.btn--d:hover {
  background: var(--bad-bg);
}
.btn--blk {
  width: 100%;
}
.btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}
.btn[disabled],
.btn[aria-busy='true'] {
  opacity: 0.6;
  cursor: progress;
  filter: none;
}

/* the two-column sign-in layout */
.wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 42px;
  border-right: 1px solid var(--line);
  background: var(--pane);
}
.right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 42px;
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    radial-gradient(760px 460px at 82% 14%, var(--vi-dim), transparent 64%),
    radial-gradient(620px 420px at 8% 92%, var(--ac-dim), transparent 62%),
    linear-gradient(180deg, var(--pane), var(--canvas) 82%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mark);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--tx);
}
.brand:hover {
  text-decoration: none;
}
.brand b {
  font-weight: 800;
}
.brand svg {
  color: var(--tx);
}

.form {
  max-width: 380px;
  width: 100%;
  margin: auto 0;
}
.form h1 {
  font-family: var(--font-display);
  font-size: clamp(27px, 3.2vw, 34px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.form h1 em {
  font-style: normal;
  color: var(--ac-tx);
}
.form .lead {
  color: var(--tx-2);
  font-size: 15px;
  margin-top: 10px;
}
.f {
  margin-top: 20px;
}
.f label,
.f legend {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tx-2);
  margin-bottom: 8px;
  padding: 0;
}
.f fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  background: var(--pane);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  color: var(--tx-3);
}
.box:focus-within {
  border-color: var(--ac-tx);
  box-shadow: 0 0 0 3px var(--ac-ring);
}
.box input,
.box select {
  border: 0;
  background: none;
  outline: none;
  flex: 1;
  min-width: 0;
  color: var(--tx);
  font-size: 15.5px;
  height: 100%;
}
.box input::placeholder {
  color: var(--tx-3);
}
.f--err .box {
  border-color: var(--bad);
}
.hint {
  font-size: 13px;
  color: var(--tx-2);
  margin-top: 8px;
}
.err {
  font-size: 13px;
  color: var(--bad);
  font-weight: 600;
  margin-top: 8px;
}
.form-err {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--r-2);
  background: var(--bad-bg);
  border: 1px solid var(--bad-line);
  color: var(--bad);
  font-size: 14px;
  font-weight: 600;
}
.note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-2);
  background: var(--ac-dim);
  border: 1px solid var(--ac-line);
  color: var(--tx);
  font-size: 14px;
}
.note--ok {
  background: var(--ok-bg);
  border-color: var(--ok-line);
}
.form .btn--blk {
  margin-top: 20px;
}
.alt {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--tx-3);
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--tx-2);
  margin-top: 14px;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ac);
}
.choices {
  display: grid;
  gap: 10px;
}
/* ".f .choice", not ".choice": a choice is a <label> inside a field, and the
   general ".f label" rule would otherwise win. */
.f .choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-3);
  background: var(--pane);
  cursor: pointer;
  font-weight: 400;
}
.f .choice:has(input:checked) {
  border-color: var(--ac-tx);
  box-shadow: 0 0 0 3px var(--ac-ring);
}
.f .choice input {
  flex: none;
  margin: 4px 0 0;
  accent-color: var(--ac);
}
.f .choice > span {
  display: block;
  min-width: 0;
}
.f .choice b {
  display: block;
  color: var(--tx);
  font-size: 15px;
  font-weight: 600;
}
.f .choice > span > span {
  display: block;
  margin-top: 2px;
  color: var(--tx-2);
  font-size: 13.5px;
  line-height: 1.45;
}
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.steps i {
  display: block;
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: var(--line);
}
.steps i.on {
  background: var(--ac);
}
.ts {
  margin-top: 18px;
  min-height: 65px;
}
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pitch {
  max-width: 400px;
}
.pitch h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.pitch ul {
  margin-top: 18px;
  display: grid;
  gap: 13px;
}
.pitch li {
  display: flex;
  gap: 11px;
  font-size: 14.5px;
  color: var(--tx-2);
}
.pitch li svg {
  color: var(--ac-tx);
  margin-top: 4px;
}
.pitch li b {
  color: var(--tx);
  font-weight: 600;
}
.foot {
  font-size: 12.5px;
  color: var(--tx-3);
}

/* signed-in pages and the super admin */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: var(--pane);
  border-bottom: 1px solid var(--line);
}
.page {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.page h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.card {
  margin-top: 20px;
  padding: 20px 22px;
  background: var(--pane);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--sh-1);
}
.card h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card p {
  color: var(--tx-2);
  margin-top: 6px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}
.item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--pane);
}
.item dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 14px;
  margin: 8px 0 0;
  font-size: 14px;
}
.item dt {
  color: var(--tx-3);
}
.item dd {
  margin: 0;
  color: var(--tx);
  overflow-wrap: anywhere;
}
.codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}
.codes li {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--pane-2);
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
  font-size: 14px;
  background: var(--pane-2);
  padding: 10px 12px;
  border-radius: var(--r-1);
  margin-top: 8px;
}
.item .bad {
  color: var(--bad);
}
.item .muted {
  margin-top: 4px;
  font-size: 13.5px;
}
.muted {
  color: var(--tx-3);
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
  }
  .right {
    display: none;
  }
  .left {
    border-right: 0;
  }
}
@media (max-width: 520px) {
  .left {
    padding: 24px 16px;
  }
  .top {
    padding: 14px 16px;
  }
  .page {
    padding: 24px 16px 48px;
  }
  .codes {
    grid-template-columns: 1fr;
  }
}

/* the pin test bench (development only) */
.harness {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  min-height: calc(100vh - 70px);
}
.harness__side {
  padding: 16px;
  border-right: 1px solid var(--line);
  background: var(--pane);
  overflow: auto;
  max-height: calc(100vh - 70px);
}
.harness__stage {
  padding: 16px;
  overflow: auto;
}
.harness__stage iframe {
  width: 100%;
  height: calc(100vh - 110px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: #fff;
}
.harness__h {
  font-size: 14px;
  margin-top: 16px;
}
.harness__pins,
.harness__log {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font:
    12px/1.45 ui-monospace,
    Menlo,
    monospace;
  overflow-wrap: anywhere;
}
.harness__log li,
.harness__pins li {
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.harness__dropped {
  color: var(--bad);
}

/* ---------- workspace and project pages ---------- */
.page--wide {
  max-width: 1100px;
}
.row--start {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.inline-form {
  margin-top: 12px;
}
.inline-form--row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.box--sm {
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
}
.box--sm input,
.box--sm select {
  font-size: 14px;
}
.actions--end {
  justify-content: flex-end;
}
.item--link {
  display: block;
  color: inherit;
  font-weight: 400;
}
.item--link:hover {
  border-color: var(--line-2);
  background: var(--pane-2);
  text-decoration: none;
}
.item--off {
  opacity: 0.6;
}
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--pane-2);
  color: var(--tx-2);
  border: 1px solid var(--line);
}
.pill--in_review {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-line);
}
.pill--changes_requested {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-line);
}
.pill--approved {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok-line);
}
.ok {
  color: var(--ok);
  font-weight: 600;
}
.warn {
  color: var(--warn);
  font-weight: 600;
}
.bad {
  color: var(--bad);
  font-weight: 600;
}
.designs {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}
.design {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}
.design h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}
.variant {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.versions {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.version {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: var(--r-2);
  background: var(--pane-2);
}
.version__main .row {
  gap: 10px;
}
.version__num {
  font-family: var(--font-display);
  font-weight: 700;
}
.version__note {
  font-size: 14px;
  color: var(--tx-2);
  margin-top: 2px;
}
.check--sm {
  margin: 0;
  font-size: 13.5px;
}
.drop {
  margin-top: 10px;
  padding: 14px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-3);
  background: var(--pane);
  display: grid;
  gap: 8px;
}
.drop--over {
  border-color: var(--ac-tx);
  background: var(--ac-dim);
}
.drop--busy {
  opacity: 0.85;
}
.drop__label {
  display: grid;
  cursor: pointer;
}
.drop__label b {
  color: var(--ac-tx);
}
.drop__note {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: 14px;
  background: var(--pane);
}
.drop__bar {
  width: 100%;
  height: 6px;
  accent-color: var(--ac);
}
.drop__status p {
  margin-top: 4px;
  font-size: 13.5px;
}

/* the Share with client dialog */
.dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--sh-3);
  background: var(--pane);
  color: var(--tx);
}
.dialog::backdrop {
  background: rgba(16, 16, 24, 0.45);
}
.dialog h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.dialog .choices {
  margin-top: 16px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-2);
  border: 1px solid var(--line-2);
  color: var(--tx-2);
}
.icon-btn:hover {
  background: var(--pane-2);
}
.kind {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-3);
  cursor: pointer;
}
.kind:has(input:checked) {
  border-color: var(--ac-tx);
  background: var(--ac-dim);
  box-shadow: 0 0 0 3px var(--ac-ring);
}
.kind:has(input:disabled) {
  cursor: default;
}
.kind input {
  order: 3;
  margin: 4px 0 0 auto;
  accent-color: var(--ac);
}
.kind__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pane-2);
  color: var(--tx-2);
}
.kind:has(input:checked) .kind__icon {
  background: var(--ac);
  color: var(--on-ac);
}
.kind__text b {
  display: block;
  font-size: 14.5px;
  color: var(--tx);
}
.kind__text > span {
  display: block;
  font-size: 13px;
  color: var(--tx-2);
  line-height: 1.45;
}
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--r-1);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.caps {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px !important;
}
.hint--icon {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}
.dialog .actions {
  margin-top: 18px;
}

/* ---------- the review screen ---------- */
/* A column: the bar takes what it needs (one row or two), the rest is the stage. */
body[data-page='review'],
body[data-page='share'] {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--pane);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.rbar__left,
.rbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rbar__center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.rbar__title {
  font-family: var(--font-display);
  font-size: 15px;
  margin-right: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.rbar__fixed {
  font-size: 14px;
  color: var(--tx-2);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--pane-2);
}
.rbar__brand .brand {
  font-size: 15px;
}
.rbar__brand .brand svg {
  width: 24px;
  height: 24px;
}
.seg {
  flex: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--pane);
}
.seg__btn {
  height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tx-2);
}
.seg__btn:hover {
  background: var(--pane-2);
}
.seg__btn--on {
  background: var(--ac-dim);
  color: var(--ac-tx);
}
.seg__val {
  min-width: 48px;
  text-align: center;
  font-size: 13px;
  color: var(--tx-2);
}
.stage {
  height: 100%;
  overflow: auto;
  padding: 24px;
  background: var(--canvas);
}
.stage__msg {
  text-align: center;
  margin-top: 80px;
  color: var(--tx-2);
}
.stage__frame {
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--r-2);
  box-shadow: var(--sh-2);
  background: #fff;
}
.stage__frame iframe {
  display: block;
  border: 0;
  background: #fff;
  transform-origin: 0 0;
}
@media (max-width: 900px) {
  .rbar__right {
    width: 100%;
    flex-wrap: wrap;
  }
  .stage {
    height: auto;
    min-height: calc(100vh - 160px);
    padding: 12px;
  }
  body[data-page='review'],
  body[data-page='share'] {
    height: auto;
    overflow: auto;
    display: block;
  }
}

/* ---------- comments on the review screen ---------- */
.rview {
  display: flex;
  flex: 1;
  min-height: 0;
}
.rview .stage {
  flex: 1;
  min-width: 0;
}
.btn--on {
  background: var(--ac-dim);
  border-color: var(--ac-line);
  color: var(--ac-tx);
}
.count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--pane-2);
  font-size: 12.5px;
  text-align: center;
}
.cpanel {
  width: 360px;
  flex: none;
  height: 100%;
  overflow: auto;
  padding: 16px;
  background: var(--pane);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cpanel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cpanel__head h2 {
  font-family: var(--font-display);
  font-size: 16px;
}
.cpanel__earlier {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--tx-2);
}
.cpanel__hint {
  font-size: 14px;
  color: var(--tx-2);
}
.ctabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--pane-2);
}
.ctabs__btn {
  flex: 1;
  height: 30px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-2);
}
.ctabs__btn--on {
  background: var(--pane);
  color: var(--tx);
  box-shadow: var(--sh-1);
}
.composer,
.cform {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer {
  padding: 12px;
  border: 1px solid var(--ac-line);
  border-radius: var(--r-2);
  background: var(--ac-dim);
}
.composer__where {
  font-size: 13px;
  font-weight: 600;
  color: var(--ac-tx);
}
.composer textarea,
.cform textarea {
  width: 100%;
  resize: vertical;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  background: var(--pane);
}
.threads {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.thread {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.thread--open {
  border-color: var(--ac-line);
  box-shadow: var(--sh-1);
}
.thread--done {
  background: var(--pane-2);
}
.thread__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.thread__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.pin-no {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--ac);
  color: var(--on-ac);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.thread--done .pin-no {
  background: var(--ok);
  color: var(--on-fill);
}
.chip {
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--pane-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tx-2);
}
.chip--ok {
  background: var(--ok-bg);
  border-color: var(--ok-line);
  color: var(--ok);
}
.chip--warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn);
}
.cmt__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}
.cmt__email,
.cmt__when {
  color: var(--tx-3);
  font-size: 12.5px;
}
.cmt__body {
  margin-top: 4px;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cmt__body a {
  color: var(--ac-tx);
}
.cmt__body--gone {
  color: var(--tx-3);
  font-style: italic;
}
.cmt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}
.link-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--ac-tx);
}
.link-btn:hover {
  text-decoration: underline;
}
.link-btn--bad {
  color: var(--bad);
}
.replies {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}
@media (max-width: 900px) {
  .rview {
    flex-direction: column;
  }
  .cpanel {
    width: 100%;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ---------- the bell ---------- */
.bell {
  position: relative;
}
.bell__btn {
  position: relative;
}
.bell__count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--ac);
  color: var(--on-ac);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bell__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--pane);
  box-shadow: var(--sh-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bell__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bell__item {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  padding: 8px 10px;
  border-radius: var(--r-1);
  font-size: 13.5px;
  color: var(--tx);
  text-decoration: none;
}
.bell__item:hover {
  background: var(--pane-2);
}
.bell__item--new {
  background: var(--ac-dim);
}
.bell__text {
  width: 100%;
  color: var(--tx-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bell__when {
  width: 100%;
  color: var(--tx-3);
  font-size: 12px;
}
.bell__item span {
  font-weight: 400;
}

/* ---------- the dashboard ---------- */
.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.figure {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--pane);
  color: var(--tx-2);
  font-size: 14px;
}
.figure__n {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--tx);
}
.figure--warn .figure__n {
  color: var(--warn);
}
.recent {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.recent__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--r-1);
  color: var(--tx);
  text-decoration: none;
  font-size: 14px;
}
.recent__item:hover {
  background: var(--pane-2);
}
.recent__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.recent__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent__when {
  color: var(--tx-3);
  font-size: 12.5px;
}
.ptools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.ptools__search {
  flex: 1;
  min-width: 180px;
}
.ptable {
  display: flex;
  flex-direction: column;
}
.ptable__row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) 1.3fr 0.7fr 1.2fr 1.1fr 1.5fr;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.ptable__row--head {
  border-top: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tx-3);
}
.ptable__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ptable__name a,
.ptable__name b {
  font-weight: 600;
  color: var(--tx);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ptable__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.ptable__empty {
  padding: 16px 4px;
}
.chip + .chip,
.ptable__row .chip {
  margin-left: 6px;
}
.ptable .pill {
  white-space: nowrap;
}
.page > .figures {
  margin-top: 16px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 760px) {
  .figures {
    gap: 8px;
  }
  .figure {
    padding: 12px;
    font-size: 12.5px;
  }
  .figure__n {
    font-size: 22px;
  }
  .ptable__row [data-label]::before {
    content: attr(data-label) ': ';
    color: var(--tx-3);
  }
  .ptable__row--head {
    display: none;
  }
  .ptable__row {
    grid-template-columns: 1fr auto;
  }
  .ptable__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* ---------- a switch (Share dialog: Show comments) ---------- */
.toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
}
.toggle__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}
.toggle__text > span {
  color: var(--tx-2);
  font-size: 13px;
}
.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.toggle__track {
  flex: none;
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--line-2);
  transition: background 0.15s;
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sh-1);
  transition: transform 0.15s;
}
.toggle input:checked + .toggle__track {
  background: var(--ac);
}
.toggle input:checked + .toggle__track::after {
  transform: translateX(16px);
}
.toggle input:focus-visible + .toggle__track {
  outline: 2px solid var(--ac-tx);
  outline-offset: 2px;
}
.toggle:has(input:disabled) {
  opacity: 0.6;
  cursor: default;
}
@media (prefers-reduced-motion: reduce) {
  .toggle__track,
  .toggle__track::after {
    transition: none;
  }
}
.dialog .toggle {
  margin-top: 12px;
}

/* ---------- Team and Activity ---------- */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.grants {
  border: 0;
  padding: 0;
  margin: 0;
}
.grants legend {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.grants__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.grants__row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.grants__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.member__projects summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ac-tx);
}
.pill--role-owner,
.pill--role-manager,
.pill--role-member {
  background: var(--pane-2);
  color: var(--tx-2);
}
.activity {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.activity__item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.activity__item:first-child {
  border-top: 0;
}
.activity__when {
  flex: none;
  color: var(--tx-3);
  font-size: 12.5px;
}
@media (max-width: 760px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
  .activity__item {
    flex-direction: column;
    gap: 2px;
  }
}
/* Inside a form field (.f), a project row is still one line: tick, name, level. */
.f label.grants__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  color: var(--tx);
}
.f label.grants__row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--ac);
}
.grants__row .box {
  flex: none;
  width: 150px;
}

/* ---------- super admin: small figures ---------- */
.figs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 16px;
  margin-bottom: 12px;
}
.figs dt {
  grid-row: 2;
  font-size: 12.5px;
  color: var(--tx-3);
}
.figs dd {
  grid-row: 1;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}
@media (max-width: 600px) {
  .figs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .figs dt,
  .figs dd {
    grid-row: auto;
  }
}
