/*
 * app.css — tildew.com's signed-in pages (/library, /library/v, /account).
 *
 * The marketing pages keep seo.css and its paper ground; the app pages are a distinct surface on the
 * COOL-GREY ground the owner picked on 2026-09-26 (spec §7.1a): direction A "Shelf" with C's mode sheets.
 * One file, no @import, no inline <style> — the site CSP is script-src 'self' and this is the only
 * stylesheet the three pages load.
 *
 * Vocabulary the page modules build against:
 *   chrome   .app-nav .logo .mark .nav-link .nav-sp .credits .avatar .initials
 *   controls .btn(.btn-primary|.btn-ghost|.btn-danger) .toggle .search .chip .select
 *   library  .rail .toolbar .grid|.list > .card, .thumb .dur .info .t .ch .modes .langs .star .empty
 *   sheets   .sheets > .sheet(.open|.dim)
 *   reader   .crumb .head .meta .actions .tabs .tldw .notes .aside .chapters .kp
 *   notes    .card.section .ts and the .b-* blocks rendered by @tildew/shared (renderSections)
 *   account  .acct .acct-row .meter .plan .note .picker .picks .pick .includes .kicker
 *   collections .collection-* (list, detail rows, confirm, delete row, card)
 *   auth     .signin
 * Everything under .b-* mirrors extension/src/sidepanel.css so the panel and the site render the same HTML
 * the same way. Change one, change the other.
 */

:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --ink: #0e0e12;
  --ink-2: #4b4b57;
  --ink-3: #767680;
  --line: #e0e3ec;
  --blue: #3d5afe;
  --blue-soft: #eef1ff;
  --yellow: #ffd23f;
  --yellow-ink: #1a1400;
  --green: #12b76a;
  --green-soft: #e6f7ee;
  --pink: #ff5c8a;
  --red: #e5484d;
  --red-soft: #fdecec;
  --grey-block: #eaecf3;
  --mark-fg: #ffffff;
  --mark-glow: rgba(61, 90, 254, 0.5);
  --load-line: #ced5f2;
  --shadow: 0 20px 50px -30px rgba(14, 14, 18, 0.35);
  --radius: 14px;
  --tap: 44px;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "DM Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f13;
    --surface: #18181e;
    --ink: #f4f3ef;
    --ink-2: #bdbcc6;
    --ink-3: #80808c;
    --line: #2a2a33;
    --blue: #6b82ff;
    --blue-soft: #1e2352;
    --green-soft: #11301f;
    --red-soft: #3a1c1e;
    --grey-block: #1f1f26;
    --mark-fg: #0f0f13;
    --mark-glow: rgba(107, 130, 255, 0.35);
    --load-line: #303552;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f0f13;
  --surface: #18181e;
  --ink: #f4f3ef;
  --ink-2: #bdbcc6;
  --ink-3: #80808c;
  --line: #2a2a33;
  --blue: #6b82ff;
  --blue-soft: #1e2352;
  --green-soft: #11301f;
  --red-soft: #3a1c1e;
  --grey-block: #1f1f26;
  --mark-fg: #0f0f13;
  --mark-glow: rgba(107, 130, 255, 0.35);
  --load-line: #303552;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.loading,
.muted {
  color: var(--ink-3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===== loading =====
 *
 * The half-second before an app page has its data (`web/src/loadingView.ts`). The mark is the hero and it
 * stays still; the only motion is three uneven lines being written underneath it — what Tildew does to a
 * video. Not a shimmer: a shimmer sweep never resolves, and this loop clears and starts the next pass.
 * `.loading` above is the OLD one-line treatment, still used inside the reader for the transcript tab.
 */

.load {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  min-height: calc(100vh - 150px);
  padding: 48px 16px;
  text-align: center;
}

.load-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--blue);
  color: var(--mark-fg);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 16px 34px -16px var(--mark-glow);
}

.load-lines {
  display: grid;
  gap: 10px;
  width: min(196px, 58vw);
}

.load-lines i {
  height: 9px;
  border-radius: 999px;
  background: var(--load-line);
  transform: scaleX(0);
  transform-origin: left center;
  animation: load-write 2.4s cubic-bezier(0.33, 0, 0.2, 1) infinite;
}

.load-lines i:nth-child(1) {
  width: 100%;
}

.load-lines i:nth-child(2) {
  width: 74%;
  animation-delay: 0.18s;
}

.load-lines i:nth-child(3) {
  width: 48%;
  animation-delay: 0.36s;
}

/* Written left to right, held while the eye reads them, then cleared for the next pass. */
@keyframes load-write {
  0% {
    transform: scaleX(0);
    opacity: 1;
  }
  26% {
    transform: scaleX(1);
    opacity: 1;
  }
  74% {
    transform: scaleX(1);
    opacity: 1;
  }
  90%,
  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

.load p {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
}

/* Nothing draws: the three lines sit at the widths they would have been written to. */
@media (prefers-reduced-motion: reduce) {
  .load-lines i {
    animation: none;
    transform: none;
    opacity: 0.75;
  }
}

/* ===== app header ===== */

#app-nav {
  display: block;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  padding: 10px 0;
}

.app-nav .logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: var(--tap);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.app-nav .mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--blue);
  color: var(--mark-fg);
  font-size: 12px;
  font-weight: 800;
}

.app-nav .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 4px;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
}

.app-nav .nav-link[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}

.app-nav .nav-sp {
  flex: 1;
}

.app-nav .credits {
  color: var(--ink-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.app-nav .avatar {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  text-decoration: none;
}

.app-nav .avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.app-nav .avatar .initials {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  color: #1a1400;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ===== controls ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--tap);
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn[aria-pressed="true"],
.btn.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-3);
}

.btn-ghost:hover {
  border-color: var(--line);
  color: var(--ink);
}

.btn-danger {
  border-color: var(--line);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

.btn.star[aria-pressed="true"] {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--yellow-ink);
}

/* grid / list view switch */
.toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: var(--tap);
  min-width: 200px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  transition:
    flex-grow 170ms ease,
    border-color 170ms ease;
}

/*
 * Clicked or tabbed into, the field takes the toolbar's slack — the space `margin-right: auto` on the
 * heading was holding — so the placeholder and a long query read in full. It GROWS rather than widening its
 * basis on purpose: flex-grow can only eat space that is already free, so the sort and the view toggle
 * never get pushed onto a second row, however narrow the window is. The global reduced-motion rule at the
 * end of this file turns the growth into a jump.
 */
.search:focus-within {
  flex-grow: 1;
  max-width: 420px;
  border-color: var(--blue);
  color: var(--blue);
}

.search svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.search input:focus {
  outline: none;
}

.select {
  min-height: var(--tap);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--grey-block);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}

.chip.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

/* ===== library: rail + toolbar + shelf ===== */

.page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 0 56px;
}

.shelf {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.rail h4 {
  padding: 4px 10px;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rail button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--tap);
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
}

.rail-link {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  margin-top: 6px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.rail-link:hover {
  background: var(--grey-block);
  color: var(--blue);
}

.rail button small {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.rail button:hover {
  background: var(--grey-block);
}

.rail button[aria-pressed="true"] {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.rail button[aria-pressed="true"] small {
  color: inherit;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar h1 {
  margin-right: auto;
  font-size: 24px;
}

.toolbar h1 small {
  margin-left: 9px;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

/* The shelf: borderless cards on the ground in grid view, one bordered sheet of rows in list view. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.grid > .card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
}

.list > .card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
}

.list > .card:first-child {
  border-top: 0;
}

.list > .card:hover {
  background: var(--grey-block);
}

/* The card body — the middle column of a list row, the stack under the thumbnail in grid view. */
.card > .info {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.list > .card > .info {
  gap: 5px;
}

/* Grid view has no third column for the star, so it sits on the thumbnail. */
.grid > .card {
  position: relative;
}

.grid > .card > .star {
  position: absolute;
  top: 8px;
  left: 8px;
  width: var(--tap);
  height: var(--tap);
  min-height: 0;
  padding: 0;
  border-color: transparent;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

.grid > .card > .star[aria-pressed="true"] {
  background: var(--yellow);
  color: var(--yellow-ink);
}

.card .star svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
}

.card .t {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card .t a {
  text-decoration: none;
}

.card .t a:hover {
  text-decoration: underline;
}

.list > .card .t {
  -webkit-line-clamp: 1;
}

.card .ch {
  color: var(--ink-3);
  font-size: 13px;
}

.card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12px;
}

.thumb {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: var(--grey-block);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb .dur {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.list .thumb {
  border-radius: 7px;
}

.modes {
  display: inline-flex;
  gap: 4px;
}

.modes i {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-3);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.modes i.on {
  border-color: transparent;
  background: var(--blue-soft);
  color: var(--blue);
}

.langs {
  color: var(--ink-3);
  font-size: 12px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 40px 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
}

.empty h2 {
  font-size: 20px;
  color: var(--ink);
}

/* ===== mode sheets (C) ===== */

.sheets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: var(--tap);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.sheet b {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sheet .n,
.sheet small {
  color: var(--ink-2);
  font-size: 12.5px;
}

.sheet .langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sheet .lang {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 12px;
}

.sheet .lang.on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

/*
 * On the library card the language pills are labels; on the reader's OPEN sheet they are the control that
 * switches language, so they carry the 44px tap target the rest of the app uses.
 */
.sheet .langs button.lang {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
}

.sheet:hover {
  border-color: var(--ink-3);
}

.sheet.open {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.sheet.open b {
  color: var(--blue);
}

/* The sheet whose notes are being fetched: dashed outline and a faded label until the fetch settles. */
.sheet.loading {
  border-style: dashed;
  border-color: var(--blue);
  cursor: progress;
}

.sheet.loading b {
  opacity: 0.6;
}

/*
 * A dot, not the word "OPEN": three sheets share the width of one card, so a 30px badge in the top-right
 * corner sits on top of the mode name at every card size the grid produces.
 */
.sheet.open::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

/* No notes for this mode yet. The site never starts a job — this deep-links to YouTube (spec §7.2). */
.sheet.dim {
  border-style: dashed;
  background: none;
  color: var(--ink-3);
}

.sheet.dim .cta {
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 600;
}

.sheet.dim .hint {
  color: var(--ink-3);
  font-size: 12px;
}

/* ===== reader (/library/v) ===== */

.crumb {
  color: var(--ink-3);
  font-size: 13px;
}

.crumb a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.head {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.head .meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.head .meta h1 {
  font-size: 28px;
  line-height: 1.12;
}

.head .meta .sub {
  color: var(--ink-3);
  font-size: 13.5px;
}

.head .meta .sub b {
  color: var(--ink-2);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  min-height: var(--tap);
  margin-bottom: -1px;
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
  color: var(--ink-3);
  font-weight: 600;
}

.tabs button[aria-selected="true"] {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
}

.body > * {
  min-width: 0;
}

.tldw {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
}

.tldw b {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.notes {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.aside {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aside .card {
  padding: 14px 16px;
}

.aside h4 {
  margin-bottom: 10px;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapters,
.kp {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--ink-2);
  font-size: 13px;
  list-style: none;
}

.chapters li,
.kp li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

/* ===== notes blocks — mirrors extension/src/sidepanel.css so shared HTML renders identically ===== */

.card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card.section > h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.card.section > :last-child {
  margin-bottom: 0;
}

/* One chapter inside the reader's Chapters card: heading, what happened, deep mode's extra notes. */
.chapter + .chapter {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.chapter h3 {
  margin-bottom: 6px;
  font-size: 15.5px;
}

/* The mind map: nested lists, one indent per level, no bullets. */
.mindmap,
.mindmap ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mindmap ul {
  margin-left: 9px;
  padding-left: 13px;
  border-left: 1px solid var(--line);
}

.mindmap li {
  margin: 4px 0;
  color: var(--ink-2);
}

.mindmap > li > span {
  color: var(--ink);
  font-weight: 700;
}

.ts {
  padding: 1px 6px;
  border: 0;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: 1px;
  cursor: pointer;
}

.b-para .ts,
.b-steps .ts,
.b-actions .ts,
.b-quote .ts,
.tlist .ts {
  margin-right: 6px;
}

.ts:hover {
  background: var(--blue);
  color: #fff;
}

.b-para {
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.6;
}

.b-bullets,
.b-steps {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--ink-2);
}

.b-bullets li,
.b-steps li {
  margin: 6px 0;
}

.b-bullets {
  list-style: none;
  padding-left: 0;
}

.b-bullets li {
  position: relative;
  padding-left: 16px;
}

.b-bullets li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.b-steps .detail,
.b-actions .detail {
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 13px;
}

.b-actions {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.b-actions li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0;
}

.b-actions label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: var(--tap);
  cursor: pointer;
}

.b-actions input {
  margin-top: 5px;
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.b-actions input:checked ~ .text {
  color: var(--ink-2);
  text-decoration: line-through;
}

.b-actions .detail {
  margin-left: 27px;
}

.b-table {
  margin: 0 0 10px;
  overflow-x: auto;
}

.b-table table {
  border-collapse: collapse;
  font-size: 13px;
}

.b-table th,
.b-table td {
  padding: 6px 9px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  text-align: left;
  vertical-align: top;
}

.b-table th {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.b-proscons {
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
}

.b-proscons > div {
  flex: 1 1 0;
  min-width: 0;
}

.b-proscons h4 {
  margin: 0 0 4px;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.b-proscons .pros h4 {
  color: var(--green);
}

.b-proscons .cons h4 {
  color: var(--red);
}

.b-proscons ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
}

.b-qa,
.b-terms {
  margin: 0 0 10px;
}

.b-qa dt,
.b-terms dt {
  margin-top: 7px;
  font-weight: 600;
}

.b-qa dd,
.b-terms dd {
  margin: 0;
  color: var(--ink-2);
}

.b-quote {
  margin: 0 0 10px;
  padding: 4px 0 4px 12px;
  border-left: 3px solid var(--pink);
  color: var(--ink-2);
}

.b-quote p {
  margin: 0;
  color: var(--ink);
  font-style: italic;
}

.b-quote cite {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-style: normal;
}

.b-callout {
  margin: 0 0 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--grey-block);
  color: var(--ink-2);
  font-size: 14px;
}

.b-callout.tip {
  border-color: var(--green-soft);
  background: var(--green-soft);
  color: var(--ink);
}

.b-callout.warning {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--yellow-ink);
}

.b-callout.disclaimer {
  border-color: var(--red-soft);
  background: var(--red-soft);
  color: var(--ink);
}

/* A disclosed sponsorship is never dropped and never disguised (owner rule). */
.b-callout.sponsored {
  border-style: dashed;
  border-color: var(--ink-3);
  background: var(--grey-block);
}

.b-callout.sponsored::before {
  content: "Sponsored · ";
  color: var(--ink);
  font-weight: 700;
}

/* Non-English notes: the tag is the notes' own word for "Sponsored" (shared labels table, data-label). */
.b-callout.sponsored[data-label]::before {
  content: attr(data-label) " · ";
}

.b-code {
  position: relative;
  margin: 0 0 10px;
}

.b-code pre {
  margin: 0;
  overflow-x: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.b-code code {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.b-code .copy {
  position: absolute;
  top: 7px;
  right: 7px;
  min-height: var(--tap);
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
}

.b-code .copy:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ===== transcript ===== */

.tsearch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 13.5px;
}

.tsearch input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
}

.tsearch input:focus {
  outline: none;
}

.tsearch b {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tlist {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tlist li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 8px 6px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}

.tlist li:first-child {
  border-top: 0;
}

.tlist li:hover,
.tlist li.hit {
  background: var(--surface);
}

.tlist li.hit {
  color: var(--ink);
}

.tlist li[hidden] {
  display: none;
}

.tlist .spk {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
}

/*
 * A speaker label makes the <li> three children (.ts, .spk, span): without explicit placement the text
 * span auto-flows into a new row starting at column 1, and an unconstrained "auto" column 1 track grows to
 * the span's full unwrapped width, overflowing the viewport (library spec §7.3 mobile pass). Pin it to the
 * same minmax(0, 1fr) column the timestamp-only row already gives the text.
 */
.tlist .spk + span {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.tlist mark {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--yellow);
  color: var(--yellow-ink);
}

.tnote {
  color: var(--ink-3);
  font-size: 12.5px;
}

/* ===== account (/account) ===== */

.acct {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.acct h1 {
  font-size: 26px;
}

.acct-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.acct-row:first-child {
  border-top: 0;
}

.acct-row .k {
  color: var(--ink-3);
  font-size: 13px;
}

.acct-row .v {
  font-weight: 600;
}

.acct .who {
  display: flex;
  align-items: center;
  gap: 14px;
}

.acct .who img,
.acct .who .initials {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.acct .who .initials {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  color: #1a1400;
  font-size: 19px;
  font-weight: 800;
}

.meter {
  overflow: hidden;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--grey-block);
}

.meter i {
  display: block;
  height: 100%;
  background: var(--blue);
}

.plan {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.plan .price {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fineprint {
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.5;
}

/* The Terms link sits mid-sentence, so it cannot be a 44px box; vertical padding gives it a 44px hit area
   without moving the line. */
.fineprint a {
  padding: 14px 0;
  text-underline-offset: 3px;
}

/* The text column of a .who / .acct-row: it takes the room the row's button does not. */
.acct .col {
  flex: 1 1 220px;
  min-width: 0;
}

/* Every row action is a tap target, including the plain Delete account link. */
.acct-row a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  text-underline-offset: 3px;
}

/* What the page says about itself: the paid banner, and anything that went wrong. */
.note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--green-soft);
  font-weight: 600;
}

.note.error {
  background: var(--red-soft);
}

/* ===== delete account (/account/delete) ===== */

.del {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.del h1 {
  font-size: 26px;
}

.del-lists h2 {
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.del-lists h2:first-child {
  margin-top: 0;
}

.del-lists ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.del-step .btn,
.del-block .btn {
  margin-top: 12px;
  margin-right: 8px;
}

.del-block {
  border-left: 3px solid var(--yellow);
  background: var(--grey-block);
}

/* ===== the plan picker (the side panel's #view-subscribe, on the site) ===== */

.picker > * + * {
  margin-top: 12px;
}

.kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.picks {
  display: grid;
  gap: 10px;
}

.pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.pick input {
  position: absolute;
  opacity: 0;
}

.pick-radio {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--surface);
}

.pick-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.pick-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.pick em {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.pick small,
.pick-copy > span:last-child {
  color: var(--ink-3);
  font-size: 12.5px;
}

.pick:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.pick:has(input:checked) .pick-radio {
  border-color: var(--blue);
  background: var(--blue);
}

.pick:has(input:focus-visible) {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* What the plan includes. */
.includes {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 12.5px;
}

.includes b {
  color: var(--ink);
  font-size: 14px;
}

.picker .btn {
  width: 100%;
}

/* ===== sign-in screen ===== */

.signin {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 460px;
  margin: 48px auto;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signin h1 {
  font-size: 25px;
}

.signin p {
  color: var(--ink-2);
}

.signin .error {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--ink);
  font-size: 14px;
}

/* Informational, not a failure (e.g. "This account is being deleted.") — blue-soft, not red. */
.signin .notice {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 14px;
}

/* Sign-in buttons (sign-in spec 2026-10-10 §7.2): Google (blue, unchanged) and Apple at the same size. Apple's
   button is ink on paper: Apple's black style in light mode, its white style in dark mode. */
.signin-buttons {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 300px;
}

.btn-apple {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn-apple:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  opacity: 0.88;
}

/* Dark: Apple's white style, as the panel's .apple-btn (extension/src/sidepanel.css), not the site's warm ink. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-apple,
  :root:not([data-theme="light"]) .btn-apple:hover {
    background: #fff;
    border-color: #fff;
    color: #000;
  }
}

:root[data-theme="dark"] .btn-apple,
:root[data-theme="dark"] .btn-apple:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.btn-apple svg {
  width: 13px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

/* ===== phone (spec §7.3: usable at 360px, no horizontal scroll) ===== */

@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .shelf,
  .head,
  .body {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    scrollbar-width: none;
  }

  .rail h4 {
    display: none;
  }

  .rail button,
  .rail-link {
    flex: 0 0 auto;
  }

  .rail-link {
    order: -1;
    margin-top: 0;
    border-top: 0;
    border-radius: 9px;
  }

  /*
   * The notes are why the page was opened, so the aside (chapters jump list + key points) goes BELOW them on
   * a phone. `.body` is a single-column grid here, so `order` is what moves it past the tabs column.
   */
  .aside {
    position: static;
    order: 1;
  }

  .toolbar {
    gap: 10px;
  }

  /* A two-up card is ~150px wide: the type chip and the language line need a row each. */
  .card .meta {
    flex-wrap: wrap;
  }

  .toolbar h1 {
    width: 100%;
    font-size: 21px;
  }

  .search {
    flex: 1 1 180px;
    min-width: 0;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .list > .card {
    grid-template-columns: 104px minmax(0, 1fr);
    row-gap: 8px;
  }

  .sheets {
    grid-template-columns: minmax(0, 1fr);
  }

  .head .meta h1 {
    font-size: 21px;
  }

  .card {
    padding: 14px 15px;
  }

  .b-proscons {
    flex-direction: column;
  }

  .tlist li {
    font-size: 13.5px;
  }
}

/* /account/delete's two buttons side by side no longer fit at phone width without wrapping oddly. */
@media (max-width: 480px) {
  .del-step .btn,
  .del-block .btn {
    display: flex;
    width: 100%;
    margin-right: 0;
  }
}

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

/* ===== print: the reader becomes a plain document ===== */

@media print {
  @page {
    margin: 18mm 16mm;
  }

  :root {
    --bg: #fff;
    --surface: #fff;
    --ink: #000;
    --ink-2: #222;
    --ink-3: #555;
    --line: #bbb;
    --blue: #000;
    --blue-soft: #f0f0f0;
    --grey-block: #f0f0f0;
    color-scheme: light;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  #app-nav,
  .app-nav,
  .rail,
  .toolbar,
  .sheets,
  .actions,
  .tabs,
  .crumb,
  .tsearch,
  .toggle,
  .search,
  .b-code .copy,
  .btn {
    display: none !important;
  }

  .wrap,
  .page,
  .body,
  .head {
    display: block;
    width: auto;
    padding: 0;
    margin: 0;
  }

  .aside {
    position: static;
    page-break-before: auto;
  }

  .card,
  .aside .card {
    border: 0;
    padding: 0 0 10pt;
    box-shadow: none;
    break-inside: avoid;
  }

  .card.section {
    break-inside: auto;
  }

  .card.section > h2 {
    break-after: avoid;
  }

  .tldw {
    border: 1pt solid #000;
    background: #fff;
    color: #000;
  }

  .ts {
    background: none;
    color: #000;
    font-weight: 700;
  }

  /* Every timestamp is a youtube.com link on this site; the a[href] rule below would print its URL. */
  a.ts[href]::after {
    content: none;
  }

  .b-callout {
    border: 1pt solid #666;
    background: #fff;
    color: #000;
  }

  .tlist li {
    break-inside: avoid;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    color: #555;
    font-size: 9pt;
  }
}

/* Plan I (R6): an in-app page (?from=app, app-mode.js) hides every link that leads to web purchasing, and the app nav,
   before the script removes them, so nothing flashes. */
.app-mode [data-web-only], .app-mode #app-nav { display: none !important; }

/* ===== collections (/library/c) ===== */

.collection-head {
  margin: 8px 0 18px;
}

.collection-head h1,
.collection-heading {
  font-size: 28px;
}

.collection-head p {
  margin: 6px 0 0;
  color: var(--ink-2);
}

.collection-list,
.collection-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.collection-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.collection-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: var(--tap);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.collection-item[data-status="running"] {
  border-left-color: var(--blue);
}

.collection-item[data-status="paused"] {
  border-left-color: var(--yellow);
}

.collection-item[data-status="done"] {
  border-left-color: var(--green);
}

.collection-item:hover {
  border-color: var(--ink);
}

.collection-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.collection-line {
  color: var(--ink-3);
  font-size: 13px;
}

.collection-crumb {
  display: inline-block;
  margin: 4px 0 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.collection-detail > .collection-heading {
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.collection-notice,
.collection-error {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 14px;
}

.collection-error {
  background: var(--red-soft);
}

.collection-waiting,
.collection-offer,
.collection-confirm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.collection-waiting p,
.collection-confirm p {
  margin: 0;
}

.collection-offer {
  display: block;
  padding-bottom: 14px;
  margin-bottom: 8px;
}

.collection-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.collection-rows {
  margin: 4px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.collection-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}

.collection-row:first-child {
  border-top: 0;
}

.collection-place {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}

.collection-status {
  color: var(--ink-3);
  font-size: 13px;
  white-space: nowrap;
}

.collection-status[data-state="running"],
.collection-status[data-state="starting"] {
  color: var(--blue);
  font-weight: 600;
}

.collection-status[data-state="failed"] {
  color: var(--red);
}

a.collection-read {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.collection-foot {
  margin-top: 4px;
}

.collection-actions .btn-ghost {
  border-color: var(--line);
  background: var(--surface);
}

.collection-delete-row {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  background: var(--red-soft);
}

.collection-delete-row p {
  flex: 1 1 100%;
  margin: 0;
  font-weight: 600;
}

.collection-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 480px) {
  .collection-head h1,
  .collection-heading {
    font-size: 24px;
  }

  .collection-actions .btn,
  .collection-waiting .btn {
    flex: 1 1 100%;
  }

  .collection-delete-row .btn {
    flex: 1 1 40%;
  }

  .collection-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .collection-row .collection-status {
    grid-column: 2;
    margin-top: -4px;
  }
}

.collection-confirm > .collection-actions {
  align-self: stretch;
  margin-bottom: 0;
}
