/* Pollenstack. One hand-written stylesheet, no build step.
   Read top to bottom: tokens, type, chrome, components.

   Light is the default and the designed state; dark is a choice the user makes.

   The idea the whole thing hangs on: COLOUR MEANS STATE. Primary actions are plain
   black-on-white (or white-on-black); green, amber and red appear only when a post
   published, partly published, or failed. A page with one accent colour on every button
   spends that signal on nothing, and then the green badge that actually matters has to
   compete with it. */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------- tokens */

:root {
  /* Light only, on purpose. A second palette is a second set of contrast decisions to
     keep right in every component, for a product that is one person's writing desk. */
  color-scheme: light;
  --bg:        #ffffff;
  --raised:    #fbfbfc;
  --sunken:    #f6f6f7;
  --hover:     #f2f2f4;

  --line:      rgba(11, 11, 12, .09);
  --line-firm: rgba(11, 11, 12, .17);

  --ink:       #121215;
  --ink-2:     #52525b;
  --ink-3:     #86868f;

  --solid:     #121215;
  --solid-ink: #ffffff;

  --ok:   #1a7a4f;  --ok-bg:   rgba(26, 122, 79, .09);
  --warn: #8a6212;  --warn-bg: rgba(138, 98, 18, .10);
  --bad:  #c2382f;  --bad-bg:  rgba(194, 56, 47, .08);
  --live: #4f4fb0;  --live-bg: rgba(79, 79, 176, .09);

  --r:    6px;
  --r-lg: 10px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --measure: 68ch;   /* comfortable reading width; this is a writing tool */
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------------ type */

h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 560; line-height: 1.22; }
h1 { font-size: 21px; letter-spacing: -0.02em; }
h2 { font-size: 15px; letter-spacing: -0.012em; }
h3 { font-size: 14px; letter-spacing: -0.008em; }
p  { margin: 0 0 8px; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-firm);
    text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink-3); }

::selection { background: var(--ink); color: var(--bg); }
.glyph { vertical-align: -0.13em; flex: none; }
.mono { font-family: var(--mono); font-size: .92em; }

/* A single small-caps label style, used for every section heading. */
.eyebrow, .section-head h2, .past summary, .knob th {
  font-size: 11px; font-weight: 560; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- layout */

main { padding: 36px 24px 120px; }
.page   { max-width: 720px; margin: 0 auto; }
.narrow { max-width: 380px; margin: 0 auto; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 28px;
}
.page-head .sub { color: var(--ink-3); font-size: 13px; margin: 5px 0 0; }

.section { margin-top: 36px; }
.section-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.section-head .count {
  font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------------------------------------------------------- chrome */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  height: 52px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}

/* A wordmark, not a gradient square. */
.brand {
  color: var(--ink); font-weight: 600; font-size: 14.5px; letter-spacing: -0.026em;
  text-decoration: none; display: flex; align-items: baseline; gap: 1px;
}
.brand::after {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-3); align-self: center; margin-left: 3px;
}
.brand:hover::after { background: var(--ink); }
.brand .mark { display: none; }   /* templates still emit it; the wordmark stands alone */

.topbar nav { display: flex; gap: 3px; margin-right: auto; }
.topbar nav a {
  color: var(--ink-3); font-size: 13px; font-weight: 460; text-decoration: none;
  padding: 5px 9px; border-radius: var(--r); transition: color .12s, background .12s;
}
.topbar nav a:hover { color: var(--ink-2); background: var(--hover); }
.topbar nav a.current { color: var(--ink); background: var(--hover); }

.session { display: flex; align-items: center; gap: 6px; }
.who {
  color: var(--ink-3); font-size: 12px; max-width: 17ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


.mode-flag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 520; padding: 3px 8px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn); text-decoration: none;
}
.mode-flag::before { content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; }

/* --------------------------------------------------------------- surfaces */

/* Used sparingly. Most grouping is done with space and a single rule, because a page
   where everything is in a box has no hierarchy left to express with one. */
.card {
  background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px;
}
.card + .card { margin-top: 10px; }
.card.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.empty { padding: 44px 24px; text-align: center; }
.empty h2 { font-size: 15px; margin-bottom: 6px; }
.empty p { color: var(--ink-3); font-size: 13px; max-width: 44ch; margin: 0 auto; }
.empty .button, .empty form { margin-top: 18px; display: inline-flex; }
.empty-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-top: 18px; }
.empty-actions .button { margin-top: 0; }
.empty-line { color: var(--ink-3); font-size: 13px; padding: 20px 0; }

.notice, .error, .alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 14px; border-radius: var(--r); font-size: 13px; margin-bottom: 14px;
  line-height: 1.5;
}
.notice { background: var(--ok-bg);  color: var(--ok); }
.error  { background: var(--bad-bg); color: var(--bad); }
.alert  { background: var(--bad-bg); align-items: center; }
.alert strong { color: var(--bad); font-size: 13.5px; }
.alert .hint { margin: 2px 0 0; }
.alert .button { margin-left: auto; }
.notice { transition: opacity .5s ease, transform .5s ease; }
.notice.fading { opacity: 0; transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .notice { transition: none; } }

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

label, legend {
  display: block; color: var(--ink); font-size: 13px; font-weight: 520;
  margin: 0 0 7px; padding: 0;
}
.field + .field { margin-top: 20px; }
fieldset { border: 0; padding: 0; margin: 20px 0 0; }

input[type=email], input[type=text], input[type=number],
input[type=datetime-local], select, textarea {
  width: 100%; padding: 8px 11px;
  background: var(--sunken); color: var(--ink);
  border: 1px solid var(--line-firm); border-radius: var(--r);
  font: inherit; font-size: 13.5px;
  transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ink-3);
  box-shadow: 0 0 0 3px var(--hover);
}
::placeholder { color: var(--ink-3); }

/* The writing surface gets reading typography, not form typography. */
textarea { resize: vertical; min-height: 150px; }
#content {
  font-size: 15px; line-height: 1.65; padding: 14px 15px; min-height: 190px;
  background: var(--bg); border-color: var(--line);
}
#content:focus { border-color: var(--line-firm); box-shadow: none; }

.check {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; margin-bottom: 6px;
  background: var(--sunken); border: 1px solid var(--line);
  border-radius: var(--r); cursor: pointer; font-size: 13px;
  transition: border-color .12s, background .12s;
}
.check:hover { border-color: var(--line-firm); }
.check:has(input:checked) { border-color: var(--ink-3); background: var(--hover); color: var(--ink); }
.check input { width: auto; margin: 0; accent-color: var(--ink-2); }
.check .muted { margin-left: auto; font-size: 12px; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 32px; padding: 0 14px;
  background: var(--solid); color: var(--solid-ink);
  border: 1px solid transparent; border-radius: var(--r);
  font: inherit; font-size: 13px; font-weight: 520;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: opacity .12s, background .12s, border-color .12s;
}
button:hover, .button:hover { opacity: .88; color: var(--solid-ink); }
/* Both, because `button` and `.button` share the base rule and a bare <button>
   carries no `.button` class to hang the modifier on. */
button.large, .button.large { height: 38px; padding: 0 20px; font-size: 14px; }
button.small, .button.small { height: 27px; padding: 0 10px; font-size: 12.5px; }

.button.secondary {
  background: transparent; color: var(--ink); border-color: var(--line-firm);
}
.button.secondary:hover { background: var(--hover); opacity: 1; }

button.link, .link {
  height: 27px; padding: 0 8px; background: none; border: 1px solid transparent;
  color: var(--ink-3); font-size: 12.5px; font-weight: 460; text-decoration: none;
}
button.link:hover, .link:hover { color: var(--bad); background: var(--bad-bg); opacity: 1; }
.link.plain:hover { color: var(--ink); background: var(--hover); }

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

.inline { display: inline-flex; align-items: center; gap: 8px; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hint { color: var(--ink-3); font-size: 12.5px; margin: 7px 0 0; }
.muted { color: var(--ink-3); }
.fineprint { color: var(--ink-3); font-size: 12.5px; margin-top: 18px; }

.counter-row { display: flex; align-items: baseline; gap: 12px; min-height: 18px;
  margin-top: 8px; }
.counter { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--bad); }
.drafted { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.drafted .mono { color: var(--ink-2); }

/* ----------------------------------------------------------------- media */

.media-strip { margin-top: 10px; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumb { position: relative; margin: 0; line-height: 0; }
.thumb img {
  width: 72px; height: 72px; object-fit: cover; display: block;
  border-radius: var(--r); border: 1px solid var(--line);
}
.thumb .remove {
  position: absolute; top: -6px; right: -6px; width: 19px; height: 19px; padding: 0;
  border-radius: 50%; background: var(--ink); color: var(--bg);
  border: 2px solid var(--bg); font-size: 11px;
}
.thumb .remove:hover { background: var(--bad); color: #fff; opacity: 1; }
.dropzone {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink-3); font-size: 12.5px;
}
.dropzone input[type=file] { font-size: 12px; color: var(--ink-2); border: 0;
  background: none; padding: 0; width: auto; }

/* Drafting box on compose. */
.assist { border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--sunken); margin-bottom: 14px; }
.assist summary {
  cursor: pointer; padding: 11px 15px; font-size: 13px; font-weight: 500;
  color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px;
}
.assist summary::-webkit-details-marker { display: none; }
.assist summary::after { content: "+"; margin-left: auto; color: var(--ink-3); }
.assist[open] summary::after { content: "−"; }
.assist summary:hover { color: var(--ink); }
.assist form { padding: 0 15px 14px; }
.assist textarea { min-height: 76px; font-size: 13px; }
.assist .actions { margin-top: 11px; }

/* ------------------------------------------------------ waiting for things

   Three layers, so nothing can be added later WITHOUT feedback:

   1. The progress bar at the top of the page, driven from app.js on any htmx
      request at all — including ones nobody remembered to decorate.
   2. Any button htmx is using goes quiet and grows a spinner. This is a rule about
      `.htmx-request`, not about a particular form, so it covers every button in the
      app and every one added after this.
   3. A named `.working` sentence, for the few places where the wait is long enough
      that a spinner alone is not an explanation. */

.working { display: none; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
/* Descendant selectors, so they reach anything nested inside the form. `.working` is
   therefore reserved for a form's OWN busy sentence; a control that sits inside another
   form and waits on its own — the image prompt inside the compose form — uses `.busy`
   and drives it itself. Sharing one class meant scheduling a post announced that it was
   drawing a picture nobody asked for. */
form.htmx-request .working, form.submitting .working { display: inline-flex; }
form.htmx-request .idle-hint, form.submitting .idle-hint { display: none; }

.busy { display: none; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }

/* Any element htmx is requesting on, and any button inside a form that is. Buttons get
   a spinner in place of their own label's leading edge; everything else just dims. */
.htmx-request, form.htmx-request button, form.submitting button {
  cursor: progress;
}
button.htmx-request, form.htmx-request button, form.submitting button,
.htmx-request > button {
  opacity: .55;
  pointer-events: none;
}
button.htmx-request::before,
form.htmx-request button[type="submit"]::before,
form.submitting button[type="submit"]::before {
  content: ""; width: 11px; height: 11px; flex: none; border-radius: 50%;
  border: 1.5px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite;
}

.spinner {
  width: 11px; height: 11px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line-firm); border-top-color: var(--ink-2);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner, button::before { animation-duration: 2.4s; }
}

/* The page-wide one. Fixed, above everything, and only ever visible mid-request —
   its own transition is what makes a fast request read as a flicker rather than a
   glitch. */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--ink); z-index: 100;
  opacity: 0; pointer-events: none;
  transition: width .2s ease-out, opacity .2s ease-out;
}
#progress.on { opacity: 1; }

/* Billing state in the nav, only when it needs a decision. Colour is state here, the
   same as everywhere else: amber means something of yours needs attention. */
.plan-flag {
  font-size: 11px; font-weight: 560; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line-firm); color: var(--ink-2);
}
.plan-flag:hover { border-color: var(--ink-3); color: var(--ink); }
.head-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.head-actions form { display: contents; }

.plan-flag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

/* The dropzone speaks for its own input: htmx marks the <input>, which is invisible. */
.dropzone .uploading { display: none; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-2); }
.dropzone:has(input.htmx-request) .uploading { display: inline-flex; }
.dropzone:has(input.htmx-request) input { opacity: .4; pointer-events: none; }

/* ----------------------------------------------------------------- posts */

.post-list { list-style: none; padding: 0; margin: 0; }

/* Rules, not boxes. A list of bordered cards reads as a grid of unrelated things; a
   ruled list reads as one list, which is what it is. */
.post-card {
  position: relative; padding: 18px 0 18px 16px;
  border-top: 1px solid var(--line);
}
.post-list > .post-card:first-child { border-top: 0; }
.post-card::before {
  content: ""; position: absolute; left: 0; top: 22px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3);
}
.post-card.status-scheduled::before { background: var(--live); }
.post-card.status-published::before { background: var(--ok); }
.post-card.status-partial::before   { background: var(--warn); }
.post-card.status-failed::before    { background: var(--bad); }
.post-card.status-draft::before     { background: transparent;
  box-shadow: inset 0 0 0 1px var(--ink-3); }

.post-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 8px;
}
.post-when { font-size: 12px; color: var(--ink-3); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.post-when strong { color: var(--ink-2); font-weight: 520; }

.post-content {
  white-space: pre-wrap; overflow-wrap: anywhere; margin: 0;
  color: var(--ink); font-size: 14.5px; line-height: 1.62; max-width: var(--measure);
}
.post-content.placeholder { color: var(--ink-3); }

.post-bottom { display: flex; align-items: center; gap: 12px; margin-top: 12px;
  flex-wrap: wrap; }
.post-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }

/* State labels are the only coloured text on the page, so they carry weight. */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 560; letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink-3); background: none; padding: 0; border: 0;
}
.badge-scheduled { color: var(--live); }
.badge-published { color: var(--ok); }
.badge-partial   { color: var(--warn); }
.badge-failed    { color: var(--bad); }
.badge-agent     { color: var(--ink-2); }

.targets { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.target {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-3); background: none; border: 0; padding: 0;
}
.target .glyph { color: var(--ink-3); }
.target .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); flex: none; }
.target-published { color: var(--ok); }
.target-published .glyph, .target-published .dot { color: var(--ok); background: var(--ok); }
.target-published .glyph { background: none; }
.target-failed { color: var(--bad); }
.target-failed .glyph { color: var(--bad); }
.target-failed .dot { background: var(--bad); }
.target a { color: inherit; text-decoration-color: currentColor; opacity: .8; }
.target-error { font-size: 12.5px; color: var(--bad); margin: 10px 0 0; }

.thumbs.small { margin-top: 10px; }
.thumbs.small img {
  width: 46px; height: 46px; object-fit: cover; display: block;
  border-radius: 4px; border: 1px solid var(--line);
}

/* Earlier: collapsed, quiet, never in the way. Scoped to the element it is written for:
   as a bare `.past` it also matched the calendar's past days and pushed every week row
   down by 44px. */
details.past { margin-top: 44px; border-top: 1px solid var(--line); }
.past summary {
  cursor: pointer; list-style: none; padding: 15px 0;
  display: flex; align-items: center; gap: 10px;
}
.past summary::-webkit-details-marker { display: none; }
.past summary::after { content: "+"; margin-left: auto; letter-spacing: 0; font-size: 13px; }
.past[open] summary::after { content: "−"; }
.past summary:hover { color: var(--ink-2); }
.past summary .badge { text-transform: uppercase; }
.past .post-list { padding-bottom: 10px; }

/* A drawer, closed by default: one body going everywhere is the normal case and should
   stay the simplest thing on the page. */
.variant { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; }
.variant summary { list-style: none; cursor: pointer; padding: 9px 12px; }
.variant summary::-webkit-details-marker { display: none; }
.variant[open] summary { border-bottom: 1px solid var(--line); }
.variant .check.inline { margin: 0; padding: 0; border: 0; background: none;
  font-size: 12.5px; color: var(--ink-2); }
.variant.live summary { color: var(--ink); }
.variant textarea { border: 0; border-radius: 0; background: none; }
.variant .counter-row { padding: 0 12px 9px; margin: 0; }

/* Not an error until they press Schedule — but not a surprise then either. */
.overflow { color: var(--warn); font-size: 12px; }

/* ------------------------------------------------------------------ plan */

/* Cards, not rules — unlike the dashboard these genuinely are separate things awaiting
   separate decisions, and the boundary is the point. */
.alert.quiet { border-color: var(--line); background: var(--raised); }
.alert.quiet strong { color: var(--ink); }

.plan-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.plan-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px 16px 13px;
  background: var(--bg);
}
.plan-card.done { background: var(--raised); border-color: transparent; }

.plan-angle {
  font-size: 11.5px; color: var(--ink-3); line-height: 1.45; margin: 0 0 10px;
}
.plan-card.done .plan-angle { display: none; }

.plan-body { margin: 0 0 12px; white-space: pre-wrap; line-height: 1.55; color: var(--ink-2); }
.plan-body-edit {
  width: 100%; margin-bottom: 10px; line-height: 1.55; resize: vertical;
}

/* Deliberately not a skeleton shimmer: a spinner and a sentence say a request is in
   flight, where a grey rectangle looks like content that failed to arrive. */
.plan-writing {
  display: flex; align-items: center; gap: 9px; padding: 18px 0 20px;
  font-size: 12.5px; color: var(--ink-3);
}

.plan-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-foot input[type="datetime-local"] { width: auto; flex: none; }
.plan-foot button { margin-left: auto; }
.plan-foot .muted { font-size: 12px; color: var(--ink-3); }
.plan-targets { display: inline-flex; gap: 7px; color: var(--ink-3); }

.plan-revise {
  display: flex; align-items: center; gap: 12px;
  margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line);
}
.plan-revise form:first-child { display: flex; gap: 8px; flex: 1; align-items: center; }
.plan-revise input { flex: 1; font-size: 12.5px; padding: 6px 9px; }
.plan-revise form.htmx-request input { opacity: .5; }

input.narrow-field { width: 90px; }

/* -------------------------------------------------------------- accounts */

.account-list { list-style: none; padding: 0; margin: 0; }
.account-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.account-list > .account-row:first-child { border-top: 0; }
.account-mark {
  width: 30px; height: 30px; border-radius: 7px; flex: none; display: grid;
  place-items: center; background: var(--hover); color: var(--ink-3);
}
.account-row.connected .account-mark { color: var(--ink); }
.account-row.broken .account-mark { background: var(--bad-bg); color: var(--bad); }
.account-meta { min-width: 0; }
.account-meta strong { color: var(--ink); font-size: 13.5px; font-weight: 520; }
.account-meta .hint { margin: 2px 0 0; }
.account-row form, .account-row .button { margin-left: auto; }
.reconnect-note { font-size: 12.5px; color: var(--bad); margin: 5px 0 0; }

/* ------------------------------------------------------------ onboarding */

.onboard-head { text-align: center; margin-bottom: 30px; }
.onboard-head h1 { font-size: 23px; letter-spacing: -0.03em; }
.onboard-head .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 7px; }
.onboard-list { list-style: none; padding: 0; margin: 0; }
.onboard-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.onboard-list > .onboard-step:first-child { border-top: 0; }
.onboard-mark {
  width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid;
  place-items: center; color: var(--ink-3); border: 1px solid var(--line-firm);
}
.onboard-step.done .onboard-mark { color: var(--ok); border-color: var(--ok); }
.onboard-body { min-width: 0; flex: 1; }
.onboard-body h2 { font-size: 14px; font-weight: 520; margin-bottom: 4px; }
.onboard-body .hint { margin: 0; }
.onboard-step .button, .onboard-status { margin-left: auto; flex: none; }
.onboard-status { font-size: 12px; color: var(--ok); font-weight: 500; padding-top: 4px; }
.onboard-tz { display: flex; gap: 8px; margin-top: 11px; }
.onboard-tz select { width: auto; flex: 1; }
.onboard-footer { margin-top: 28px; text-align: center; }
.onboard-footer .hint { margin-top: 11px; }

/* ----------------------------------------------------------- auth, error */

.hero { padding-top: 72px; text-align: center; }
.hero .logo { display: none; }
.hero h1 { font-size: 26px; letter-spacing: -0.035em; margin-bottom: 10px; }
.hero .mark {
  display: inline-block; font-size: 26px; font-weight: 600; letter-spacing: -0.04em;
  color: var(--ink-3); margin-bottom: 14px;
}
.hero .lede { color: var(--ink-3); font-size: 14px; margin: 0 auto 30px; max-width: 34ch; }
.hero .card { text-align: left; }
.hero .card button { width: 100%; margin-top: 16px; }

/* ------------------------------------------------------------- dev, misc */

.knob { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.knob th, .knob td { text-align: left; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.knob select { width: auto; padding: 4px 7px; font-size: 12.5px; }

.voice-list { list-style: none; padding: 0; margin: 14px 0 0; }
.voice-list li {
  display: flex; gap: 14px; padding: 10px 0; font-size: 12.5px; line-height: 1.55;
  border-top: 1px solid var(--line);
}
.voice-list li:first-child { border-top: 0; }
.voice-meta { flex: none; width: 11ch; text-align: right; color: var(--ink-3);
  font-variant-numeric: tabular-nums; font-size: 11.5px; padding-top: 1px; }
.voice-text { color: var(--ink-2); overflow-wrap: anywhere; }

/* ------------------------------------------------------------- marketing */

.marketing { max-width: 880px; margin: 0 auto; }

.lp-hero { text-align: center; padding: 84px 0 0; }
.eyebrow { display: inline-block; margin-bottom: 26px; }
.lp-hero h1 {
  font-size: clamp(38px, 6.4vw, 58px); line-height: 1.02; letter-spacing: -0.042em;
  font-weight: 580; margin-bottom: 22px;
}
.lp-lede { color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 52ch;
  margin: 0 auto 30px; }
.lp-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.lp-shot {
  position: relative; margin: 60px auto 0; max-width: 660px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--raised);
  overflow: hidden;
}
.lp-shot::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 96px;
  background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none;
}
.lp-shot-bar { display: flex; gap: 6px; padding: 12px 15px;
  border-bottom: 1px solid var(--line); }
.lp-shot-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-firm); }
.lp-shot .post-list { padding: 4px 18px 18px; }

/* The exchange above the cards: what you said, what it said back. Two lines, because
   the point is how little you have to type — a long fake transcript would argue the
   opposite of the headline. */
.lp-thread { padding: 16px 18px 4px; display: grid; gap: 8px; }
.lp-said {
  font-size: 13px; line-height: 1.55; color: var(--ink);
  background: var(--sunken); border-radius: var(--r);
  padding: 9px 11px; margin: 0 0 0 auto; max-width: 82%;
}
.lp-replied {
  font-size: 13px; color: var(--ink-2); margin: 0;
  display: flex; align-items: baseline; gap: 7px;
}
.lp-replied .glyph { color: var(--ink-3); }

.lp-section { padding: 96px 0 0; }
.lp-h2 { font-size: clamp(23px, 3.2vw, 30px); letter-spacing: -0.032em; font-weight: 570;
  margin-bottom: 16px; max-width: 22ch; }
.lp-body { color: var(--ink-2); font-size: 15.5px; max-width: 58ch; line-height: 1.65; }

.lp-steps { list-style: none; padding: 0; margin: 40px 0 0; }
.lp-steps li { display: flex; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.lp-steps h3 { font-size: 14.5px; font-weight: 540; margin-bottom: 5px; }
.lp-steps p { color: var(--ink-3); font-size: 14px; max-width: 60ch; margin: 0; }
.step-n {
  width: 22px; flex: none; color: var(--ink-3); font-size: 12px; font-weight: 560;
  font-variant-numeric: tabular-nums; padding-top: 2px;
}

.lp-rule { margin-top: 44px; padding: 24px 0 0; border-top: 1px solid var(--line-firm); }
.lp-rule h3 { font-size: 16px; font-weight: 560; margin-bottom: 8px; }
.lp-rule p { color: var(--ink-2); font-size: 14px; margin: 0; max-width: 64ch; }

/* Two columns, because there are four of these. auto-fit at 260px gave three and left
   the fourth alone on a row of its own — a column count the items do not fill reads as
   something missing rather than something finished. */
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 0 44px; margin-top: 38px; }
.lp-grid > div { padding: 22px 0; border-top: 1px solid var(--line); }
.lp-grid h3 { font-size: 14px; font-weight: 540; margin-bottom: 6px; }
.lp-grid p { color: var(--ink-3); font-size: 13.5px; margin: 0; line-height: 1.6; }

.lp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0; margin: 40px 0 22px; border-top: 1px solid var(--line); }
.plan { position: relative; padding: 30px 28px 30px 0; }
.plan + .plan { border-left: 1px solid var(--line); padding-left: 28px; }
.plan-tag { position: absolute; top: 12px; right: 0; font-size: 11px; font-weight: 540;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.plan h3 { font-size: 14px; font-weight: 540; margin-bottom: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .07em; font-size: 11px; }
.plan-price { font-size: 36px; font-weight: 580; letter-spacing: -0.04em; margin: 0 0 8px;
  color: var(--ink); }
.plan-price span { font-size: 14px; font-weight: 450; color: var(--ink-3);
  letter-spacing: 0; }
.plan-for { color: var(--ink-3); font-size: 13.5px; margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.plan li { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px;
  color: var(--ink-2); }
.plan li::before { content: "—"; color: var(--ink-3); flex: none; }
.plan li.highlight { color: var(--ink); font-weight: 500; }
.plan li.highlight::before { content: "—"; color: var(--ink); }
.plan .button { width: 100%; }

.lp-footer {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 110px; padding: 26px 0 0; border-top: 1px solid var(--line); font-size: 13px;
}
.lp-footer .muted { margin-right: auto; font-size: 12.5px; }

@media (max-width: 640px) {
  main { padding: 22px 16px 80px; }
  .topbar { gap: 12px; padding: 0 14px; }
  .topbar nav a { padding: 5px 6px; font-size: 12.5px; }
  .who { display: none; }
  .lp-hero { padding-top: 44px; }
  .lp-section { padding-top: 60px; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .plan { padding-right: 0; }
}

.onboard-alt { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; }

/* Where someone points us at their own profile, for a platform whose API will not
   hand their posts back. Deleted with the rest of that workaround. */
.profile-url { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.profile-url h3 { display: flex; align-items: center; gap: 7px; font-size: 14px;
  font-weight: 540; margin-bottom: 5px; }
.profile-url .hint { margin: 0 0 10px; max-width: 62ch; }
.url-row { display: flex; gap: 8px; }
.url-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-firm);
  border-radius: var(--r); padding: 7px 10px;
}
.url-row input:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }

/* Where a plan is needed and is not there. Deliberately not a modal: the post is still
   being written behind it, and a dialog demanding money over the top of someone's own
   words is a worse experience than a clear sentence where the button used to be. */
.paywall {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid var(--line-firm); border-radius: var(--r-lg);
  background: var(--sunken);
}
.paywall p { margin: 0; flex: 1 1 22ch; font-size: 13.5px; color: var(--ink-2); }
.paywall strong { color: var(--ink); }

/* Sign-in: one road or the other, with the divider saying so. */
.button.wide { width: 100%; }
.or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--ink-3); font-size: 12px;
}
.or::before, .or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* The paywall, as a dialog rather than a page. Whatever someone was doing is still
   behind it, which is the point: this is an offer interrupting a task, not a failure
   replacing one. */
.paywall-dialog {
  border: 1px solid var(--line-firm); border-radius: 14px;
  padding: 30px 30px 24px; max-width: 440px; width: calc(100vw - 32px);
  background: var(--bg); color: var(--ink-2);
  box-shadow: 0 24px 60px -12px rgba(11, 11, 12, .28);
}
/* Darker than a normal scrim. The page behind is meant to be legible — it is the
   argument — but the offer has to be the thing in focus. */
.paywall-dialog::backdrop { background: rgba(11, 11, 12, .46); }
.paywall-dialog h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 570; letter-spacing: -0.015em; margin-bottom: 10px;
}
.paywall-dialog p { font-size: 14px; line-height: 1.6; margin: 0 0 18px; max-width: 46ch; }
.paywall-dialog .fineprint { margin: 14px 0 0; }
.paywall-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* The one state where the way out should be the loudest thing on the page: connected,
   readable, and nothing read yet. */
.voice-invite {
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px; flex-wrap: wrap;
  border: 1px solid var(--line-firm); border-radius: var(--r-lg);
  padding: 20px 22px; margin-bottom: 18px; background: var(--raised);
}
.voice-invite h2 { font-size: 16px; font-weight: 560; margin-bottom: 5px; }
.voice-invite .hint { margin: 0; max-width: 54ch; }

/* ----------------------------------------------------------------- plan */

.plan-box { display: grid; gap: 12px; }
.plan-now { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.plan-now .k {
  display: block; font-size: 10.5px; font-weight: 560; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px;
}
.plan-name { font-size: 17px; font-weight: 560; color: var(--ink); }
.plan-box .hint { margin: 0; max-width: 52ch; }
.plan-box form.inline { display: inline-block; margin-right: 8px; }

/* --------------------------------------------------------- conversation */

/* Rail on the left, board on the right. The rail is fixed-width because it holds
   sentences and the board is fluid because it holds posts — the reverse would set the
   post width from the length of whatever the agent last said. */
.conversation { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }

.rail {
  position: sticky; top: 68px;
  display: grid; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--raised); padding: 16px;
  max-height: calc(100vh - 96px); overflow-y: auto;
}

.turn { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.6; }
.turn p { margin: 0; }
.turn-user {
  color: var(--ink); background: var(--sunken);
  padding: 9px 11px; border-radius: var(--r); align-self: end;
  max-width: 92%; margin-left: auto;
}
.turn-agent { color: var(--ink-2); padding: 2px 0; }
.turn-agent .who { flex: none; color: var(--ink-3); padding-top: 3px; }
/* A question is the one turn that wants an answer, so it is the one that gets weight. */
.turn.asking p { color: var(--ink); font-weight: 500; }

.say { display: grid; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.say textarea {
  width: 100%; resize: vertical; font: inherit; font-size: 13.5px;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-firm); border-radius: var(--r); padding: 8px 10px;
}
.say textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }
.say-status { min-height: 16px; font-size: 12px; }
.rail:has(.say .htmx-request) .idle-hint { display: none; }
.rail:has(.say .htmx-request) .working { display: inline-flex; }

.board { min-width: 0; }
.board .plan-cards { margin: 0; }
.board-empty {
  border: 1px dashed var(--line-firm); border-radius: var(--r-lg);
  padding: 40px 28px; text-align: center; color: var(--ink-3);
}
.board-empty p { margin: 0 0 6px; }

@media (max-width: 900px) {
  .conversation { grid-template-columns: 1fr; }
  /* Unstuck and unbounded on narrow screens: a sticky rail with its own scrollbar
     inside a page that also scrolls is two scrollbars and no way to read either. */
  .rail { position: static; max-height: none; }
}

/* ------------------------------------------------------- generated images */

.imagine { display: flex; gap: 8px; margin-top: 10px; }
.imagine input {
  flex: 1; min-width: 0;
  /* Matches the other text inputs; declared here rather than reused because the strip
     is swapped as a fragment and must not depend on a parent form's styling. */
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-firm); border-radius: var(--r); padding: 7px 10px;
}
.imagine input:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }
.imagine button { flex: none; }

/* The working state belongs to the form's sibling, so it survives the form being
   disabled mid-request. Same show/hide rule as the drafting box. */
.imagine-status { margin-top: 7px; min-height: 17px; }
.media-strip:has(.imagine .htmx-request) .idle-hint { display: none; }
.media-strip:has(.imagine .htmx-request) .busy { display: inline-flex; }

.thumb .made {
  position: absolute; left: 5px; bottom: 5px;
  font-size: 9.5px; font-weight: 560; letter-spacing: .06em;
  padding: 2px 5px; border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--ink-2); backdrop-filter: blur(6px);
}

/* ----------------------------------------------------------------- legal */

/* Long-form prose, which nothing else in the app is: a narrower measure than the
   marketing page, and headings that space a document rather than a dashboard. */

.legal { max-width: 640px; margin: 0 auto; padding: 30px 0 0; }
.legal h1 { font-size: clamp(25px, 3.6vw, 32px); letter-spacing: -0.035em; }
.legal-date { color: var(--ink-3); font-size: 12.5px; margin: 10px 0 34px; }
.legal-lede { font-size: 15.5px; color: var(--ink-2); line-height: 1.65;
  margin-bottom: 8px; }
.legal h2 { font-size: 14.5px; font-weight: 560; margin: 38px 0 12px;
  padding-top: 22px; border-top: 1px solid var(--line); }
.legal p, .legal li { color: var(--ink-2); font-size: 14.5px; line-height: 1.68; }
.legal p { margin-bottom: 14px; }
.legal ul { padding-left: 19px; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--ink-3); }
.legal strong { color: var(--ink); font-weight: 540; }

.legal-nav {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13px;
}
.legal-nav .muted { margin-right: auto; font-size: 12.5px; }

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

.month-nav { display: flex; gap: 6px; flex: none; }

.cal { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line); background: var(--sunken);
}
.cal-head span {
  padding: 9px 10px; font-size: 11px; font-weight: 560; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3);
}
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week + .cal-week { border-top: 1px solid var(--line); }

/* Each square is a form whose submit button fills it, so the entire day is clickable
   without wrapping interactive post links inside another link. */
.cal-day {
  position: relative; min-height: 104px; padding: 7px 8px;
  display: flex; flex-direction: column; gap: 3px;
  border-left: 1px solid var(--line);
}
.cal-day:first-child { border-left: 0; }
.cal-hit {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  background: none; border: 0; border-radius: 0; cursor: pointer; z-index: 0;
}
.cal-hit:hover { background: var(--hover); opacity: 1; }
.cal-hit:focus-visible { outline-offset: -2px; }

.cal-num {
  position: relative; z-index: 1; pointer-events: none;
  font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums;
  align-self: flex-start;
}
.cal-day.outside { background: var(--sunken); }
.cal-day.outside .cal-num { opacity: .45; }
.cal-day.past .cal-num { opacity: .6; }
.cal-day.today .cal-num {
  color: var(--solid-ink); background: var(--solid);
  width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; font-weight: 560; margin: -2px 0 0 -3px;
}

.cal-post {
  position: relative; z-index: 1;
  display: flex; align-items: baseline; gap: 6px;
  padding: 3px 6px; border-radius: 4px; background: var(--hover);
  font-size: 11.5px; line-height: 1.35; text-decoration: none; color: var(--ink-2);
  border-left: 2px solid var(--ink-3);
  overflow: hidden;
}
.cal-post:hover { background: var(--line); color: var(--ink); }
.cal-post.status-scheduled { border-left-color: var(--live); }
.cal-post.status-published { border-left-color: var(--ok); }
.cal-post.status-partial   { border-left-color: var(--warn); }
.cal-post.status-failed    { border-left-color: var(--bad); }
.cal-time { flex: none; color: var(--ink-3); font-variant-numeric: tabular-nums;
  font-size: 10.5px; }
.cal-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { position: relative; z-index: 1; pointer-events: none;
  font-size: 10.5px; color: var(--ink-3); padding-left: 6px; }

.cal-key { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px;
  font-size: 11.5px; color: var(--ink-3); }
.key-item { display: inline-flex; align-items: center; gap: 6px; }
.key-item .k { width: 8px; height: 2px; border-radius: 2px; background: var(--ink-3); }
.key-item .k.status-scheduled { background: var(--live); }
.key-item .k.status-published { background: var(--ok); }
.key-item .k.status-partial   { background: var(--warn); }
.key-item .k.status-failed    { background: var(--bad); }

@media (max-width: 760px) {
  .cal-day { min-height: 74px; padding: 5px 5px; }
  .cal-text { display: none; }
  .cal-post { padding: 2px 4px; }
}

.voice-list li form { margin-left: auto; flex: none; }
.voice-cutoff {
  display: block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); padding: 14px 0 6px; border-top: 1px solid var(--line-firm);
}
.voice-list li.spare .voice-text, .voice-list li.spare .voice-meta { opacity: .55; }

.voice-meta.own {
  color: var(--ink); font-weight: 560; letter-spacing: .01em;
}

/* The one-line answer to "is this working yet". Colour is state, so it only goes green
   once there is genuinely enough here to imitate. */
.voice-state {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--sunken);
  margin-bottom: 18px; font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
}
.voice-state .dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 6px;
  background: var(--ink-3);
}
.voice-state.ready .dot { background: var(--ok); }
.voice-state strong { color: var(--ink); font-weight: 560; }

.voice-add textarea { min-height: 118px; }
.voice-add-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px;
}
.voice-add-foot button { margin-left: auto; }

.excluded { margin-top: 16px; }
.excluded summary {
  cursor: pointer; list-style: none; font-size: 11.5px; color: var(--ink-3);
  padding: 8px 0; letter-spacing: .04em; text-transform: uppercase; font-weight: 540;
}
.excluded summary::-webkit-details-marker { display: none; }
.excluded summary::after { content: " +"; }
.excluded[open] summary::after { content: " −"; }
.excluded summary:hover { color: var(--ink-2); }
.excluded .voice-text { opacity: .6; }
