/* Postmstr design system — Phase 5.

   Platform names are never rendered with text-transform: capitalize, because
   that turns "tiktok" into "Tiktok" and "linkedin" into "Linkedin". Display
   names come from PLATFORM_LABELS in engine/prompts.py instead. */

:root {
  --sh-bg: #F6F5FF;
  --sh-surface: #FFFFFF;
  --sh-ink: #13111E;
  --sh-muted: #6B6880;
  --sh-border: #E4E0F5;
  --sh-primary: #7C3AED;
  --sh-primary-hover: #6D28D9;
  --sh-accent: #FF4F7B;
  --sh-mint: #10D9A0;

  --sh-ig: #E1306C; --sh-ig-bg: #FFF0F5; --sh-ig-dk: #8B1640;
  --sh-tt-bg: #EBEBEB; --sh-tt-dk: #111111;
  --sh-li: #0A66C2; --sh-li-bg: #E8F0FB; --sh-li-dk: #0A4A8C;
  --sh-fb: #1877F2; --sh-fb-bg: #E8F0FD; --sh-fb-dk: #0E55B8;
  --sh-x-bg: #E8E8E8; --sh-x-dk: #111111;
  --sh-pi: #E60023; --sh-pi-bg: #FFF0F0; --sh-pi-dk: #8B0014;

  --sh-radius: 12px;
  --sh-radius-sm: 10px;
  /* 0.5px reads as a true hairline on retina and rounds up to 1px elsewhere. */
  --sh-hairline: 0.5px solid var(--sh-border);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sh-bg);
  color: var(--sh-ink);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--sh-ink);
}

h1 { font-size: 1.75rem; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 .5rem; }

a { color: var(--sh-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--sh-muted); }
.small { font-size: .8125rem; }

/* ── Layout ────────────────────────────────────────────────────────────── */

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main.wrap { padding-top: 2rem; padding-bottom: 4rem; }

/* ── Nav ───────────────────────────────────────────────────────────────── */

.nav {
  background: var(--sh-surface);
  border-bottom: var(--sh-hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 60px;
}

.wordmark {
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--sh-ink);
}
.wordmark:hover { text-decoration: none; }
.wordmark em { font-style: normal; color: var(--sh-primary); }

/* The gap is pushed here rather than onto the wordmark's margin-right, so the
   switcher can sit next to the wordmark and the links still go right whether
   or not a switcher is rendered. */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--sh-muted);
}
.nav-links a:hover { color: var(--sh-ink); text-decoration: none; }

/* The muted link colour above outspecifies .btn, which would leave the nav's
   call to action grey-on-violet. Put white back for the button only. */
.nav-links a.btn { color: #fff; }
.nav-links a.btn:hover { color: #fff; background: var(--sh-primary-hover); }

/* ── Business switcher ─────────────────────────────────────────────────── */

.biz-switch { position: relative; }

.biz-switch summary {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .6rem;
  border: var(--sh-hairline);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sh-ink);
  cursor: pointer;
  list-style: none;  /* Safari and Firefox both need telling. */
}
.biz-switch summary::-webkit-details-marker { display: none; }
.biz-switch summary:hover { border-color: var(--sh-primary); }

.biz-name {
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.biz-switch .chev { color: var(--sh-muted); flex: none; }
.biz-switch[open] .chev { transform: rotate(180deg); }

.biz-menu {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  z-index: 20;
  min-width: 220px;
  padding: .3rem;
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
  box-shadow: 0 8px 24px rgba(19, 17, 30, .12);
}

/* One rule for both, because the list holds form buttons and an anchor and
   they must not look like two different kinds of thing. */
.biz-menu .biz-item {
  display: block;
  width: 100%;
  padding: .45rem .6rem;
  border: 0;
  border-radius: var(--sh-radius-sm);
  background: none;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--sh-ink);
  cursor: pointer;
}
.biz-menu .biz-item:hover { background: var(--sh-bg); text-decoration: none; }
.biz-menu .biz-item.current { font-weight: 600; color: var(--sh-primary); }

.biz-menu .biz-add {
  margin-top: .2rem;
  border-top: var(--sh-hairline);
  border-radius: 0 0 var(--sh-radius-sm) var(--sh-radius-sm);
  color: var(--sh-muted);
}
.biz-menu .biz-add:hover { color: var(--sh-ink); }

@media (max-width: 560px) {
  .nav-inner { height: auto; padding: .75rem 0; flex-wrap: wrap; gap: .75rem; }
  .nav-links { gap: .9rem; width: 100%; }
  /* The wordmark and switcher share the first row; the links wrap under. */
  .biz-switch { order: 1; }
  .nav-links { order: 2; margin-left: 0; }
  .biz-menu { min-width: 200px; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  padding: 11px 18px;
  border-radius: var(--sh-radius-sm);
  border: 0.5px solid transparent;
  background: var(--sh-primary);
  color: #fff;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--sh-primary-hover); text-decoration: none; color: #fff; }

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

.btn.pill { border-radius: 999px; padding: 9px 16px; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger:hover { background: var(--sh-surface); border-color: var(--sh-accent); color: var(--sh-accent); }

.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

.field { display: block; margin-top: 1.25rem; }
.field > .label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: .4rem;
}
.field .optional { font-weight: 400; color: var(--sh-muted); }
.field .hint { display: block; font-size: 13px; color: var(--sh-muted); margin-top: .35rem; }

input[type=text], input[type=email], input[type=password], input[type=date],
textarea, select {
  width: 100%;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius-sm);
  padding: 13px 16px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  color: var(--sh-ink);
}
input::placeholder, textarea::placeholder { color: var(--sh-muted); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--sh-primary);
}

select {
  appearance: none;
  /* Inline chevron: a data URI keeps this a single self-contained stylesheet. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6880' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}

.check {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: 14px;
  cursor: pointer;
}
.check input { width: auto; margin: 0; accent-color: var(--sh-primary); }

/* Password reveal. The button sits inside the input's right edge, so the input
   reserves room for it — otherwise a long password runs underneath the icon. */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--sh-radius-sm);
  color: var(--sh-muted);
  cursor: pointer;
}
.pw-toggle:hover { color: var(--sh-ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--sh-primary); outline-offset: -2px; }
.pw-toggle svg { display: block; width: 20px; height: 20px; }
/* Outspecifies the rule above, which would otherwise show both icons at once. */
.pw-toggle svg[hidden] { display: none; }

/* Sits under the password field, right-aligned against it. */
.field-link { display: block; margin-top: .5rem; font-size: 13px; text-align: right; }

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
  padding: 1.25rem;
  margin: 1.25rem 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.flash {
  background: var(--sh-surface);
  border: 0.5px solid var(--sh-accent);
  border-left: 3px solid var(--sh-accent);
  border-radius: var(--sh-radius-sm);
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  font-size: 14px;
}

/* ── Pricing table ─────────────────────────────────────────────────────── */

table.pricing {
  width: 100%;
  margin: 1.25rem 0 0;
  border-collapse: collapse;
  font-size: 14px;
}

table.pricing th,
table.pricing td {
  padding: .7rem .5rem;
  border-top: var(--sh-hairline);
  text-align: left;
  vertical-align: top;
}

table.pricing th {
  width: 8.5rem;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
}

table.pricing td { color: var(--sh-muted); }

table.pricing .price {
  width: 6rem;
  text-align: right;
  font-weight: 600;
  color: var(--sh-ink);
  white-space: nowrap;
}

/* The add-on is indented off the plans above it — it is bought alongside one
   of them, not instead of one. */
table.pricing .addon th { padding-left: 1rem; color: var(--sh-muted); }

@media (max-width: 560px) {
  table.pricing th { width: auto; }
  table.pricing .price { width: auto; }
}

/* ── Platform chips ────────────────────────────────────────────────────── */

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
  white-space: nowrap;
}
.chip.instagram { background: var(--sh-ig-bg); color: var(--sh-ig-dk); }
.chip.facebook  { background: var(--sh-fb-bg); color: var(--sh-fb-dk); }
.chip.tiktok    { background: var(--sh-tt-bg); color: var(--sh-tt-dk); }
.chip.linkedin  { background: var(--sh-li-bg); color: var(--sh-li-dk); }
.chip.x         { background: var(--sh-x-bg);  color: var(--sh-x-dk); }
.chip.pinterest { background: var(--sh-pi-bg); color: var(--sh-pi-dk); }

.dot {
  display: inline-block;
  width: .5rem; height: .5rem;
  border-radius: 50%;
  margin: 0 .12rem .12rem 0;
}
.dot.instagram { background: var(--sh-ig); }
.dot.facebook  { background: var(--sh-fb); }
.dot.tiktok    { background: var(--sh-tt-dk); }
.dot.linkedin  { background: var(--sh-li); }
.dot.x         { background: var(--sh-x-dk); }
.dot.pinterest { background: var(--sh-pi); }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  border: 0.5px solid;
}
.badge.draft     { color: var(--sh-muted); border-color: var(--sh-border); background: var(--sh-bg); }
.badge.scheduled { color: var(--sh-primary); border-color: var(--sh-primary); background: #F3EDFF; }
.badge.published { color: #04795A; border-color: var(--sh-mint); background: #E7FBF5; }
/* Handed to Metricool — further along than 'scheduled', not yet 'published'. */
.badge.external  { color: #04795A; border-color: var(--sh-mint); background: #E7FBF5; }

/* ── Tabs ──────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.25rem 0;
}
.tabs button {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 999px;
  border: var(--sh-hairline);
  background: var(--sh-surface);
  color: var(--sh-ink);
  cursor: pointer;
}
.tabs button[aria-selected="true"] {
  background: var(--sh-primary);
  border-color: var(--sh-primary);
  color: #fff;
}

/* ── Post cards ────────────────────────────────────────────────────────── */

.post {
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
  margin: .75rem 0;
  overflow: hidden;
}

.post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: 1.25rem 1.25rem .5rem;
}

.post-title {
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin: 0 1.25rem .35rem;
}

.post-body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--sh-muted);
  white-space: pre-wrap;
  padding: 0 1.25rem 1.25rem;
  margin: 0;
}

/* The action row sits along the bottom behind a hairline, per the spec. */
.post-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  border-top: var(--sh-hairline);
  padding: .75rem 1.25rem;
}
.post-actions form { margin: 0; display: inline-flex; gap: .4rem; align-items: center; }
.post-actions input[type=date] { padding: 6px 10px; font-size: 13px; width: auto; }
.post-actions .note { font-size: 12px; color: var(--sh-muted); }

/* ── Calendar ──────────────────────────────────────────────────────────── */

table.calendar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
  margin-top: 1rem;
}
table.calendar th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--sh-muted);
  padding: .35rem;
  text-align: left;
  font-weight: 600;
}
table.calendar td {
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius-sm);
  vertical-align: top;
  height: 4.25rem;
  padding: 0;
  font-size: 13px;
}
table.calendar td.empty { background: transparent; border-color: transparent; }
table.calendar td.today { border: 1px solid var(--sh-primary); }
table.calendar td button {
  all: unset;
  cursor: pointer;
  display: block;
  width: 100%;
  height: 100%;
  padding: .45rem;
  box-sizing: border-box;
}
table.calendar td button:focus-visible { outline: 2px solid var(--sh-primary); }
.daynum { font-weight: 600; font-size: 12px; color: var(--sh-ink); }

.month-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.month-nav h2 { margin: 0 auto 0 0; }
.month-nav a { font-size: 14px; font-weight: 500; }

/* ── Misc ──────────────────────────────────────────────────────────────── */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .6rem;
  margin-top: .5rem;
}
.platform-opt {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius-sm);
  padding: 11px 14px;
  cursor: pointer;
}
.platform-opt:has(input:checked) { border-color: var(--sh-primary); }
.platform-opt input { width: auto; margin: 0; accent-color: var(--sh-primary); }

fieldset { border: 0; padding: 0; margin: 1.25rem 0 0; }
fieldset legend { font-size: 14px; font-weight: 600; padding: 0; }

.idea {
  border-top: var(--sh-hairline);
  padding: .9rem 0;
}
.idea:first-of-type { border-top: 0; }
.idea h4 {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 .3rem;
}
.idea p { margin: .25rem 0; font-size: 13px; color: var(--sh-muted); }
.idea .idea-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--sh-ink);
}

/* ── Dashboard sections ────────────────────────────────────────────────── */

/* The dashboard is one long page now, so each section needs air above it and a
   rule to read against — otherwise six stacked headings all look like one list. */
main.wrap > section {
  border-top: var(--sh-hairline);
  margin-top: 2.5rem;
  padding-top: .5rem;
  /* #calendar, #generate and #performance are all jumped to from links and
     buttons; a little headroom stops the heading hugging the viewport top. */
  scroll-margin-top: 1rem;
}
main.wrap > section:first-of-type { border-top: 0; }

.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.dash-head h1 { margin-bottom: .25rem; }

.runs {
  margin: .3rem 0 0;
  font-size: 13px;
  color: var(--sh-muted);
  white-space: nowrap;
}
.runs strong { color: var(--sh-ink); }

.badge.pro {
  color: #fff;
  background: var(--sh-primary);
  border-color: var(--sh-primary);
  padding: 4px 12px;
  font-size: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-head h2 { margin-bottom: .5rem; }
.section-head form { margin: 0; }
.section-head select {
  width: auto;
  padding: 7px 34px 7px 12px;
  font-size: 13px;
  background-position: right 12px center;
}

/* ── Stat boxes ────────────────────────────────────────────────────────── */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-top: 1rem;
}
.stat {
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
  padding: 1.1rem 1.25rem;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--sh-muted);
  margin-top: .3rem;
}
@media (max-width: 520px) {
  .stat-row { grid-template-columns: 1fr; }
  .stat { text-align: left; }
}

/* Four short inputs side by side, collapsing to one column when they will not fit. */
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .75rem;
}
.field-row .field { margin-top: 1rem; }

/* ── Result card extras ────────────────────────────────────────────────── */

/* The inline editor stands in for .post-body, so it matches that box exactly. */
.post-edit {
  display: block;
  width: calc(100% - 2.5rem);
  margin: 0 1.25rem 1.25rem;
  min-height: 120px;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.post-actions select.rewrite-select {
  width: auto;
  padding: 7px 32px 7px 12px;
  font-size: 13px;
  background-position: right 11px center;
}

/* ── Week plan ─────────────────────────────────────────────────────────── */

.day-card {
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
  padding: 1.1rem 1.25rem;
  margin: .75rem 0;
}

.day-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .5rem;
}
.day-name {
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
}
.day-sep { color: var(--sh-muted); }

.day-idea { margin: 0; font-size: 14px; }

.day-tags { margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.day-tags .tag {
  font-size: 12px;
  color: var(--sh-primary);
  background: #F3EDFF;
  border-radius: 999px;
  padding: 2px 9px;
}

.day-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .9rem;
}
.day-actions input[type=date] { padding: 6px 10px; font-size: 13px; width: auto; }
.day-actions .note { font-size: 12px; color: var(--sh-muted); }

/* The written-up post sits inside its day, indented so the nesting is legible. */
.day-drafted:not(:empty) {
  margin-top: .9rem;
  padding-left: .9rem;
  border-left: 2px solid var(--sh-border);
}
.day-drafted .post { margin-bottom: 0; }

/* Topic badges. Neutral by default; the three that carry a real signal — an
   event, an offer, something behind the scenes — get their own colour. */
.badge.topic       { color: var(--sh-muted); border-color: var(--sh-border); background: var(--sh-bg); }
.badge.topic.event { color: var(--sh-li-dk); border-color: var(--sh-li); background: var(--sh-li-bg); }
.badge.topic.offer { color: var(--sh-ig-dk); border-color: var(--sh-ig); background: var(--sh-ig-bg); }
.badge.topic.bts   { color: #04795A; border-color: var(--sh-mint); background: #E7FBF5; }

/* ── Photos ────────────────────────────────────────────────────────────── */

/* Sized here rather than with a Cloudinary transformation URL so the thumbnail
   still works on an account where transformations are restricted. */
.post-photo {
  display: block;
  margin: 0 1.25rem .9rem;
  border-radius: var(--sh-radius-sm);
  overflow: hidden;
  border: var(--sh-hairline);
  max-width: 260px;
}
.post-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
}
.post-photo:hover { border-color: var(--sh-primary); }

input[type=file] {
  width: 100%;
  background: var(--sh-surface);
  border: 1px dashed var(--sh-border);
  border-radius: var(--sh-radius-sm);
  padding: 11px 14px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  color: var(--sh-ink);
}
input[type=file]:disabled { opacity: .55; cursor: not-allowed; }
input[type=file]::file-selector-button {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  margin-right: .75rem;
  padding: 6px 12px;
  border-radius: var(--sh-radius-sm);
  border: var(--sh-hairline);
  background: var(--sh-bg);
  color: var(--sh-ink);
  cursor: pointer;
}

/* ── Inline schedule panel ─────────────────────────────────────────────── */

.schedule-panel {
  border-top: var(--sh-hairline);
  background: var(--sh-bg);
  padding: .9rem 1.25rem 1rem;
}
.schedule-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.schedule-row input[type=date],
.schedule-row input[type=time] {
  width: auto;
  padding: 7px 11px;
  font-size: 13px;
}
/* The suggestion line. Reads as a statement, not as a filled-in value — the
   pickers below stay empty until one of the two choices is pressed. */
.schedule-hint { margin: 0 0 .6rem; color: var(--sh-ink); font-size: 14px; }
.schedule-hint:empty { display: none; }

.schedule-choices { display: flex; flex-wrap: wrap; gap: .5rem; }

/* The one line under a card after scheduling: the connect nudge, a failed
   push, or confirmation that Metricool has it. */
.schedule-aside {
  margin: 0;
  padding: .6rem 1.25rem .9rem;
  font-size: 13px;
  color: var(--sh-muted);
}
.schedule-aside.warning { color: var(--sh-accent); }

/* ── Integrations (profile) ────────────────────────────────────────────── */

.integration-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem .75rem;
  margin: 0 0 .5rem;
}
.connected { font-weight: 600; color: #04795A; }

.btn-link {
  background: none;
  border: 0;
  padding: 0 .25rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  color: var(--sh-muted);
  text-decoration: underline;
  cursor: pointer;
}
.btn-link:hover { color: var(--sh-ink); }
.btn-link.danger:hover { color: var(--sh-accent); }

.post-head .when { margin-left: auto; }

/* ── Integrations hub ──────────────────────────────────────────────────── */

.integration-grid {
  display: grid;
  /* auto-fill rather than auto-fit: with one connected card, auto-fit would
     stretch it the full width and it would stop reading as a card. */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
  margin: .75rem 0 1.5rem;
}

.integration {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem;
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
}
.integration > :last-child { margin-bottom: 0; }
.integration p { margin: 0; }

.integration.connected { border-color: #04795A; }

/* Greyed rather than hidden — "is my tool coming?" is the question this
   section exists to answer, so the cards must still be readable. */
.integration.soon { background: transparent; opacity: .62; }

.integration-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.integration-head h3 { margin: 0; font-size: .95rem; }

/* Stands in for a logo. Real marks need each vendor's permission and a lot of
   SVG; an initial in the brand violet is honest and does not go stale. */
.integration-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--sh-bg);
  border: var(--sh-hairline);
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--sh-primary);
}

.integration .status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
}
.integration .status.connected { color: #04795A; }
.integration .status.soon { color: var(--sh-muted); font-weight: 500; }

.affiliate { font-size: .8125rem; color: var(--sh-muted); }
.affiliate:hover { color: var(--sh-primary); }

/* ── Integration requests ──────────────────────────────────────────────── */

.request-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }

.chip-btn {
  padding: .35rem .7rem;
  border: var(--sh-hairline);
  border-radius: 999px;
  background: var(--sh-surface);
  font: inherit;
  font-size: 13px;
  color: var(--sh-ink);
  cursor: pointer;
}
.chip-btn:hover { border-color: var(--sh-primary); color: var(--sh-primary); }

/* A cast vote. Disabled *and* marked, because a disabled button alone reads
   as broken rather than as done. */
.chip-btn.requested,
.chip-btn:disabled {
  opacity: .55;
  cursor: default;
  border-color: var(--sh-border);
  color: var(--sh-muted);
}
.chip-btn.requested::after { content: ' ✓'; }

#request-note { min-height: 1.2em; font-size: 13px; color: var(--sh-muted); }
#request-note.warning { color: var(--sh-accent); }

/* ── Admin ─────────────────────────────────────────────────────────────── */

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin-table th,
table.admin-table td {
  padding: .5rem .4rem;
  border-bottom: var(--sh-hairline);
  text-align: left;
}
table.admin-table th { font-weight: 600; font-size: 13px; color: var(--sh-muted); }

/* ── Profile nudge ─────────────────────────────────────────────────────── */

/* Positioned so the dismiss button can sit in the corner without the heading
   having to leave room for it. */
.nudge { position: relative; }
.nudge-dismiss { position: absolute; top: .6rem; right: .75rem; margin: 0; }

.icon-btn {
  background: none;
  border: 0;
  padding: .15rem .4rem;
  font-size: 20px;
  line-height: 1;
  color: var(--sh-muted);
  cursor: pointer;
  border-radius: var(--sh-radius-sm);
}
.icon-btn:hover { color: var(--sh-ink); }
.icon-btn:focus-visible { outline: 2px solid var(--sh-primary); outline-offset: 0; }

/* ── Landing page ──────────────────────────────────────────────────────── */

/* Sections live inside .landing rather than directly under main.wrap, so the
   dashboard's hairline-between-sections rule does not apply to them — the
   landing page separates by whitespace instead. */
.landing > section { margin-top: 3.5rem; scroll-margin-top: 1.5rem; }
.landing > section:first-child { margin-top: 1.5rem; }

.landing h2 { font-size: 1.4rem; margin: 0 0 1.25rem; }

/* scroll-behavior only takes effect on the scrolling element, so it is set on
   the root and narrowed to pages that render a .landing — elsewhere an in-page
   jump should land instantly rather than animate the whole document. */
html:has(.landing) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html:has(.landing) { scroll-behavior: auto; }
}

/* ── Hero ── */

.lp-hero { text-align: center; padding-top: 1.5rem; }

.lp-hero h1 {
  font-size: clamp(2rem, 7vw, 2.85rem);
  line-height: 1.1;
  margin: 0 0 .9rem;
}

.lp-sub {
  max-width: 34rem;
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--sh-muted);
}

.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin: 1.75rem 0 1rem;
}
.lp-cta-row .btn { padding: 13px 22px; font-size: 15px; }

.lp-reassure { margin: 0; font-size: 13px; color: var(--sh-muted); }

/* ── Platform chips ── */

.landing > section.lp-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
}
/* Bigger than the inline chips used inside cards — here they are the content,
   not an annotation on it. */
.lp-chips .chip { padding: 7px 15px; font-size: 13px; }

/* ── Steps and pills ── */

.lp-steps { display: grid; gap: .75rem; }

.lp-step {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
  padding: 1.1rem 1.25rem;
}
.lp-step h3 { margin: 0 0 .2rem; }
.lp-step p { margin: 0; font-size: 14px; color: var(--sh-muted); }

.lp-step-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sh-primary);
  color: #fff;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 800;
  font-size: 13px;
}

.lp-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.lp-pill {
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
}

/* ── Pricing ── */

.lp-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

/* Grid items stretch by default, so the three cards match height and the two
   buttons — pushed down by margin-top:auto below — land on the same line. */
.lp-plan {
  display: flex;
  flex-direction: column;
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
  padding: 1.25rem;
}
.lp-plan h3 { margin: 0; }
.lp-plan ul {
  margin: .75rem 0 1.25rem;
  padding-left: 1.1rem;
  font-size: 14px;
  color: var(--sh-muted);
}
.lp-plan li { margin-bottom: .25rem; }
/* Pushes the button to the bottom so the three CTAs line up across cards of
   unequal height. */
.lp-plan .btn { margin-top: auto; text-align: center; }

.lp-plan.featured { border: 1px solid var(--sh-primary); }

.lp-price {
  display: block;
  margin-top: .35rem;
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.lp-price .per { font-size: 13px; font-weight: 500; color: var(--sh-muted); }

/* The add-on is not a plan you buy instead of the other two, so it does not
   carry a button of its own. */
.lp-plan.addon p { margin: .75rem 0 0; font-size: 14px; color: var(--sh-muted); }

@media (max-width: 620px) {
  .lp-plans { grid-template-columns: 1fr; }
}

/* ── Final CTA and footer ── */

.lp-final {
  text-align: center;
  background: var(--sh-surface);
  border: var(--sh-hairline);
  border-radius: var(--sh-radius);
  padding: 2.5rem 1.5rem;
}
.lp-final h2 { margin-bottom: 1.25rem; }

.lp-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: var(--sh-hairline);
  font-size: 13px;
  color: var(--sh-muted);
  text-align: center;
}
.lp-footer a { color: var(--sh-muted); }
.lp-footer a:hover { color: var(--sh-ink); }

.spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid var(--sh-border);
  border-top-color: var(--sh-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -2px;
  margin-right: .4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
