/* adayo - minimal, system fonts only, no external resources. */
:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --fg: #1d1c1a;
  --muted: #5b5750;
  --accent: #1f5f8b;
  --accent-fg: #ffffff;
  --border: #d9d4ca;
  --panel: #f1eee7;
  --error: #a4231b;
  --ok: #276738;
  --danger: #a4231b;
  --focus: #c56a00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --fg: #ecebe8;
    --muted: #b1ada5;
    --accent: #7cb8e0;
    --accent-fg: #0d1a24;
    --border: #3a3834;
    --panel: #22211f;
    --error: #ff8a80;
    --ok: #8fd19e;
    --danger: #ff8a80;
    --focus: #ffb454;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; padding: .5rem 1rem; background: var(--panel); }
.skip-link:focus { left: 1rem; }
.site-header, main, .site-footer { max-width: 40rem; margin: 0 auto; padding: 0 1rem; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.site-header nav ul { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.brand { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--fg); letter-spacing: .02em; }
main { padding-bottom: 3rem; }
main:focus { outline: none; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 1rem 0; }
h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
section { margin-top: 1.5rem; }
.site-footer { color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); padding-top: 1rem; padding-bottom: 2rem; }
.hero h1 { font-size: 2.5rem; margin-bottom: .25rem; }
.tagline { font-size: 1.35rem; font-weight: 600; margin: 0 0 .5rem; }
.lede { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.points { padding-left: 1.25rem; }
.points li { margin: .5rem 0; }
.notice, .phrase-box { background: var(--panel); border: 1px solid var(--border); border-radius: .5rem; padding: .75rem 1rem; }
.field { margin: 1rem 0; }
.field label { display: block; font-weight: 600; margin-bottom: .25rem; }
.field.checkbox { display: flex; gap: .5rem; align-items: flex-start; }
.field.checkbox label { font-weight: 600; margin: 0; }
.field.checkbox input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; flex: none; }
.help { color: var(--muted); font-size: .95rem; margin: .25rem 0; }
input[type=text], input[type=time], select, textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: .375rem;
  padding: .55rem .65rem;
}
textarea { resize: vertical; min-height: 5.5rem; }
button, .button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: .375rem;
  padding: .6rem 1.1rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  min-height: 2.75rem;
}
.button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.danger { background: var(--danger); border-color: var(--danger); color: var(--bg); }
.phrase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: .35rem 1rem;
  padding-left: 1.75rem;
  margin: .75rem 0;
  font: 600 1.1rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.error { color: var(--error); font-weight: 600; }
.error:empty { margin: 0; }
.status { color: var(--ok); font-weight: 600; }
.cf-turnstile { margin: 1rem 0; min-height: 65px; }

/* Visually hidden but announced by assistive technology. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Logo (adayo.md, "Brand"): "adayo" plus a quieter chevron mark. Static. */
.logo { white-space: nowrap; }
.logo-mark { font-weight: 300; color: var(--muted); margin-left: .04em; }

/* ---- Phase B: navigation wraps on small screens ---- */
.site-header { flex-wrap: wrap; }
.site-header nav ul { flex-wrap: wrap; gap: .5rem 1rem; }

/* ---- Buttons used inside forms as secondary actions ---- */
button.secondary { background: transparent; color: var(--accent); }
.inline-form { display: inline; margin-left: .5rem; }
.inline-form button { min-height: 2.25rem; padding: .3rem .8rem; }

/* ---- Inbox and follower view ---- */
.edition { color: var(--muted); margin-top: -.5rem; }
.feed { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
/* A card is one row, like a notification, and the whole row is the outbound
   link (src/views/cards.tsx): what the link is, how long ago, and the mark. */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: .5rem;
}
.card-link {
  display: flex;
  align-items: center;
  gap: .25rem .75rem;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  color: var(--fg);
  text-decoration: none;
  border-radius: .5rem;
}
.card-link:hover .platform-name, .card-link:focus-visible .platform-name,
.card-link:hover .card-label, .card-link:focus-visible .card-label { text-decoration: underline; }
.card-main { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .6rem; }
.card-main .platform { font-weight: 600; }
.card-title { flex-basis: 100%; font-weight: 600; overflow-wrap: anywhere; }
.card-source { color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.card-link time { flex: none; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.card-out { flex: none; color: var(--accent); font-weight: 600; }
.caught-up {
  border-top: 2px solid var(--border);
  margin: .75rem 0;
  padding-top: .75rem;
  text-align: center;
}
.caught-up h2 { margin: 0 0 .25rem; font-size: 1.2rem; }
.caught-up p { color: var(--muted); margin: 0; }
.more { margin: 1.5rem 0; text-align: center; }

/* ---- Platforms ---- */
.platform { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.platform-icon { flex: none; vertical-align: middle; }

/* ---- Channel page ---- */
.channel-head h1 { margin-bottom: 0; }
.channel-owner { color: var(--muted); margin: 0 0 1rem; }
.posts-from { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 1rem 0; }
.posts-from-label { font-weight: 600; }
.posts-from ul { display: flex; flex-wrap: wrap; gap: .5rem 1rem; list-style: none; margin: 0; padding: 0; }
.follow-form { margin: 1rem 0; }

/* ---- Management and lists ---- */
.channel-list, .link-list { list-style: none; padding: 0; margin: 1rem 0; }
.channel-list li, .link-list li { border-bottom: 1px solid var(--border); padding: .6rem 0; }
.link-list p { margin: .2rem 0; }
.link-url { overflow-wrap: anywhere; font-size: .95rem; }
.link-list form { margin-top: .35rem; }
.link-list button { min-height: 2.25rem; padding: .3rem .8rem; }

/* ---- "Your adayo is ready" ---- */
.ready h1 { font-size: 2rem; }

/* Phase C: reports, notices, admin. */
.name-notice { margin-top: 1rem; }
.site-footer nav a { color: var(--muted); }
.choices { border: 0; padding: 0; margin: 1rem 0; }
.choices legend { font-weight: 600; margin-bottom: .25rem; }
.choices .field.checkbox { margin: .4rem 0; }
.token-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; background: var(--panel); border: 1px solid var(--border); border-radius: .5rem; padding: .75rem 1rem; }
/* Connected apps and the consent page (MCP + OAuth): a client's address in full, and its self-declared name isolated from the text around it. */
.uri { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; font-size: .875rem; }
.client-name, #connect-client-name, #connect-only-name { unicode-bidi: isolate; overflow-wrap: anywhere; }
.admin-item { border-bottom: 1px solid var(--border); padding: .75rem 0; }
.admin-item p { margin: .25rem 0; }
.admin-item form { margin: .35rem 0; }
.plain-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; font-size: .9rem; }
.admin-log { font-size: .9rem; }

/* ---- Phase C2: edition sections, sub-groups, the grouping switcher and the one-creator filter ---- */
.edition-section { margin-top: 0; }
.edition-title { font-size: 1.15rem; margin: .75rem 0 .5rem; }
.edition-body, .group { display: flex; flex-direction: column; gap: .5rem; }
.edition-body { gap: 1.25rem; }
.group-title { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0; }
.group-title a { color: var(--accent); text-decoration: none; }
.group-title a:hover, .group-title a:focus-visible { text-decoration: underline; }
/* The creator's name: plain text, or (with the script) the "show only this
   creator" filter, set apart from the channel link beside it by a dotted
   underline in the heading's own colour. */
.group-title a.group-creator { color: inherit; text-decoration: underline dotted; text-underline-offset: .2em; }
.group-title a.group-creator:hover, .group-title a.group-creator:focus-visible { color: var(--accent); text-decoration-style: solid; }
.grouping { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .75rem 0; }
.grouping label { font-weight: 600; }
.grouping select { width: auto; }
.filter-bar { margin: .75rem 0; }

/* The Report page (src/views/report.tsx) and the admin's links to a reported post. */
.report-subject { font-weight: 600; overflow-wrap: anywhere; }
.matching-links { margin: .25rem 0; padding-left: 1.25rem; }
.matching-links li { margin: .35rem 0; overflow-wrap: anywhere; }

/* Daily delivery (src/views/push.tsx): the inbox banner, the ask after the
   first follow, and "Welcome back". A smaller secondary "Not now". */
.nudge, .ask, .welcome-back { margin: 1rem 0; }
.nudge .actions, .ask .actions { margin-top: .75rem; }
.ask h2 { margin-top: 0; }
button.small, .button.small { min-height: 2.25rem; padding: .3rem .8rem; font-size: .9rem; }

/* ---- Phase E: the edition's "More from" links, History, the directory,
   the creator page and the share box ---- */
/* The directory's link beside a creator. */
.more-channels { margin: 0; font-weight: 600; font-size: .95rem; }
.more-channels a { text-decoration: none; }
.more-channels a:hover, .more-channels a:focus-visible { text-decoration: underline; }
/* The end of the edition, after "You're caught up.": one row per creator with
   channels the reader does not follow, a link card's box and row (.card,
   .card-link, .card-main, .card-out), stacked with the feed's gap. */
.creator-more-list { display: flex; flex-direction: column; gap: .75rem; }
.creator-more { margin: 0; }
.history-list, .creator-channels { list-style: none; padding: 0; margin: 1rem 0; }
.history-list li, .creator-channels li { border-bottom: 1px solid var(--border); padding: .6rem 0; }
.creator-channel { font-weight: 700; }
.creator-platforms { color: var(--muted); margin-left: .75rem; }
.directory-creator { margin: 1rem 0 1.5rem; }
.directory-creator .channel-list { margin: .25rem 0 .5rem; }
.new-today { color: var(--ok); font-weight: 600; }
.share-box { margin: .75rem 0; }
.share-box label { display: block; font-weight: 600; margin-bottom: .25rem; }
.share-text { min-height: 4rem; }
.share-box .actions { margin-top: .35rem; }

/* ---- The 12 words (S-4, client/words.ts): twelve numbered inputs ---- */
.word-entry { border: 0; padding: 0; margin: 1rem 0; min-width: 0; }
.word-entry legend { font-weight: 600; margin-bottom: .5rem; padding: 0; }
.word-inputs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: .5rem .75rem;
}
.word-inputs li { display: flex; align-items: center; gap: .4rem; }
.word-inputs label { min-width: 1.6rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.word-inputs input[type=text] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.word-inputs input[aria-invalid=true] { border-color: var(--error); }
.word-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; }
.word-suggestions .word-suggestion {
  min-height: 2.25rem;
  padding: .3rem .7rem;
  background: transparent;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---- "Confirm it's you" (S-6, client/stepup.ts): over the page ---- */
.step-up {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
}
.step-up-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: 1rem 1.25rem;
  width: 100%;
  max-width: 40rem;
  margin-top: 4vh;
}

/* ---- Security notices (S-10) and recent activity (S-20) ---- */
.security-notices ul { margin: 0; padding-left: 1.25rem; }
.security-notices .own-notice { color: var(--muted); }
/* This session's own security changes (S-10, compact): a quiet line outside the one-banner order. */
.security-notices-own { color: var(--muted); font-size: .95rem; margin: .75rem 0; }
.security-notices-own ul { margin: 0; padding-left: 1.25rem; }
.security-notices-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: .5rem 0 0; }
.activity-list { padding-left: 1.25rem; }
.activity-list li { margin: .25rem 0; }

/* ---- Passkeys (adoption phase 3): S-1's choice, Settings' list ---- */
.signup-choice .actions { margin-top: .5rem; }
.passkey-list { list-style: none; padding: 0; margin: 1rem 0; }
.passkey-list .passkey { border-bottom: 1px solid var(--border); padding: .6rem 0; }
.passkey-list .passkey p { margin: .2rem 0; }
.passkey-list .passkey-name { overflow-wrap: anywhere; }
.passkey-list .actions { margin-top: .35rem; }
.passkey-rename, .passkey-remove { margin: .5rem 0; }
.passkey-rename label { display: block; font-weight: 600; margin-bottom: .25rem; }
.passkey-rename input[type=text] { margin-bottom: .5rem; }
.passkey-rename button { margin-right: .5rem; }
.token-list .token p { margin: .2rem 0; }
.token-list .token-name { overflow-wrap: anywhere; }
.token-list .actions { margin-top: .35rem; }

/* ---- Connected apps, the consent page and the approve page (MCP + OAuth plan section 17, P4):
   narrow screens, the theme's tokens only (light and dark), visible focus ---- */
/* A live region that is always present; its lines are shown inside it. */
.outcome p { margin: .25rem 0; }
.app-list .app p { margin: .2rem 0; }
.app-list .app-name { overflow-wrap: anywhere; }
.app-list .actions { margin-top: .35rem; }
.app-list .app-confirm { font-weight: 600; margin-top: .5rem; }
.app-list .app-posting { margin-top: .5rem; }
/* The scopes the holder may untick (anonfirst 0.4.0, gap G1): a fieldset of checkboxes, label beside its box. */
.connect-scopes { border: 0; margin: 1rem 0 .5rem; padding: 0; min-width: 0; }
.connect-scopes legend { font-weight: 600; margin-bottom: .25rem; padding: 0; }
#connect-scopes { list-style: none; padding-left: 0; }
#connect-scopes li { display: flex; gap: .5rem; align-items: flex-start; margin: .5rem 0; }
#connect-scopes input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; flex: none; }
#connect-scopes input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#connect-document-host, .app-document strong { overflow-wrap: anywhere; }
#connect-wants, .approve-app { overflow-wrap: anywhere; }
.approve-facts { margin: 1rem 0; }
.approve-facts dt { font-weight: 600; }
.approve-facts dd { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.approve-choices { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0 .5rem; }
/* Headings and boxes that take focus from the script (tabindex -1): a visible ring for keyboard users. */
#apps-title:focus-visible, #connect-problem:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#apps-title:focus:not(:focus-visible) { outline: none; }
@media (max-width: 30rem) {
  .approve-choices button, #connect .actions button, #connect-problem .actions .button { flex: 1 1 100%; text-align: center; }
}
