/* Squeak web, direction B "Chat first" (docs/mocks/2026-11-27/web-redesign/b). Warm neutrals (DESIGN.md), light and dark following
   the browser. A dark rail of Pond tiles on the left (a strip across the top on a phone) and the open Pond taking the rest.
   The duck's yellow is only ever a primary button or the logo, never text or a state; no coloured status dots. */

@font-face {
  font-family: Figtree;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/Figtree-700.ttf") format("truetype");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/JetBrainsMono-Medium.ttf") format("truetype");
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --side: #fcf7f1;
  --raised: #ffffff;
  --sel: #f1ece6;
  --sel2: #e7e2dd;
  --ink: #292622;
  --muted: #67625e;
  --subtle: #8a8580;
  --line: #e7e2dd;
  --ls: rgba(20, 16, 15, 0.16);
  --warn: #a16207;
  --work: #1d4ed8;
  --neg: #dc2626;
  --paper: #f8f7f3;
  --duck: #ffda1a;
  --inkb: #18191b;
  --rail: #1c1915;
  /* the primary button: ink on light, the duck's yellow on dark */
  --primary-bg: #18191b;
  --primary-fg: #f8f7f3;
  /* Pond colours: every tint reads --h (set per Pond or person, never in the duck's band) */
  --tint-sat: 62%;
  --tint-bg: 86%;
  --tint-fg-sat: 60%;
  --tint-fg: 24%;
  --acc-s: 55%;
  --acc-l: 34%;
  --td-s: 58%;
  --td-l: 46%;
  --shadow: 0 2px 10px rgba(30, 20, 10, 0.06);
  /* the names older rules still use */
  --surface: var(--raised);
  --selected: var(--sel);
  --line-strong: var(--ls);
  --negative: var(--neg);
  --waiting: var(--warn);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13100c;
    --side: #1c1915;
    --raised: #26221e;
    --sel: #26221e;
    --sel2: #312d29;
    --ink: #ece7e2;
    --muted: #afaaa5;
    --subtle: #8c8782;
    --line: rgba(255, 255, 255, 0.1);
    --ls: rgba(255, 255, 255, 0.2);
    --warn: #e0a030;
    --work: #4c8dff;
    --neg: #f87171;
    --paper: #13100c;
    --rail: #0c0a07;
    --primary-bg: #ffda1a;
    --primary-fg: #18191b;
    --tint-sat: 30%;
    --tint-bg: 28%;
    --tint-fg-sat: 70%;
    --tint-fg: 82%;
    --acc-s: 60%;
    --acc-l: 66%;
    --td-s: 84%;
    --td-l: 69%;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
a,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.rail :focus-visible,
.yellow :focus-visible {
  outline-color: #f8f7f3;
}
.invite .hero-text :focus-visible {
  outline-color: var(--inkb);
}

/* Said to screen readers, not drawn. */
.sr,
.rail h1,
.rail h2,
.rail .sub,
.rail .bar,
.rail .empty,
.rail .age,
.rail [data-block="needs-you"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Sign-in: one page, centred, nothing else. */
.signin {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.lockup {
  display: block;
  width: min(210px, 56vw);
  height: auto;
}

.blurb,
.quiet {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  text-wrap: balance;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--ls);
  border-radius: 14px;
  background: var(--raised);
  font-weight: 600;
}

.button:hover {
  background: var(--sel);
}

.icon {
  flex: none;
}

.failure {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.failure p {
  color: var(--neg);
}

/* People and Pond tiles: one hue each. */
.avatar {
  --h: 260;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  font-weight: 600;
  background: hsl(var(--h) var(--tint-sat) var(--tint-bg));
  color: hsl(var(--h) var(--tint-fg-sat) var(--tint-fg));
}

.avatar.person {
  border-radius: 50%;
}

.avatar.tile {
  border-radius: 12px;
  font-weight: 700;
}

.pa {
  --acc: hsl(var(--h) var(--acc-s) var(--acc-l));
}

/* Layout: the rail (a strip on a phone) and the open Pond; the Pond fills the rest of the window, its feed scrolls. */
.shell {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

.list {
  flex: none;
  display: flex;
}

.detail {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.detail > .screen {
  flex: 1;
  min-height: 0;
}

.screen {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* The header over a Pond, a Duck, Settings: Pond tile, title and a quiet line, people, the Room | Ducks switch. */
.hd,
.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 40px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.hd .avatar.tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 17px;
}

.titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.hd h1,
.bar h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar h1 {
  flex: none;
}

.subtitle {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: -10px;
  border-radius: 50%;
  text-decoration: none;
}
.back:hover {
  background: var(--sel);
}

.flock {
  display: flex;
  flex: none;
  border-radius: 999px;
  text-decoration: none;
}
.flock .avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
  box-shadow: 0 0 0 2px var(--bg);
  margin-left: -8px;
}
.flock .avatar:first-child {
  margin-left: 0;
}

.seg {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--sel);
  font-size: 13.5px;
  font-weight: 500;
}
.seg a {
  padding: 6px 16px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}
.seg a:hover {
  color: var(--ink);
}
.seg a[aria-selected="true"] {
  background: var(--raised);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
@media (prefers-color-scheme: dark) {
  .seg a[aria-selected="true"] {
    background: var(--sel2);
    box-shadow: none;
  }
}

.empty {
  padding: 32px 16px;
  color: var(--muted);
  text-align: center;
}

.banner {
  flex: none;
  margin: 12px 40px 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sel);
  color: var(--muted);
  font-size: 14px;
}

/* The pinned question over the Room: the Pond's colour wash, Answer on the right. */
.pin {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 40px 0;
  padding: 12px 16px 12px 18px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--acc) 9%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--acc) 22%, var(--line));
}
.pin::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: var(--subtle);
}
.pin .tx {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
}
.pin strong {
  font-weight: 600;
}
.pin small {
  font-size: 13px;
  color: var(--muted);
}
.pin .duck {
  width: 28px;
  height: 28px;
}
.answer {
  flex: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* Buttons. */
.primary {
  border: 0;
  background: var(--primary-bg);
  color: var(--primary-fg);
}
a.primary {
  display: inline-block;
}
.outline {
  border: 1px solid var(--ls);
  background: transparent;
  border-radius: 12px;
  min-height: 40px;
  padding: 0 16px;
  font-weight: 600;
}
.outline:hover {
  background: var(--sel);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.failure-line {
  color: var(--neg);
  font-size: 14px;
}
.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
}
.link:hover {
  color: var(--ink);
}

/* The feed: oldest first, the newest at the bottom, a calm centred column that fills the window. */
.room,
.ducks {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.feed > ol,
.tools ul,
.options,
.tasks ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feed > ol {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 15px;
  width: min(860px, 100% - 48px);
  margin: 0 auto;
  padding: 18px 0 14px;
  min-height: 100%;
}
.feed > .empty,
.feed > .earlier {
  width: min(860px, 100% - 48px);
  margin: 0 auto;
}
.earlier {
  text-align: center;
}

.msg {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.msg > .avatar {
  width: 36px;
  height: 36px;
  font-size: 15px;
  margin-top: 2px;
}
.msg .bubble {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  overflow-wrap: anywhere;
}
.msg .who {
  order: 1;
  font-weight: 600;
  font-size: 14px;
}
.msg .meta {
  order: 2;
}
.msg .bubble p {
  order: 3;
  flex-basis: 100%;
  font-size: 16px;
  line-height: 1.45;
}
.msg.mine {
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.msg.mine .bubble {
  flex: none;
  display: block;
  max-width: 78%;
  padding: 10px 16px;
  border-radius: 20px 20px 6px 20px;
  background: color-mix(in srgb, var(--acc, var(--sel2)) 15%, var(--bg));
}
@media (prefers-color-scheme: dark) {
  .msg.mine .bubble {
    background: color-mix(in srgb, var(--acc, var(--sel2)) 22%, var(--bg));
  }
}
.msg.pending {
  opacity: 0.85;
}
.who,
.meta,
.note,
.earlier,
.mac-line,
.readonly {
  color: var(--muted);
  font-size: 12.5px;
}
.meta .link {
  font-size: 12.5px;
}

/* A Duck's line in the Room: a soft row. */
.state-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 50px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--sel);
  font-size: 14px;
  color: var(--muted);
}
.state-line strong {
  color: var(--ink);
  font-weight: 600;
}
.state-line .line {
  flex: 1;
  min-width: 0;
}
.state-line .duck {
  width: 20px;
  height: 20px;
}
.state-line .waiting {
  width: 16px;
  height: 16px;
}
.state-line .meta {
  min-width: 38px;
  text-align: right;
}
.mac-line {
  margin-top: 2px;
}

.tools {
  margin-left: 50px;
  color: var(--muted);
  font-size: 14px;
}
.tools summary {
  cursor: pointer;
}
.reply {
  margin-left: 50px;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tasks {
  flex: none;
  width: min(860px, 100% - 48px);
  margin: 12px auto 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--sel);
  font-size: 14px;
}
.tasks h2 {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.tasks li {
  padding: 2px 0;
}

/* The composer: one rounded field with Make task on the left and Send, in the Pond's colour, on the right. */
.composer {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 24px calc(22px + env(safe-area-inset-bottom));
}
.composer .field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(860px, 100%);
  padding: 8px 8px 8px 22px;
  border: 1.5px solid var(--ls);
  border-radius: 26px;
  background: var(--raised);
  box-shadow: var(--shadow);
}
.composer .field:focus-within {
  border-color: var(--acc, var(--ink));
}
.composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 24px;
  max-height: 160px;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 16px;
  line-height: 1.4;
  resize: none;
  field-sizing: content;
}
.composer textarea::placeholder {
  color: var(--subtle);
}
.task-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 5px 12px 5px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--sel);
  font-size: 13px;
  font-weight: 500;
}
.task-chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--acc, var(--ink)) 18%, var(--bg));
  box-shadow: inset 0 0 0 1.5px var(--acc, var(--ink));
}
.composer .send {
  flex: none;
  display: grid;
  place-items: center;
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--acc, var(--primary-bg));
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .composer .send {
    color: #13100c;
  }
}
.composer .failure-line,
.composer .note {
  width: min(860px, 100%);
  padding-left: 22px;
}
.readonly {
  flex: none;
  width: min(860px, 100% - 48px);
  margin: 0 auto;
  padding: 14px 0 22px;
}

/* Home: nothing open. */
.pick {
  margin: auto;
}
.welcome {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(640px, 100% - 48px);
  margin: auto;
  padding: 24px 0;
}
.welcome .m {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.welcome .mav {
  flex: none;
  margin-top: 4px;
}
.welcome .mh b {
  font-size: 14px;
  font-weight: 600;
}
.hello {
  margin-top: 3px;
  padding: 14px 18px;
  border-radius: 6px 22px 22px 22px;
  background: var(--sel);
  font-size: 17px;
  line-height: 1.5;
}
.aside {
  margin-left: 52px;
  font-size: 13.5px;
  color: var(--muted);
}
.get-mac {
  align-self: flex-start;
  margin-left: 52px;
  padding: 14px 24px;
  border-radius: 14px;
  background: var(--duck);
  color: var(--inkb);
  font-weight: 600;
  text-decoration: none;
}

.sign-out {
  margin-top: auto;
}

/* Phone: the rail becomes a strip across the top; the Pond fills the rest. */
@media (max-width: 859px) {
  .shell {
    flex-direction: column;
  }
  .list {
    width: 100%;
  }
  .shell[data-route="duck"] .list,
  .shell[data-route="settings"] .list {
    display: none;
  }
  .hd,
  .bar {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 14px 16px;
  }
  .hd .avatar.tile {
    display: none;
  }
  .flock {
    order: 3;
  }
  .flock .avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  .pin {
    margin: 12px 16px 0;
  }
  .pin .more {
    display: none;
  }
  .banner {
    margin: 12px 16px 0;
  }
  .feed > ol,
  .feed > .empty,
  .feed > .earlier,
  .tasks,
  .readonly {
    width: calc(100% - 32px);
  }
  .composer {
    padding: 0 12px calc(14px + env(safe-area-inset-bottom));
  }
  .composer .field {
    padding-left: 12px;
  }
  .msg {
    gap: 12px;
  }
  .state-line,
  .tools,
  .reply {
    margin-left: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* "Make task" on a message shows on hover or focus where there is a pointer; always on touch. */
@media (hover: hover) {
  .msg .meta .task-act {
    opacity: 0;
  }
  .msg:hover .meta .task-act,
  .msg:focus-within .meta .task-act {
    opacity: 1;
  }
}

.home {
  background: radial-gradient(
    ellipse 46% 34% at 50% 78%,
    color-mix(in srgb, var(--duck) 14%, transparent),
    transparent 70%
  );
}

/* The rail (a strip on a phone): the logo, Invites, one tile per Pond with its name under it, and the account at the end. A Pond's
   triangle (waiting on you) or tide (working) sits on its tile's corner. The owner's avatar is the badge on a shared Pond. */
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.count {
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.rail {
  width: 88px;
  height: 100%;
  background: var(--rail);
  color: #ece7e2;
  align-items: center;
  padding: 18px 0 16px;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar {
  display: none;
}
.rail .content,
.rail [data-block] {
  display: contents;
}
.rail ul {
  display: contents;
}
.rail li {
  display: contents;
}
.rail-logo {
  flex: none;
  display: block;
  margin-bottom: 12px;
  border-radius: 12px;
}
.rail-logo img {
  display: block;
  width: 44px;
  height: auto;
}
.rail .item,
.rail .account .acct {
  position: relative;
  flex: none;
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  min-height: 0;
  border: 0;
  background: none;
  color: #afaaa5;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}
.rail .item:hover,
.rail .account .acct:hover {
  background: none;
  color: #fff;
}
.rail .item strong,
.rail .item .label,
.rail .account strong {
  display: block;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 500;
  color: inherit;
  text-align: center;
}
.rail .item.unread {
  color: #ece7e2;
}
.rail .item.unread strong {
  font-weight: 700;
}
.rail .item.selected {
  color: #fff;
}
.rail .item.selected strong {
  font-weight: 700;
}
.rail .item.selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 4px;
  height: 28px;
  border-radius: 0 4px 4px 0;
  background: #f8f7f3;
}
.rail .item.connecting {
  opacity: 0.7;
}

.tile-wrap {
  position: relative;
  flex: none;
  display: block;
}
.tile-wrap .avatar.tile {
  margin: 0;
  width: 52px;
  height: 52px;
  font-size: 22px;
  border-radius: 16px;
  background: hsl(var(--h) 55% 70%);
  color: hsl(var(--h) 70% 16%);
}
.tile-wrap .avatar.small {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 19px;
  height: 19px;
  font-size: 9px;
  box-shadow: 0 0 0 2px var(--rail);
}
.rail .item.selected .avatar.tile {
  box-shadow:
    0 0 0 3px var(--rail),
    0 0 0 5px hsl(var(--h) 80% 78%);
}
.rail .item:focus-visible .avatar.tile,
.rail .acct:focus-visible .avatar {
  outline: 2px solid #f8f7f3;
  outline-offset: 3px;
}
.rail .item:focus-visible,
.rail .acct:focus-visible {
  outline: 0;
}

.rail .waiting,
.rail .tide {
  position: absolute;
  top: -1px;
  right: 3px;
}
.rail .waiting {
  width: 16px;
  height: 16px;
  color: #e0a030;
}
.rail .tide {
  top: 1px;
  color: #7fb0ff;
}

/* Invites: a dashed tile with the count; the invitations open in a flyout beside it. */
.rail-invites {
  cursor: pointer;
}
.rail .avatar.tile.dashed {
  background: transparent;
  border: 1.5px dashed #6b655f;
  color: #ece7e2;
}
.rail .cnt {
  position: absolute;
  top: -5px;
  right: -6px;
  padding: 0 6px;
  border-radius: 9px;
  background: #f8f7f3;
  color: #18191b;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}
.rail .failure {
  padding: 0 6px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-align: center;
  color: #ece7e2;
}
.rail .failure p {
  color: #f4a3a3;
}
.rail .failure .button {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  background: transparent;
  color: #ece7e2;
  border-color: #6b655f;
  font-size: 11px;
}

.rail .account {
  margin-top: auto;
  flex: none;
}
.rail .account .acct .avatar {
  width: 40px;
  height: 40px;
  font-size: 16px;
}
.rail .account .acct .avatar.person {
  background: hsl(var(--h) 60% 87%);
  color: hsl(var(--h) 55% 27%);
}
.avatar-button {
  display: none;
}

.rail .flyout {
  display: none;
}
.rail [data-open] .flyout {
  display: flex;
  position: fixed;
  z-index: 30;
  left: 100px;
  top: 16px;
  width: min(360px, 100vw - 120px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--raised);
  color: var(--ink);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.rail .flyout li {
  display: block;
}
.rail .flyout .sub {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: hidden;
  white-space: nowrap;
}
.invitation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px;
}
.invitation .row {
  display: flex;
  gap: 14px;
  align-items: center;
}
.invitation .tile-wrap .avatar.tile {
  width: 48px;
  height: 48px;
  font-size: 20px;
  border-radius: 14px;
}
.invitation .tile-wrap .avatar.small {
  box-shadow: 0 0 0 2px var(--raised);
}
.text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.invitation .text strong {
  max-width: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}
.sub {
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pair button {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 600;
}
.pair .outline {
  border: 1px solid var(--ls);
  background: transparent;
}

/* The tide: still squares that twinkle (not at all under reduced motion). */
.tide {
  display: inline-flex;
  flex: none;
  color: var(--work);
}
.tide svg {
  display: block;
}
.tide rect {
  animation: twinkle 1.6s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}
.waiting {
  color: var(--warn);
  flex: none;
}
.age {
  color: var(--muted);
  font-size: 13px;
  flex: none;
}

/* A Duck: the template thread duck, tinted. */
.duck {
  --h: 200;
  flex: none;
  width: 34px;
  height: 34px;
  background: hsl(var(--h) var(--td-s) var(--td-l));
  -webkit-mask: url("brand/duckThread.png") center / contain no-repeat;
  mask: url("brand/duckThread.png") center / contain no-repeat;
}
.connection {
  color: var(--muted);
  font-size: 14px;
}
.connection[data-connection="reconnecting"] {
  color: var(--warn);
}

/* Ducks tab: soft rows. */
.ducks {
  overflow-y: auto;
  gap: 14px;
  padding: 18px 0 24px;
  align-items: center;
}
.ducks > * {
  width: min(860px, 100% - 48px);
  flex: none;
}
.ducks h2 {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.ducks .list-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ducks .item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--sel);
  text-decoration: none;
}
.ducks a.item:hover {
  background: var(--sel2);
}
.ducks .text strong {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ducks .duck {
  width: 28px;
  height: 28px;
}
.ducks .waiting {
  width: 20px;
  height: 20px;
}
.start {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ducks .composer {
  padding: 0;
  align-items: stretch;
}

/* A Duck's screen: the question card sits above the composer. */
.actions {
  flex: none;
  display: flex;
  justify-content: flex-end;
  padding: 10px 40px 0;
}
.decision {
  flex: none;
  width: min(860px, 100% - 48px);
  margin: 0 auto 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--acc, var(--sel2)) 9%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--acc, var(--sel2)) 22%, var(--line));
}
.question {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.option {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--sel);
  text-align: left;
}
.option:hover:not(:disabled) {
  background: var(--sel2);
}
.option .letter {
  width: 22px;
  font-weight: 600;
  color: var(--muted);
}
.decision .composer {
  padding: 12px 0 0;
}
.decision .composer .field {
  width: 100%;
}

@media (max-width: 859px) {
  /* The strip: tiles in a row, scrolling sideways; the account is its last item. */
  .rail {
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    padding: calc(max(env(safe-area-inset-top), 12px) + 8px) 12px 12px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .rail-logo {
    display: none;
  }
  .rail .item,
  .rail .account .acct {
    width: 64px;
    padding: 4px 0;
  }
  .rail .item strong,
  .rail .item .label,
  .rail .account strong {
    max-width: 60px;
  }
  .tile-wrap .avatar.tile,
  .rail .item.selected::before {
    display: none;
  }
  .rail .account {
    margin-top: 0;
    margin-left: auto;
  }
  .rail .waiting,
  .rail .tide {
    right: 6px;
  }
  .rail [data-open] .flyout {
    left: 12px;
    right: 12px;
    top: 118px;
    width: auto;
  }
  .ducks > *,
  .decision {
    width: calc(100% - 32px);
  }
  .actions {
    padding: 10px 16px 0;
  }
}

/* The rail does not list Needs you: the question is pinned in its Pond, and the tile triangle says where. */
.rail [data-block="needs-you"] {
  display: none;
}

.ducks .list-card {
  border: 0;
  background: none;
  border-radius: 0;
  overflow: visible;
}
.ducks .list-card > li + li {
  border-top: 0;
}

.rail .flyout .card {
  border: 0;
  border-radius: 0;
  background: none;
}

/* The invite page (direction C's, chosen for /invite): a duck-yellow sheet with a big headline and one ink Join button, then the
   Pond on paper. Figtree for the headline and JetBrains Mono for the kicker are the brand's own type, used on this page only.
   The yellow sheet is the brand constant in both themes; the rest follows the browser. */
.invite {
  --wash: hsl(var(--h) var(--tint-sat) var(--tint-bg));
  --pond: hsl(var(--h) var(--acc-s) var(--acc-l));
  min-height: 100dvh;
  background: var(--paper);
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.invite.plain {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 24px;
}
.lockup-h {
  display: block;
  height: 30px;
  width: auto;
}
.invite .story,
.invite .closing,
.invite .foot,
.invite .story-lede,
.invite .hero-pond {
  width: min(1040px, 100% - 48px);
  margin-inline: auto;
}

.invite .hero-text {
  --ink: #18191b;
  --muted: #3a3720;
  --ls: rgba(24, 25, 27, 0.28);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: max(52px, env(safe-area-inset-top)) max(24px, calc((100% - 1040px) / 2)) 30px;
  border-radius: 0 0 34px 34px;
  background: var(--duck);
  color: var(--inkb);
}
.invite .hero-text > * {
  max-width: 640px;
}
.invite .top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: none;
}
.invite .duck-mark {
  display: block;
  width: 44px;
  height: auto;
}
.invite .for {
  font:
    500 11px/1.4 "JetBrains Mono",
    ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.invite h1 {
  margin-top: -2px;
  font:
    700 clamp(44px, 9vw, 84px) / 1 Figtree,
    var(--font);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.invite h1.settled {
  font-size: clamp(34px, 7vw, 56px);
}
.invite .pond-name {
  color: inherit;
}
.invite .lede {
  font-size: 16px;
  line-height: 1.5;
  color: #3a3720;
}
.invite .actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.invite .actions .button {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  font-size: 17px;
  text-decoration: none;
  color: var(--inkb);
}
.invite .button.solid {
  background: var(--inkb);
  border: 0;
  color: #f8f7f3;
}
.invite .button.solid:hover {
  background: #2c2d30;
}
.invite .actions a.button:not(.solid) {
  background: transparent;
  border-color: rgba(24, 25, 27, 0.4);
}
.invite .providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.invite .providers .quiet {
  font-size: 15px;
  color: #3a3720;
}
.invite .providers .button {
  background: #fff;
  color: var(--inkb);
  border-color: rgba(24, 25, 27, 0.2);
}
.invite .fine {
  font-size: 12.5px;
  line-height: 1.5;
  color: #3a3720;
}
.invite .fine strong {
  color: var(--inkb);
}
.invite .link {
  border: 0;
  background: none;
  padding: 0;
  color: #3a3720;
  font: inherit;
  text-decoration: underline;
}
.invite .problem {
  color: #9b1c1c;
  font-size: 15px;
  font-weight: 500;
}
.invite .ask {
  font-size: 19px;
  font-weight: 600;
}

/* The Pond, on paper. */
.invite .hero-pond {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
  margin-inline: max(24px, calc((100% - 1040px) / 2));
  width: auto;
  padding: 24px 0 8px;
}
.invite .pond-line {
  display: flex;
  align-items: center;
  gap: 14px;
}
.invite .avatar.tile.big {
  width: 56px;
  height: 56px;
  font-size: 24px;
  border-radius: 16px;
}
.invite .pond-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.invite .pond-h {
  font:
    700 28px / 1 Figtree,
    var(--font);
  letter-spacing: -0.03em;
  color: var(--pond);
}
.invite .pond-sub {
  font-size: 13px;
  color: var(--muted);
}
.invite .members {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--muted);
}
.invite .flock {
  display: flex;
  flex: none;
}
.invite .flock .avatar {
  width: 34px;
  height: 34px;
  font-size: 14px;
  box-shadow: 0 0 0 2px var(--paper);
  margin-left: -10px;
}
.invite .flock .avatar:first-child {
  margin-left: 0;
}
.invite .role-note {
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 820px) {
  .invite .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .invite .actions .button {
    width: auto;
    min-width: 220px;
    padding: 0 28px;
  }
  .invite .fine {
    text-align: left;
  }
}
@media (max-width: 819px) {
  .invite .fine {
    text-align: center;
  }
}

.invite .story-lede,
.invite .closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px 0 40px;
  text-align: center;
}
.invite .closing h2 {
  font-size: 32px;
  letter-spacing: -0.015em;
}
.invite .closing .actions {
  justify-content: center;
}
.invite .foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
/* The "Get Squeak for Mac" card, once, in a Pond after joining on the web. */
.mac-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 16px 0;
  padding: 14px 16px;
  background: var(--selected);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.mac-card a {
  font-weight: 600;
}
.mac-card button {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.invite .actions {
  padding: 0;
  justify-content: flex-start;
}
.invite .flock {
  order: 0;
}

/* People sheet and Settings, in the same calm language as the Room: raised cards, soft rows, Pond colour only where it belongs.
   Red (--neg) marks the destructive and failures only. */
.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.list-card {
  overflow: hidden;
}
.list-card > li + li {
  border-top: 1px solid var(--line);
}
.cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.row {
  display: flex;
  gap: 14px;
  align-items: center;
}
.text strong {
  font-size: 16px;
  font-weight: 600;
}

/* The sheet: a bottom sheet on a phone, a centred card on a wide window. */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 860px) {
  .sheet-backdrop {
    align-items: center;
  }
  .sheet {
    max-height: 86dvh;
    border-radius: 24px;
    padding: 20px 24px 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  }
  .sheet .grab {
    display: none;
  }
}
.grab {
  align-self: center;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--ls);
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet-head h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.sheet h3 {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.done {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--sel);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.done:hover {
  background: var(--sel2);
}
.invite-form {
  display: flex;
  gap: 8px;
}
.invite-form input {
  flex: 1;
  min-width: 0;
}
.invite-form .primary,
.confirm .primary {
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
}
input,
select {
  font: inherit;
  color: var(--ink);
  background: var(--raised);
  border: 1.5px solid var(--ls);
  border-radius: 12px;
  padding: 10px 12px;
}
input:focus-visible,
select:focus-visible {
  outline-offset: 0;
}
select {
  background: var(--sel);
  border-color: transparent;
}
.person-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
}
.person-row .text {
  flex: 1;
  min-width: 0;
}
.person-row .email,
.person-row .presence {
  display: block;
}
.person-row .avatar.person {
  width: 40px;
  height: 40px;
}
.you {
  color: var(--muted);
  font-weight: 400;
}
.role {
  align-self: center;
  color: var(--muted);
  font-size: 14px;
}
.person-row .actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding: 0;
}
.danger-link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--neg);
}
.danger-text {
  color: var(--neg);
}
.danger {
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  border: 0;
  background: var(--neg);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .danger {
    color: #13100c;
  }
}
.confirm {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}
.confirm p {
  flex-basis: 100%;
}
.confirm input {
  flex: 1;
  min-width: 0;
}
.person-row .buttons {
  flex-direction: row;
  width: auto;
  gap: 8px;
  margin-top: 8px;
}
.person-row .buttons .outline {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
}
.avatar.dashed {
  background: transparent;
  border: 1.5px dashed var(--ls);
  color: var(--muted);
}
.wide {
  width: 100%;
}
.danger-zone {
  margin-top: 8px;
}

/* Settings. */
[data-screen="settings"] .content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(640px, 100% - 32px);
  margin: 0 auto;
  padding: 24px 0 32px;
}
[data-screen="settings"] h2 {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.account-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.account-card .avatar {
  width: 44px;
  height: 44px;
}
.device-row .outline {
  align-self: center;
  min-height: 34px;
  font-size: 14px;
}
[data-screen="settings"] .note {
  margin-top: 8px;
}
.sign-out {
  margin-top: 8px;
}
.mac-card {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 40px 0;
  padding: 12px 16px;
  background: var(--sel);
  border-radius: 14px;
}
.mac-card a {
  font-weight: 600;
}
.mac-card button {
  border: 0;
  background: none;
  color: var(--muted);
}
@media (max-width: 859px) {
  .mac-card {
    margin: 12px 16px 0;
  }
}

.sheet > * {
  flex: none;
}
