

:root {
  --ground: #ecedf1; --card: rgba(255, 255, 255, .44); --card-2: rgba(255, 255, 255, .32); --card-solid: #fbfcfd;
  --ink: #1b2230; --ink-2: #5b6475; --ink-3: #5b6475;
  --hair: rgba(27, 34, 48, .09); --hair-strong: rgba(27, 34, 48, .22);
  --tint: #2f6fd0; --tint-soft: #e4edfb;
  --action-bg: #2f6fd0; --on-action: #fff;
  --accent: #815413; --accent-soft: #f1e9d8;
  --positive: #216349; --positive-soft: #d9e9e4;
  --warn: #a2352b; --warn-soft: #f8e0dc;
  --surface-mint: #d9e8e6; --surface-pink: #ebe6df;
  --surface-lavender: #e0e5ef; --surface-yellow: #efe8d6;
  --surface-feature: #e8edf4; --on-pastel: #1b2230;
  --lift: none; --lift-2: 0 8px 40px rgba(0, 0, 0, .16);
  --r-card: 24px; --r-control: 14px; --r-button: 100px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-6: 24px; --space-8: 32px;
  color-scheme: light;
}
:root[data-theme="dark"] { 
  --ground: #0c0e14; --card: rgba(30, 35, 48, .40); --card-2: rgba(44, 49, 66, .32); --card-solid: #151922;
  --ink: #eceef5; --ink-2: #98a0b2; --ink-3: #98a0b2;
  --hair: rgba(255, 255, 255, .10); --hair-strong: rgba(255, 255, 255, .24);
  --tint: #5a93e8; --tint-soft: rgba(90, 147, 232, .18);
  --action-bg: #5a93e8; --on-action: #0a0d15;
  --accent: #d7a056; --accent-soft: #3a3020;
  --positive: #7fd4a8; --positive-soft: #1f3a2e;
  --warn: #ffafa6; --warn-soft: #492c2a;
  --surface-feature: #1a2233;
  --lift-2: 0 8px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
 }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] { 
  --ground: #0c0e14; --card: rgba(30, 35, 48, .40); --card-2: rgba(44, 49, 66, .32); --card-solid: #151922;
  --ink: #eceef5; --ink-2: #98a0b2; --ink-3: #98a0b2;
  --hair: rgba(255, 255, 255, .10); --hair-strong: rgba(255, 255, 255, .24);
  --tint: #5a93e8; --tint-soft: rgba(90, 147, 232, .18);
  --action-bg: #5a93e8; --on-action: #0a0d15;
  --accent: #d7a056; --accent-soft: #3a3020;
  --positive: #7fd4a8; --positive-soft: #1f3a2e;
  --warn: #ffafa6; --warn-soft: #492c2a;
  --surface-feature: #1a2233;
  --lift-2: 0 8px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
 }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.47 var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { letter-spacing: -0.022em; margin: 0; }
:focus-visible { outline: 3px solid var(--tint); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- browser surfaces: the parts we did not draw still carry the design ---------- */

::selection { background: var(--tint-soft); color: var(--tint); }
input, textarea, select, [contenteditable] { caret-color: var(--tint); }
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--tint); }
html { scrollbar-color: var(--hair-strong) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--hair-strong); border: 3px solid transparent; border-radius: 999px; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--ink-3); }

/* ---------- shell ---------- */

.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px max(18px, env(safe-area-inset-left)) 12px max(18px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tint); flex: none; }
.top .spacer { flex: 1; }
.who { font-size: 15px; color: var(--ink-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  background: var(--card); border: 0; border-radius: 980px;
  padding: 7px 14px; cursor: pointer; font-family: inherit;
  min-height: 36px;
  transition: background-color .16s ease, color .16s ease;
}
.chip:hover { color: var(--ink); }
.chip:active { color: var(--ink); background: var(--card-2); }
.chip:disabled, .chip[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.chip.plain { background: none; padding: 7px 4px; }

.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.side {
  position: sticky; top: 61px; align-self: start;
  padding: 18px 14px 48px; max-height: calc(100vh - 61px); overflow-y: auto;
}
.side a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: var(--r-control);
  color: var(--ink); font-size: 16px; font-weight: 500; text-decoration: none;
  min-height: var(--btn-h);
}
.side a:hover { background: var(--card); text-decoration: none; }
.side a[aria-current="page"] { background: var(--tint-soft); color: var(--tint); font-weight: 650; }
.side a[aria-current="page"] .ic { opacity: 1; }
.side .ic { width: 22px; text-align: center; opacity: 0.7; flex: none; font-size: 15px; }
.side h3 {
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  margin: 26px 0 6px; padding: 0 13px; letter-spacing: 0;
}
.side .topic { font-size: 15px; font-weight: 400; color: var(--ink-2); min-height: 38px; padding: 7px 13px; }
.side .topic[data-muted="1"] { opacity: 0.4; }

.main {
  padding: 26px max(20px, env(safe-area-inset-left)) 96px max(20px, env(safe-area-inset-right));
  width: 100%; max-width: 1240px; min-width: 0;
  padding: 44px 48px 96px; margin: 0 auto;
}
.main:has(.panel-set) { max-width: 1120px; }

/* ---------- page head ---------- */

.pagehead { margin-bottom: 26px; }
.pagehead h1 { font-size: 44px; line-height: 1.1; font-weight: 700; }
.pagehead p { margin: 7px 0 0; font-size: 17px; color: var(--ink-2); max-width: 56ch; }

/* ---------- notes ---------- */

.note {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border-radius: var(--r-card);
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--lift);
  font-size: 16px; color: var(--ink-2);
}
.note .ic { font-size: 19px; line-height: 1.2; flex: none; }
.note b { color: var(--ink); font-weight: 600; }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.warn .ic { color: var(--warn); }
.note.good .ic { color: var(--positive); }
.note a { font-weight: 500; }
.source-status { margin: 0 0 20px; color: var(--ink-2); font-size: 15px; }
.source-status summary { cursor: pointer; padding: 8px 0; }
.source-status summary span { margin-left: 8px; color: var(--tint); }
.source-status p { margin: 8px 0; max-width: 80ch; }

/* ---------- groups ---------- */

.group { margin-bottom: 34px; }
.group > h2 {
  font-size: 22px; font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: baseline; gap: 10px;
}
.group > h2 .tail { margin-left: auto; font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: -0.01em; }
.group > .sub { font-size: 15px; color: var(--ink-3); margin: 0 0 13px; }

/* ---------- cards ---------- */

.card {
  background: var(--card); border-radius: var(--r-card);
  padding: 24px; margin-bottom: 12px; box-shadow: var(--lift); border: 1px solid var(--hair);
}
.card > h3 { font-size: 20px; line-height: 1.28; font-weight: 600; }
.card .line { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 15px; color: var(--ink-3); margin-top: 8px; }
.card .line b { color: var(--ink-2); font-weight: 600; }
.card .said { font-size: 16px; color: var(--ink-2); margin: 12px 0 0; }
.card .said.quote { color: var(--accent); font-weight: 500; }
.card .src { font-size: 15px; }

.card.hero { background: linear-gradient(135deg, var(--tint-soft), transparent 65%), var(--card); border: 1px solid var(--hair); padding: 36px; }
.card.hero > h3 { font-size: clamp(26px, 3vw, 36px); max-width: 24ch; letter-spacing: -0.035em; }
.card.hero .said.quote { font-size: 20px; line-height: 1.55; color: var(--ink); max-width: 62ch; margin-top: 24px; }
.card.hero .row { margin-top: 24px; }

.pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.pill {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  background: var(--card-2); border-radius: 980px; padding: 5px 12px;
}
.pill.hot { background: var(--accent-soft); color: var(--accent); }
.pill.win { background: var(--positive-soft); color: var(--positive); }
.pill.bad { background: var(--warn-soft); color: var(--warn); }

/* ---------- buttons ---------- */

.row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 17px; }
.row form { display: contents; }
.row .push { margin-left: auto; }
.row .teach { font-size: 15px; color: var(--ink-3); margin-right: 2px; }

.btn {
  font: inherit; font-size: var(--btn-font-size); font-weight: 500; line-height: 1.2;
  min-height: var(--btn-h); padding: 0 var(--btn-pad-x); border-radius: var(--r-button);
  border: 0; background: var(--card-2); color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(0.96); }
.btn:active { transform: scale(0.97); }
.btn.go { background: var(--action-bg); color: var(--on-action); font-weight: 600; }
.btn.go:hover { filter: brightness(1.08); }
.btn.quiet { background: none; color: var(--tint); padding: 0 10px; }
.btn.quiet:hover { background: var(--tint-soft); filter: none; }
.btn[disabled] { opacity: 0.4; cursor: default; transform: none; }
.btn.done { background: var(--positive-soft); color: var(--positive); }
.btn.icon { padding: 0; width: var(--btn-h); font-size: var(--btn-icon); background: none; color: var(--ink-3); }
.btn.icon:hover { background: var(--card-2); }
.btn.icon.on { color: var(--accent); }
.btn.small { min-height: var(--btn-h-sm); font-size: var(--btn-font-size-sm); padding: 0 var(--btn-pad-x-sm); }

/* ---------- sheet ---------- */

dialog.sheet {
  border: 0; padding: 0; background: none; max-width: 100%; max-height: 100%;
  color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(0,0,0,0.42); backdrop-filter: blur(3px); }
dialog.sheet .panel {
  background: var(--card-solid); border-radius: 22px; box-shadow: var(--lift-2);
  width: min(94vw, 430px); padding: 24px; margin: auto;
}
dialog.sheet h3 { font-size: 21px; font-weight: 700; margin-bottom: 4px; }
dialog.sheet .sub { font-size: 16px; color: var(--ink-3); margin: 0 0 18px; }

.choices { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; }
.choice {
  display: flex; gap: 13px; align-items: flex-start; cursor: pointer;
  background: var(--card-2); border-radius: 14px; padding: 14px 16px;
  border: 2px solid transparent;
}
.choice:has(input:checked) { border-color: var(--tint); background: var(--tint-soft); }
.choice input { margin: 3px 0 0; accent-color: var(--tint); width: 19px; height: 19px; flex: none; }
.choice .t { font-size: 16px; font-weight: 600; display: block; }
.choice .d { font-size: 15px; color: var(--ink-3); display: block; margin-top: 2px; }

.menu { display: flex; flex-direction: column; gap: 7px; }
.menu button {
  text-align: left; background: var(--card-2); border: 0; border-radius: 13px;
  padding: 13px 16px; cursor: pointer; font: inherit; color: var(--ink); min-height: var(--btn-h);
}
.menu button:hover { background: var(--tint-soft); }
.menu button .t { font-size: 16px; font-weight: 600; display: block; }
.menu button .d { font-size: 14px; color: var(--ink-3); display: block; margin-top: 2px; }

/* ---------- figures ---------- */

.figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 1px; background: var(--hair); border-radius: var(--r-card); overflow: hidden;
  box-shadow: var(--lift);
}
.figure { background: var(--card); padding: 16px 18px 18px; }
.figure .k { font-size: 14px; color: var(--ink-3); }
.figure .v { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.figure .v.up { color: var(--positive); }
.figure .v.down { color: var(--warn); }
.figure .n { font-size: 14px; color: var(--ink-3); margin-top: 3px; }

/* ---------- board ---------- */

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.lane > h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.lane > h3 .c { color: var(--ink-3); font-weight: 500; }
.lane .card { padding: 14px 15px; }
.lane .card > h3 { font-size: 16px; line-height: 1.32; }

/* ---------- week ---------- */

.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.dayc { background: var(--card); border-radius: var(--r-card); padding: 14px; box-shadow: var(--lift); }
.dayc > h4 { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.dayc > .st { font-size: 14px; color: var(--ink-3); margin-bottom: 10px; }
.dayc.today { border: 2px solid var(--tint); }
.slot {
  display: flex; align-items: center; gap: 8px; font-size: 14px;
  color: var(--ink-2); padding: 7px 0; border-top: 0.5px solid var(--hair);
}
.slot:first-of-type { border-top: 0; }
.slot .dt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--hair-strong); }
.slot.on .dt { background: var(--positive); }
.slot.on { color: var(--ink); }

/* ---------- forms ---------- */

input[type="search"], input[type="text"], input[type="url"], input[type="password"], input[type="number"], select, textarea {
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--card); border: 0.5px solid var(--hair-strong);
  border-radius: var(--r-control); padding: 13px 15px; width: 100%; min-width: 0; min-height: var(--btn-h);
}
input:focus, select:focus, textarea:focus { border-color: var(--tint); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; background: var(--card-2); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737973' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center; background-repeat: no-repeat;
}
label.field { display: block; margin-bottom: 18px; }
label.field > .t { display: block; font-size: 16px; font-weight: 600; margin-bottom: 3px; }
label.field > .d { display: block; font-size: 15px; color: var(--ink-3); margin-bottom: 9px; }
label.toggle {
  display: flex; gap: 13px; align-items: flex-start; cursor: pointer;
  padding: 14px 0; border-top: 0.5px solid var(--hair);
}
label.toggle:first-of-type { border-top: 0; }
label.toggle input { width: 21px; height: 21px; margin: 1px 0 0; accent-color: var(--tint); flex: none; }
label.toggle .t { font-size: 16px; font-weight: 500; }
label.toggle .d { font-size: 15px; color: var(--ink-3); display: block; margin-top: 2px; }

.panel { background: var(--card); border-radius: var(--r-card); padding: 20px; box-shadow: var(--lift); margin-bottom: 14px; }
.panel > h3 { font-size: 18px; font-weight: 600; margin-bottom: 3px; }
.panel > .d { font-size: 15px; color: var(--ink-3); margin: 0 0 16px; }

.searchbar { display: flex; gap: 10px; margin-bottom: 22px; }

/* ---------- table ---------- */

.table { background: var(--card); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--lift); }
.table table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th {
  text-align: left; font-size: 14px; font-weight: 600; color: var(--ink-3);
  padding: 13px 18px; border-bottom: 0.5px solid var(--hair);
}
.table td { padding: 14px 18px; border-bottom: 0.5px solid var(--hair); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

mark { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-radius: 4px; padding: 0 3px; }

/* ---------- empty ---------- */

.empty { background: var(--card); border-radius: var(--r-card); padding: 40px 26px; text-align: center; box-shadow: var(--lift); }
.empty .ic { font-size: 40px; line-height: 1; margin-bottom: 14px; }
.empty h3 { font-size: 20px; font-weight: 600; margin-bottom: 7px; }
.empty p { font-size: 16px; color: var(--ink-2); margin: 0 auto; max-width: 42ch; }
.empty .row { justify-content: center; }

/* ---------- toast ---------- */

#toast {
  position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink); color: var(--ground);
  border-radius: 980px; padding: 13px 22px; font-size: 16px; font-weight: 500;
  box-shadow: var(--lift-2); z-index: 90; max-width: min(92vw, 460px); text-align: center;
}
#toast[hidden] { display: none !important; }
#toast.bad { background: var(--warn); color: #fff; }

/* ---------- sign in ---------- */

.gate { max-width: 430px; margin: 0 auto; padding: 11vh 22px 60px; }
.gate .brand { font-size: 20px; margin-bottom: 26px; }
.gate h1 { font-size: 31px; font-weight: 700; margin-bottom: 8px; }
.gate p.lead { font-size: 17px; color: var(--ink-2); margin: 0 0 26px; }
.gate .who-card {
  display: flex; align-items: center; gap: 15px; width: 100%; text-align: left;
  background: var(--card); border: 0; border-radius: var(--r-card);
  padding: 18px 20px; margin-bottom: 11px; cursor: pointer; box-shadow: var(--lift);
  font: inherit; color: var(--ink); min-height: 74px;
}
.gate .who-card:hover { background: var(--tint-soft); }
.gate .who-card .av {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--action-bg); color: var(--on-action); display: grid; place-items: center;
  font-size: 17px; font-weight: 600;
}
.gate .who-card .t { font-size: 17px; font-weight: 600; display: block; }
.gate .who-card .d { font-size: 15px; color: var(--ink-3); display: block; margin-top: 2px; }
.gate .who-card .go { margin-left: auto; color: var(--ink-3); font-size: 20px; }
.gate details { margin-top: 22px; }
.gate summary { font-size: 16px; color: var(--tint); cursor: pointer; list-style: none; min-height: var(--btn-h); display: flex; align-items: center; }
.gate summary::-webkit-details-marker { display: none; }
.gate .foot { font-size: 14px; color: var(--ink-3); margin-top: 28px; line-height: 1.5; }


/* ---------- tabs ---------- */

.tabs {
  position: sticky; top: 61px; z-index: 18;
  display: flex; flex-wrap: wrap; gap: 6px;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 10px 0 12px; margin: 0 0 22px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  background: var(--card); border-radius: 980px; padding: 0 15px; min-height: var(--btn-h-sm);
  white-space: nowrap;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="true"] { background: var(--ink); color: var(--ground); font-weight: 600; }
.tabs a .n {
  font-size: 13px; font-variant-numeric: tabular-nums;
  background: var(--card-2); color: var(--ink-3); border-radius: 980px; padding: 1px 7px;
}
.tabs a[aria-current="true"] .n { background: rgba(127,127,127,0.3); color: inherit; }

/* Panels: one visible at a time, the rest present for no-JS and for search. */
.panel-set > .tabpanel { display: none; }
.panel-set > .tabpanel[data-on="1"] { display: block; }

/* ---------- masonry-ish grid ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; align-items: start; }
.grid > * { margin-bottom: 0; }
.research-category { margin-bottom: 12px; border: 1px solid var(--hair); border-radius: var(--r-card); background: var(--card); }
.research-category > summary {
  display: flex; align-items: center; gap: 12px; padding: 20px;
  cursor: pointer; font-size: 18px; font-weight: 600; list-style: none;
}
.research-category > summary::-webkit-details-marker { display: none; }
.research-category > summary::after { content: '+'; color: var(--tint); font-size: 22px; }
.research-category[open] > summary::after { content: '−'; }
.research-category > summary:hover { color: var(--tint); }
.category-count { margin-left: auto; color: var(--ink-2); font-size: 14px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.category-body { border-top: 1px solid var(--hair); padding: 16px; background: var(--card-2); border-radius: 0 0 var(--r-card) var(--r-card); }
.category-body .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: stretch; }
.research-card { display: flex; flex-direction: column; min-width: 0; }
.research-card > h3 { font-size: 20px; }
.research-card .card-footer { margin-top: auto; padding-top: 4px; }
.refine { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hair); }
.refine summary { cursor: pointer; font-size: 14px; color: var(--ink-2); }
.refine .row { margin-top: 12px; }
.opening-list { list-style: none; padding: 0; margin: 0; }
.opening-list li { padding: 16px 4px; border-bottom: 1px solid var(--hair); }
.opening-list li:last-child { border-bottom: 0; }
.opening-list a { display: block; color: var(--ink); font-size: 20px; font-weight: 600; line-height: 1.3; }
.opening-list span { display: block; margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.span-2 { grid-column: 1 / -1; }

/* ---------- draggable ---------- */

.drag { cursor: grab; }
.drag:active { cursor: grabbing; }
.drag.lifting { opacity: 0.4; }
.lane .drop {
  border-radius: var(--r-card); min-height: 64px;
  border: 2px dashed transparent; padding: 2px; transition: border-color 0.12s ease, background 0.12s ease;
}
.lane .drop.over { border-color: var(--tint); background: var(--tint-soft); }
.lane .drop .hint { font-size: 15px; color: var(--ink-3); padding: 18px 12px; text-align: center; display: block; }
.grabber { color: var(--ink-3); font-size: 15px; letter-spacing: 2px; line-height: 1; user-select: none; }

/* ---------- ideas library ---------- */

.ideas-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.ideas-heading .pagehead { margin-bottom: 28px; }
.ideas-heading .pagehead p { font-size: 15px; }
.ideas-heading .btn { border-radius: 99px; white-space: nowrap; font-size: 14px; }
.ideas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; border-top: 1px solid var(--hair); }
.ideas-total { font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ideas-filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ideas-filters select, .ideas-filters input { width: auto; max-width: 220px; min-height: var(--btn-h-sm); font-size: 13px; border: 1px solid var(--hair); border-radius: 99px; padding: 9px 16px; }
.ideas-filters input { width: 210px; }
.idea-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; position: sticky; top: 61px; z-index: 10; padding: 12px 0; background: var(--ground); }
.idea-stage-link { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 12px 16px; background: var(--card); color: var(--ink); border: 1px solid var(--hair); border-radius: 10px; font-size: 14px; font-weight: 600; }
.idea-stage-link:hover { text-decoration: none; border-color: var(--tint); }
.idea-stage-link .idea-count { margin-left: auto; }
.idea-count { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--card-2); padding: 2px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.stage-dot { height: 7px; width: 7px; border-radius: 50%; flex: none; background: var(--tint); }
.stage-dot.stage-this_week { background: #b88735; }
.stage-dot.stage-producing { background: #558cd1; }
.stage-dot.stage-posted { background: #39a28a; }
.ideas-help { font-size: 13px; color: var(--ink-2); margin: 8px 0 30px; }
.ideas-results { font-size: 14px; color: var(--ink-2); }
.idea-stage { margin-bottom: 32px; scroll-margin-top: 150px; }
.idea-stage-heading { cursor: pointer; list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.idea-stage-heading::-webkit-details-marker { display: none; }
.idea-stage-heading h2::before { content: '›'; color: var(--ink-3); transform: rotate(0deg); font-size: 22px; line-height: 1; }
.idea-stage[open] > .idea-stage-heading h2::before { transform: rotate(90deg); }
.idea-stage-link[aria-expanded="false"] .idea-chevron { transform: rotate(-90deg); }
.idea-stage:not([open]) { border-bottom: 1px solid var(--hair); padding-bottom: 10px; }
.idea-pagination { display: flex; align-items: center; gap: 12px; padding: 12px 2px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.idea-pagination label { display: flex; align-items: center; gap: 8px; }
.idea-pagination select { width: auto; min-height: 36px; border-radius: 99px; padding: 6px 12px; font-size: 13px; }
.idea-page-range { margin-left: auto; }
.idea-page-buttons { display: flex; gap: 6px; }
.idea-page-buttons .btn.small { min-width: 36px; min-height: 36px; border-radius: 50%; padding: 0; }
.idea-page-buttons .btn:disabled { opacity: 0.35; cursor: default; }
.idea-stage-heading h2 { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 600; }
.idea-stage-heading > span { font-size: 12px; color: var(--ink-2); }
.idea-list { background: var(--card); border: 1px solid var(--hair); border-radius: 7px; box-shadow: 0 2px 3px rgba(40,35,80,0.03); overflow: hidden; min-height: 74px; }
.idea-row { display: grid; grid-template-columns: 18px minmax(180px, 2.6fr) minmax(100px, 1fr) minmax(95px, 0.9fr) minmax(195px, 1.3fr); gap: 18px; align-items: center; min-height: 110px; padding: 22px; }
.idea-row:nth-of-type(even) { background: var(--card-2); }
.idea-row:hover { background: var(--tint-soft); }
.idea-grip { font-size: 22px; color: var(--ink-3); }
.idea-title { min-width: 0; }
.idea-title h3 { font-size: 15px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.idea-title > span { display: block; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.idea-meta { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.idea-meta-label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.idea-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.idea-status { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 99px; padding: 11px 16px; min-height: var(--btn-h-sm); background: var(--tint-soft); color: var(--tint); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.idea-status.stage-this_week { background: var(--accent-soft); color: var(--accent); }
.idea-status.stage-producing { background: var(--action-bg); color: var(--on-action); }
.idea-status.stage-posted { background: var(--positive-soft); color: var(--positive); }
.idea-moves { display: flex; gap: 5px; }
.idea-moves .btn.small { width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--ground); color: var(--ink-2); box-shadow: none; }
.idea-stage-empty { text-align: center; padding: 24px 16px; margin: 0; color: var(--ink-3); font-size: 13px; }
.ideas-page [hidden] { display: none !important; }
.ideas-page .drop.over { outline: 2px solid var(--tint); outline-offset: -2px; background: var(--tint-soft); }
.ideas-page.is-dragging .idea-stage-link { border-style: dashed; border-color: var(--tint); }
@media (max-width: 1200px) {
  .idea-row { grid-template-columns: 16px minmax(150px, 2fr) minmax(90px, 1fr) auto; gap: 14px; padding: 20px 16px; }
  .idea-meta:nth-of-type(3) { display: none; }
  .ideas-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .ideas-filters { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .idea-stages { top: 122px; }
  .idea-stage { scroll-margin-top: 210px; }
}
@media (max-width: 600px) {
  .ideas-heading { flex-direction: column; gap: 0; margin-bottom: 22px; }
  .ideas-heading .pagehead { margin-bottom: 16px; }
  .ideas-filters { width: 100%; }
  .ideas-filters select { flex: 1; width: 0; max-width: none; }
  .ideas-filters input { width: 100%; max-width: none; }
  .idea-stages { gap: 5px; }
  .idea-stage-link { padding: 10px 4px; font-size: 12px; flex-wrap: wrap; justify-content: center; gap: 5px; }
  .idea-stage-link .idea-count { margin: 0; }
  .idea-stage-link .stage-dot { display: none; }
  .idea-stage-heading > span { display: none; }
  .idea-row { grid-template-columns: 12px minmax(0, 1fr); gap: 8px 12px; padding: 18px 14px; }
  .idea-meta { grid-column: 2; }
  .idea-meta-label { display: inline; margin-right: 8px; }
  .idea-meta:nth-of-type(3) { display: block; }
  .idea-actions { grid-column: 2; justify-content: space-between; margin-top: 8px; }
  .idea-moves .btn.small { width: var(--btn-h); min-height: var(--btn-h); }
}

/* ---------- calendar ---------- */

.cal { background: var(--card); border-radius: var(--r-card); box-shadow: var(--lift); overflow: hidden; }
.cal .dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 0.5px solid var(--hair); }
.cal .dow span { font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 11px 0; text-align: center; }
.cal .grid7 { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal .cell {
  border: 0; border-right: 0.5px solid var(--hair); border-bottom: 0.5px solid var(--hair);
  min-height: 96px; padding: 9px 10px; background: none; text-align: left;
  font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px;
}
.cal .cell:nth-child(7n) { border-right: 0; }
.cal .cell:hover { background: var(--card-2); }
.cal .cell[disabled] { cursor: default; opacity: 0.38; }
.cal .cell[disabled]:hover { background: none; }
.cal .cell .d { font-size: 15px; font-weight: 600; }
.cal .cell.today .d {
  background: var(--action-bg); color: var(--on-action); border-radius: 980px;
  width: 27px; height: 27px; display: grid; place-items: center; margin: -3px 0 0 -4px;
}
.cal .cell .dots { display: flex; gap: 4px; flex-wrap: wrap; }
.cal .cell .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--hair-strong); }
.cal .cell .dots i.on { background: var(--positive); }
.cal .cell .dots i.film { background: var(--accent); }
.cal .cell .lbl { font-size: 13px; color: var(--ink-3); margin-top: auto; }
.cal .cell .lbl.full { color: var(--positive); font-weight: 600; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 15px; color: var(--ink-3); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--hair-strong); }
.legend i.on { background: var(--positive); }
.legend i.film { background: var(--accent); }

/* ---------- composer ---------- */

.composer { background: var(--card); border-radius: var(--r-card); padding: 20px; box-shadow: var(--lift); margin-bottom: 22px; }
.composer h3 { font-size: 19px; font-weight: 700; margin-bottom: 3px; }
.composer .d { font-size: 15px; color: var(--ink-3); margin: 0 0 16px; }
.composer .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.seg { display: inline-flex; background: var(--card-2); border-radius: 11px; padding: 3px; gap: 3px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; font-size: 15px; font-weight: 500; color: var(--ink-2);
  padding: 8px 15px; border-radius: 9px; cursor: pointer; min-height: 38px; line-height: 22px;
}
.seg input:checked + span { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--lift); }

@media (max-width: 860px) {
  .tabs { position: static; }
  .grid, .grid.wide { grid-template-columns: minmax(0, 1fr); }
  .cal .cell { min-height: 74px; padding: 7px 6px; }
  .cal .cell .lbl { display: none; }
}

/* Layout utilities keep all views compatible with the strict style policy. */
:root .border-top-hairline { border-top:0.5px solid var(--hair); }
:root .color-inherit { color:inherit; }
:root .color-muted { color:var(--ink-3); }
:root .color-positive { color:var(--positive); }
:root .color-primary { color:var(--ink); }
:root .display-inline { display:inline; }
:root .leading-1_4 { line-height:1.4; }
:root .m-0 { margin:0; }
:root .m-0-0-10 { margin:0 0 10px; }
:root .m-0-0-12 { margin:0 0 12px; }
:root .m-0-0-18 { margin:0 0 18px; }
:root .m-0-0-8 { margin:0 0 8px; }
:root .m-13-0-0 { margin:13px 0 0; }
:root .m-16-0-0 { margin:16px 0 0; }
:root .m-6-0-0 { margin:6px 0 0; }
:root .mb-10 { margin-bottom:10px; }
:root .mb-12 { margin-bottom:12px; }
:root .mb-14 { margin-bottom:14px; }
:root .mb-16 { margin-bottom:16px; }
:root .mb-18 { margin-bottom:18px; }
:root .mb-22 { margin-bottom:22px; }
:root .mt-12 { margin-top:12px; }
:root .mt-14 { margin-top:14px; }
:root .mt-16 { margin-top:16px; }
:root .mt-9 { margin-top:9px; }
:root .pt-20 { padding-top:20px; }
:root .text-15 { font-size:15px; }
:root .text-17 { font-size:17px; }
:root .text-18 { font-size:18px; }
:root .w-100full { width:100%; }
:root .whitespace-pre-wrap { white-space:pre-wrap; }


.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.form-feedback { flex-basis: 100%; font-size: 14px; color: var(--positive); margin: 12px 0 0; overflow-wrap: anywhere; }
.form-feedback.error { color: var(--warn); }
form[aria-busy="true"] { cursor: progress; }
form[aria-busy="true"] .form-feedback { color: var(--ink-2); }
.workspace-summary { margin: 0 0 28px; }
.workspace-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.workspace-stat { display: flex; flex-direction: column; gap: 5px; background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 18px; color: var(--ink); }
.workspace-stat:hover { text-decoration: none; border-color: var(--tint); }
.workspace-stat .dashboard-stat-value { font-size: 30px; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.workspace-stat .dashboard-stat-label, .workspace-stat .dashboard-stat-detail { font-size: 14px; color: var(--ink-2); }
.dashboard-next { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 15px; color: var(--ink-2); }
.dashboard-next p { margin: 0; }
.dashboard-next h3 { font-size: 18px; margin-bottom: 4px; }
.dashboard-next .eyebrow { margin-bottom: 6px; }
.workspace-stat .dashboard-stat-detail { font-size: 12px; color: var(--ink-3); }
.tabs { top: 69px; }
.dashboard-next .btn { margin-left: auto; }
@media (max-width: 480px) {
  .workspace-grid { gap: 8px; }
  .workspace-stat { padding: 13px 10px; border-radius: 12px; }
  .workspace-stat .dashboard-stat-value { font-size: 25px; }
  .workspace-stat .dashboard-stat-label, .workspace-stat .dashboard-stat-detail { font-size: 12px; }
  .dashboard-next .btn { margin-left: 0; }
}

/* Shared refinements */
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.hero .eyebrow { color: var(--tint); }
.note { box-shadow: none; border: 1px solid var(--hair); font-size: 14px; border-radius: 12px; }
.note.demo { background: transparent; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--card); padding: 12px 20px; border-radius: 12px; }
.skip-link:focus { top: 12px; }
.seg input:focus-visible + span { outline: 3px solid var(--tint); outline-offset: 2px; }
.gate { max-width: 490px; }
.gate h1 { font-size: 40px; letter-spacing: -.04em; }
.btn:hover { text-decoration: none; }
@media (max-width: 1100px) and (min-width: 861px) { .main { padding: 32px 24px 80px; } }
@media (max-width: 860px) { .card.hero { padding: 24px; } .tabs a { min-height: var(--btn-h); } }
@media print { .shell { display: block; } .tabs, .skip-link { display: none; } .panel-set > .tabpanel { display: block; } }

/* ---------- Today dashboard ---------- */

.dashboard-icon { width: 22px; height: 22px; flex: none; vertical-align: middle; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); margin: 0 0 12px; }
.dashboard-heading h1 { font-size: clamp(32px, 3.2vw, 48px); font-weight: 600; line-height: 1.12; letter-spacing: -.045em; }
.heading-dot { color: #86a793; }
.dashboard-heading p:last-child { color: var(--ink-2); font-size: 15px; margin: 12px 0 0; }
.dashboard-plan { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--card); color: var(--ink); padding: 13px 20px; border-radius: 100px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.dashboard-plan:hover { text-decoration: none; background: var(--tint-soft); }
.dashboard-context { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 24px 0; font-size: 12px; color: var(--ink-2); }
.brief-date { display: inline-flex; align-items: center; gap: 7px; }
.brief-date .dashboard-icon { width: 16px; height: 16px; }
.demo-badge { background: var(--card); border: 1px solid var(--hair); padding: 3px 10px; border-radius: 30px; font-size: 12px; }
.brief-context { margin-left: auto; position: relative; }
.brief-context > summary { cursor: pointer; min-height: 32px; align-content: center; }
.brief-context-body { position: absolute; right: 0; top: 38px; width: min(420px, 85vw); padding: 16px; border-radius: 18px; background: var(--card); box-shadow: 0 10px 40px #0002; border: 1px solid var(--hair); z-index: 25; }
.brief-context .note { font-size: 14px; padding: 10px; margin-bottom: 8px; }
.brief-context .source-status { margin: 0; font-size: 14px; }
.dashboard-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; font-size: 14px; }
.dashboard-filter a { margin-left: auto; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.dashboard-stat { display: block; padding: 22px 24px; border-radius: 26px; color: #242b28; transition: transform .15s ease; }
.dashboard-stat:hover { color: #242b28; text-decoration: none; transform: translateY(-3px); }
.dashboard-stat.mint { background: var(--surface-mint); }
.dashboard-stat.pink { background: var(--surface-pink); }
.dashboard-stat.lavender { background: var(--surface-lavender); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 500; }
.stat-top .dashboard-icon { width: 20px; height: 20px; opacity: .7; }
.stat-bottom { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: 16px; }
.stat-bottom strong { display: block; font-size: 46px; font-weight: 500; line-height: 1.05; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.stat-detail { display: block; font-size: 12px; color: #535e57; margin-top: 10px; }
.circle-arrow { display: grid; place-items: center; width: 42px; height: 42px; flex: none; background: #fff9; border-radius: 50%; font-size: 24px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 26px; align-items: start; }
.research-desk, .dashboard-rail { min-width: 0; }
.research-desk { scroll-margin-top: 85px; }
.dashboard .tabs { position: static; background: none; backdrop-filter: none; margin-bottom: 22px; padding: 0 0 12px; gap: 2px; border-bottom: 1px solid var(--hair); border-radius: 0; }
.dashboard .tabs a { min-height: 38px; font-size: 12px; padding: 0 10px; background: transparent; color: var(--ink-2); gap: 4px; }
.dashboard .tabs a[aria-current="true"] { background: var(--ink); color: var(--ground); }
.dashboard .tabs .n { font-size: 10px; padding: 1px 5px; }
.dashboard .group { margin-bottom: 24px; }
.dashboard .group > h2 { font-size: 22px; font-weight: 600; }
.dashboard .group > .sub { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 7px 0 18px; }
.dashboard .hero { border: 0; background: var(--surface-feature); padding: 26px; margin-bottom: 0; }
.feature-label { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; color: var(--ink-2); margin-bottom: 20px; }
.feature-label .dashboard-icon { width: 18px; height: 18px; }
.feature-label span { font-weight: 400; }
.dashboard .hero > h3 { font-size: clamp(24px, 2.1vw, 32px); line-height: 1.23; font-weight: 550; max-width: 24ch; letter-spacing: -.035em; }
.dashboard .hero .line { font-size: 13px; margin-top: 16px; color: var(--ink-2); }
.dashboard .hero .btn:not(.go):not(.quiet) { background: var(--card); }
.dashboard .hero .btn { font-size: 14px; }
.dashboard .hero .refine { margin-top: 20px; }
.suggested-opening { margin-top: 20px; font-size: 13px; }
.suggested-opening summary { cursor: pointer; color: var(--ink-2); }
.dashboard .hero .quote { font-size: 16px; color: var(--ink); }
.dashboard-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-section-heading > span { color: var(--ink-2); font-size: 12px; }
.dashboard-section-heading > a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--card-2); color: var(--ink); font-size: 20px; }
.dashboard-title { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.025em; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.topic-tile { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--card); color: var(--ink); border-radius: 20px; }
.topic-tile:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--hair); }
.topic-symbol, .shortcut-icon { display: grid; place-items: center; width: 40px; height: 44px; flex: none; border-radius: 12px; color: #303b34; }
.tone-0 { background: var(--surface-mint); }
.tone-1 { background: var(--surface-pink); }
.tone-2 { background: var(--surface-yellow); }
.tone-3 { background: var(--surface-lavender); }
.topic-tile b { display: block; font-size: 13px; font-weight: 600; }
.topic-tile small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 5px; }
.topic-arrow { margin-left: auto; font-size: 18px; }
.dashboard-widget { padding: 24px; border-radius: 26px; background: var(--card); margin-bottom: 18px; }
.widget-sub { color: var(--ink-2); font-size: 12px; margin: 6px 0 20px; }
.dashboard-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 0 -8px 20px; }
.week-day { text-align: center; padding: 7px 0; border-radius: 24px; }
.week-day small { display: block; font-size: 10px; font-weight: 500; color: var(--ink-2); }
.week-day b { display: block; font-size: 15px; font-weight: 500; margin-top: 8px; }
.week-day i { display: block; margin: 6px auto 0; width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.week-day.has-plan i { background: #75a18a; }
.week-day.current { background: var(--tint); color: var(--on-action); }
.week-day.current small { color: #d3ddd7; }
.schedule-capacity { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 7px; }
.schedule-capacity b { font-weight: 500; color: var(--ink); }
.schedule-progress { display: block; width: 100%; height: 6px; border: none; border-radius: 8px; overflow: hidden; background: var(--card-2); accent-color: #8db7a1; }
.schedule-progress::-webkit-progress-bar { background: var(--card-2); }
.schedule-progress::-webkit-progress-value { background: #8db7a1; border-radius: 8px; }
.schedule-progress::-moz-progress-bar { background: #8db7a1; border-radius: 8px; }
.week-empty { margin: 22px 0; font-size: 13px; }
.week-empty b { font-weight: 500; }
.week-empty p { color: var(--ink-2); font-size: 12px; line-height: 1.6; margin: 5px 0; }
.widget-link { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 12px; font-weight: 500; border-top: 1px solid var(--hair); padding-top: 14px; min-height: var(--btn-h-sm); }
.upcoming-list { list-style: none; margin: 20px 0; padding: 0; }
.upcoming-list li { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.upcoming-icon { display: grid; place-items: center; border-radius: 12px; width: 38px; height: 38px; background: var(--card-2); }
.upcoming-icon svg { width: 18px; }
.upcoming-list b { display: block; font-size: 12px; font-weight: 500; }
.upcoming-list small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.pulse-headline strong { display: block; font-size: 40px; font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.pulse-headline > span { font-size: 12px; color: var(--ink-2); }
.pulse-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.pulse-metrics > div { background: var(--card-2); border-radius: 14px; padding: 12px 14px; }
.pulse-metrics b { display: block; font-size: 21px; font-weight: 500; }
.pulse-metrics span { font-size: 12px; color: var(--ink-2); }
.pulse-comparison { font-size: 12px; color: var(--ink-2); margin: 14px 0 18px; }
.dashboard-shortcut { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 22px; background: var(--surface-lavender); color: #252b28; }
.shortcut-icon { background: #fff9; width: 40px; height: 40px; border-radius: 50%; }
.dashboard-shortcut b { font-size: 13px; font-weight: 600; }
.dashboard-shortcut span > span { display: block; font-size: 12px; color: #53595a; margin-top: 3px; }
.dashboard-shortcut > span:last-child { margin-left: auto; font-size: 22px; }
.dashboard .research-category { border: 0; border-radius: 20px; }
.dashboard .research-category > summary { font-size: 15px; }
.dashboard .category-count { font-size: 12px; }
.dashboard .research-card { padding: 22px; border-radius: 20px; }
.dashboard .research-card h3 { font-size: 19px; }
.dashboard .research-card .btn { font-size: 14px; }
.dashboard .category-body .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); }
.dashboard .opening-list a { font-size: 18px; }
.dashboard .table { max-width: 100%; }
@media (min-width: 1700px) { .dashboard-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (min-width: 861px) and (max-width: 1180px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
  .dashboard-stat { padding: 20px; }
  .topic-grid { grid-template-columns: 1fr; }
  .dashboard-widget { padding: 20px; }
  .stat-detail { font-size: 12px; }
}
@media (max-width: 1000px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .dashboard-widget { margin-bottom: 0; }
  .dashboard-shortcut { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
        .research-desk { scroll-margin-top: 145px; }
  .dashboard-heading h1 { font-size: 36px; }
}
@media (max-width: 600px) {
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading h1 { font-size: 32px; }
  .dashboard-heading p:last-child { font-size: 13px; max-width: 26ch; }
  .dashboard-plan { padding: 12px; }
  .dashboard-plan span { display: none; }
  .eyebrow { font-size: 10px; }
  .dashboard-context { gap: 8px; margin: 20px 0; }
  .brief-date { font-size: 12px; }
  .brief-context { flex-basis: 100%; margin-left: 0; }
  .brief-context-body { left: 0; right: auto; }
  .dashboard-stats { gap: 8px; margin-bottom: 24px; }
  .dashboard-stat { padding: 16px 12px; border-radius: 20px; }
  .stat-top { font-size: 12px; min-height: 36px; align-items: start; line-height: 1.35; }
  .stat-top .dashboard-icon, .stat-detail { display: none; }
  .stat-bottom { margin-top: 8px; }
  .stat-bottom strong { font-size: 34px; }
  .circle-arrow { width: 24px; height: 24px; font-size: 18px; }
  .dashboard .hero { padding: 22px; }
  .dashboard .hero > h3 { font-size: 27px; }
  .dashboard .tabs { margin-bottom: 18px; }
  .dashboard .tabs a { min-height: var(--btn-h); }
  .topic-grid { grid-template-columns: 1fr; }
  .dashboard-rail { grid-template-columns: 1fr; }
  .dashboard-section-heading > a { width: var(--btn-h); height: var(--btn-h); }
}
/* ---------- phone ---------- */

@media (max-width: 860px) {
  body { font-size: 17px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: sticky; top: 61px; z-index: 20; max-height: none; overflow: visible;
    padding: 8px 12px; display: flex; gap: 7px; overflow-x: auto;
    background: color-mix(in srgb, var(--ground) 92%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--hair);
    scrollbar-width: none;
  }
  .side::-webkit-scrollbar { display: none; }
  .side a { white-space: nowrap; padding: 9px 15px; border-radius: 980px; }
  .side h3, .side .topic { display: none; }
  .side .ic { display: none; }
  .main { padding: 20px 18px 96px; }
  .pagehead h1 { font-size: 30px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .who { display: none; }
}

/* On a touch screen nothing is smaller than a fingertip, whatever its role on
   a desktop. 44px is the floor Apple sets and it is the right one. */
@media (pointer: coarse) {
  .btn, .btn.small, .chip, .side a, .side .topic, .menu button, input, select, textarea, .brand {
    min-height: var(--btn-h);
  }
  .btn.quiet { padding: 0 14px; }
  /* button-system.js's Compact category forces .chip to 40px with !important,
     appended after this file, so an equal-specificity rule here would lose on
     source order. .top .chip (two classes) outranks a bare .chip on
     specificity, so this wins regardless of order -- the theme toggle and
     Sign out reach the 44px floor on a touch screen while staying 40px (the
     Compact height) for a mouse, where this block never applies. */
  .top .chip { min-height: var(--btn-h-sm) !important; height: var(--btn-h-sm) !important; }
}

@media print {
  :root, :root[data-theme] { --ground: #fff; --card: #fff; --card-2: #f6f6f6; --ink: #000; --ink-2: #333; --ink-3: #666; --hair: #ddd; --tint: #222; --tint-soft: #eee; --surface-feature: #fff; --lift: none; color-scheme: light; }
  .top, .side, .row, #toast, dialog { display: none !important; }
  .main { max-width: none; padding: 0; }
  .card { break-inside: avoid; }
}

html { scroll-padding-top: 90px; }
.top { min-height: 69px; }
.top .brand { color: var(--ink); text-decoration: none; }
.top .brand:hover { opacity: .8; }
.top .chip { min-height: var(--btn-h); }
.top #theme { justify-content: center; min-width: 44px; }
.side { top: 69px; max-height: calc(100dvh - 69px); }
.nav-links { display: grid; gap: var(--space-1); }
.side .ic { display: inline-flex; align-items: center; justify-content: center; }
.side a[aria-current="page"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 12%, transparent); }
.side a:focus-visible { position: relative; z-index: 1; }
.side .topic[data-muted="1"] { opacity: 1; color: var(--ink-3); }
.side .topic[data-muted="1"]::after { content: 'Muted'; margin-left: auto; font-size: 11px; }
.main { scroll-margin-top: 85px; }
.pagehead h1 { text-wrap: balance; }
.pagehead p, .lead { text-wrap: pretty; }
.card, .note { overflow-wrap: anywhere; }
.btn, .chip { border-radius: var(--r-button); }
input, select, textarea { border-radius: var(--r-control); }
.btn, .chip, .side a { transition: background-color .16s ease, color .16s ease, box-shadow .16s ease; }
input, select, textarea { accent-color: var(--tint); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 3px; }
summary { cursor: pointer; min-height: var(--btn-h); align-content: center; }
dialog.sheet {
  max-height: calc(100dvh - 32px); max-width: calc(100vw - 24px);
  overflow-y: auto; overscroll-behavior: contain; border-radius: 22px;
}
dialog.sheet .panel { width: min(94vw, 460px); max-width: 100%; }
dialog.script-sheet { margin: auto; }
dialog.script-sheet .panel { width: min(90vw, 780px); padding: 32px; }
.script-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.script-heading h3 { margin: 0; }
.script-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.script-meta { margin: 0; color: var(--ink-3); font-size: 13px; }
.writer-picker { max-width: 300px; margin-bottom: 18px; }

.writer-tag { margin-right: 8px; font-size: 12px; font-weight: 600; }
.writer-tag.low { background: var(--card-2); color: var(--ink-2); }
.writer-tag.high { background: var(--tint-soft); color: var(--tint); }
.script-composers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.script-composer { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 24px; border: 1px solid var(--hair); border-radius: 24px; }
.script-composer h2 { font-size: 21px; letter-spacing: -.025em; margin-bottom: 8px; }
.script-composer > .d { min-height: var(--btn-h); line-height: 1.5; }
.script-composer .writer-picker { max-width: none; }

.script-composer .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.script-choice { position: relative; width: 100%; }
.choice-native { position: absolute; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px; clip-path: inset(50%); overflow: hidden; }
.choice-trigger { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid var(--hair-strong); border-radius: var(--r-control); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.choice-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-chevron { flex-shrink: 0; margin-left: auto; color: var(--ink-3); }
.choice-trigger[aria-expanded="true"] { border-color: var(--tint); box-shadow: 0 0 0 3px var(--tint-soft); }
.choice-trigger[aria-expanded="true"] .choice-chevron { transform: rotate(180deg); }
.choice-trigger:disabled { opacity: .5; cursor: default; }
.choice-menu { position: absolute; z-index: 30; inset: calc(100% + 8px) 0 auto; padding: 6px; border: 1px solid var(--hair); border-radius: 14px; background: var(--card); box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.choice-above .choice-menu { inset: auto 0 calc(100% + 8px); }
.choice-list { max-height: min(260px, 40dvh); overflow-y: auto; overscroll-behavior: contain; }
.choice-menu input.choice-search { font-size: 15px; padding: 10px 12px; min-height: var(--btn-h-sm); margin-bottom: 6px; border-radius: 9px; background: var(--card-2); }
.choice-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 8px; font-size: 15px; line-height: 1.4; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.choice-option:hover, .choice-option.is-active { background: var(--card-2); }
.choice-option[aria-selected="true"] { color: var(--tint); background: var(--tint-soft); }
.choice-description { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.choice-check { margin-left: auto; visibility: hidden; }
.choice-option[aria-selected="true"] .choice-check { visibility: visible; }
.choice-option[aria-disabled="true"] { color: var(--ink-3); opacity: .6; cursor: default; }
.choice-empty { padding: 12px; font-size: 14px; color: var(--ink-3); }
.choice-menu[hidden], .choice-option[hidden], .choice-empty[hidden] { display: none; }
.draft-filing { flex-shrink: 0; font-size: 14px; }
.draft-filing summary { color: var(--ink-3); }
.draft-filing form { display: flex; flex-direction: column; gap: 8px; }
.script-composer .composer-actions { margin-top: auto; padding-top: 8px; gap: 12px; }
.script-composer .composer-actions .btn { padding-inline: 16px; }
.composer-options { margin: -4px 0 14px; }
.composer-options summary { color: var(--ink-2); font-size: 14px; }
.composer-options summary span { color: var(--ink-3); }
.draft-library { scroll-margin-top: 85px; }
.draft-library > h2 { font-size: 23px; margin-bottom: 16px; }
.draft-folders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.draft-folder { display: flex; align-items: center; gap: 14px; border: 1px solid var(--hair); border-radius: 20px; padding: 20px; color: var(--ink-2); background: var(--card); }
.draft-folder:hover { border-color: var(--tint); }
.draft-folder[aria-current="page"] { background: var(--tint-soft); border-color: var(--tint); color: var(--tint); }
.draft-folder svg { flex-shrink: 0; }
.draft-folder strong { display: block; font-size: 18px; }
.draft-folder small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.folder-count { margin-left: auto; font-size: 20px; font-weight: 600; }
.draft-folder-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.draft-folder-heading h3 { font-size: 18px; }
.draft-folder-heading > span { font-size: 13px; color: var(--ink-3); }
.draft-list { background: var(--card); border: 1px solid var(--hair); border-radius: 22px; overflow: hidden; }
.draft-row { display: flex; align-items: center; gap: 20px; padding: 20px 24px; }
.draft-row + .draft-row, .draft-row ~ .draft-row { border-top: 1px solid var(--hair); }
.draft-row-content { min-width: 0; flex: 1; }
.draft-title { display: block; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; line-height: 1.45; }
.draft-title:hover { color: var(--tint); }
.draft-excerpt { margin: 6px 0 10px; font-size: 14px; color: var(--ink-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.draft-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--ink-3); }
.draft-row-meta .writer-tag { margin: 0; }
.draft-open { flex-shrink: 0; font-size: 14px; }
.draft-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 20px; font-size: 14px; color: var(--ink-3); }
@media (max-width: 1050px) { .script-composer { padding: 20px; } .script-composer .composer-actions .push { margin-left: 0; } }
@media (max-width: 700px) {
  .script-composers { grid-template-columns: minmax(0, 1fr); }
  .script-composer > .d { min-height: 0; }
  .draft-folders { gap: 10px; }
  .draft-folder { padding: 16px 12px; gap: 8px; flex-wrap: wrap; }
  .draft-folder small { display: none; }
  .draft-folder strong { font-size: 16px; }
  .draft-row { align-items: flex-start; flex-direction: column; gap: 12px; padding: 18px; }
  .draft-row-content { width: 100%; }
}
.script-paper { max-width: 62ch; padding: 4px 0 16px; }
.script-paper p { white-space: pre-wrap; font-size: 20px; line-height: 1.7; margin: 0 0 22px; overflow-wrap: anywhere; }
.script-paper p.script-opening { font-size: 24px; line-height: 1.5; font-weight: 600; letter-spacing: -.025em; }
.script-paper p:last-child { margin-bottom: 0; }
.script-edit { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 18px 0; padding: 4px 0; }
.script-edit > summary { color: var(--tint); font-weight: 600; }
.script-edit form { margin-top: 14px; padding-bottom: 12px; }
.script-edit textarea { min-height: 300px; font-size: 18px; line-height: 1.6; }
@media (max-width: 600px) {
  dialog.script-sheet .panel { width: calc(100vw - 24px); padding: 22px 18px; }
  .script-paper p { font-size: 18px; line-height: 1.65; }
  .script-paper p.script-opening { font-size: 21px; }
}
.plan-actions { gap: 8px; }
.plan-actions .btn { flex: 1 1 auto; padding-inline: 14px; }
.plan-actions .btn.quiet { flex: 0 1 auto; }
dialog[data-making] .plan-actions {
  position: sticky; bottom: 0; background: var(--card);
  margin: 16px -24px -24px; padding: 16px 24px 24px;
  border-top: 1px solid var(--hair);
}
.pill.make-now { color: var(--tint); background: var(--tint-soft); font-weight: 600; }
.make-now-count { display: block; color: var(--tint); font-size: 11px; font-weight: 600; margin-top: 4px; }
.making-workspace { max-width: 1040px; }
.making-back { margin-bottom: 20px; }
.making-subject { margin-bottom: 24px; }
.making-subject h2 { font-size: 23px; line-height: 1.35; text-wrap: balance; }
.making-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr); align-items: start; gap: 20px; }
.making-layout h2 { font-size: 19px; margin-bottom: 10px; }
.making-script textarea { min-height: 360px; line-height: 1.6; resize: vertical; }
.making-draft-text { white-space: pre-wrap; line-height: 1.6; }
.making-next .btn { width: 100%; }
.print-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
[data-save-notice] { margin-bottom: 18px; }
@media print { .print-toolbar, [data-save-notice] { display: none; } }
@media (max-width: 1050px) {
  .making-layout { grid-template-columns: minmax(0, 1fr); }
  .making-script textarea { min-height: 300px; }
}

/* Shared dashboard shell. Screen layouts inherit this; they do not own themes. */
.app-page .top { background: var(--card); border-bottom: 0; }
.app-page .brand .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--surface-mint); transform: rotate(-12deg); }
.app-page .main { max-width: 1600px; padding: 34px 36px 60px; }
.app-page[data-screen="settings"] .main { max-width: 1120px; }
.app-page .side { background: var(--card); border-radius: var(--r-card); margin: 20px 0 20px 16px; padding: 18px 14px 28px; max-height: calc(100dvh - 101px); }
.app-page .side a:hover { background: var(--card-2); }
.app-page .side a[aria-current="page"], .app-page .mobile-navigation nav a[aria-current="page"] { background: var(--action-bg); color: var(--on-action); }
.app-page .side h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.panel, .composer, .cal, .empty { border: 1px solid var(--hair); }
.panel, .composer { padding: var(--space-6); }
.choice-trigger, input, select, textarea { font-size: 15px; }
.idea-list, .draft-list, .draft-folder, .brief-sections { border-radius: var(--r-card); box-shadow: none; }
.idea-stage-link { border-radius: var(--r-control); color: var(--on-pastel); }
.idea-stage-link:nth-child(1) { background: var(--surface-mint); }
.idea-stage-link:nth-child(2) { background: var(--surface-yellow); }
.idea-stage-link:nth-child(3) { background: var(--surface-lavender); }
.idea-stage-link:nth-child(4) { background: var(--surface-pink); }
.idea-stage-link .idea-count { background: rgba(255,255,255,.6); color: var(--on-pastel); }
.idea-stage-link .stage-dot { background: currentColor; }
.script-composer:first-child { background: var(--surface-feature); }
.script-composer:nth-child(2) { background: color-mix(in srgb, var(--surface-lavender) 12%, var(--card)); }
.app-page .report-schedule { background: var(--surface-feature); }
.cal .cell:has(.dots .on) { background: var(--tint-soft); }
.cal .cell:has(.dots .on):hover { background: var(--card-2); }
.mobile-navigation { background: var(--card); }
@media (max-width: 1180px) and (min-width: 861px) {
  .app-page .main { padding: 28px 24px 60px; }
}
@media (max-width: 860px) {
  .app-page .main { padding: 26px 18px 56px; }
  .idea-stages { top: 61px; }
  .idea-stage { scroll-margin-top: 150px; }
}

/* The page leads with content. Supporting navigation and status stay quiet. */
.shell { grid-template-columns: 212px minmax(0, 1fr); }
.main { max-width: 1120px; padding: 36px 40px 72px; }
.shell.bare { display: block; }
.shell.bare .main { max-width: 960px; margin-inline: auto; }
.top { min-height: 61px; padding-block: 8px; }
.side { top: 61px; padding-top: 24px; }
.side a { font-size: 15px; }
.side h3 { margin-top: 28px; }
.pagehead h1 { font-size: clamp(32px, 3vw, 48px); font-weight: 600; letter-spacing: -.045em; }
.brief-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brief-heading .pagehead { margin-bottom: 12px; }
.brief-heading .pagehead p { font-size: 16px; }
.workspace-badge { flex: none; font-size: 12px; color: var(--ink-3); padding-top: 9px; }
.brief-status { margin-bottom: 12px; }
.brief-status > summary { display: flex; align-items: center; gap: 8px; width: fit-content; font-size: 13px; color: var(--ink-3); min-height: 32px; list-style: none; }
.brief-status > summary::after { content: '⌄'; }
.brief-status > summary::-webkit-details-marker { display: none; }
.brief-status > summary span { color: var(--accent); }
.brief-status .note { margin-top: 8px; }
.tabs { position: static; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 0 14px; margin-bottom: 8px; gap: 4px; }
.tabs a { background: transparent; border-radius: 8px; padding-inline: 12px; font-size: 14px; }
.tabs a[aria-current="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tabs a .n { padding: 0; background: transparent; color: var(--ink-3); font-size: 12px; }
.tabs a[aria-current="true"] .n { background: transparent; color: var(--ink-2); }
.tabpanel[data-panel="angle"] > .group > h2,
.tabpanel[data-panel="angle"] > .group > .sub { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.card.hero { background: var(--card); padding: 32px; border: 1px solid var(--hair); box-shadow: 0 4px 24px rgba(0,0,0,.035); }
.card.hero .eyebrow { font-size: 11px; color: var(--ink-3); letter-spacing: .07em; margin-bottom: 20px; }
.card.hero > h3 { font-size: clamp(26px, 2.6vw, 34px); max-width: 30ch; }
.card.hero .said.quote { font-size: 19px; line-height: 1.5; font-weight: 400; max-width: 54ch; margin-top: 24px; }
.card.hero .line { font-size: 13px; }
.card.hero .row { margin-top: 22px; }
.draft-ready { margin-top: 18px; }
.draft-ready .said { font-size: 14px; }
.feedback-options { border-top: 1px solid var(--hair); margin-top: 24px; padding-top: 8px; }
.feedback-options > summary { color: var(--ink-3); font-size: 13px; min-height: 36px; }
.feedback-options .row { margin-top: 8px; }
.workspace-details { margin-top: 20px; border-top: 1px solid var(--hair); padding-top: 8px; }
.workspace-details > summary { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); min-height: var(--btn-h); }
.workspace-details > summary::after { content: '+'; margin-left: auto; }
.workspace-details[open] > summary::after { content: '−'; }
.workspace-details > summary span { font-size: 13px; color: var(--ink-3); }
.workspace-details > summary::-webkit-details-marker { display: none; }
.workspace-details .workspace-summary { margin: 16px 0; }
.mobile-navigation { display: none; }
.today-nav { position: relative; min-width: 0; }
.side .today-nav-link, .mobile-navigation .today-nav-link { padding-right: 44px; }
.today-topics > summary { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 40px; min-height: var(--btn-h); border-radius: 12px; list-style: none; color: var(--ink-2); }
.today-topics > summary::-webkit-details-marker { display: none; }
.today-topics > summary:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.today-topics[open] > summary span { transform: rotate(180deg); }
.marketing-ui .side .today-nav:has(.today-nav-link[aria-current="page"]) .today-topics > summary { color: var(--on-action); }
.today-subnav { margin: 8px 0 12px 24px; padding: 0 0 0 10px; border-left: 1px solid var(--hair-strong); list-style: none; }
.side .today-subnav a, .mobile-navigation .today-subnav a { display: flex; font-size: 13px; font-weight: 400; min-height: var(--btn-h-sm); padding: 8px 10px; margin: 2px 0; border-radius: 9px; line-height: 1.4; white-space: normal; }
.side .today-subnav a[aria-current="location"], .mobile-navigation .today-subnav a[aria-current="location"] { color: var(--tint); background: var(--tint-soft); font-weight: 600; }
.mobile-navigation .today-nav { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .shell { display: block; }
  .top { gap: 10px; padding-inline: max(16px, env(safe-area-inset-left)); }
  .side { display: none; }
  .mobile-navigation { display: block; border-bottom: 1px solid var(--hair); }
  .mobile-navigation > summary { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; min-height: var(--btn-h); font-size: 14px; list-style: none; }
  .mobile-navigation > summary > span:last-child { color: var(--ink-3); }
  .mobile-navigation > summary::-webkit-details-marker { display: none; }
  .mobile-navigation nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 0 12px 12px; }
  .mobile-navigation nav a { display: flex; align-items: center; gap: 10px; min-height: var(--btn-h); padding: 10px; color: var(--ink-2); font-size: 14px; border-radius: 10px; }
  .mobile-navigation nav a[aria-current="page"] { color: var(--tint); background: var(--tint-soft); }
  .main { padding: 24px 18px 56px; }
  .pagehead h1 { font-size: 30px; }
  .brief-heading .pagehead p { font-size: 14px; }
  .workspace-badge { font-size: 11px; padding-top: 7px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 8px; margin-bottom: 12px; }
  .tabs a { min-height: var(--btn-h-sm); padding-inline: 10px; font-size: 13px; }
  .tabs a .n { display: none; }
  .card.hero { padding: 24px 20px 12px; }
  .card.hero > h3 { font-size: 27px; }
  .card.hero .eyebrow { margin-bottom: 16px; }
  .card.hero .said.quote { font-size: 17px; margin-top: 20px; }
  .card.hero .row { gap: 8px; margin-top: 18px; }
  .card.hero .btn { padding-inline: 13px; font-size: 14px; }
  .workspace-details > summary span { display: none; }
}

.brief-sections { margin: 0 0 20px; border: 1px solid var(--hair); border-radius: 14px; background: var(--card); }
.brief-sections > summary { display: flex; align-items: center; gap: 18px; padding: 16px 20px; list-style: none; cursor: pointer; }
.brief-sections > summary::-webkit-details-marker { display: none; }
.section-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.section-prompt { color: var(--ink-3); font-size: 12px; }
.section-current { color: var(--ink); font-size: 17px; font-weight: 600; line-height: 1.35; }
.section-description { display: block; font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-top: 3px; }
.section-switch { color: var(--tint); font-size: 13px; flex: none; }
.section-switch > span { display: inline-block; margin-left: 6px; }
.brief-sections[open] .section-switch > span { transform: rotate(180deg); }
.section-list { margin: 0; padding: 6px; border-top: 1px solid var(--hair); list-style: none; }
.section-list a { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.section-list a:hover { background: var(--card-2); }
.section-list a[aria-current="true"] { background: var(--tint-soft); }
.section-name { font-size: 15px; font-weight: 600; }
.section-number { display: grid; place-items: center; flex: none; width: 26px; height: 26px; background: var(--card-2); border-radius: 7px; font-size: 13px; color: var(--ink-2); }
.section-check { color: var(--tint); margin-left: auto; min-width: 14px; }
@media (max-width: 860px) {
  .brief-sections > summary { flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
  .section-copy { flex-basis: 100%; }
  .section-current { font-size: 16px; }
  .section-description { font-size: 13px; }
  .section-switch { font-size: 12px; }
  .section-list a { padding: 12px 10px; gap: 10px; }
}
@media print {
  .main, .app-page .main, .app-page[data-screen="settings"] .main, .shell.bare .main { max-width: none; margin: 0; padding: 0; }
  .mobile-navigation, .brief-status, .workspace-details, .feedback-options, .brief-sections { display: none; }
}
@media (max-width: 360px) {
  .top { gap: 6px; padding-inline: 12px; }
  .top .brand { font-size: 15px; }
  .top .chip.plain { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .chip, .side a { transition: none; }
}


.today-page {
  --glass: rgba(255, 255, 255, .62);
  --glass-reading: rgba(255, 255, 255, .80);
  --glass-edge: rgba(255, 255, 255, .86);
  --glass-shine: rgba(255, 255, 255, .72);
  --glass-shadow: 0 12px 36px rgba(44, 65, 57, .07), inset 0 1px 0 var(--glass-shine);
  --glass-mint: rgba(190, 214, 224, .62);
  --glass-pink: rgba(226, 222, 214, .60);
  --glass-lavender: rgba(207, 216, 232, .64);
  --glass-wash: radial-gradient(ellipse at 12% 20%, #cfe0ec 0, transparent 46%),
    radial-gradient(ellipse at 88% 35%, #d9e0ec 0, transparent 46%),
    radial-gradient(ellipse at 50% 95%, #e9e4da 0, transparent 52%);
  background-color: var(--ground);
  background-image: var(--glass-wash);
  background-attachment: fixed;
  background-size: 100vw 100vh;
}
:root[data-theme="dark"] .today-page {
  --glass: rgba(30, 35, 48, .68);
  --glass-reading: rgba(24, 28, 40, .86);
  --glass-edge: rgba(220, 239, 227, .16);
  --glass-shine: rgba(235, 255, 244, .12);
  --glass-shadow: 0 12px 36px rgba(0, 0, 0, .18), inset 0 1px 0 var(--glass-shine);
  --glass-mint: rgba(38, 66, 86, .72);
  --glass-pink: rgba(62, 56, 50, .72);
  --glass-lavender: rgba(48, 56, 84, .76);
  --glass-wash: radial-gradient(ellipse at 12% 20%, #1f3550 0, transparent 46%),
    radial-gradient(ellipse at 88% 35%, #2a3248 0, transparent 46%),
    radial-gradient(ellipse at 50% 95%, #352f2a 0, transparent 52%);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .today-page {
    --glass: rgba(30, 35, 48, .68);
    --glass-reading: rgba(24, 28, 40, .86);
    --glass-edge: rgba(220, 239, 227, .16);
    --glass-shine: rgba(235, 255, 244, .12);
    --glass-shadow: 0 12px 36px rgba(0, 0, 0, .18), inset 0 1px 0 var(--glass-shine);
    --glass-mint: rgba(38, 66, 86, .72);
    --glass-pink: rgba(62, 56, 50, .72);
    --glass-lavender: rgba(48, 56, 84, .76);
    --glass-wash: radial-gradient(ellipse at 12% 20%, #1f3550 0, transparent 46%),
      radial-gradient(ellipse at 88% 35%, #2a3248 0, transparent 46%),
      radial-gradient(ellipse at 50% 95%, #352f2a 0, transparent 52%);
  }
}
.today-page :is(.top, .side, .mobile-navigation, .dashboard-plan, .dashboard-stat,
  .dashboard-widget, .dashboard-shortcut, .topic-tile, .brief-sections, .card) {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
}
.today-page .top { border-width: 0 0 1px; box-shadow: inset 0 1px 0 var(--glass-shine); }
.today-page .side { border-radius: 28px; }
.today-page .dashboard .card { background: var(--glass-reading); }
.today-page .dashboard-stat {
  background: linear-gradient(135deg, var(--glass-shine), transparent 58%), var(--stat-glass);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(44, 65, 57, .06), inset 0 1px 1px var(--glass-shine);
}
.today-page .dashboard-stat.mint { --stat-glass: var(--glass-mint); }
.today-page .dashboard-stat.pink { --stat-glass: var(--glass-pink); }
.today-page .dashboard-stat.lavender { --stat-glass: var(--glass-lavender); }
.today-page .stat-detail { color: var(--ink-2); }
.today-page .week-day.current small { color: var(--on-action); }
.today-page .circle-arrow {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-shine);
  color: var(--ink);
}
.today-page .dashboard-shortcut { background: var(--glass-lavender); color: var(--ink); }
.today-page .dashboard-plan:hover, .today-page .topic-tile:hover { background: var(--glass-reading); }
.today-page .btn.go {
  background: linear-gradient(160deg, rgba(255,255,255,.12), transparent 70%), var(--action-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 4px 10px rgba(26,44,35,.12);
}
/* Floating menus are opaque so overlapping text never shows through. */
.today-page .brief-context-body { background: var(--card-solid); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme] .today-page {
    --glass: var(--card-solid); --glass-reading: var(--card-solid);
    --glass-mint: var(--card-solid); --glass-pink: var(--card-solid); --glass-lavender: var(--card-solid);
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), print {
  :root[data-theme] .today-page {
    --glass: var(--card-solid); --glass-reading: var(--card-solid);
    --glass-mint: var(--card-solid); --glass-pink: var(--card-solid); --glass-lavender: var(--card-solid);
    --glass-edge: var(--hair-strong); --glass-shadow: none; --glass-shine: transparent;
    background-image: none;
  }
  .today-page :is(.top, .side, .mobile-navigation, .dashboard-plan, .dashboard-stat,
    .dashboard-widget, .dashboard-shortcut, .topic-tile, .brief-sections, .card) {
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

.research-refresh { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px 20px; margin-bottom:24px; border:1px solid var(--hair); border-radius:20px; background:var(--card); font-size:13px; }
.today-page .research-refresh { background:var(--glass-reading); border-color:var(--glass-edge); box-shadow:var(--glass-shadow); }
.research-refresh p { margin:5px 0 0; color:var(--ink-2); font-size:12px; }
.research-refresh p:empty { display:none; }
.research-refresh form { margin:0; flex-shrink:0; }
@media(max-width:600px) { .research-refresh { align-items:stretch; flex-direction:column; } .research-refresh button { width:100%; } }

/* Reports: one week and a bounded shelf of daily briefs. */
.report-schedule { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); padding: 20px 24px; margin-bottom: 16px; }
.report-schedule h2 { font-size: 19px; margin: 0; }
.report-schedule p, .report-card p, .report-row p { font-size: 14px; color: var(--ink-2); margin: 6px 0 0; }
.report-schedule dl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.report-schedule dt, .report-eyebrow { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; }
.report-schedule dd { margin: 5px 0 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.report-search { margin: 22px 0; }
.report-week-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.report-eyebrow { margin: 0 0 6px; }
.report-week-heading h2 { font-size: 26px; margin: 0; }
.report-week-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.report-week-picker label { width: 100%; font-size: 13px; color: var(--ink-2); }
.report-week-picker select { width: auto; max-width: 100%; min-width: 0; flex: 1; }
.report-week-nav, .report-pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.report-pagination span { font-size: 13px; color: var(--ink-2); }
.report-section-title { font-size: 17px; margin: 20px 0 12px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-grid .report-card { margin: 0; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.report-card h3, .report-row h3 { font: 600 16px/1.4 var(--sans, sans-serif); margin: 0; }
.report-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.report-list { border: 1px solid var(--hair); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.report-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.report-row + .report-row { border-top: 1px solid var(--hair); }
.report-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.report-row .report-excerpt { margin-top: 8px; }
.report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
@media (max-width: 640px) {
  .report-schedule { padding: 18px; }
  .report-schedule dl, .report-grid { grid-template-columns: 1fr; }
  .report-week-picker { width: 100%; }
  .report-row { flex-wrap: wrap; padding: 14px 16px; }
  .report-row > div:first-child { flex: 1 1 180px; }
}
@media print { .report-toolbar { display: none !important; } }

/* Readable report documents, with the raw records folded into an appendix. */
.research-report { max-width: 920px; margin: 0 auto 32px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); padding: clamp(24px, 4vw, 52px); }
.research-masthead { padding-bottom: 26px; border-bottom: 2px solid var(--ink); }
.research-masthead h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; margin: 12px 0; }
.research-report p, .research-report li { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.research-report h2 { font-size: 23px; margin: 0 0 16px; }
.research-report h3 { font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.research-summary, .research-section { padding: 28px 0; border-bottom: 1px solid var(--hair); }
.research-summary > p { font-size: 18px; }
.research-metrics { display: flex; flex-wrap: wrap; gap: 22px 36px; margin: 24px 0 0; }
.research-metrics dd { margin: 0; font-size: 27px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.research-metrics dt, .research-caption { font-size: 13px; color: var(--ink-3); }
.research-findings { padding-left: 24px; margin-bottom: 0; }
.research-findings li { padding-left: 8px; margin-bottom: 24px; }
.research-findings li:last-child { margin-bottom: 0; }
.research-section li + li { margin-top: 10px; }
.research-sources { padding-top: 24px; }
.research-sources summary { cursor: pointer; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-weight: 600; font-size: 17px; }
.research-sources summary span { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.research-sources li { padding: 12px 0; border-bottom: 1px solid var(--hair); overflow-wrap: anywhere; }
.research-sources li p { margin: 4px 0; }
.report-card-date { font-size: 12px !important; }
@media (max-width: 640px) {
  .report-grid .report-card { padding: 16px; gap: 12px; }
  .research-report { padding: 22px 18px; }
  .report-actions .btn { min-height: var(--btn-h-sm); }
}
@media print { .research-report { border: 0; padding: 0; } }


/* ---------------------------------------------------------------------- */
/* Button system tokens                                                   */
/* ---------------------------------------------------------------------- */
:root, body[data-screen="machine"] {
  --btn-h: 36px;
  --btn-h-sm: 30px;
  --btn-radius: 999px;
  --btn-pad-x: 14px;
  --btn-pad-x-sm: 10px;
  --btn-font-size: 13px;
  --btn-font-size-sm: 12px;
  --btn-icon: 16px;
  --btn-icon-sm: 14px;
  --btn-gap: 6px;
}

/* Rows of buttons line up on their centerline, whatever their own markup says.
   Every action button in a row sits on ONE baseline at EQUAL height; a row
   wraps only as a whole aligned row, never leaving one button lower than its
   row-mates or a bare "..." box out of line. */
.machine-toolbar,
.machine-page .machine-toolbar,
.machine-production-action,
.machine-idea-deck .machine-production-action,
.machine-curate-actions,
.article-actions,
.article-toolbar,
.messages-ai-action,
.performance-toolbar,
.machine-carousel-controls,
.home-content-more-body .machine-idea-save,
.machine-button-row,
.machine-actions,
.machine-page .machine-review-actions,
.machine-idea-triage,
.machine-week-actions,
.machine-schedule-actions,
.top {
  align-items: center !important;
}
/* The generic action-button row any screen can use: a centered flex row whose
   buttons wrap as whole rows. Equal heights come from the standard/compact
   button rules below. */
.machine-button-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: var(--btn-gap) !important;
  min-width: 0;
}
/* Shrink-to-fit modifier: when a row is tight, .machine-button-row-compact
   drops every button to the compact size (smaller height, padding, then font)
   so the whole row stays on one aligned baseline instead of one button
   dropping to a second line or a different height. */
.machine-button-row-compact > .machine-button,
.machine-button-row-compact > a.machine-button,
.machine-button-row-compact > button.machine-button,
.machine-button-row-compact > form > .machine-button,
.machine-button-row-compact > details > summary,
.machine-button-row-compact > .machine-menu > .machine-menu-trigger {
  height: var(--btn-h-sm) !important;
  min-height: var(--btn-h-sm) !important;
  padding-left: var(--btn-pad-x-sm) !important;
  padding-right: var(--btn-pad-x-sm) !important;
  font-size: var(--btn-font-size-sm) !important;
}

/* ---------------------------------------------------------------------- */
/* Standard buttons - the default everywhere                              */
/* ---------------------------------------------------------------------- */
.machine-button,
a.machine-button,
button.machine-button,
input.machine-button,
.machine-delete-button,
.machine-idea-schedule > summary,
.machine-plan-script > summary,
.machine-brief-action > summary,
.machine-week-actions .machine-plan-calendar > summary,
.machine-upload-media > summary {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--btn-gap) !important;
  height: var(--btn-h) !important;
  min-height: var(--btn-h) !important;
  max-height: none !important;
  padding: 0 var(--btn-pad-x) !important;
  border-radius: var(--btn-radius) !important;
  font-family: inherit !important;
  font-size: var(--btn-font-size) !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  max-width: 100% !important;
  list-style: none !important;
}
.machine-idea-schedule > summary::-webkit-details-marker,
.machine-plan-script > summary::-webkit-details-marker,
.machine-brief-action > summary::-webkit-details-marker,
.machine-upload-media > summary::-webkit-details-marker {
  display: none !important;
}
/* .machine-upload-media's summary never had its own fill (unlike the other
   three action summaries, which already have a lavender fill from
   machine-assets.js); give it the same secondary look as its sibling pills
   so it reads as a button and not a bare text link. A more specific rule
   (e.g. the Home card's primary "Upload footage" case) still wins. */
.machine-upload-media > summary {
  background: var(--machine-surface);
  color: var(--machine-pine);
  border: 1px solid var(--machine-border);
}
/* A button's label can still wrap to multiple lines inside its own box (long
   text, narrow viewport) without the box itself growing off the shared row
   height; keep the row from clipping tall labels only where that happens. */
.machine-button > svg, a.machine-button > svg, button.machine-button > svg {
  width: var(--btn-icon);
  height: var(--btn-icon);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------- */
/* Compact buttons - dense places only                                    */
/* ---------------------------------------------------------------------- */
.performance-toolbar .machine-button,
.messages-ai-action .machine-button,
.messages-workspace .messages-ai-action .machine-button,
.redesign-status-tabs button,
.machine-format-filter button,
.inbox-filters a,
.messages-workspace .messages-navigation a,
.chip,
.machine-additional-secondary .machine-button,
.machine-additional-secondary summary.machine-triage-button,
.machine-idea-triage .machine-button,
.machine-idea-triage .machine-triage-button,
.machine-idea-save .machine-button,
.machine-category-buttons .machine-button,
.machine-dismiss-panel .machine-button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--btn-gap) !important;
  height: var(--btn-h-sm) !important;
  min-height: var(--btn-h-sm) !important;
  max-height: none !important;
  padding: 0 var(--btn-pad-x-sm) !important;
  border-radius: var(--btn-radius) !important;
  font-family: inherit !important;
  font-size: var(--btn-font-size-sm) !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}
/* ---------------------------------------------------------------------- */
/* Icon-only buttons - square, same radius as their category               */
/* ---------------------------------------------------------------------- */
.machine-carousel-controls button,
.machine-carousel-controls .machine-button,
.machine-idea-deck .machine-carousel-controls .machine-button,
.machine-review-artwork .machine-carousel-controls button,
[data-carousel-step],
.home-content-more > summary,
.machine-menu > .machine-menu-trigger,
.machine-studio-close {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--btn-h) !important;
  height: var(--btn-h) !important;
  min-width: var(--btn-h) !important;
  min-height: var(--btn-h) !important;
  max-height: none !important;
  padding: 0 !important;
  border-radius: var(--btn-radius) !important;
  font-size: var(--btn-icon) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  list-style: none !important;
}
.home-content-more > summary::-webkit-details-marker {
  display: none !important;
}
/* Icon-only action inside a compact row (e.g. Save for later): square at the compact height. */
button.machine-button.machine-icon-button {
  width: var(--btn-h-sm) !important;
  min-width: var(--btn-h-sm) !important;
  padding: 0 !important;
}
button.machine-button.machine-icon-button > svg {
  width: var(--btn-icon-sm);
  height: var(--btn-icon-sm);
}
#theme,
.inbox-search button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--btn-h-sm) !important;
  height: var(--btn-h-sm) !important;
  min-width: var(--btn-h-sm) !important;
  min-height: var(--btn-h-sm) !important;
  max-height: none !important;
  padding: 0 !important;
  border-radius: var(--btn-radius) !important;
  font-size: var(--btn-icon-sm) !important;
  line-height: 1 !important;
}

/* ---------------------------------------------------------------------- */
/* Mobile: buttons wrap, they never shrink below their category height     */
/* ---------------------------------------------------------------------- */
@media(max-width:480px) {
  .machine-toolbar,
  .machine-production-action,
  .machine-idea-deck .machine-production-action,
  .machine-curate-actions,
  .article-actions,
  .article-toolbar,
  .messages-ai-action {
    flex-wrap: wrap !important;
  }
  :root, body[data-screen="machine"] {
    --btn-pad-x: 12px;
    --btn-pad-x-sm: 9px;
  }
}

