/* Fanout Studio account pages (src/account/views.js layout), Oct 19: the homepage's look. Loaded after site/home.css,
   which brings the palette (stone ground, ink, one lagoon accent, apricot for decoration only), Bricolage Grotesque
   and Newsreader, the header, buttons and footer. This file adds only the account's own parts, under body.acct so a
   homepage class with the same name (.tiles, .check) never leaks in. */
:root {
  --ok: var(--lagoon); --warn: #8A5300; --warn-bg: #FFF4E0; --info-bg: #EAF3F0;
  --field-line: #A79F93; --r-md: 14px; --r-lg: 20px;
}
body.acct { min-height: 100vh; display: flex; flex-direction: column; font-size: 16.5px; }
.acct .wrap { max-width: calc(1080px + var(--gutter) * 2); }

/* ---------- header: the homepage's, with the account nav ---------- */
.acct-header .wordmark { flex: none; }
.acct .tabs { gap: clamp(4px, 1.4vw, 14px); }
.acct .tabs form { margin: 0; }
.acct .tabs a:not(.btn), .acct .linkbtn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 550; }
.acct .tabs a:not(.btn):hover { color: var(--lagoon); background: rgba(25, 32, 43, .05); }
.acct .tabs a[aria-current="page"] { background: var(--lagoon-wash); color: var(--lagoon-deep); font-weight: 650; }
.acct .linkbtn { background: none; border: 0; font-family: inherit; color: var(--muted); cursor: pointer; white-space: nowrap; }
.acct .linkbtn:hover { color: var(--ink); background: rgba(25, 32, 43, .05); }
@media (max-width: 640px) {
  .acct-header .wrap { flex-wrap: wrap; height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 6px; row-gap: 4px; }
  .acct-header .tabs[aria-label="Account"] { width: calc(100% + 20px); margin: 0 -10px; overflow-x: auto; scrollbar-width: none; }
  .acct-header .tabs::-webkit-scrollbar { display: none; }
  .acct .tabs a:not(.btn), .acct .linkbtn { padding: 0 10px; font-size: 15px; }
}

/* ---------- page ---------- */
.acct-main { flex: 1; padding: clamp(24px, 5vw, 52px) 0 clamp(48px, 7vw, 80px);
  background: radial-gradient(120% 50% at 92% 0%, rgba(233, 160, 124, .16), rgba(233, 160, 124, 0) 60%), radial-gradient(90% 40% at 0% 100%, rgba(12, 106, 96, .05), rgba(12, 106, 96, 0) 60%), var(--stone); }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(32px, 6vw, 48px); font-weight: 720; letter-spacing: -0.035em; line-height: 1.02; }
.page-head p { color: var(--muted); margin: 10px 0 0; max-width: 40em; }
.page-head p.eyebrow { margin: 0 0 8px; }
.eyebrow { font-size: 14px; font-weight: 650; color: var(--muted); margin-bottom: 8px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.stack > * + * { margin-top: 16px; }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .grid.two { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .grid.halves { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 28px); min-width: 0; box-shadow: 0 1px 2px rgba(25, 32, 43, .04), 0 14px 32px -24px rgba(25, 32, 43, .32); }
.card h2 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 10px; }
.card h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.card > :last-child { margin-bottom: 0; }
.card.hero { border-color: rgba(25, 32, 43, .28); }
.card.attention { border-color: #C77700; }

/* ---------- buttons: the homepage's pill, plus the account's variants ---------- */
.acct .btn { white-space: normal; text-align: center; min-height: 48px; padding: 8px 22px; font-size: 16.5px; }
.acct .btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.acct .btn.ghost:hover { background: rgba(25, 32, 43, .06); }
.acct .btn.quiet { background: var(--stone); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--field-line); }
.acct .btn.quiet:hover { background: var(--lagoon-wash); box-shadow: inset 0 0 0 1.5px var(--lagoon); }
.acct .btn.ghost[aria-pressed="true"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lagoon); }
.acct .btn.danger { background: var(--error); }
.acct .btn.danger:hover { background: #8E1B12; }
.acct .btn.block { width: 100%; }
.acct .btn.sm { min-height: 44px; padding: 6px 18px; font-size: 15px; }
.acct .btn.big { min-height: 56px; font-size: 18px; }
.acct .btn.google { background: #fff; color: #1F1F1F; box-shadow: inset 0 0 0 1.5px var(--field-line); font-weight: 600; margin-top: 4px; }
.acct .btn.google:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { margin: 0; }
form.actions + p.small { margin-top: 12px; } /* "I connected Instagram, check again" sat flush on its helper line (QA Oct 19 #14) */

/* ---------- fields ---------- */
.acct .field { margin-bottom: 14px; }
.acct .field select, .arch-page select { width: 100%; height: 50px; padding: 0 12px; font: inherit; font-size: 16.5px; color: var(--ink); background: #fff; border: 1.5px solid var(--field-line); border-radius: 12px; }
.arch-page select { width: auto; min-width: 160px; }
.acct .field select:focus, .arch-page select:focus { outline: none; border-color: var(--lagoon); box-shadow: 0 0 0 3px rgba(12, 106, 96, .22); }
.field .hint { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 220px; margin: 0; }
/* Oct 29 (founder: the Save button was a circle on phones): two selects a row, the button at the bottom, its own size. */
.cadence-form .field { flex: 1 1 140px; }
.cadence-form .btn { align-self: flex-end; flex: 0 0 auto; }
input.code { font-size: 26px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- alerts and status ---------- */
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 15px; background: var(--info-bg); color: var(--ink); }
.alert.ok { background: var(--lagoon-wash); color: #0B3F3A; }
.alert.warn { background: var(--warn-bg); color: #5E3B00; }
.alert.error { background: #FDECEA; color: var(--error); }
.alert > :last-child { margin-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--stone); color: var(--ink); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.ok::before { background: var(--lagoon); } .pill.warn::before { background: #C77700; } .pill.bad::before { background: var(--error); } .pill.info::before { background: var(--apricot); }
.state { flex: none; font-size: 13px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--stone); color: var(--ink); white-space: nowrap; }
.state.ok { background: var(--lagoon-wash); color: var(--lagoon-deep); }
.state.miss { background: var(--warn-bg); color: var(--warn); }
.mini-check { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--lagoon); color: #fff; flex: 0 0 auto; }

/* ---------- narrow pages: login, codes, messages, email links ---------- */
.narrow { max-width: 540px; margin: 0 auto; }
.narrow .card { padding: clamp(22px, 5vw, 36px); border-radius: 22px; }
.narrow h1 { font-size: clamp(30px, 7vw, 40px); letter-spacing: -0.03em; margin-bottom: 10px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ---------- lists ---------- */
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0 0 16px; font-size: 15px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
ul.plain li:last-child { border-bottom: 0; }
ul.samples li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
ul.upcoming li { align-items: flex-start; }

/* ---------- analytics ---------- */
.acct .tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; align-items: stretch; max-width: none; margin: 0 0 16px; padding: 0; overflow: hidden; scroll-snap-type: none; background: var(--line); border: 1px solid var(--line); border-radius: 16px; }
@media (min-width: 820px) { .acct .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.acct .tile { position: static; flex: initial; width: auto; scroll-snap-align: none; background: var(--card); padding: 14px 16px; }
.acct .tile b { display: block; font-size: clamp(24px, 4vw, 30px); font-weight: 720; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.acct .tile span { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.acct .tile small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.range { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 16px; }
.range a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 999px; }
.range a[aria-current="true"] { background: var(--lagoon); color: #fff; }
.approval-rate { margin-top: 10px; }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.acct table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.acct th { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.acct td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.acct tbody th { padding: 10px 8px; }
.acct tr:last-child td, .acct tr:last-child th { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .quote { font-family: var(--serif); font-size: 16px; line-height: 1.4; display: block; min-width: 14em; }
td .meta { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { fill: var(--muted); font: 500 11px var(--sans); }
.legend { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.empty { text-align: center; padding: clamp(28px, 6vw, 48px) 16px; }
.empty h2 { font-size: 22px; margin-bottom: 8px; }
.empty p { max-width: 34em; margin-left: auto; margin-right: auto; color: var(--muted); }
@media (max-width: 600px) {
  .acct .tiles .tile:last-child:nth-child(odd) { grid-column: span 2; }
  table.cards-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.cards-sm tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.cards-sm tr:last-child { border-bottom: 0; }
  .acct table.cards-sm td { border: 0; padding: 0; }
  table.cards-sm td:first-child { grid-column: 1 / -1; margin-bottom: 6px; }
  table.cards-sm td .quote { min-width: 0; }
  table.cards-sm td.n { text-align: left; font-weight: 700; }
  table.cards-sm td.n::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
}

/* ---------- onboarding (src/setup.js): one step at a time, the welcome page's step card ---------- */
.card.setup { margin-bottom: 16px; scroll-margin-top: 80px; }
.card.setup.focus { border-radius: 22px; padding: clamp(22px, 5vw, 36px); box-shadow: var(--shadow); }
.setup.focus .eyebrow { display: inline-block; margin: 0 0 12px; padding: 4px 11px; border-radius: 999px; background: var(--lagoon-wash); color: var(--lagoon-deep); font-size: 14px; font-weight: 700; }
.setup.focus h2 { font-size: clamp(28px, 6.6vw, 40px); letter-spacing: -0.03em; margin-bottom: 10px; }
.setup .why { font-size: 18px; max-width: 38em; }
.setup .cta { margin: 20px 0 14px; }
.setup .cta .btn { min-height: 58px; font-size: 19px; padding: 8px 34px; background: linear-gradient(135deg, #0E7A6E, var(--lagoon) 55%, #0A5E55); box-shadow: 0 14px 28px -14px rgba(12, 106, 96, .7); }
.setup .cta .btn:hover { background: var(--lagoon-deep); }
@media (max-width: 560px) { .setup .cta .btn { width: 100%; } }
.setup details > summary, .more-settings > summary, .key-more > summary { cursor: pointer; color: var(--lagoon); font-weight: 600; min-height: 44px; display: flex; align-items: center; width: fit-content; max-width: 100%; }
.setup details[open] > summary { margin-bottom: 8px; }
.other-ways, .help-more { margin-top: 6px; }
.other-ways .inline-form .btn { align-self: flex-end; }
.other-ways .inline-form + p { margin-top: 10px; }
.found-h { margin: 14px 0 4px; font-weight: 600; }
ul.found, ul.to-add { list-style: none; margin: 0 0 14px; padding: 0; }
ul.found li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.found li:last-child { border-bottom: 0; }
ul.found .nm { font-weight: 700; }
ul.to-add li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; }
.acct ul.to-add .btn.add { min-height: 52px; font-size: 17px; }
@media (max-width: 560px) { .acct ul.to-add .btn.add { width: 100%; } }
.setup .found { margin-bottom: 0; }
.acct-help { margin: 6px 0 12px; }
.card .acct-help h4 { margin: 0 0 4px; font-size: 15px; }
.acct-help ul { margin: 0 0 6px; padding-left: 20px; }
.card.all-set { padding: 14px clamp(16px, 3vw, 22px); background: var(--card); }
.card.all-set p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
ol.next { margin: 0; padding-left: 22px; }
ol.next li { margin-bottom: 10px; }
ol.next li:last-child { margin-bottom: 0; }
ol.next li::marker { color: var(--lagoon); font-weight: 700; }
.focus-row { margin-bottom: 16px; }
.more-settings { margin-top: 4px; }
.more-settings[open] > summary { margin-bottom: 4px; }
.more-settings > .stack { margin-top: 10px; }
.card.bio-step h2 { font-size: 19px; }
.channel-form fieldset { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
.channel-form legend { font-size: 15px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.chan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .chan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chan { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 14px; min-width: 0; line-height: 1.25; cursor: pointer; font-weight: 600; background: #fff; }
.chan input { width: 20px; height: 20px; margin: 0; accent-color: var(--lagoon); flex: 0 0 auto; }
.chan:has(input:checked) { border-color: var(--lagoon); background: #F6FBF9; }
.chan:has(input:focus-visible) { outline: 3px solid var(--lagoon); outline-offset: 2px; }
.bio-url { width: 100%; font: 600 14px/1.3 ui-monospace, Menlo, monospace; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--stone); color: var(--ink); }
form.toggle { margin: 0; }
ol.howto li { margin-bottom: 6px; }
ul.moves { list-style: none; padding: 0; margin: 0 0 14px; }
ul.moves li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
ul.moves .what { font-weight: 700; }
ul.moves .from { color: var(--muted); font-size: 14px; }
ul.moves .to { font-weight: 600; }
ul.moves .to::before { content: "\2192\00a0"; color: var(--muted); }
@media (min-width: 640px) { ul.moves li { grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: baseline; } }

/* ---------- "Your archive" (/account/archive) ---------- */
.arch-row { align-items: flex-start !important; }
.arch-pick { display: flex; gap: 10px; align-items: flex-start; min-width: 0; flex: 1; cursor: pointer; }
.arch-pick input, .arch-auto input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--lagoon); }
.arch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arch-title { font-weight: 600; }
.arch-row .pill { flex: none; }
.arch-page > * + * { margin-top: 16px; }
.arch-auto { display: flex; gap: 10px; align-items: flex-start; }

/* ---------- signed email links and "How you approve" ---------- */
.email-act h1 { font-size: clamp(28px, 7vw, 36px); margin-bottom: 8px; }
.email-act form { margin: 16px 0 6px; }
.email-posts { margin-top: 14px; }
.acct .email-posts li { padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 0; display: block; }
.email-post-img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: 12px; margin: 12px 0 4px; border: 1px solid var(--line); }
.acct .check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0 0 12px; padding: 0; list-style: none; font-size: 15px; line-height: 1.45; }
.acct .check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--lagoon); }
fieldset.autopilot { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px 4px; margin: 4px 0 14px; min-width: 0; }
fieldset.autopilot legend { padding: 0 6px; }

/* Oct 22: "Review posts" in the nav, the one way to the posts page from every account page. */
.acct .tabs a.nav-posts { background: var(--lagoon); color: #fff; font-weight: 650; }
.acct .tabs a.nav-posts:hover { background: var(--lagoon-deep); color: #fff; }
/* A channel connected in Buffer but off here (setup extra): one line and a button to turn it on. */
.extra-chans { margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--lagoon-wash); }
.extra-chans .actions { margin-top: 8px; }
.chan small { display: block; font-size: 12.5px; line-height: 1.2; font-weight: 500; }
