/* Teacake HQ, in Teacake's Glaze look (the studio site's colours and type). One stylesheet, no
   script. Each app keeps its own colours where it appears (src/apps/catalogue.ts). */

@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url("/static/fonts/fredoka-latin-500-normal.woff2") format("woff2") }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("/static/fonts/fredoka-latin-600-normal.woff2") format("woff2") }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/static/fonts/figtree-latin-400-normal.woff2") format("woff2") }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/static/fonts/figtree-latin-500-normal.woff2") format("woff2") }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/static/fonts/figtree-latin-600-normal.woff2") format("woff2") }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/static/fonts/figtree-latin-700-normal.woff2") format("woff2") }

/* Anything hidden stays hidden, whatever display its own rules give it. */
[hidden] { display: none !important }

:root {
  --jam: #D23153;
  --jam-deep: #B32447;
  --toast: #F5A833;
  --toast-deep: #DE8526;
  --butter: #FFEB6E;
  --crumb: #FFE3B3;
  --currant: #3A1638;
  --currant-lift: #4B2148;
  --soft: #6A4A63;
  --on-currant: #F3E4EC;
  --on-currant-soft: #D9C3D2;
  --blush: #FBF1F4;
  --line: #EFE2E7;
  --press: #E6D3DC;
  --custard: #FFF4DF;
  --custard-line: #E9CFA0;
  --ok-ink: #1E6B3A;
  --ok-wash: #E3F3E8;
  --wait-ink: #7A5200;
  --wait-wash: #FFF3C4;
  --stop-wash: #FDE7EC;
  --quiet-ink: #4B3A48;
  --quiet-wash: #F1EBEF;
  --display: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bounce: cubic-bezier(.3, 1.55, .5, 1);
  --radius-card: 22px;
  --radius-small: 14px;
}

*, *::before, *::after { box-sizing: border-box }
/* The page's backdrop matches the sidebar beside the white page, so scrolling past either end shows
   currant behind the sidebar, never white; and the bounce is off where browsers allow it. */
html {
  -webkit-text-size-adjust: 100%; --side-w: 200px; overscroll-behavior: none;
  background: linear-gradient(to right, var(--currant) var(--side-w), #FFFFFF var(--side-w));
}
html.side-icons { --side-w: 68px }
body { margin: 0; color: var(--currant); font: 400 1rem/1.5 var(--text); overscroll-behavior: none }
img { max-width: 100% }
a { color: var(--jam-deep); text-underline-offset: 2px }
a:hover { color: var(--currant) }
:focus-visible { outline: 3px solid var(--jam); outline-offset: 2px }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0 }
h1 { font-size: 2.125rem; line-height: 1.1 }
h2 { font-size: 1.3125rem; line-height: 1.2 }
h3 { font-size: 1.25rem; line-height: 1.2 }
p { margin: 0 }
.lead { color: var(--soft); font-size: .9375rem; max-width: 68ch }
.muted { color: var(--soft) }
.small { font-size: .875rem }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--butter); color: var(--currant); font-weight: 700 }
.skip:focus { top: 12px }

/* The shell: a slim sidebar pinned beside the page, as tall as the window and never scrolling (its rows
   tighten on a short window so who you are and Sign out stay in view), or a bar above a narrow page. */
.shell { display: flex; min-height: 100vh }
.side {
  flex: none; width: var(--side-w); position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: visible; z-index: 5;
  background: var(--currant); color: var(--on-currant);
  padding: clamp(12px, 2.4vh, 18px) 10px clamp(10px, 2vh, 14px); display: flex; flex-direction: column; gap: clamp(10px, 2.2vh, 18px);
}
.main { flex: 1 1 0; min-width: 0; background: #FFFFFF; padding: 32px 40px 56px; display: flex; flex-direction: column; gap: 28px }

.brand { display: flex; align-items: center; gap: 8px; padding: 0 4px; min-width: 0; color: #FFFFFF; text-decoration: none; border-radius: 8px }
.brand:hover { color: #FFFFFF }
.brand-name { font: 600 1.125rem/1 var(--display); letter-spacing: .01em; white-space: nowrap }
.brand-tag { color: var(--butter) }

.nav-list { display: flex; flex-direction: column; gap: 2px }
.nav-link {
  display: flex; align-items: center; gap: 10px; min-height: clamp(32px, 5.2vh, 40px); padding: 0 10px; border-radius: 12px;
  color: var(--on-currant); text-decoration: none; font-size: .875rem; font-weight: 500;
}
.nav-link:hover { color: #FFFFFF; background: var(--currant-lift) }
.nav-link[aria-current="page"] { background: var(--butter); color: var(--currant); font-weight: 700 }
.nav-link:focus-visible, .brand:focus-visible, .sign-out:focus-visible { outline-color: var(--butter) }
.nav-link .count { margin-left: auto }
.icon { flex: none }
.side-fill { flex: 1; min-height: 0 }
.who { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--currant-lift) }
/* A person's picture or, until they add one, their initial: always a true box, whatever holds it. */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; overflow: hidden;
  border-radius: 999px; background: var(--butter); color: var(--currant); font: 600 .875rem/1 var(--display); text-align: center;
  vertical-align: middle; user-select: none;
}
.avatar.owner { background: var(--crumb) }
.who-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0 }
.who-name { font-weight: 700; font-size: .8125rem; color: #FFFFFF; overflow-wrap: anywhere }
.who-role { font-size: .75rem; color: var(--on-currant-soft) }
.sign-out { font-size: .75rem; color: var(--on-currant-soft); white-space: nowrap }
.sign-out:hover { color: #FFFFFF }

.side-head { display: flex; align-items: center; justify-content: space-between; gap: 6px }
.side-toggle { margin: 0; flex: none }
.side-toggle-button {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--on-currant-soft); cursor: pointer;
}
.side-toggle-button:hover { background: var(--currant-lift); color: #FFFFFF }
.side-toggle-button:focus-visible { outline: 2px solid var(--butter); outline-offset: 1px }

/* Tooltips: a small dark label beside the thing, after a short pause. No script. */
[data-tip] { position: relative }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 5px 9px; border-radius: 8px; background: #1F0B1E; color: #FFFFFF; font: 600 .75rem/1.2 var(--text);
  white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; z-index: 30; box-shadow: 0 6px 18px rgba(31, 11, 30, .25);
  transition: opacity .1s ease, visibility 0s linear .1s;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; visibility: visible; transition: opacity .12s ease .4s, visibility 0s linear .4s }
@media (prefers-reduced-motion: reduce) { [data-tip]::after { transition: none } }
.sign-out { display: inline-flex; align-items: center; gap: 5px; text-decoration: none }
.sign-out .icon { width: 16px; height: 16px }

/* Collapsed to icons: each section's name stays for screen readers and shows on hover. */
@media (min-width: 861px) {
  html.side-icons .side { padding-left: 10px; padding-right: 10px }
  html.side-icons .side .label, html.side-icons .brand-name, html.side-icons .brand-tag, html.side-icons .who-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  html.side-icons .brand { justify-content: center; padding: 0 }
  html.side-icons .nav-link { position: relative; justify-content: center; padding: 0 }
  html.side-icons .nav-link .count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; font-size: .625rem }
  html.side-icons .side-head { flex-direction: column; gap: 10px }
  html.side-icons .who { flex-direction: column; gap: 10px; padding: 10px 0 0 }
}

/* The drawer is the sidebar itself on a wide window: its parts sit in the side as before. */
.drawer { display: contents }
.drawer-state, .drawer-open, .drawer-head, .drawer-scrim, .top-title, .top-me { display: none }

/* A phone: a bar along the top (the menu, the section's name, you), and the sidebar slides in from
   the left as a drawer over the page, as Slack's own app has it. */
@media (max-width: 860px) {
  html { background: linear-gradient(to bottom, var(--currant) 50%, #FFFFFF 50%) }
  html:has(.drawer-state:checked) { overflow: hidden }
  .side-toggle { display: none }
  .shell { flex-direction: column }
  .side { position: sticky; top: 0; z-index: 30; width: auto; height: auto; overflow: visible; padding: 0; gap: 0; display: block }
  .side-head {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; min-height: 56px;
    padding: max(6px, env(safe-area-inset-top)) 8px 6px;
  }
  .side-head .brand { display: none }
  .drawer-open, .top-me {
    position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
    color: #FFFFFF; cursor: pointer; text-decoration: none;
  }
  .drawer-open:hover, .top-me:hover, .drawer-open:focus-visible, .top-me:focus-visible { background: var(--currant-lift); color: #FFFFFF }
  .drawer-dot { position: absolute; top: 9px; right: 8px; width: 9px; height: 9px; border-radius: 999px; background: var(--jam); box-shadow: 0 0 0 2px var(--currant) }
  .top-title { display: block; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; color: #FFFFFF; font: 600 1.0625rem/1 var(--display) }
  .top-me .avatar { width: 32px; height: 32px; font-size: .875rem; line-height: 32px }
  .drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(86vw, 320px); display: flex; flex-direction: column; gap: 14px;
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
    background: var(--currant); box-shadow: 12px 0 40px rgba(20, 6, 19, .35); transform: translateX(-104%); visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s linear .3s;
  }
  .drawer-state:checked ~ .drawer { transform: none; visibility: visible; transition: transform .3s var(--ease), visibility 0s }
  .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(31, 11, 30, .5); opacity: 0; pointer-events: none; transition: opacity .3s ease }
  .drawer-state:checked ~ .drawer-scrim { opacity: 1; pointer-events: auto }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 4px 10px; color: #FFFFFF }
  .drawer-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--on-currant-soft); cursor: pointer }
  .drawer-close:hover { background: var(--currant-lift); color: #FFFFFF }
  .nav-list .nav-link { min-height: 50px; padding: 0 14px; font-size: 1rem; gap: 14px }
  .side-fill { display: block }
  .main { padding: 22px 16px 48px }
  .main.flush { padding: 0 }
  h1 { font-size: 1.875rem }
}
@media (hover: none) { [data-tip]::after { display: none } }

/* A page's head: Pat (on Home) beside the title and a line about the page. */
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap }
.page-head > div { min-width: 0; flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px }
.pat { flex: none }
.bob { animation: bob 3.4s ease-in-out infinite; transform-origin: 50% 100% }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0) } 45% { transform: translateY(-5px) rotate(-4deg) } 60% { transform: translateY(0) rotate(0) } }
@media (prefers-reduced-motion: reduce) { .bob { animation: none } }

.section { display: flex; flex-direction: column; gap: 14px }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap }
.split { display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-start }
.split-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 36px }
.split-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px }

/* Cards. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px }
.card { background: var(--blush); border-radius: var(--radius-card); padding: 22px; display: flex; flex-direction: column; gap: 10px }
.card.outline { background: #FFFFFF; border: 1.5px solid var(--line) }
.card-head { display: flex; align-items: center; gap: 12px }
.card-icon {
  width: 42px; height: 42px; border-radius: var(--radius-small); background: #FFFFFF; color: var(--jam);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.card p { color: var(--soft); font-size: .9375rem }
.card-actions { margin-top: auto; padding-top: 4px; display: flex; gap: 10px; flex-wrap: wrap }

/* Buttons: flat and compact, as a working tool's are. Jam for the one main action, outlined for the rest. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 10px; background: var(--jam); color: #FFFFFF; text-decoration: none; cursor: pointer;
  font: 600 .875rem/1 var(--text); white-space: nowrap; box-shadow: 0 1px 2px rgba(58, 22, 56, .14); transition: background-color .12s ease, border-color .12s ease;
}
.btn:hover { color: #FFFFFF; background: #DA3A5C }
.btn:active { transform: translateY(1px); box-shadow: none }
.btn.quiet { background: #FFFFFF; color: var(--currant); border-color: var(--press); box-shadow: 0 1px 2px rgba(58, 22, 56, .06) }
.btn.quiet:hover { background: var(--blush); color: var(--currant) }
.btn.quiet:active { box-shadow: none }
.btn.danger { background: #FFFFFF; color: var(--jam-deep); border-color: #F2C9D3; box-shadow: none }
.btn.danger:hover { background: var(--stop-wash) }
@media (max-width: 860px) { .btn { min-height: 44px } }
input[type="file"] { font: 400 .875rem var(--text); color: var(--soft) }
input[type="file"]::file-selector-button {
  margin-right: 12px; min-height: 36px; padding: 0 14px; border: 1px solid var(--press); border-radius: 10px; background: #FFFFFF;
  color: var(--currant); font: 600 .875rem var(--text); cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--blush) }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none }
@media (prefers-reduced-motion: reduce) { .btn { transition: none } }
.link-out::after { content: " \2197"; font-family: var(--text) }

/* Chips. */
.chip { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap }
.chip.ok { color: var(--ok-ink); background: var(--ok-wash) }
.chip.wait { color: var(--wait-ink); background: var(--wait-wash) }
.chip.stop { color: var(--jam-deep); background: var(--stop-wash) }
.chip.quiet { color: var(--quiet-ink); background: var(--quiet-wash) }

/* The apps, each in its own colours. */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px }
.app-card { border: 1.5px solid var(--line); border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 12px }
.app-head { display: flex; align-items: center; gap: 12px }
.app-head img { width: 44px; height: 44px; border-radius: 12px; flex: none }
.app-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0 }
.app-card p { color: var(--soft); font-size: .9375rem }

/* HQ's build steps. */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: #FBF6F8 }
.step.here { background: var(--ok-wash) }
.step.next { background: var(--custard) }
.step-n {
  width: 30px; height: 30px; border-radius: 999px; background: #FFFFFF; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font: 600 .9375rem/1 var(--display);
}
.step-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0 }
.step-title { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 700 }
.step-text p { color: var(--soft); font-size: .9375rem }

/* The noticeboard. */
.board { background: var(--custard); border-radius: var(--radius-card); padding: 22px; display: flex; flex-direction: column; gap: 14px }
.board h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem }
.note { background: #FFFFFF; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px }
.note p { font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .78125rem; color: var(--soft) }
.note-foot form { margin: 0 }
.text-button {
  border: 0; background: none; padding: 8px 4px; min-height: 32px; cursor: pointer;
  color: var(--jam-deep); font: 600 .78125rem var(--text); text-decoration: underline; text-underline-offset: 2px;
}
.note-foot .text-button { color: var(--soft); text-decoration: none }
.note-foot .text-button:hover, .note-foot .text-button:focus-visible { color: var(--jam-deep); text-decoration: underline }
.board form.post { display: flex; flex-direction: column; gap: 10px }
.board form.post .btn { align-self: flex-start }

/* Forms. */
.field { display: flex; flex-direction: column; gap: 6px }
.field label, .legend { font-weight: 700; font-size: .9375rem }
.hint { font-size: .875rem; color: var(--soft) }
input[type="text"], input[type="email"], input[type="date"], input[type="time"], input[type="url"], input[type="number"], textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--press); border-radius: 12px;
  background: #FFFFFF; color: var(--currant); font: 400 1rem/1.4 var(--text);
}
textarea { resize: vertical; min-height: 88px }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--jam); outline-offset: 1px; border-color: var(--jam) }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--jam); flex: none }
.choice span { display: flex; flex-direction: column; gap: 2px }
.choice strong { font-size: .9375rem }
.choice small { font-size: .875rem; color: var(--soft) }
.choices-row { display: flex; flex-wrap: wrap; gap: 8px }
.choices-row .choice { flex: 1 1 180px; align-items: center }
.choices-row .choice img { width: 26px; height: 26px; border-radius: 7px }
.form { display: flex; flex-direction: column; gap: 18px; max-width: 640px }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center }

.notice { padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: .9375rem }
.notice.ok { background: var(--ok-wash); color: var(--ok-ink) }
.notice.error { background: var(--stop-wash); color: var(--jam-deep) }

/* People. */
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px }
.person { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 18px }
.person .avatar { background: var(--butter) }
.person .avatar.owner { background: var(--crumb) }
.person-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px }
.person-name { font-weight: 700; overflow-wrap: anywhere }
.person-meta { font-size: .875rem; color: var(--soft); overflow-wrap: anywhere }
.person-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center }

/* Lists of what's coming, and links out. */
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem }
.ticks li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 999px; background: var(--toast) }
.outs { display: flex; flex-direction: column; gap: 10px }
.out { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line) }
.out a { font-weight: 700; text-decoration: none }
.out a:hover { text-decoration: underline }
.out p { font-size: .9375rem; color: var(--soft) }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px }
.download { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border-radius: 18px; background: var(--blush); text-decoration: none; color: var(--currant); font-weight: 600; font-size: .875rem; text-align: center }
.download img { width: 72px; height: 72px; object-fit: contain; border-radius: 16px }
.download:hover { color: var(--jam-deep) }

/* The audit log. */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 14px }
table { width: 100%; border-collapse: collapse; font-size: .875rem }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top }
thead th { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); background: #FBF6F8 }
tbody th { font-weight: 700 }
tr:last-child td { border-bottom: 0 }
td.when { white-space: nowrap; color: var(--soft) }
td.what { font-weight: 600 }
.empty { padding: 18px 20px; border-radius: 14px; background: #FBF6F8; color: var(--soft); font-size: .9375rem }

/* The page for someone HQ can't show the rest to. */
body.plain { background: var(--blush) }
.lone { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px }
.lone-card { max-width: 480px; background: #FFFFFF; border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start }
.lone-card .lead { overflow-wrap: anywhere }
.narrow { max-width: 640px }

/* The sidebar's count of what's new. */
.count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--jam); color: #FFFFFF;
  font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.step.part { background: var(--custard) }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em }
select {
  min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--press); border-radius: 12px; background: #FFFFFF;
  color: var(--currant); font: 400 1rem/1.4 var(--text); max-width: 100%;
}

/* The inbox's filters. */
/* Filters: a light segmented control, the one shown raised in white. */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }
.pills { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #F5EDF1; border-radius: 11px; align-self: flex-start }
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 8px;
  color: var(--soft); text-decoration: none; font-weight: 600; font-size: .8125rem;
}
.pill:hover { background: rgba(255, 255, 255, .65); color: var(--currant) }
.pill[aria-current="true"] { background: #FFFFFF; color: var(--currant); box-shadow: 0 1px 2px rgba(58, 22, 56, .14) }
.pill img { width: 18px; height: 18px; border-radius: 5px }
.pill-n { font-weight: 600; color: var(--soft) }
/* A section's own pages: underlined tabs along a line. */
.pills.tabs-big { align-self: stretch; gap: 6px; padding: 0; background: none; border-radius: 0; border-bottom: 1px solid var(--line) }
.tabs-big .pill { min-height: 42px; margin-bottom: -1px; padding: 0 4px; border-radius: 0; border-bottom: 2px solid transparent; font-size: .9375rem; color: var(--soft) }
.tabs-big .pill + .pill { margin-left: 14px }
.tabs-big .pill:hover { background: none; color: var(--currant) }
.tabs-big .pill[aria-current="true"] { background: none; box-shadow: none; color: var(--currant); border-bottom-color: var(--jam) }
.tabs-big .pill-n { padding: 2px 7px; border-radius: 999px; background: var(--stop-wash); color: var(--jam-deep); font-size: .75rem; font-weight: 700 }

/* The list of threads. */
.threads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: 20px; overflow: hidden }
.threads li + li { border-top: 1px solid var(--line) }
.thread-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; color: var(--currant); text-decoration: none }
.thread-row:hover { background: #FBF6F8; color: var(--currant) }
.thread-avatar {
  width: 36px; height: 36px; border-radius: 999px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--quiet-wash); color: var(--currant); font: 600 .9375rem/1 var(--display);
}
.thread-row.unread .thread-avatar { background: var(--stop-wash); color: var(--jam-deep) }
.thread-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px }
.thread-who { font-weight: 600; overflow-wrap: anywhere }
.thread-row.unread .thread-who, .thread-row.unread .thread-subject { font-weight: 700 }
.thread-subject { font-size: .9375rem; overflow-wrap: anywhere }
.thread-preview { font-size: .875rem; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.thread-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 40% }
.thread-when { font-size: .8125rem; color: var(--soft) }
.thread-chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end }
.on-it { font-size: .75rem; color: var(--soft) }
.caught-up { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; border-radius: var(--radius-card); background: #FBF6F8; text-align: center }
.hop { animation: hop 2.6s var(--bounce) 1 both }
@keyframes hop { 0% { transform: translateY(0) } 18% { transform: translateY(-14px) rotate(-5deg) } 34% { transform: translateY(0) } 46% { transform: translateY(-5px) } 56%, 100% { transform: translateY(0) } }
@media (prefers-reduced-motion: reduce) { .hop { animation: none } }

/* A thread: the conversation, the reply box and the panels beside them. */
.conversation { display: flex; flex-direction: column; gap: 12px }
.msg { border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; width: min(100%, 680px) }
.msg.in { background: var(--blush); align-self: flex-start }
.msg.out { background: #FFFFFF; border: 1.5px solid var(--line); align-self: flex-end }
.msg-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .875rem }
.msg-head span { color: var(--soft) }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9375rem; line-height: 1.55 }
.reply { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 16px }
.reply h2 { font-size: 1.0625rem }
.reply-form { display: flex; flex-direction: column; gap: 12px }
.reply textarea { min-height: 200px }
.saved summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center }
.saved-list { margin: 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 2px }
.saved-list a { display: flex; align-items: center; min-height: 40px; font-weight: 600 }
.panel { border: 1.5px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px }
.panel h2 { font-size: 1.0625rem }
.panel p { font-size: .9375rem; overflow-wrap: anywhere }
.panel form { margin: 0 }
.panel.notes form.post { display: flex; flex-direction: column; gap: 8px }
.panel.notes .btn { align-self: flex-start }
.panel .note { background: #FBF6F8 }
.segs { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #F5EDF1; border-radius: 11px }
.segs form { display: contents }
.seg {
  flex: 1 1 auto; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  color: var(--soft); font: 600 .8125rem var(--text); display: inline-flex; align-items: center; justify-content: center;
}
button.seg:hover { background: rgba(255, 255, 255, .65); color: var(--currant) }
.seg.on { background: #FFFFFF; color: var(--currant); box-shadow: 0 1px 2px rgba(58, 22, 56, .14) }
.about-app { display: flex; align-items: center; gap: 8px; font-weight: 600 }
.about-app img { border-radius: 6px }

/* Store reviews. */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px }
.review-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; color: var(--currant); text-decoration: none }
.review-row:hover { background: #FBF6F8; color: var(--currant) }
.review-row img { width: 36px; height: 36px; border-radius: 10px; flex: none }
.strong { font-weight: 700 }
.review-excerpt { font-size: .9375rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere }
.stars { font-size: 1rem; letter-spacing: 1px; line-height: 1 }
.stars .on { color: var(--toast-deep) }
.stars .off { color: var(--press) }
.review-full { background: var(--blush); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; width: min(100%, 680px) }
.review-full .stars { font-size: 1.25rem }
.ratings { display: flex; flex-direction: column; gap: 6px }
.ratings .big-number { font: 600 2.5rem/1 var(--display); color: var(--currant) }
.ratings .big-number span { color: var(--toast-deep); font-size: 1.75rem; margin-left: 4px }
.bars { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px }
.bars li { display: flex; align-items: center; gap: 8px; font-size: .8125rem }
.bar-label { width: 26px; color: var(--soft) }
.bar { flex: 1; height: 10px; border-radius: 999px; background: #F0DDE5; overflow: hidden }
.fill { display: block; height: 100%; border-radius: 999px; background: var(--toast) }
.bar-n { width: 28px; text-align: right; color: var(--soft) }
.w-0 { width: 0 } .w-10 { width: 10% } .w-20 { width: 20% } .w-30 { width: 30% } .w-40 { width: 40% } .w-50 { width: 50% }
.w-60 { width: 60% } .w-70 { width: 70% } .w-80 { width: 80% } .w-90 { width: 90% } .w-100 { width: 100% }

/* On a phone, a row's date and status move under its words. */
@media (max-width: 560px) {
  .thread-row, .review-row { flex-wrap: wrap }
  .thread-text { flex: 1 1 calc(100% - 52px) }
  .thread-side { flex-direction: row; align-items: center; flex-wrap: wrap; max-width: none; margin-left: 50px; gap: 8px }
  .pills { border-radius: 11px }
}

/* The account card's facts. */
.terms { margin: 0; display: flex; flex-direction: column; gap: 8px }
.term { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; font-size: .9375rem }
.term dt { color: var(--soft) }
.term dd { margin: 0; overflow-wrap: anywhere }

/* Insights. */
.app-numbers { display: flex; flex-direction: column; gap: 16px; padding-bottom: 28px; border-bottom: 1.5px solid var(--line) }
.app-numbers .app-head h2 { font-size: 1.5rem }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px }
.tile { background: var(--blush); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 4px }
.tile-label { font-size: .875rem; color: var(--soft) }
.tile-value { font: 600 1.875rem/1.15 var(--display) }
.delta { font-size: .8125rem; font-weight: 700 }
.delta.up { color: var(--ok-ink) }
.delta.down { color: var(--jam-deep) }
.delta.same { color: var(--soft); font-weight: 600 }
.few { font: 700 .6875rem var(--text); color: var(--wait-ink); background: var(--wait-wash); padding: 2px 6px; border-radius: 999px; vertical-align: middle }
.day-bars { margin: 0; display: flex; flex-direction: column; gap: 8px }
.day-bars figcaption { font-weight: 700 }
.bars-row { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px; background: #FBF6F8; border-radius: 16px }
.day-bar { flex: 1; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--toast) }
.day-bar:last-child { background: var(--jam) }
.bars-ends { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--soft) }
.card .big { font: 600 2rem/1.1 var(--display); color: var(--currant) }
.card .big span { font: 500 1rem var(--text); color: var(--soft) }
.h-0 { height: 0 } .h-5 { height: 5% } .h-10 { height: 10% } .h-15 { height: 15% } .h-20 { height: 20% } .h-25 { height: 25% } .h-30 { height: 30% }
.h-35 { height: 35% } .h-40 { height: 40% } .h-45 { height: 45% } .h-50 { height: 50% } .h-55 { height: 55% } .h-60 { height: 60% } .h-65 { height: 65% }
.h-70 { height: 70% } .h-75 { height: 75% } .h-80 { height: 80% } .h-85 { height: 85% } .h-90 { height: 90% } .h-95 { height: 95% } .h-100 { height: 100% }

/* Store pages on Insights. */
.app-numbers h4 { margin: 0; font: 600 1.0625rem/1.2 var(--display) }
.small-tile .tile-value { font-size: 1.5rem }
.app-numbers .card.outline .tiles { grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)) }
.sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px }
.sources li { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; padding: 6px 10px; border-radius: 10px; background: #FBF6F8 }

/* The marketing desk. */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap }
.month-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.month-nav h2 { min-width: 9.5em; text-align: center }
.month-nav .btn { margin-left: 8px }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  border: 1px solid var(--press); background: #FFFFFF; color: var(--currant);
}
.icon-btn:hover { background: var(--blush); color: var(--currant) }
.cal-summary { font-size: .875rem; color: var(--soft); margin: -12px 0 0 }
.cal-summary .strong { color: var(--currant) }
.cal-summary .missed { color: var(--jam-deep) }
.calendar-wrap { overflow-x: auto }
.calendar { min-width: 820px; table-layout: fixed; border-collapse: separate; border-spacing: 6px; font-size: .8125rem }
.calendar th { background: none; padding: 0 6px; color: var(--soft); font-weight: 700 }
.calendar td { vertical-align: top; background: #FBF6F8; border: 0; border-radius: 14px; padding: 8px; height: 96px }
.calendar td.cal-out { background: none }
.calendar td.today { background: #FFF4F6; box-shadow: inset 0 0 0 1.5px var(--jam) }
.cal-day { display: block; font: 600 .9375rem var(--display); margin-bottom: 4px }
.cal-post { display: flex; flex-direction: column; gap: 3px; background: #FFFFFF; border-radius: 10px; padding: 7px 8px; margin-top: 6px; color: var(--currant); text-decoration: none; box-shadow: 0 1px 0 var(--line) }
.cal-post:hover { box-shadow: 0 0 0 2px var(--jam) inset; color: var(--currant) }
.cal-app { display: flex; align-items: center; gap: 5px; color: var(--soft); font-size: .75rem }
.cal-app img { border-radius: 4px }
.cal-title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere }
.cal-post .chip { align-self: flex-start; font-size: .6875rem }
.pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px }
.picture { position: relative; display: block; border-radius: 14px; overflow: hidden; background: #FBF6F8; aspect-ratio: 4 / 5 }
.picture img { width: 100%; height: 100%; object-fit: cover; display: block }
.picture.story { aspect-ratio: 9 / 16 }
.picture .chip { position: absolute; left: 8px; bottom: 8px }
textarea[readonly], input[readonly] { background: #FBF6F8 }
.form-row { display: flex; flex-wrap: wrap; gap: 12px }
.form-row .field { flex: 1 1 160px }
.numbers-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line) }
.numbers-row:first-of-type { border-top: 0 }
.numbers-channel { flex: 1 0 100%; font-weight: 700 }
.num { display: flex; flex-direction: column; gap: 2px; font-size: .75rem; color: var(--soft); width: 92px }
.num input { min-height: 40px; padding: 6px 8px; border: 1.5px solid var(--press); border-radius: 10px; font: 400 .9375rem var(--text); color: var(--currant); width: 100% }
.budget-bar { display: block; flex: none; height: 14px; margin: 6px 0 }
.fill.over { background: var(--jam) }
td.money { white-space: nowrap; font-weight: 600 }
.link-card { list-style: none }
.link-card .card-head img { border-radius: 8px }
.lib-shelf { list-style: none; margin: 0; padding: 0 }
.lib-file { gap: 6px }
.lib-file .btn { min-height: 36px; padding: 0 14px; font-size: .8125rem }
.file-kind { width: 72px; height: 72px; border-radius: 16px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; font: 700 .8125rem var(--text); color: var(--soft) }
.inline-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px dashed var(--press); border-radius: 14px }
.inline-upload label { font-weight: 700 }
input[type="file"] { font: 400 .875rem var(--text); max-width: 100% }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px }
.form > .btn { align-self: flex-start }

/* App rooms. */
.app-link { color: var(--currant); text-decoration: none }
.app-link:hover { box-shadow: inset 0 0 0 2px var(--jam); color: var(--currant) }
.releases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
.releases li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.switch-row { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line) }
.switch-row:first-of-type { border-top: 0; padding-top: 0 }
.mod-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.mod-form input[type="text"] { flex: 1 1 200px; min-height: 40px }
.mod-form .btn { min-height: 40px }

/* Content approvals: a unit is one word or one season's trail, its pieces each with a corner box. */
.reading { display: flex; flex-direction: column; gap: 18px }
.unit { gap: 0; padding: 0; overflow: hidden }
.unit-head { padding: 18px 22px 6px; display: flex; flex-direction: column; gap: 2px }
.unit-title { font-size: 1.5rem; display: inline; align-self: flex-start; padding: 0 4px; background: linear-gradient(transparent 55%, var(--butter) 55%) }
.unit > .context { padding: 0 22px 10px; color: var(--soft) }
.piece { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px }
.piece-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px }
.piece-name { font: 700 .9375rem var(--text) }
.back-box { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .875rem; cursor: pointer; background: #FFFFFF }
.back-box:hover { background: var(--stop-wash) }
.back-box input { width: 18px; height: 18px; accent-color: var(--jam) }
.back-box:has(input:checked) { background: var(--stop-wash); border-color: #F2C9D3; color: var(--jam-deep) }
.short { font-weight: 600 }
.senses { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 4px }
.examples { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; font-style: italic }
.examples .hint { font-style: normal }
.sentence { font-size: 1.0625rem; line-height: 1.45 }
.verdict-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px }
.kindred { display: grid; gap: 6px }
.kin-group { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--blush) }
.kin-label { font-weight: 700; font-size: .875rem }
.kin-words { font-size: .9375rem }
.stop .strong { font-size: 1.0625rem }
.unit-note { padding: 14px 22px 18px; border-top: 1px solid var(--line); background: #FBF6F8 }
.unit-note textarea { min-height: 64px }
.decide-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 20px; background: #FFFFFF; box-shadow: 0 -6px 18px rgba(58, 22, 56, .08) }
.decide-bar .hint { flex: 1 1 240px }
.tray { background: var(--custard); border-color: var(--custard-line) }
.sent-back { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px }
.sent-back li { padding: 12px 16px; border-radius: 14px; background: #FBF6F8; display: flex; flex-direction: column; gap: 2px }
@media (max-width: 600px) {
  .decide-bar { padding: 10px 12px; gap: 8px 14px; border-radius: 16px }
  .decide-bar .hint { display: none }
  .unit-head, .piece, .unit-note { padding-left: 16px; padding-right: 16px }
}

/* Handbook: shelves of pages, a page as an article, its history. */
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px }
.shelf-page { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: 100%; padding: 18px; border: 1.5px solid var(--line); border-radius: 18px; color: var(--currant); text-decoration: none; background: #FFFFFF }
.shelf-page:hover { box-shadow: inset 0 0 0 2px var(--jam); color: var(--currant) }
.shelf-title { font: 600 1.0625rem var(--display) }
.handbook-page { max-width: 760px; gap: 12px; font-size: 1rem; line-height: 1.6 }
.handbook-page h2 { font-size: 1.25rem; margin-top: 10px }
.handbook-page h3 { font-size: 1.0625rem; margin-top: 6px }
.handbook-page ul, .handbook-page ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px }
.handbook-page code { font-size: .875em; background: var(--quiet-wash); padding: 1px 6px; border-radius: 6px }
.handbook-page blockquote { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--custard); border-left: 4px solid var(--toast) }
.ticklist { list-style: none; padding-left: 0 !important }
.ticklist li { position: relative; padding-left: 32px }
.ticklist li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border: 2px solid var(--press); border-radius: 6px; background: #FFFFFF }
.ticklist li.done::before { background: var(--ok-wash); border-color: var(--ok-ink) }
.ticklist li.done::after { content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 11px; border: solid var(--ok-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) }
.form.wide { max-width: 860px }
textarea.page-body { min-height: 420px; font: 400 .9375rem/1.55 var(--text) }
.versions { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px }
.remove-page { margin-top: 24px }

/* Company: details, what's paid for, money in by month. */
.details { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px 24px }
.details > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line) }
.details dt { font-size: .8125rem; font-weight: 700; color: var(--soft) }
.details dd { margin: 0; overflow-wrap: anywhere }
.long-value { white-space: pre-line }
.add-renewal { margin-top: 14px }
.add-renewal > summary { list-style: none; display: inline-flex; cursor: pointer }
.add-renewal > summary::-webkit-details-marker { display: none }
.add-renewal[open] > summary { margin-bottom: 14px }
.add-renewal .form { padding: 18px; border: 1.5px solid var(--line); border-radius: 20px }
.handbook-page p, .handbook-page li { font-size: 1rem; color: var(--currant) }

/* Home: a greeting, what needs you, setup (owners), Nomi's week, and the noticeboard beside. */
.home-head { display: flex; flex-direction: column; gap: 4px }
.eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--soft) }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start }
@media (max-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1fr) } }
.home-main { display: flex; flex-direction: column; gap: 20px; min-width: 0 }
.home-main .panel { padding: 22px; gap: 14px; border-radius: var(--radius-card) }
.home-main .panel h2 { font-size: 1.25rem }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px }
.panel-link { font-size: .875rem; font-weight: 700; text-decoration: none }
.panel-link:hover { text-decoration: underline }
.need-list { list-style: none; margin: 0 -10px; padding: 0; display: flex; flex-direction: column }
.need-list li + li { border-top: 1px solid var(--line) }
.need { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 12px; color: var(--currant); text-decoration: none }
.need:hover { background: var(--blush); color: var(--currant) }
.need-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--stop-wash); color: var(--jam-deep); display: inline-flex; align-items: center; justify-content: center; flex: none }
.need.calm .need-icon { background: var(--quiet-wash); color: var(--soft) }
.need-text { display: flex; flex-direction: column; flex: 1; min-width: 0 }
.need-title { font-weight: 700; font-size: .9375rem }
.need-detail { font-size: .875rem; color: var(--soft) }
.need-count {
  min-width: 28px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--stop-wash); color: var(--jam-deep);
  font-weight: 700; font-size: .8125rem; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.need-go { color: var(--soft); flex: none }
.progress { display: block; height: 6px; border-radius: 999px; background: var(--quiet-wash); overflow: hidden }

/* Home on a phone: what's waiting as tiles with their count big and the quiet ones in a line, setup as
   one card with the next step (tap for the rest), the week as four numbers, the notes sliding sideways
   and posting in a sheet. Wider screens keep the rows, tiles and form above. */
.need-brief, .needs-calm, .setup-brief, .post-pill, .sheet-backdrop { display: none }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.notes { display: flex; flex-direction: column; gap: 14px }
.needs-calm { align-items: center; gap: 8px; margin: 0; font-size: .875rem; color: var(--soft) }
.needs-calm svg { color: var(--ok-ink); flex: none }
.setup-ring { position: relative; flex: none; width: 44px; height: 44px; color: var(--jam) }
.setup-ring svg { display: block }
.setup-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 600 .8125rem/1 var(--display); color: var(--currant) }
@media (max-width: 699px) {
  .home-main { gap: 24px }
  .home-main .panel.needs { border: 0; border-radius: 0; padding: 0; gap: 12px }
  .needs .panel-head, .needs-calm { padding: 0 4px }
  .needs .need-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 }
  .needs .need-list li + li { border-top: 0 }
  .needs .need-list li:has(> .calm) { display: none }
  .needs .need { position: relative; height: 100%; min-height: 104px; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px; border: 1.5px solid var(--line); border-radius: 18px; background: #FFFFFF; transition: transform .16s var(--ease), background-color .16s }
  .needs .need:hover { background: #FFFFFF }
  .needs .need:active { transform: scale(.96); background: var(--blush) }
  .needs .need-icon { width: 32px; height: 32px; border-radius: 10px }
  .needs .need-count { position: absolute; top: 10px; right: 12px; min-width: 0; height: auto; padding: 0; background: none; color: var(--jam); font: 600 1.75rem/1 var(--display) }
  .needs .need-title { line-height: 1.25 }
  .needs .need-detail, .needs .need-go { display: none }
  .needs .need-brief { display: block; font-size: .8125rem; line-height: 1.3; color: var(--soft) }
  .needs-calm { display: flex }

  .home-main .panel.setup { border: 0; border-radius: 18px; padding: 12px 14px; gap: 12px; background: #FFF6B8 }
  .setup-brief { display: flex; align-items: center; gap: 12px; cursor: pointer; transition: transform .16s var(--ease) }
  .setup-brief:active { transform: scale(.98) }
  .setup-brief .setup-go { transition: transform .24s var(--ease) }
  .setup > .panel-head, .setup > .progress, .setup > .setup-todo, .setup > .setup-done { display: none }
  .setup-toggle:checked ~ .setup-brief .setup-go { transform: rotate(90deg) }
  .setup-toggle:checked ~ .setup-todo { display: grid }
  .setup-toggle:checked ~ .setup-done { display: flex }
  .setup-toggle:checked ~ .setup-todo .setup-item { background: #FFFFFF }

  .week .stats { grid-template-columns: 1fr 1fr; gap: 10px }
  .week .stat { padding: 12px 14px }
  .week .stat-value { font-size: 1.375rem }

  .board { padding: 18px 18px 20px }
  .post-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--currant); color: var(--butter); font-weight: 700; font-size: .8125rem; cursor: pointer; transition: transform .16s var(--ease) }
  .post-pill:active { transform: scale(.95) }
  .board .notes { flex-direction: row; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; scroll-padding: 0 18px }
  .board .notes::-webkit-scrollbar { display: none }
  .board .notes > .note { flex: 0 0 min(82%, 300px); scroll-snap-align: start }
  .board form.post { display: none }
  .sheet-toggle:checked ~ form.post {
    display: flex; position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0; background: #FFFFFF; box-shadow: 0 -18px 40px -12px rgba(58, 22, 56, .3); animation: hq-sheet .32s var(--ease-out) both;
  }
  .sheet-toggle:checked ~ .sheet-backdrop { display: block; position: fixed; z-index: 60; inset: 0; background: rgba(58, 22, 56, .32); animation: hq-fade .24s ease both }
}
@keyframes hq-sheet { from { transform: translateY(100%) } }
@keyframes hq-fade { from { opacity: 0 } }
.progress-fill { display: block; height: 100%; border-radius: 999px; background: var(--ok-ink) }
.setup-todo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px }
.setup-todo li { display: flex }
.setup-item {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px;
  color: var(--currant); text-decoration: none;
}
a.setup-item:hover { background: var(--blush); border-color: var(--press); color: var(--currant) }
.setup-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0 }
.setup-title { font-weight: 700; font-size: .9375rem }
.setup-detail { font-size: .8125rem; line-height: 1.4; color: var(--soft) }
.setup-go { color: var(--soft); flex: none }
.setup-done { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 0 }
.setup-done-label { font-size: .8125rem; color: var(--soft); margin-right: 4px }
.setup-done .chip { gap: 5px }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--blush) }
.stat-label { font-size: .8125rem; color: var(--soft) }
.stat-value { font: 600 1.625rem/1.15 var(--display) }

/* A page inside a section: the way back, above its title. */
.back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 2px -4px; font-size: .875rem; font-weight: 600; color: var(--soft); text-decoration: none }
.back:hover { color: var(--currant) }
.link-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .875rem }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .9375rem; font-weight: 600 }
.split-aside .panel { padding: 18px 20px; border-radius: 16px }
.split-aside .panel h2 { font-size: 1.0625rem }

/* The marketing desk's numbers due. */
.due-list { list-style: none; margin: 0 -8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 2px 12px }
.due-list a { display: flex; flex-direction: column; gap: 1px; padding: 8px; border-radius: 10px; color: var(--currant); text-decoration: none }
.due-list a:hover { background: var(--blush); color: var(--currant) }
.due-title { font-weight: 700; font-size: .9375rem }

/* The content desk's groups. */
.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px }
.group-card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 16px; color: var(--currant); text-decoration: none }
a.group-card:hover { background: var(--blush); border-color: var(--press); color: var(--currant) }
.group-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0 }
.group-name { font: 600 1.0625rem/1.2 var(--display) }
.group-what { font-size: .875rem; color: var(--soft) }
.group-count { font-size: .8125rem; font-weight: 700; color: var(--jam-deep); margin-top: 2px }
.group-go { color: var(--soft); flex: none }

/* The audit log. */
table.audit td.target { font-size: .75rem; color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap }
table.audit td.what { white-space: nowrap }

/* The inbox: a mail app's three panes, as tall as the window, each scrolling on its own. */
.main.flush { padding: 0; gap: 0; height: 100vh; height: 100dvh; overflow: hidden }
.mailbox { height: 100%; min-height: 0; display: grid; grid-template-columns: 232px minmax(320px, 400px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) }
.mb-folders, .mb-list, .mb-read { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain }
.main.flush { position: relative }
.mb-folders { background: #FBF6F8; border-right: 1px solid var(--line); padding: 24px 12px 16px; display: flex; flex-direction: column; gap: 2px }
.mb-title { font: 600 1.375rem/1.2 var(--display); padding: 0 10px 6px }
.mb-group { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); padding: 16px 10px 6px }
.mb-folder {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 10px; color: var(--currant);
  text-decoration: none; font-weight: 600; font-size: .875rem; transition: background-color .15s ease, box-shadow .15s ease;
}
.mb-folder svg { color: var(--soft); flex: none; transition: color .15s ease }
.mb-folder:hover { background: #F3E8EE; color: var(--currant) }
/* The current folder's highlight is its own element, so a view transition slides it to the next one. */
.mb-folder { position: relative; isolation: isolate }
.mb-pill { position: absolute; inset: 0; z-index: -1; border-radius: 10px; background: #F1E2EA }
.mb-folder[aria-current="page"] svg { color: var(--jam) }
.mb-count { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--stop-wash); color: var(--jam-deep); font-size: .75rem; font-weight: 700 }
.mb-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line) }

.mb-list { border-right: 1px solid var(--line); display: flex; flex-direction: column }
.mb-list-head {
  position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 12px; padding: 24px 18px 14px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.mb-list-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px }
.mb-list-title h1 { font-size: 1.375rem }
.mb-list-head .filters .pill { min-height: 28px; padding: 0 10px; font-size: .75rem }
.mb-items { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px }
.mb-item { position: relative; display: flex; gap: 12px; padding: 12px; border-radius: 12px; color: var(--currant); text-decoration: none; transition: background-color .15s ease }
.mb-item:hover { background: #FBF6F8; color: var(--currant) }
.mb-item[aria-current="true"] { background: var(--blush); box-shadow: inset 3px 0 0 var(--jam) }
.mb-item.unread::after { content: ""; position: absolute; top: 18px; right: 12px; width: 7px; height: 7px; border-radius: 999px; background: var(--jam) }
.mb-item.unread .mb-when { margin-right: 14px }
.mb-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px }
.mb-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px }
.mb-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9375rem }
.mb-when { flex: none; font-size: .75rem; color: var(--soft) }
.mb-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem }
.mb-preview { font-size: .8125rem; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere }
.mb-item.unread .mb-who, .mb-item.unread .mb-subject { font-weight: 700 }
.mb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px }
.mb-chips .on-it { margin-left: 4px }
.mb-none { padding: 48px 20px; display: flex; flex-direction: column; gap: 4px; text-align: center }
.rating-avatar {
  width: 36px; height: 36px; border-radius: 999px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ok-wash); color: var(--ok-ink); font: 700 .75rem/1 var(--text);
}
.rating-avatar.r-1, .rating-avatar.r-2 { background: var(--stop-wash); color: var(--jam-deep) }
.rating-avatar.r-3 { background: var(--wait-wash); color: var(--wait-ink) }
.mb-item .stars { font-size: .8125rem }

.mb-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 40px; text-align: center }
.mb-empty h2 { font-size: 1.25rem }
.mb-note { margin-top: 14px; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 14px; max-width: 420px; display: flex; flex-direction: column; gap: 4px }
.mb-overview { padding: 28px 32px 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; align-items: start; max-width: 1120px }
.mb-overview-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0 }
.mb-overview .notice { grid-column: 1 / -1 }
.mb-overview .panel { border-radius: 16px }
.mb-back { display: none }

/* What's open on the right: its head and tools, then the conversation beside its details. */
.rd { container-type: inline-size; padding: 26px 32px 56px; display: flex; flex-direction: column; gap: 18px }
.rd-head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line) }
.rd-head h1 { font-size: 1.625rem; overflow-wrap: anywhere }
.rd-from { color: var(--soft); font-size: .9375rem; overflow-wrap: anywhere }
.rd-from .strong { color: var(--currant) }
.rd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 10px }
.rd-tools .segs { flex: none }
.on-it-control { display: flex; align-items: center; gap: 10px }
.on-it-control form { margin: 0 }
.rd-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start }
@container (min-width: 780px) { .rd-body { grid-template-columns: minmax(0, 1fr) 280px } }
.rd-main { display: flex; flex-direction: column; gap: 18px; min-width: 0 }
.rd-side { display: flex; flex-direction: column; gap: 14px; min-width: 0 }
.rd-side .panel { padding: 16px 18px; border-radius: 14px; gap: 8px }
.rd-side .panel h2 { font-size: 1rem }
.rd .form { max-width: 760px }
.rd .msg, .rd .review-full { width: min(100%, 720px) }

/* A narrower window: the folders become icons. */
@media (max-width: 1240px) and (min-width: 901px) {
  .mailbox { grid-template-columns: 64px minmax(300px, 360px) minmax(0, 1fr) }
  .mb-folders { padding: 20px 8px; align-items: stretch }
  .mb-title, .mb-group { display: none }
  .mb-folder { justify-content: center; padding: 0; position: relative; min-height: 40px }
  .mb-folder .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
  .mb-count { position: absolute; top: 2px; right: 4px; min-width: 8px; height: 8px; padding: 0; font-size: 0 }
  .mb-folders .mb-folder + .mb-group + .mb-folder, .mb-group + .mb-folder { margin-top: 0 }
}
/* A phone or a narrow window: the folders run along the top, and the list and what's open take turns. */
@media (max-width: 900px) {
  .main.flush { height: auto; overflow: visible }
  .mailbox { display: flex; flex-direction: column; height: auto }
  .mb-folders { flex-direction: row; overflow-x: auto; padding: 10px 12px; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line) }
  .mb-title, .mb-group, .mb-foot { display: none }
  .mb-folder { flex: none }
  .mb-list, .mb-read { overflow: visible; border-right: 0 }
  .mb-list-head { position: static }
  .mailbox.is-open .mb-list { display: none }
  .mailbox:not(.is-open) .mb-read { display: none }
  .mb-back { display: inline-flex; align-items: center; gap: 2px; font-size: .875rem; font-weight: 600; color: var(--soft); text-decoration: none }
  .rd { padding: 18px 18px 40px }
}

/* An owner naming themselves on People. */
.rename { width: 100% }
.rename summary { list-style: none; cursor: pointer; width: max-content }
.rename summary::-webkit-details-marker { display: none }
.rename-form { display: flex; gap: 8px; margin-top: 10px; max-width: 420px }
.rename-form input { flex: 1 }

/* Apps, as App Store Connect shows them: each app as an icon, and each app's page with its tabs. */
.app-icon-big { border-radius: 22%; box-shadow: 0 1px 2px rgba(58, 22, 56, .12), 0 0 0 1px rgba(58, 22, 56, .06); flex: none }
.app-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 16px }
.app-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1.5px solid var(--line); border-radius: 20px;
  color: var(--currant); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.app-tile:hover { color: var(--currant); border-color: var(--press); box-shadow: 0 10px 28px rgba(58, 22, 56, .08); transform: translateY(-2px) }
.app-tile .app-icon-big { margin-bottom: 8px }
.app-tile-name { font: 600 1.25rem/1.2 var(--display) }
.app-tile-line { font-size: .875rem; color: var(--soft) }
.app-tile-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px }
.app-page { display: flex; flex-direction: column; gap: 24px }
.app-page > .back { margin-bottom: -16px }
.app-page-head { display: flex; align-items: center; gap: 20px }
.app-page-text { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.app-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 4px }
.app-links { display: inline-flex; flex-wrap: wrap; gap: 14px; font-size: .875rem; font-weight: 600 }
.app-links a { display: inline-flex; align-items: center; gap: 3px; text-decoration: none }
.app-links a:hover { text-decoration: underline }
.app-page > .tabs-big { margin-top: -4px }
.tab-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px }
.tab-bar form { margin: 0 }
.tab-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 28px; align-items: start }
.switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px }
.switch-row form { margin-top: auto }
.switch-name { display: flex; align-items: center; gap: 8px }
.store-card h3 .hint { font: 500 .875rem var(--text) }
.store-card .tiles { grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)) }
.store-card h3 { font-size: 1.125rem }

/* The library, as a file store: shelves, then the shelf's files as a grid or a list, then the file picked. */
.drive, .drive .mailbox { height: 100% }
.drive .mailbox { grid-template-columns: 232px minmax(0, 1fr) 360px }
.mb-count.quiet { background: none; color: var(--soft); font-weight: 600 }
.view-switch { align-self: flex-start }
.view-switch .pill { min-height: 30px; padding: 0 8px }
.drive-grid { list-style: none; margin: 0; padding: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px }
.drive-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 16px; border: 1.5px solid transparent;
  color: var(--currant); text-decoration: none; transition: background-color .15s ease, border-color .15s ease, transform .2s ease;
}
.drive-tile:hover { background: #FBF6F8; color: var(--currant) }
.drive-tile[aria-current="true"] { background: var(--blush); border-color: var(--jam) }
.drive-thumb {
  aspect-ratio: 4 / 3; border-radius: 12px; background: #F6EFF3; display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 6px;
}
.drive-thumb img { max-width: 78%; max-height: 78%; object-fit: contain }
.drive-name { font-weight: 700; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.drive-meta { font-size: .75rem; color: var(--soft) }
.file-badge { padding: 6px 10px; border-radius: 8px; background: #FFFFFF; color: var(--jam-deep); font: 700 .75rem/1 var(--text); letter-spacing: .04em }
.drive-list { padding: 8px 10px 18px; display: flex; flex-direction: column }
.drive-row {
  display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr); gap: 12px;
  align-items: center; padding: 8px 10px; border-radius: 10px; font-size: .875rem; color: var(--currant); text-decoration: none;
}
.drive-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
a.drive-row:hover { background: #FBF6F8; color: var(--currant) }
.drive-row[aria-current="true"] { background: var(--blush) }
.drive-row-head { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 4px }
.drive-row-name { display: flex; align-items: center; gap: 10px; font-weight: 600 }
.drive-mini { width: 32px; height: 32px; flex: none; border-radius: 8px; background: #F6EFF3; display: inline-flex; align-items: center; justify-content: center; overflow: hidden }
.drive-mini img { max-width: 80%; max-height: 80% }
.drive-mini .file-badge { padding: 2px 3px; font-size: .5625rem }
.drive-details { gap: 14px }
.drive-preview { aspect-ratio: 4 / 3; border-radius: 16px; background: #F6EFF3; display: flex; align-items: center; justify-content: center; overflow: hidden }
.drive-preview img { max-width: 80%; max-height: 80%; object-fit: contain }
.drive-title { font-size: 1.25rem; overflow-wrap: anywhere }
.drive-facts { margin: 0; display: flex; flex-direction: column; gap: 8px }
.drive-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; padding-bottom: 8px; border-bottom: 1px solid var(--line) }
.drive-facts dt { color: var(--soft) }
.drive-facts dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere }
.drive-details .btn { align-self: stretch }
.drive-details form .btn { width: 100% }
.upload { display: flex; flex-direction: column; gap: 14px }
.upload h2 { font-size: 1.125rem }
@media (max-width: 1240px) and (min-width: 901px) { .drive .mailbox { grid-template-columns: 64px minmax(0, 1fr) 320px } }
.shelf-chips { display: flex; flex-wrap: wrap; gap: 6px }

/* Motion: pages hand over to each other instead of blinking (the browser's own view transitions, no
   script), bars fill, results slide in, and everything answers the pointer. Snapshots are never
   stretched: when the sidebar opens or shuts, each part keeps its size and the sidebar's edge slides.
   Reduce Motion turns all of it off. */
:root { --ease: cubic-bezier(.22, .9, .24, 1); --ease-out: cubic-bezier(.16, 1, .3, 1) }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto }
  .side { view-transition-name: hq-side }
  .mb-folders { view-transition-name: hq-folders }
  .mb-list { view-transition-name: hq-list }
  .mb-read { view-transition-name: hq-read }
  .main:not(.flush) { view-transition-name: hq-page }
  ::view-transition-group(*) { animation-duration: .3s; animation-timing-function: var(--ease) }
  ::view-transition-group(hq-side), ::view-transition-group(hq-page), ::view-transition-group(hq-folders), ::view-transition-group(hq-list), ::view-transition-group(hq-read) { overflow: clip }
  ::view-transition-old(*), ::view-transition-new(*) { width: auto; height: auto; object-fit: none; object-position: left top }
  /* The sidebar's edge wipes across: the old bar stays solid under the new one as the edge moves. */
  ::view-transition-old(hq-side), ::view-transition-new(hq-side), ::view-transition-old(hq-folders), ::view-transition-new(hq-folders) { animation: none; mix-blend-mode: normal }
  /* The old page goes at once, so it never doubles up with the new one as it slides. */
  ::view-transition-old(hq-page), ::view-transition-old(hq-read), ::view-transition-old(hq-list) { animation: none; opacity: 0 }
  ::view-transition-new(hq-page) { animation: .3s var(--ease-out) both hq-page-in }
  ::view-transition-new(hq-read) { animation: .28s var(--ease-out) both hq-read-in }
  ::view-transition-new(hq-list) { animation: .2s ease both hq-fade-in }
  html:active-view-transition [data-tip]::after { display: none }

  /* Bars fill and results slide in. */
  .progress-fill, .fill { transform-origin: left center; animation: hq-grow .8s .1s var(--ease-out) both }
  .day-bar { transform-origin: bottom center; animation: hq-grow-up .6s var(--ease-out) both }
  .notice { animation: hq-notice .4s var(--ease-out) both }

  /* Everything answers the pointer. */
  .nav-link, .need, .mb-item, .mb-folder, .pill, .seg, .group-card, .drive-tile, .drive-row, .setup-item, .shelf-page, .cal-post, .icon-btn, .back, .panel-link, .chat-tool {
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease, transform .18s var(--ease);
  }
  .btn { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s var(--ease) }
  .btn:active, .icon-btn:active, .seg:active, .pill:active, .side-toggle-button:active { transform: scale(.96) }
  .need:hover .need-go, .group-card:hover .group-go, .setup-item:hover .setup-go { transform: translateX(3px) }
  .need-go, .group-go, .setup-go { transition: transform .2s var(--ease) }
  .drive-tile:hover .drive-thumb img { transform: scale(1.04) }
  .drive-thumb img, .drive-preview img { transition: transform .35s var(--ease) }
  .shelf-page:hover, .group-card:hover, .setup-item:hover { transform: translateY(-1px) }
  .back:hover svg { transform: translateX(-2px) }
  .back svg { transition: transform .2s var(--ease) }
}
@keyframes hq-rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes hq-fade-out { to { opacity: 0 } }
@keyframes hq-fade-in { from { opacity: 0 } }
@keyframes hq-page-in { from { opacity: 0; transform: translateY(10px) } }
@keyframes hq-read-in { from { opacity: 0; transform: translateX(12px) } }
@keyframes hq-grow { from { transform: scaleX(0) } }
@keyframes hq-grow-up { from { transform: scaleY(0) } }
@keyframes hq-pop { from { transform: scale(.4); opacity: 0 } 70% { transform: scale(1.08) } to { transform: none; opacity: 1 } }
@keyframes hq-notice { from { opacity: 0; transform: translateY(-6px) } }

/* A phone, again: what must outrank the wider rules above it. */
@media (max-width: 860px) {
  .pills.tabs-big { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none }
  .tabs-big .pill { flex: none }
  .app-page-head { align-items: flex-start; gap: 14px }
  .app-page-head .app-icon-big { width: 60px; height: 60px }
  .cal-head { flex-direction: column; align-items: stretch }
  .month-nav { justify-content: space-between }
  .month-nav h2 { min-width: 0 }
  /* The calendar becomes a list of the days with posts. */
  .calendar-wrap { overflow: visible }
  .calendar-wrap .calendar, .calendar tbody, .calendar tr { display: block; width: 100%; min-width: 0; border-spacing: 0 }
  .calendar thead, .calendar td.cal-out, .calendar td:not(.today):not(:has(.cal-post)) { display: none }
  .calendar td { display: flex; flex-wrap: wrap; align-items: baseline; width: auto; height: auto; margin: 0 0 8px; padding: 12px 14px }
  .calendar td::after { content: attr(data-weekday); margin-left: 8px; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft) }
  .calendar td .cal-day { display: inline; margin: 0; font-size: 1.0625rem }
  .calendar td .cal-post { flex: 1 1 100%; order: 2 }
  .drive .mailbox:not(.is-open) .mb-read { display: block; border-top: 1px solid var(--line) }
  .drive .mailbox { display: flex }
  .drive-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 14px }
  .drive-row { grid-template-columns: minmax(0, 1fr) auto; }
  .drive-row > span:nth-child(n + 2):not(:nth-child(4)) { display: none }
  .home-grid { gap: 16px }
  [data-tip]::after { display: none }
}

/* Chat: channels, the conversation with its composer under it, and a thread beside it when open. */
.chat .app-face { display: inline-flex; overflow: hidden; border-radius: 10px; background: var(--blush) }
.chat .app-face img { display: block; width: 100%; height: 100%; object-fit: cover }
.chat-app-tag { padding: 1px 6px; border-radius: 6px; background: var(--quiet-wash); color: var(--soft); font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase }
.chat, .chat .mailbox { height: 100% }
.chat .mailbox { grid-template-columns: 232px minmax(0, 1fr) }
.chat .mailbox.is-open { grid-template-columns: 232px minmax(0, 1fr) minmax(320px, 420px) }
.chat .mailbox:not(.is-open) .mb-read { display: none }
.chat .mb-list { overflow: hidden; display: flex; flex-direction: column; border-right: 0 }
.chat .mailbox.is-open .mb-list { border-right: 1px solid var(--line) }
.chat .mb-folder .chat-hash { width: 18px; text-align: center; font-size: 1rem; color: var(--soft) }
.chat .mb-folder[aria-current="page"] .chat-hash { color: var(--jam) }
.mb-folder.unread .label { font-weight: 800; color: var(--currant) }
.mb-count.none { display: none }
.chat-new-channel summary { list-style: none; cursor: pointer }
.chat-new-channel summary::-webkit-details-marker { display: none }
.chat-new-channel .form { padding: 10px 6px 4px; gap: 10px }
.chat-head { flex: none; padding: 20px 24px 14px; border-bottom: 1px solid var(--line) }
.chat-head h1 { display: flex; align-items: center; gap: 2px; font-size: 1.375rem }
.chat-head .chat-hash { color: var(--soft) }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column-reverse }
.chat-stream { display: flex; flex-direction: column; padding: 10px 0 6px }
.chat-msg { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; padding: 7px 24px }
.chat-msg:hover { background: #FBF6F8 }
.chat-avatar { display: block; width: 36px; height: 36px; margin-top: 2px }
.chat-avatar .avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--butter); font-size: .9375rem }
.chat-avatar .avatar.has-picture { background: #F0E1E9 }
.chat-gutter { display: none }
.chat-body { grid-column: 2; grid-row: 1; min-width: 0 }
.chat-msg.cont { padding-top: 1px; padding-bottom: 1px }
.chat-msg.cont .chat-avatar, .chat-msg.cont .chat-meta { display: none }
.chat-msg.cont .chat-gutter { display: block; grid-column: 1; grid-row: 1; padding-top: 3px; text-align: right; font-size: .6875rem; color: var(--soft); opacity: 0 }
@media (hover: hover) { .chat-msg.cont:hover .chat-gutter { opacity: 1 } }
.chat-meta { display: flex; align-items: baseline; gap: 8px }
.chat-who { font-weight: 700; font-size: .9375rem }
.chat-meta time { font-size: .75rem; color: var(--soft) }
.chat-text { font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere }
.chat-text code { padding: 1px 5px; border-radius: 5px; background: #F5EDF1; font: .8125rem ui-monospace, SFMono-Regular, Menlo, monospace }
.chat-text.deleted { color: var(--soft); font-style: italic }
.mention { padding: 0 3px; border-radius: 4px; background: #FFF3B8; color: var(--currant); font-weight: 600 }
.chat-replies { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: .8125rem; font-weight: 700; text-decoration: none }
.chat-replies .hint { font-weight: 500 }
.chat-replies.empty { display: none }
.chat-replies:hover { text-decoration: underline }
.chat-tools {
  position: absolute; top: -14px; right: 20px; z-index: 3; display: none; gap: 2px; padding: 2px; background: #FFFFFF;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 14px rgba(58, 22, 56, .1);
}
.chat-msg:focus-within .chat-tools { display: flex }
@media (hover: hover) { .chat-msg:hover .chat-tools { display: flex } }
.chat-tools form { margin: 0 }
.chat-tool { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: none; color: var(--soft); cursor: pointer }
.chat-tool:hover { background: var(--blush); color: var(--currant) }
.chat-tools [data-tip]::after { left: 50%; top: auto; bottom: calc(100% + 8px); transform: translateX(-50%) }
/* The list's mute bells sit at its right edge, where the list would clip a label beside them: theirs goes to the left. */
.mb-mute[data-tip]::after { left: auto; right: calc(100% + 8px) }
.chat-day { display: flex; align-items: center; gap: 12px; margin: 14px 24px 6px; font-size: .75rem; font-weight: 700; color: var(--soft) }
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--line) }
.chat-new { display: flex; align-items: center; gap: 8px; margin: 6px 24px; font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--jam) }
.chat-new::before { content: ""; flex: 1; height: 1px; background: var(--jam) }
.chat-empty { padding: 40px 24px 16px; display: flex; flex-direction: column; gap: 4px }
.chat-composer { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px 24px 14px }
.chat-box {
  display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border: 1.5px solid var(--press); border-radius: 14px; background: #FFFFFF;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.chat-box:focus-within { border-color: var(--currant); box-shadow: 0 0 0 3px rgba(58, 22, 56, .08) }
.chat-composer .chat-box textarea {
  flex: 1; min-height: 24px; max-height: 220px; margin: 0; padding: 7px 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  resize: none; outline: none; font: 400 .9375rem/1.45 var(--text);
}
.chat-send { width: 40px; min-height: 36px; padding: 0 }
.chat-hint { font-size: .75rem; color: var(--soft) }
.chat-composer.refused .chat-box { border-color: var(--jam) }
.chat .notice { margin: 0 24px }
.chat-thread { height: 100%; display: flex; flex-direction: column }
.chat-thread-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 20px 20px 14px; border-bottom: 1px solid var(--line) }
.chat-thread-head h2 { font-size: 1.125rem }
.chat-close { width: 32px; height: 32px; margin-left: auto }
.chat-thread .chat-msg { padding-left: 20px; padding-right: 20px }
.chat-thread .chat-day { margin-left: 20px; margin-right: 20px }
.chat-thread .chat-composer { padding: 8px 20px 14px }
@media (prefers-reduced-motion: no-preference) { .chat-msg.arrived { animation: hq-rise .3s var(--ease-out) both } }
@media (max-width: 1240px) and (min-width: 901px) {
  .chat .mailbox { grid-template-columns: 64px minmax(0, 1fr) }
  .chat .mailbox.is-open { grid-template-columns: 64px minmax(0, 1fr) minmax(300px, 380px) }
  .chat .mb-folder .chat-hash { width: auto }
  .chat .mb-foot { display: none }
}
/* A phone: chat fills the screen between the top bar and the tabs, and a thread takes the channel's place. */
@media (max-width: 900px) {
  .chat { height: calc(100dvh - 56px - max(0px, env(safe-area-inset-top) - 6px)) }
  .chat .mailbox { display: flex; flex-direction: column; height: 100% }
  .chat .mb-folders { flex: none }
  .chat .mb-list, .chat .mb-read { flex: 1; min-height: 0; overflow: hidden }
  .chat .mailbox.is-open .mb-list { display: none }
  .chat .mailbox:not(.is-open) .mb-read { display: none }
  .chat-head { padding: 12px 16px 10px }
  .chat-msg { padding-left: 16px; padding-right: 16px }
  .chat-composer { padding: 8px 12px 10px }
  .chat-hint { display: none }
  .chat-tools { right: 12px }
}

/* The library's right pane while nothing's picked, and adding files: closed until tapped. */
.lib-side { padding: 24px 24px 40px; display: flex; flex-direction: column; gap: 20px }
.lib-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 12px; text-align: center }
.lib-pick h2 { font-size: 1.125rem }
.upload { border: 1.5px solid var(--line); border-radius: 16px; background: #FFFFFF }
.upload[open] { box-shadow: 0 8px 24px rgba(58, 22, 56, .06) }
.upload-toggle { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; cursor: pointer; font-weight: 700; border-radius: 16px }
.upload-toggle::-webkit-details-marker { display: none }
.upload-toggle:hover { background: #FBF6F8 }
.upload-plus { width: 26px; height: 26px; border-radius: 8px; background: var(--jam); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font: 700 1.125rem/1 var(--text) }
.upload-chev { margin-left: auto; color: var(--soft); transition: transform .2s var(--ease) }
.upload[open] .upload-chev { transform: rotate(180deg) }
.upload .form { padding: 4px 16px 18px }
.lib-new-shelf summary { list-style: none; cursor: pointer }
.lib-new-shelf summary::-webkit-details-marker { display: none }
.lib-new-shelf .form { padding: 10px 6px 4px; gap: 10px }
@media (prefers-reduced-motion: no-preference) {
  .upload[open] .form, .lib-new-shelf[open] .form, .chat-new-channel[open] .form { animation: hq-rise .25s var(--ease-out) both }
}

/* Pictures: a person's own, or their initial until they add one. */
.avatar.has-picture { overflow: hidden; background: #F6EFF3 }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover }
.who-me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; margin: -4px; padding: 4px; border-radius: 10px; color: inherit; text-decoration: none }
.who-me:hover { background: var(--currant-lift); color: inherit }
.who-me:focus-visible { outline: 2px solid var(--butter); outline-offset: 1px }
html.side-icons .who-me { flex: none; justify-content: center }
.me-card { display: flex; align-items: center; gap: 18px }
.me-card .avatar { width: 88px; height: 88px; border-radius: 26px; font-size: 2rem; line-height: 88px }
.me-name { font: 600 1.5rem/1.2 var(--display) }
.me-text { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.me-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 16px; align-items: start }
.me-panels .panel { padding: 20px 22px; border-radius: 18px }
/* HQ on your phone: the apps' builds as QR codes, for a computer (the apps don't show them). */
.qr-row { display: flex; flex-wrap: wrap; gap: 14px }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border: 1.5px solid var(--line); border-radius: 18px; color: var(--currant); font-weight: 700; text-decoration: none }
.qr-card:hover { border-color: var(--press); color: var(--currant) }
.qr-card .qr { display: block; border-radius: 6px }
html.in-app .apps-panel { display: none }
.picture-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }

/* Reactions under a message: a chip per emoji, yours marked; and adding one. */
html:not(.has-js) .js-only, .chat:not(.has-js) .chat-react-add { display: none }
.chat-reacts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px }
.chat-reacts.none { display: none }
.chat-react-form { display: inline; margin: 0 }
.chat-react {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px;
  background: #F7F1F4; color: var(--currant); font: 700 .75rem/1 var(--text); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .12s var(--ease);
}
.chat-react:hover { border-color: var(--press); background: #FFFFFF }
.chat-react:active { transform: scale(.94) }
.chat-react.mine { border-color: var(--jam); background: #FFF1F4; color: var(--jam-deep) }
.chat-react-emoji { font-size: .9375rem; line-height: 1 }
.chat-react-add {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; border: 1px dashed var(--press); border-radius: 999px;
  background: none; color: var(--soft); cursor: pointer; opacity: 0; transition: opacity .15s ease
}
.chat-react-add:focus-visible { opacity: 1 }
@media (hover: hover) { .chat-msg:hover .chat-react-add { opacity: 1 } }
.chat-emoji-button { align-self: center; flex: none }

/* The picker, one for the page. */
.chat-picker {
  position: fixed; z-index: 50; width: 312px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #FFFFFF;
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 44px rgba(31, 11, 30, .18);
}
.chat-picker[hidden] { display: none }
.chat-picker input[type="search"] { min-height: 36px; padding: 6px 12px; font-size: .875rem; border-radius: 10px }
.chat-picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 232px; overflow-y: auto }
.chat-emoji { height: 34px; border: 0; border-radius: 8px; background: none; font-size: 1.25rem; line-height: 1; cursor: pointer }
.chat-emoji:hover, .chat-emoji:focus-visible { background: var(--blush) }
.chat-emoji[hidden] { display: none }

/* The menus while writing: @, : and /. */
.chat-composer { position: relative }
.chat-suggest {
  position: absolute; left: 24px; right: 24px; bottom: calc(100% - 2px); z-index: 10; max-height: 300px; overflow-y: auto; margin: 0; padding: 6px;
  list-style: none; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(31, 11, 30, .14);
}
.chat-suggest[hidden] { display: none }
.chat-suggest li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: .875rem }
.chat-suggest li[aria-selected="true"] { background: var(--blush) }
.chat-suggest-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0 }
.chat-suggest-label img { width: 22px; height: 22px; border-radius: 7px; object-fit: cover }
.chat-suggest-hint { color: var(--soft); font-size: .8125rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.chat-thread .chat-suggest { left: 20px; right: 20px }

/* A word from chat after something done without a new page. */
.chat-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px;
  background: var(--currant); color: #FFFFFF; font-weight: 600; font-size: .875rem; box-shadow: 0 12px 30px rgba(31, 11, 30, .25);
}
.chat-toast[hidden] { display: none }
@media (max-width: 900px) {
  .chat-toast { bottom: calc(20px + env(safe-area-inset-bottom)) }
  .chat-suggest { left: 12px; right: 12px }
  .chat-react-add { opacity: 1 }
  .chat-picker { left: 8px !important; right: 8px; width: auto }
}
.chat-msg.show-tools .chat-tools, .chat-msg.show-tools .chat-react-add { display: flex; opacity: 1 }
.chat-msg.show-tools .chat-reacts.none { display: flex }
.chat-msg.show-tools { background: #FBF6F8 }

/* A new message while you're elsewhere in HQ: a small card, bottom right, that takes you there. */
.hq-ping {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(340px, calc(100vw - 40px)); display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; border-radius: 14px; background: var(--currant); color: #FFFFFF; text-decoration: none; box-shadow: 0 16px 40px rgba(31, 11, 30, .3);
}
.hq-ping:hover { color: #FFFFFF; background: #4A1C47 }
.hq-ping[hidden] { display: none }
.hq-ping strong { font-size: .875rem }
.hq-ping span { font-size: .8125rem; color: var(--on-currant-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere }
@media (prefers-reduced-motion: no-preference) { .hq-ping:not([hidden]) { animation: hq-ping-in .35s var(--ease-out) both } }
@keyframes hq-ping-in { from { opacity: 0; transform: translateY(12px) scale(.98) } }
@media (max-width: 860px) { .hq-ping { right: 12px; left: 12px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom)) } }

/* Chat notifications on the You page, and muting a channel. */
.notify-panel .form { max-width: none; gap: 16px }
.notify-permission { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #FBF6F8 }
fieldset.choices, fieldset.sound-choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
fieldset.choices legend, fieldset.sound-choices legend { font-weight: 700; margin-bottom: 6px }
fieldset.sound-choices { flex-direction: row; flex-wrap: wrap }
fieldset.sound-choices legend { width: 100% }
.sound-choice { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .875rem }
.sound-choice:has(input:checked) { border-color: var(--jam); background: #FFF1F4 }
.sound-choice .icon-btn { width: 28px; height: 28px; border-radius: 8px }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px }
.chat-head form { margin: 0; flex: none }
.chat-mute { min-height: 34px; padding: 0 12px; gap: 6px; font-size: .8125rem }
.chat-mute.is-muted { color: var(--soft) }
.mb-folder.muted .label { color: var(--soft); font-weight: 500 }
.mb-folder.muted .mb-count { background: var(--quiet-wash); color: var(--soft) }
.sound-choice input, .choice input { accent-color: var(--jam) }

/* Chat on a phone, as Slack's app: the channels as a list of their own, then a channel full screen
   with the way back. */
.chat-back { display: none }
@media (max-width: 900px) {
  .chat:not(.is-index) .mb-folders { display: none }
  .chat.is-index .mb-list, .chat.is-index .mb-read { display: none }
  .chat.is-index .mb-folders { flex: 1; flex-direction: column; overflow-y: auto; gap: 2px; padding: 18px 12px 24px; border: 0; background: #FFFFFF }
  .chat.is-index .mb-title, .chat.is-index .mb-group, .chat.is-index .mb-foot { display: block }
  .chat.is-index .mb-title { padding: 0 10px 4px }
  .chat.is-index .mb-folder { min-height: 52px; font-size: 1rem }
  .chat.is-index .mb-pill { display: none }
  .chat.is-index .mb-folder[aria-current="page"] .chat-hash { color: var(--soft) }
  .chat-back { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; margin: -4px 0 0 -8px; border-radius: 10px; color: var(--currant) }
  .chat-back:hover { background: var(--blush); color: var(--currant) }
  .chat-head { align-items: center; gap: 6px }
  .chat-head > div { flex: 1; min-width: 0 }
  .chat-head .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .chat-mute span { display: none }
  .chat-mute { width: 40px; padding: 0 }
}

/* Moving about chat. On a wide window: the highlight slides to the channel picked, the conversation
   rises into place while the composer stays put, and a thread's pane slides in from the right. On a
   phone: a channel or thread pushes in from the right over the last screen, and going back slides it
   off again, as an app's own screens do. live.js says which way you went (chat-deeper, chat-back,
   chat-across). */
@media (prefers-reduced-motion: no-preference) {
  .mb-pill { view-transition-name: hq-pill }
  ::view-transition-group(hq-pill) { animation-duration: .34s; animation-timing-function: var(--ease-out) }
  ::view-transition-old(hq-pill), ::view-transition-new(hq-pill) { animation: none }
  /* The highlight slides under the names: the folder list is see-through (its colour is the pane's,
     .mailbox below), and it's drawn above the highlight while things move. */
  ::view-transition-group(root) { z-index: 0 }
  ::view-transition-group(hq-pill) { z-index: 1 }
  ::view-transition-group(hq-folders) { z-index: 2 }
  ::view-transition-old(hq-folders) { animation: .14s ease-out both hq-fade-out }
  @media (min-width: 901px) {
    .chat .chat-head { view-transition-name: hq-chat-head }
    .chat .mb-list .chat-scroll { view-transition-name: hq-chat-stream }
    .chat .mb-list .chat-composer { view-transition-name: hq-chat-composer }
    ::view-transition-old(hq-chat-head), ::view-transition-old(hq-chat-stream) { animation: .12s ease-out both hq-fade-out }
    ::view-transition-new(hq-chat-head) { animation: .28s var(--ease-out) both hq-head-in }
    ::view-transition-new(hq-chat-stream) { animation: .36s var(--ease-out) both hq-stream-in }
    ::view-transition-old(hq-chat-composer), ::view-transition-new(hq-chat-composer) { animation: none }
    html:active-view-transition-type(chat-deeper)::view-transition-new(hq-read) { animation: .32s var(--ease-out) both hq-thread-in }
  }
  @media (max-width: 900px) {
    .chat .mb-folders, .chat .mb-list, .chat .mb-read { view-transition-name: none }
    .chat { view-transition-name: hq-chat-screen }
    ::view-transition-group(hq-chat-screen) { animation-duration: .34s }
    html:active-view-transition-type(chat-deeper)::view-transition-new(hq-chat-screen) { animation: .34s var(--ease-out) both hq-push-in; box-shadow: -12px 0 30px rgba(31, 11, 30, .14) }
    html:active-view-transition-type(chat-deeper)::view-transition-old(hq-chat-screen) { animation: .34s var(--ease-out) both hq-push-under }
    html:active-view-transition-type(chat-back)::view-transition-new(hq-chat-screen) { animation: .34s var(--ease-out) both hq-pop-under }
    html:active-view-transition-type(chat-back)::view-transition-old(hq-chat-screen) { z-index: 1; animation: .34s var(--ease-out) both hq-pop-out; box-shadow: -12px 0 30px rgba(31, 11, 30, .14) }
  }
}
@keyframes hq-head-in { from { opacity: 0; transform: translateY(-4px) } }
@keyframes hq-stream-in { from { opacity: 0; transform: translateY(14px) } }
@keyframes hq-thread-in { from { opacity: 0; transform: translateX(36px) } }
@keyframes hq-push-in { from { transform: translateX(100%) } }
@keyframes hq-push-under { to { transform: translateX(-26%); opacity: .55 } }
@keyframes hq-pop-under { from { transform: translateX(-26%); opacity: .55 } }
@keyframes hq-pop-out { to { transform: translateX(100%) } }

/* The folder column's colour comes from the pane behind it, so the list itself is see-through and the
   highlight can slide beneath the names (see the view transitions above). */
@media (min-width: 901px) {
  .mailbox { --fw: 232px; background: linear-gradient(to right, #FBF6F8 calc(var(--fw) - 1px), var(--line) calc(var(--fw) - 1px), var(--line) var(--fw), #FFFFFF var(--fw)) }
  .mb-folders { background: none; border-right: 0 }
}
@media (max-width: 1240px) and (min-width: 901px) { .mailbox { --fw: 64px } }
@media (max-width: 900px) { .mb-pill { view-transition-name: none } }

/* A message that's only an emoji or three, shown large. */
.chat-text.jumbo { font-size: 2.25rem; line-height: 1.25; padding: 2px 0 }

/* Direct messages: the people's faces in a conversation's head and beside it in the list, and choosing who. */
.dm-title { display: flex; align-items: center; gap: 10px }
.dm-faces { display: inline-flex }
.dm-faces .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: .8125rem; box-shadow: 0 0 0 2px #FFFFFF }
.dm-faces .avatar + .avatar { margin-left: -8px }
.dm-link .avatar { width: 22px; height: 22px; border-radius: 7px; font-size: .6875rem }
.new-dm .chat-hash { width: 22px; text-align: center; font-size: 1rem; color: var(--soft) }
.dm-form { max-width: 560px }
.dm-people { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px }
.dm-people legend { font-weight: 700; margin-bottom: 8px }
.dm-person { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer }
.dm-person:has(input:checked) { border-color: var(--jam); background: #FFF1F4 }
.dm-person input { accent-color: var(--jam) }
.dm-person span { display: flex; flex-direction: column; gap: 1px }
.dm-person small { color: var(--soft); font-size: .8125rem }
.chat.is-new .mailbox { grid-template-columns: 232px minmax(0, 1fr) }
.chat.is-new .mb-list { display: none }
.chat.is-new .mb-read { display: block }
@media (max-width: 1240px) and (min-width: 901px) { .chat.is-new .mailbox { grid-template-columns: 64px minmax(0, 1fr) } }
@media (max-width: 900px) { .chat.is-new .mb-folders { display: none } }

/* Pop-ups while you're in HQ: a stack in the corner. */
.hq-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 40px)); pointer-events: none }
.hq-toast {
  position: relative; display: flex; align-items: stretch; pointer-events: auto; border-radius: 16px; background: var(--currant); color: #FFFFFF;
  box-shadow: 0 16px 40px rgba(31, 11, 30, .3), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.hq-toast-body { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 12px 36px 12px 14px; color: #FFFFFF; text-decoration: none; border-radius: 16px }
.hq-toast-body:hover { color: #FFFFFF; background: #4A1C47 }
.hq-toast-face { width: 34px; height: 34px; border-radius: 10px; font-size: .875rem }
.hq-toast-words { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.hq-toast-words strong { font-size: .875rem }
.hq-toast-words span { font-size: .8125rem; color: var(--on-currant-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere }
.hq-toast-close { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--on-currant-soft); font-size: 1.125rem; line-height: 1; cursor: pointer }
.hq-toast-close:hover { background: var(--currant-lift); color: #FFFFFF }
@media (prefers-reduced-motion: no-preference) {
  .hq-toast { animation: hq-toast-in .38s var(--ease-out) both }
  .hq-toast.leaving { animation: hq-toast-out .22s ease-in both }
}
@keyframes hq-toast-in { from { opacity: 0; transform: translateY(14px) scale(.97) } }
@keyframes hq-toast-out { to { opacity: 0; transform: translateX(24px) } }
@media (max-width: 860px) { .hq-toasts { right: 12px; left: 12px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom)) } }

/* Chat's list: search at the top, mark all read, a mute bell on each row, and a pause showing. */
.mb-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-right: 6px }
.mb-title-row .mb-title { padding-bottom: 6px }
.mb-read-all { margin: 0 }
.mb-read-all .text-button { color: var(--soft); text-decoration: none; padding: 4px; font-size: .75rem }
.mb-read-all .text-button:hover { color: var(--jam-deep); text-decoration: underline }
.chat-search { position: relative; display: flex; align-items: center; margin: 2px 2px 8px }
.chat-search svg { position: absolute; left: 11px; color: var(--soft); pointer-events: none }
.chat-search input { width: 100%; min-height: 36px; padding: 6px 10px 6px 34px; border-radius: 10px; border: 1.5px solid var(--line); background: #FFFFFF; font-size: .875rem }
.chat-search input:focus { border-color: var(--currant); outline: none; box-shadow: 0 0 0 3px rgba(58, 22, 56, .08) }
.mb-row { position: relative; display: flex; align-items: center }
.mb-row > .mb-folder { flex: 1; min-width: 0; padding-right: 34px }
.mb-mute-form { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); margin: 0 }
.mb-mute { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--soft); cursor: pointer; opacity: 0; transition: opacity .15s ease }
.mb-mute:focus-visible, .mb-row.is-muted .mb-mute { opacity: 1 }
@media (hover: hover) { .mb-row:hover .mb-mute { opacity: 1 } }
.mb-mute:hover { background: #F3E8EE; color: var(--currant) }
@media (hover: hover) { .mb-row:hover .mb-count:not(.none) { visibility: hidden } }
/* On a touch screen nothing appears on hover (iOS would take the first tap as one): an unmuted row's
   bell is left to the long-press menu, and an owner's Remove shows plainly. */
@media (hover: none) {
  .mb-row:not(.is-muted) .mb-mute-form { display: none }
  .member-row .text-button { opacity: 1 }
}
.mb-row.is-muted .mb-count:not(.none) { visibility: hidden }
.mb-paused { display: flex; align-items: center; gap: 8px; margin: 0 4px 6px; padding: 8px 10px; border-radius: 10px; background: #FFF6D6; color: var(--currant); font-size: .8125rem }
.mb-paused span { flex: 1 }
.mb-paused a { font-weight: 700; font-size: .75rem }
.pause-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px }
.pause-options { display: flex; flex-wrap: wrap; gap: 8px }
.pause-options .btn { min-height: 34px; font-size: .8125rem }

/* Chat's search results. */
.search-scroll { flex-direction: column }
.search-hits { list-style: none; margin: 0; padding: 8px 12px 24px; display: flex; flex-direction: column; gap: 2px }
.search-hit { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--currant); text-decoration: none }
.search-hit:hover { background: #FBF6F8; color: var(--currant) }
.search-text { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.search-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px }
.search-body { font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere }
.search-body mark { background: #FFE99A; color: inherit; border-radius: 3px; padding: 0 1px }
.chat.is-search .mailbox { grid-template-columns: 232px minmax(0, 1fr) }
@media (max-width: 1240px) and (min-width: 901px) { .chat.is-search .mailbox { grid-template-columns: 64px minmax(0, 1fr) } }
.chat-msg:target { background: #FFF7D6; box-shadow: inset 3px 0 0 #F2C94C }
@media (max-width: 900px) {
  .chat.is-search .mb-folders { display: none }
  .chat.is-index .mb-title-row { display: flex }
}
@media (max-width: 1240px) and (min-width: 901px) {
  .chat .chat-search, .chat .mb-read-all, .chat .mb-paused span, .chat .mb-paused a { display: none }
  .chat .mb-mute-form { display: none }
  .chat .mb-row > .mb-folder { padding-right: 0 }
}

/* Channel membership: private channels' lock, the members button and pane, joining from outside,
   the lines HQ writes when someone joins or leaves, and browsing every channel. */
.chat-hash.is-private { display: inline-flex; align-items: center; justify-content: center }
.chat-lock { display: block }
.chat-head h1 .chat-hash.is-private { width: 22px; color: var(--soft) }
.chat-head h1 .chat-lock { width: 17px; height: 17px }
.mb-folder.visiting .label { font-style: italic; font-weight: 500; color: var(--soft) }
.chat-head-tools { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto }
.chat-members-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px 0 6px; border: 1.5px solid var(--line);
  border-radius: 999px; color: var(--currant); font-weight: 700; font-size: .8125rem; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.chat-members-link:hover, .chat-members-link.is-open { background: var(--blush); border-color: var(--press); color: var(--currant) }
.chat-members-link .dm-faces .avatar { width: 24px; height: 24px; border-radius: 7px; font-size: .6875rem }
.chat-members-link .dm-faces .avatar + .avatar { margin-left: -7px }

.chat-join {
  flex: none; display: flex; align-items: center; gap: 16px; margin: 8px 24px 14px; padding: 14px 16px; border: 1.5px solid var(--line);
  border-radius: 16px; background: var(--blush);
}
.chat-join p { flex: 1; display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: .875rem }
.chat-join form { margin: 0; flex: none }
.chat-join.is-watching { background: var(--custard); border-color: var(--custard-line) }
.chat-thread .chat-join { margin: 8px 20px 14px }
.chat.is-visitor .chat-tool[data-react], .chat.is-visitor .chat-react-add, .chat.is-visitor .chat-emoji-button { display: none !important }
.chat.is-visitor .chat-react { pointer-events: none }

.chat-msg.system { padding-top: 3px; padding-bottom: 3px }
.chat-msg.system .chat-body { grid-column: 2 }
.chat-system { margin: 0; font: italic 400 .8125rem/1.45 var(--text); color: var(--soft) }
.chat-system .chat-who { font: inherit; font-weight: 600; color: var(--soft) }
.chat-system a.chat-who:hover { color: var(--currant) }
.chat-system time { margin-left: 4px; font-size: .75rem; opacity: 0; transition: opacity .15s ease }
@media (hover: hover) { .chat-msg.system:hover .chat-system time { opacity: 1 } }

.members-scroll { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 28px }
.members-about { margin: 0 }
.members-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px }
.member-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px }
.member-row:hover { background: #FBF6F8 }
.member-row > .avatar { width: 36px; height: 36px; border-radius: 10px }
.member-who { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0 }
.member-who small { color: var(--soft); font-size: .8125rem }
.member-row form { margin: 0 }
.member-row .text-button { font-size: .8125rem; opacity: 0; transition: opacity .15s ease }
.member-row .text-button:focus-visible { opacity: 1 }
@media (hover: hover) { .member-row:hover .text-button { opacity: 1 } }
.members-add { gap: 12px; padding-top: 14px; border-top: 1px solid var(--line) }
.members-add .dm-person > .avatar { width: 30px; height: 30px; border-radius: 9px }
.members-leave { margin: 0; padding-top: 14px; border-top: 1px solid var(--line) }
.members-leave .btn { color: var(--jam-deep) }
.members-note { margin: 0; padding-top: 14px; border-top: 1px solid var(--line) }

.new-channel-form .choice { padding: 10px 12px }
.new-channel-form .choice small { font-size: .8125rem }
.chat.is-browse .mailbox { grid-template-columns: 232px minmax(0, 1fr) }
.browse-scroll { flex-direction: column }
.browse-list { list-style: none; margin: 0; padding: 10px 12px 28px; display: flex; flex-direction: column; gap: 2px }
.browse-row { display: flex; align-items: center; gap: 12px; padding: 4px 12px 4px 0; border-radius: 14px; transition: background-color .15s ease }
.browse-row:hover { background: #FBF6F8 }
.browse-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; color: var(--currant); text-decoration: none }
.browse-link:hover { color: var(--currant) }
.browse-name { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 1rem }
.browse-name .chat-hash { width: 16px; color: var(--soft) }
.browse-topic { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.browse-row form { margin: 0; flex: none }
.browse-row .btn { min-height: 34px; font-size: .8125rem }
.browse-joined { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--ok-wash); color: var(--ok-ink); font-weight: 700; font-size: .75rem }
.browse-new { position: relative }
.browse-new summary { list-style: none; min-height: 36px; font-size: .875rem }
.browse-new summary::-webkit-details-marker { display: none }
.browse-new[open] summary { background: var(--jam-deep) }
.browse-new .new-channel-form {
  position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; width: min(340px, calc(100vw - 32px)); padding: 16px; gap: 12px;
  border: 1.5px solid var(--line); border-radius: 18px; background: #FFFFFF; box-shadow: 0 18px 40px -18px rgba(58, 22, 56, .35);
  animation: hq-drop .18s var(--ease-out);
}
@keyframes hq-drop { from { opacity: 0; transform: translateY(-4px) scale(.98) } }
@media (max-width: 1240px) and (min-width: 901px) {
  .chat.is-browse .mailbox { grid-template-columns: 64px minmax(0, 1fr) }
  .chat-members-link > span:last-child { display: none }
}
@media (max-width: 900px) {
  .chat.is-browse .mb-folders { display: none }
  .chat-join { flex-direction: column; align-items: stretch; margin: 8px 12px 12px }
  .chat-join .btn { width: 100% }
  .chat-head-tools .chat-mute span { display: none }
  .browse-row { flex-wrap: wrap; padding-bottom: 10px }
  .browse-row form, .browse-joined { margin-left: 12px }
}
@media (prefers-reduced-motion: reduce) { .browse-new .new-channel-form { animation: none } }

/* People in chat: a name opens a DM, a picture opens the person's card. */
a.chat-who { color: var(--currant); text-decoration: none }
a.chat-who:hover { color: var(--currant); text-decoration: underline; text-underline-offset: 3px }
.chat-face { color: inherit; text-decoration: none; border-radius: 10px; cursor: pointer }
.chat-face:hover .avatar { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--press) }
.chat-face:focus-visible { outline: 2px solid var(--jam); outline-offset: 2px }
.member-face { flex: none; border-radius: 10px }
.member-face .avatar { width: 36px; height: 36px; border-radius: 10px }

.person-pop {
  position: fixed; z-index: 60; width: 300px; border: 1.5px solid var(--line); border-radius: 20px; background: #FFFFFF;
  box-shadow: 0 24px 60px -24px rgba(58, 22, 56, .45), 0 2px 6px rgba(58, 22, 56, .06);
  transform-origin: top left; animation: hq-card-in .2s var(--ease-out);
}
.person-pop.leaving { animation: hq-card-out .16s ease forwards }
@keyframes hq-card-in { from { opacity: 0; transform: translateY(4px) scale(.96) } }
@keyframes hq-card-out { to { opacity: 0; transform: scale(.97) } }
.person-pop { overflow: hidden }
.person-card { --pad: 18px; display: flex; flex-direction: column; gap: 12px; padding: 0 var(--pad) var(--pad) }
.person-card-band { height: 64px; margin: 0 calc(-1 * var(--pad)) -46px; background: linear-gradient(120deg, var(--butter), var(--crumb) 55%, #FFD3DE) }
.person-card-band.owner { background: linear-gradient(120deg, #FFD3DE, var(--crumb) 50%, var(--butter)) }
.person-card-face { position: relative; width: 76px; height: 76px }
.person-card-face .avatar { width: 76px; height: 76px; border-radius: 22px; font-size: 1.75rem; box-shadow: 0 0 0 4px #FFFFFF; background: var(--butter) }
.person-card-face .avatar.has-picture { background: #F6EFF3 }
.person-dot { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border: 3px solid #FFFFFF; border-radius: 999px; background: #CDBBC5 }
.person-dot.on { background: #2BAA5E }
.person-card-who { display: flex; flex-direction: column; gap: 2px }
.person-card-who p { margin: 0 }
.person-card-name { font-size: 1.25rem; line-height: 1.2 }
.person-presence { font-size: .8125rem; font-weight: 600; color: var(--soft) }
.person-presence.on { color: var(--ok-ink) }
.person-card-facts { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line) }
.person-card-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem }
.person-card-facts dt { color: var(--soft) }
.person-card-facts dd { margin: 0; font-weight: 600 }
.person-card-actions { display: flex; flex-wrap: wrap; gap: 8px }
.person-card-actions form { margin: 0 }
.person-card-actions .btn { min-height: 36px; font-size: .8125rem }
.person-card-actions > .btn:first-child { flex: 1 1 100% }
.chat.is-person .mb-read { display: block }
.person-page .person-card { max-width: 420px; margin-top: 16px; border: 1.5px solid var(--line); border-radius: 22px; overflow: hidden }
@media (max-width: 900px) {
  .person-pop {
    left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto; width: auto; border-radius: 24px;
    transform-origin: bottom center; animation-name: hq-card-up; box-shadow: 0 0 0 100vmax rgba(31, 11, 30, .32);
  }
  @keyframes hq-card-up { from { opacity: 0; transform: translateY(24px) } }
  .person-card { --pad: 20px; padding-bottom: 22px }
  .chat.is-person .mb-folders { display: none }
}
@media (prefers-reduced-motion: reduce) { .person-pop, .person-pop.leaving { animation: none } }

/* A phone with its keyboard open. Type is at least 16px where you write, or iOS zooms the page in.
   On iOS (live.js sets keyboard-open) chat is pinned to the part of the screen above the keyboard:
   its head stays at the top, the newest messages stay in sight, and the composer sits on the keys. */
@media (max-width: 900px) {
  .chat-composer .chat-box textarea, .chat-search input, .chat .form input[type="text"] { font-size: 1rem }
  .chat-composer { padding-bottom: max(10px, env(safe-area-inset-bottom)) }
  html.keyboard-open, html.keyboard-open body { overflow: hidden; overscroll-behavior: none }
  html.keyboard-open .chat {
    position: fixed; z-index: 40; left: 0; right: 0; top: var(--vv-top, 0px); height: var(--vv-height, 100dvh); background: #FFFFFF;
  }
  html.keyboard-open .chat-head { padding-top: 8px; padding-bottom: 8px }
  html.keyboard-open .chat-head h1 + .hint, html.keyboard-open .chat-head .dm-title + .hint { display: none }
  html.keyboard-open .chat-composer { padding-bottom: 8px }
  html.keyboard-open .chat-composer .chat-box textarea { max-height: calc(var(--vv-height, 100dvh) * .32) }
  html.keyboard-open .hq-toasts { top: calc(var(--vv-top, 0px) + 8px); bottom: auto }
  html.keyboard-open .chat-thread-head { padding-top: 10px; padding-bottom: 10px }
}

/* Right-click menus in chat (chat-menu.js): on the list, a message or a person. A sheet on a phone. */
.mb-mute .bell-off, .mb-mute.is-muted .bell-on { display: none }
.mb-mute.is-muted .bell-off, .mb-mute .bell-on { display: inline-flex }
.mb-mute span { align-items: center }
.ctx-menu {
  position: fixed; z-index: 70; min-width: 220px; max-width: 300px; padding: 6px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #FFFFFF; box-shadow: 0 18px 44px -18px rgba(58, 22, 56, .42), 0 2px 6px rgba(58, 22, 56, .06);
  display: flex; flex-direction: column; animation: hq-menu-in .14s var(--ease-out); transform-origin: top left;
}
.ctx-menu.leaving { animation: hq-menu-out .12s ease forwards }
@keyframes hq-menu-in { from { opacity: 0; transform: scale(.96) } }
@keyframes hq-menu-out { to { opacity: 0 } }
.ctx-title { display: none }
.ctx-item {
  display: flex; align-items: center; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--currant);
  font: 500 .875rem/1.2 var(--text); text-align: left; cursor: pointer;
}
.ctx-item:hover, .ctx-item:focus-visible { background: var(--blush); outline: none }
.ctx-item.danger { color: var(--jam-deep) }
.ctx-item.danger:hover, .ctx-item.danger:focus-visible { background: #FDE8EC }
.ctx-item.confirming { background: var(--jam); color: #FFFFFF; font-weight: 700 }
.ctx-line { height: 1px; margin: 5px 8px; background: var(--line) }
.mb-folder.ctx-target { background: #F3E8EE }
.chat-msg.ctx-target { background: #FBF6F8 }
.mb-row.closing { animation: hq-row-out .22s var(--ease) forwards; overflow: hidden }
@keyframes hq-row-out { to { opacity: 0; height: 0; min-height: 0; margin: 0; transform: translateX(-12px) } }
@media (hover: none) {
  .mb-folder, .chat-msg, .chat-face, .chat-who { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none }
}
@media (max-width: 900px) {
  .ctx-menu {
    left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto; max-width: none; padding: 8px 8px 10px; border-radius: 22px;
    box-shadow: 0 0 0 100vmax rgba(31, 11, 30, .32); transform-origin: bottom center; animation-name: hq-sheet-up;
  }
  @keyframes hq-sheet-up { from { opacity: 0; transform: translateY(20px) } }
  .ctx-title { display: block; margin: 4px 12px 6px; overflow: hidden; color: var(--soft); font-size: .8125rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap }
  .ctx-item { min-height: 48px; font-size: 1rem }
}
@media (prefers-reduced-motion: reduce) { .ctx-menu, .ctx-menu.leaving, .mb-row.closing { animation: none } }

/* Chat reads like an app: its labels, buttons and lists aren't text to select (a right-click on a Mac
   selects the word under it). What people wrote, and where you write, still are. */
.chat .mb-folders, .chat-head, .chat-meta, .chat-day, .chat-new, .chat-replies, .chat-reacts, .chat-tools, .chat-thread-head,
.chat-join, .browse-row, .browse-head, .member-row, .members-about, .chat-system, .chat-avatar, .ctx-menu, .person-pop, .chat-picker, .dm-person {
  -webkit-user-select: none; user-select: none;
}
.chat input, .chat textarea, .chat-text { -webkit-user-select: text; user-select: text }

/* The guide over the composer while a command is being written (chat.js). */
.chat-cmd {
  display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--blush); font-size: .8125rem; animation: hq-cmd-in .16s var(--ease-out);
}
@keyframes hq-cmd-in { from { opacity: 0; transform: translateY(4px) } }
.chat-cmd[hidden] { display: none }
.chat-cmd p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0 }
.chat-cmd code {
  padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; background: #FFFFFF; color: var(--currant);
  font: 600 .8125rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.chat-cmd-arg { padding: 0 9px; border: 1.5px dashed var(--press); border-radius: 999px; color: var(--soft); font-weight: 600; line-height: 1.6 }
.chat-cmd-arg.filled { border-style: solid; border-color: #BFE3CB; background: var(--ok-wash); color: var(--ok-ink) }
.chat-cmd-go { margin-left: auto; color: var(--soft); font-size: .75rem; font-weight: 600 }
.chat-cmd-what { color: var(--currant) }
.chat-cmd-eg { color: var(--soft) }
.chat-cmd-eg code { font-weight: 400; overflow-wrap: anywhere; min-width: 0 }
.chat-cmd-eg .text-button { font-size: .8125rem }
.chat-cmd-line.unknown { color: var(--jam-deep) }
.chat-composer.refused .chat-cmd { border-color: var(--jam); animation: hq-cmd-nudge .32s ease }
@keyframes hq-cmd-nudge { 25% { transform: translateX(-4px) } 75% { transform: translateX(4px) } }
@media (prefers-reduced-motion: reduce) { .chat-cmd, .chat-composer.refused .chat-cmd { animation: none } }

/* In the Teacake HQ app (apps/ios, apps/android) the app draws the navigation as its tab bar, so
   HQ's own sidebar and phone top bar step aside and every page has the whole frame. */
html.in-app .side, html.in-app .skip { display: none !important }
html.in-app, html.in-app body { background: #FFFFFF }
html.in-app .shell { display: block }
@media (max-width: 900px) {
  html.in-app .chat { height: 100dvh }
  html.in-app .main { padding-top: 12px }
  html.in-app .main.flush { padding: 0 }
}
/* The app's glaze header shows a page's heading itself, big at the top and melting into a slim bar as
   the page scrolls, over the room left for it here (apps: HQ.headExtra, 124 points). The line under the
   heading and its buttons stay on the page. */
html.in-app .home-head, html.in-app .main .page-head > div > h1 { display: none }
/* The header names the section and has back, so chat's and the inbox's own title and back links step aside. */
html.in-app .mb-title, html.in-app .chat-back, html.in-app .mb-back { display: none }
html.in-app .mb-title-row:not(:has(.mb-read-all)) { display: none }
html.in-app .main:has(> .home-head, > .page-head) { padding-top: 130px }
html.in-app .main > .page-head:not(:has(.lead, .back, .head-actions, form, a, button)) { display: none }

/* In the app, a page's pieces drop in from under the glaze header one after another as it arrives: on
   each page load, and each time its tab is opened again (live.js, hqApp.arrive). */
@media (prefers-reduced-motion: no-preference) {
  html.in-app.arriving .main > :not(.home-head):not(.page-head):not(.home-grid),
  html.in-app.arriving .home-main > *, html.in-app.arriving .home-aside > * {
    animation: hq-arrive .38s var(--ease) both; animation-delay: calc(90ms + var(--arrive, 0) * 70ms);
  }
  html.in-app.arriving .main > :nth-child(3), html.in-app.arriving .home-main > :nth-child(2) { --arrive: 1 }
  html.in-app.arriving .main > :nth-child(4), html.in-app.arriving .home-main > :nth-child(3) { --arrive: 2 }
  html.in-app.arriving .main > :nth-child(5), html.in-app.arriving .home-main > :nth-child(4) { --arrive: 3 }
  html.in-app.arriving .main > :nth-child(n + 6), html.in-app.arriving .home-aside > * { --arrive: 4 }
  html.in-app .need:active, html.in-app .setup-item:active { transform: scale(.97) }
}
@keyframes hq-arrive { from { opacity: 0; transform: translateY(-16px) } }
/* The app answers taps itself (pressed tiles give a little), so no grey flash over what's tapped. */
html.in-app a, html.in-app label, html.in-app button { -webkit-tap-highlight-color: transparent }

/* Huddles (pages/chat/huddle.ts, huddle.js): the conversation's Huddle button, butter while one's on,
   and the call itself on plum: everyone's face, a butter ring round whoever's speaking, a jam dot on
   whoever's muted, and round buttons to mute and to leave. */
.chat-huddle { gap: 6px; white-space: nowrap }
.chat-huddle.is-on { background: var(--butter); border-color: transparent; color: var(--currant) }
.chat-huddle.is-on:hover { background: #FFE24A }
.chat-huddle.is-on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--jam); animation: hq-huddle-beat 1.6s ease-in-out infinite }
@media (max-width: 560px) { .chat-huddle:not(.is-on) .chat-huddle-label { display: none } }
@keyframes hq-huddle-beat { 50% { opacity: .35; transform: scale(.75) } }

body.bare { margin: 0; background: var(--currant) }
html:has(body.bare) { background: var(--currant) }
.huddle {
  min-height: 100dvh; display: flex; flex-direction: column; color: #FFFFFF;
  padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(130% 60% at 50% 0%, var(--currant-lift), var(--currant) 70%);
}
.huddle-head { display: flex; align-items: center; gap: 10px }
.huddle-back { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -8px; border-radius: 12px; color: var(--on-currant-soft) }
.huddle-back:hover { color: #FFFFFF; background: var(--currant-lift) }
.huddle-title { flex: 1; min-width: 0 }
.huddle-title .eyebrow { margin: 0; color: var(--butter) }
.huddle-title h1 { margin: 2px 0 0; font: 600 1.5rem/1.15 var(--display); color: #FFFFFF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.huddle-time { flex: none; font-weight: 600; font-size: .9375rem; color: var(--on-currant-soft); font-variant-numeric: tabular-nums }
.huddle-people { list-style: none; margin: 0; padding: 28px 0 12px; flex: 1; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 26px 20px }
.huddle-person { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 112px; transition: opacity .32s var(--ease), transform .42s var(--ease) }
.huddle-person.arriving { opacity: 0; transform: translateY(-16px) scale(.9) }
.huddle-face {
  position: relative; display: flex; align-items: center; justify-content: center; width: 92px; height: 92px; border-radius: 50%;
  background: var(--crumb); color: var(--currant); font: 600 2.25rem/1 var(--display); box-shadow: 0 0 0 4px var(--currant-lift); transition: box-shadow .16s ease;
}
.huddle-people[data-count="1"] .huddle-face, .huddle-people[data-count="2"] .huddle-face { width: 116px; height: 116px; font-size: 2.75rem }
.huddle-people[data-count="1"] .huddle-person, .huddle-people[data-count="2"] .huddle-person { width: 136px }
.huddle-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover }
.huddle-person.speaking .huddle-face { box-shadow: 0 0 0 4px var(--butter), 0 0 0 13px rgba(255, 235, 110, .2) }
.huddle-person.muted .huddle-face::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 3px var(--currant);
  background: linear-gradient(45deg, transparent 44%, #FFFFFF 44% 56%, transparent 56%) center / 14px 14px no-repeat, var(--jam);
}
.huddle-name { font-weight: 700; font-size: .9375rem; line-height: 1.25; text-align: center; overflow-wrap: anywhere }
.huddle-status { margin: 0 auto 18px; max-width: 320px; text-align: center; color: var(--on-currant-soft); font-size: .9375rem; min-height: 1.4em }
.huddle-controls { display: flex; justify-content: center; gap: 28px }
.huddle-controls button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #FFFFFF; font: 700 .8125rem/1 var(--text); cursor: pointer }
.huddle-controls .huddle-icon { box-sizing: border-box; width: 64px; height: 64px; padding: 19px; border-radius: 50%; background: var(--currant-lift); transition: transform .16s var(--ease), background-color .2s, color .2s }
.huddle-controls button:active .huddle-icon { transform: scale(.92) }
.huddle-controls button:focus-visible .huddle-icon { outline: 3px solid var(--butter); outline-offset: 3px }
.huddle-off { display: none }
.huddle-mute[aria-pressed="true"] .huddle-icon { background: #FFFFFF; color: var(--currant) }
.huddle-mute[aria-pressed="true"] .huddle-off { display: inline }
.huddle-leave .huddle-icon { background: var(--jam) }
.huddle.no-mic .huddle-mute { opacity: .4; pointer-events: none }
html.in-app .huddle { min-height: 100%; padding-top: 12px }
html.in-app .huddle-back { display: none }

/* Build news on an app's Releases tab (pages/apps/app-page.ts): on, since when, the last it brought. */
.build-news h2 { display: flex; align-items: center; gap: 8px }
.build-news-when { color: var(--soft); white-space: nowrap }
.build-news-when::before { content: "· " }
.build-news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
.build-news-list li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: .9375rem }
.build-news-list form { margin: 0 0 0 auto }
.build-news-os { flex: none; min-width: 64px; font-weight: 700 }

/* The sample HQ (src/sample): a line at the top of every page saying it's made up. */
.sample-banner { margin: 0 0 16px; padding: 10px 14px; border-radius: 14px; background: var(--wait-wash); color: var(--wait-ink); font-weight: 600; font-size: .875rem }
html.in-app .main:has(> .home-head, > .page-head) > .sample-banner { margin-top: -6px }
/* The apps' privacy page, public. */
.privacy { max-width: 680px; margin: 0 auto; padding: 40px 20px 60px; line-height: 1.6 }
.privacy h1 { font: 600 2rem/1.2 var(--display); margin: 0 0 8px }
.privacy h2 { font: 600 1.25rem/1.3 var(--display); margin: 28px 0 6px }
.privacy p, .privacy li { color: var(--currant) }
