:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --surface: #fffefa;
  --ink: #202a28;
  --muted: #6f7975;
  --soft: #9ba29d;
  --line: #e4e4dc;
  --line-strong: #d3d5ca;
  --accent: #e9523c;
  --accent-dark: #bb3928;
  --accent-wash: #f9e9e3;
  --green: #376a55;
  --green-wash: #e7f0e9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 86% 0%, rgba(233, 82, 60, .045), transparent 31rem),
    var(--paper);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(233, 82, 60, .45);
  outline-offset: 3px;
}

.page-shell {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
}

.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 48px;
}

.wordmark, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -.055em;
}

.wordmark-mark {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
}

.wordmark-mark::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fffaf4;
  content: "";
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 29px;
  height: 100%;
}

.primary-nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 570;
  transition: color .16s ease;
}

.primary-nav a:hover, .primary-nav a.is-active { color: var(--ink); }
.primary-nav a.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
}

.header-account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 12px;
}

.header-login {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.header-login {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 600;
}

.header-login:hover { border-color: #d3a296; background: #fff8f4; }
.header-user { display: block; max-width: 150px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.header-user:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

.header-account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  display: grid;
  width: 218px;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(33, 39, 36, .12);
}

.header-account-menu[hidden] { display: none; }
.header-account-menu [hidden] { display: none; }
.header-account-menu p { margin: 2px 6px 5px; color: var(--muted); font-size: 11px; }
.header-account-menu button { min-height: 34px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.header-account-menu button:hover { background: var(--paper); }
.header-account-menu form { display: grid; gap: 7px; padding: 5px 2px 2px; }
.header-account-menu label { color: var(--muted); font-size: 11px; }
.header-account-menu input { min-width: 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink); font: inherit; }
.header-account-menu [data-passkey-sign-up-error] { margin: 0; color: var(--accent-dark); font-size: 11px; line-height: 1.4; }
.local-admin .header-account, .demo-mode .header-account { display: none; }

.local-admin .site-header { height: auto; min-height: 82px; }

.profile-card {
  max-width: 480px;
  margin-bottom: 70px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 250, .73);
}

.profile-card-anniversary {
  border-color: rgba(233, 82, 60, .45);
  background: linear-gradient(135deg, var(--accent-wash), var(--surface) 78%);
  box-shadow: 0 8px 26px rgba(187, 57, 40, .08);
}
.profile-created-date { margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.profile-anniversary { display: flex; align-items: center; gap: 8px; margin: -8px 0 18px; color: var(--accent-dark); font-size: 14px; font-weight: 650; }
.profile-anniversary span { font-size: 20px; }
.profile-card h2 { margin: 0 0 20px; font-family: var(--serif); font-size: 24px; font-weight: 400; }
.profile-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.profile-card > .profile-created-date { margin: 0 0 7px; font-size: 12px; }
.profile-card > .profile-anniversary { margin: -8px 0 18px; color: var(--accent-dark); }

.submission-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: start; gap: 20px; padding: 18px 0 45px; }
.submission-form, .submission-login, .submission-card, .submission-review-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 254, 250, .72);
}
.submission-form { display: grid; gap: 14px; padding: 20px; }
.submission-field-hint { display: block !important; color: #79847d !important; font-size: 11px; font-weight: 400; line-height: 1.5; }
.submission-form-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.submission-form-heading h2, .submission-list > h2, .submission-login h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
}
.submission-form-heading .text-link { border: 0; background: none; color: var(--accent-dark); cursor: pointer; font-size: 12px; }
.submission-form > label { display: grid; gap: 6px; color: #59665f; font-size: 12px; font-weight: 600; }
.submission-form > label > span { display: inline; color: #87918a; font-weight: 400; }
.submission-form input:not([type="radio"]), .submission-form textarea, .submission-form select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.submission-form textarea { resize: vertical; line-height: 1.55; }
.submission-form fieldset { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.submission-form legend { padding: 0 4px; color: #59665f; font-size: 12px; font-weight: 600; }
.submission-form fieldset label { display: flex; align-items: center; gap: 8px; color: #59665f; font-size: 13px; }
.submission-form input[type="radio"] { accent-color: var(--accent); }
.submission-form-note, .submission-list-note { margin: 0; color: #79847d; font-size: 12px; line-height: 1.55; }
.submission-form .button { justify-self: start; }
.submission-save-status { min-height: 1em; margin: 0; color: var(--muted); font-size: 12px; }
.submission-list { display: grid; gap: 12px; }
.submission-list > h2 { margin-bottom: 0; }
.submission-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 15px; }
.submission-card .eyebrow { margin: 0 0 5px; color: var(--green); font-size: 10px; }
.submission-card h3 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 400; }
.submission-card p:not(.eyebrow) { margin: 7px 0; color: #59665f; font-size: 12px; line-height: 1.55; }
.submission-card > .button { padding: 7px 10px; font-size: 11px; }
.submission-topic { color: #79847d; font-size: 11px; }
.submission-history { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); color: #59665f; font-size: 11px; }
.submission-history summary { cursor: pointer; }
.submission-history ol { display: grid; gap: 7px; padding-left: 18px; }
.submission-history li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; }
.submission-login { max-width: 580px; margin: 15px 0 60px; padding: 22px; }
.submission-login p { margin: 10px 0 0; color: #59665f; font-size: 14px; line-height: 1.7; }
.submission-attribution { margin: -13px 0 0; color: #79847d; font-size: 12px; }
.submission-review-list { display: grid; gap: 12px; padding: 8px 0 40px; }
.submission-review-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 20px; padding: 18px; }
.submission-review-card .eyebrow { margin: 0 0 5px; color: var(--green); font-size: 10px; }
.submission-review-card h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.submission-review-card > div:first-child > p:not(.eyebrow) { margin: 8px 0 12px; color: #59665f; font-size: 13px; line-height: 1.6; }
.submission-review-card dl { display: grid; gap: 5px; margin: 0; color: #59665f; font-size: 11px; }
.submission-review-card dl > div { display: flex; gap: 8px; }
.submission-review-card dt { min-width: 95px; color: #87918a; }
.submission-review-card dd { margin: 0; }
.submission-review-links, .submission-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.submission-review-links { margin-top: 12px; }
.submission-review-links a { color: var(--accent-dark); font-size: 12px; }
.submission-review-actions { align-items: center; }
.submission-review-actions .review-action { min-height: 34px; }
.submission-review-card[aria-busy="true"] { opacity: .7; }
.submission-admin-edit { grid-column: 1 / -1; margin: 0; }
.submission-admin-edit[hidden] { display: none; }
.submission-admin-edit > div:last-of-type { display: flex; flex-wrap: wrap; gap: 8px; }
.submission-admin-edit > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.profile-hidden-projects { margin: 42px 0 70px; }
.profile-voted-projects { margin: 42px 0 70px; }
.profile-hidden-projects h2, .profile-voted-projects h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 28px; font-weight: 400; }
.profile-muted { color: var(--muted); font-size: 13px; line-height: 1.65; }
.hidden-project-list { max-width: 720px; margin: 20px 0 0; padding: 0; list-style: none; }
.hidden-project-list li, .voted-project-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.hidden-project-list li > a, .voted-project-list li > a { color: var(--ink); font-family: var(--serif); font-size: 17px; }
.hidden-project-list li > span, .voted-project-list li > span { flex: 1; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.voted-project-list { max-width: 720px; margin: 20px 0 0; padding: 0; list-style: none; }

.admin-sync-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: 62%;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.admin-sync-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.admin-sync-main strong { color: var(--ink); }
.admin-sync-status .sync-status-dot { width: 8px; height: 8px; margin: 0; }
.admin-sync-status.is-error .sync-status-dot { background: var(--accent); }
.admin-sync-warning { max-width: 620px; color: var(--accent-dark); font-size: 12px; }

#app { min-height: 60vh; }

.page-intro {
  max-width: 710px;
  padding: 66px 0 42px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.6;
  text-transform: uppercase;
}

.page-intro h1, .detail-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.intro-copy {
  max-width: 490px;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.demo-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 10px 13px;
  border: 1px solid #ead8c7;
  border-radius: 9px;
  background: #fff8ec;
  color: #746551;
  font-size: 11px;
}

.demo-note strong { color: #584933; }
.demo-note-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #d7923a; }

.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: 13px;
  padding: 0 3px;
  border-top: 1px solid var(--line-strong);
}

.feed-context {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
}

.feed-context-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.feed-count {
  margin-left: 6px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form input {
  width: 184px;
  padding: 8px 31px 8px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.search-form input::placeholder { color: #969d97; }
.search-form input:hover { background: rgba(255,255,255,.55); }
.search-form input:focus { border-color: var(--line-strong); background: var(--surface); outline: none; }
.search-form kbd {
  position: absolute;
  right: 9px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 9px;
}

.feed-list {
  border-top: 1px solid var(--line);
}

.latest-feed { margin-top: 24px; }

.feed-row {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  align-items: start;
  gap: 17px;
  padding: 22px 4px 20px;
  border-bottom: 1px solid var(--line);
  transition: background .16s ease, padding .16s ease;
}

.feed-row:hover {
  padding-right: 10px;
  padding-left: 10px;
  background: rgba(255, 254, 250, .55);
}

.row-index {
  padding-top: 4px;
  color: #9ea49e;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
}

.row-main { min-width: 0; }
.row-title-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 11px; }

.project-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -.025em;
  line-height: 1.3;
}

.project-title:hover { color: var(--accent-dark); }

.project-domain {
  color: #87918a;
  font-family: var(--mono);
  font-size: 10px;
}

.project-description {
  max-width: 760px;
  margin: 6px 0 9px;
  color: #59645f;
  font-size: 12px;
  line-height: 1.65;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  color: #929993;
  font-size: 10px;
}

.meta-source { color: #69736e; font-weight: 590; }
.meta-source:hover { color: var(--accent-dark); }
.meta-separator { color: #c2c6bd; }

.feed-vote {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #7d8981;
  cursor: pointer;
  font-size: 10px;
}

.feed-vote:hover:not(:disabled), .feed-vote.is-voted { background: var(--green-wash); color: var(--green); }
.feed-vote:disabled { cursor: wait; opacity: .6; }
.feed-vote span:last-child { color: var(--ink); font-family: var(--mono); }
.hide-project-button { padding: 2px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 10px; }
.hide-project-button:hover:not(:disabled) { background: #fff4ef; color: var(--accent-dark); }
.hide-project-button:disabled { cursor: wait; opacity: .6; }

.feed-more { display: flex; justify-content: center; padding: 22px 0 10px; }
.feed-more .button { min-width: 120px; }

.row-tags, .fact-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid #e8e7df;
  border-radius: 999px;
  color: #59665f;
  font-size: 9px;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.topic-pill:hover { border-color: #e6b6a8; background: #fff4ef; color: var(--accent-dark); }
.self-hosted-pill { border-color: #cddfcf; background: #f1f7f1; color: var(--green); }

.feed-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 29px 0 21px;
  color: #9ca39d;
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
}

.feed-end span { width: 33px; height: 1px; background: var(--line-strong); }

.active-topic {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -2px 0 16px;
  color: var(--muted);
  font-size: 11px;
}

.active-topic strong { color: var(--ink); font-size: 12px; }
.active-topic a { margin-left: auto; color: var(--accent-dark); }
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 70px;
}

.topic-card {
  position: relative;
  display: flex;
  min-height: 157px;
  flex-direction: column;
  padding: 18px 19px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 254, 250, .72);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: #e6b6a8;
  box-shadow: 0 9px 24px rgba(62, 45, 28, .055);
}

.topic-card-count {
  color: var(--soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.topic-card-title {
  margin-top: 17px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -.035em;
}

.topic-card-copy {
  max-width: 230px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.detail { padding: 35px 0 75px; }
.back-link { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; }
.back-link span { color: var(--accent); font-size: 14px; }
.back-link:hover { color: var(--ink); }

.detail-heading {
  max-width: 760px;
  padding: 43px 0 40px;
  border-bottom: 1px solid var(--line-strong);
}

.detail-heading .eyebrow { margin-bottom: 14px; }
.eyebrow-slash { padding: 0 4px; color: #c5a49a; }
.detail-heading h1 { font-size: clamp(42px, 6vw, 62px); }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 25px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.button:disabled, .review-action:disabled { cursor: wait; opacity: .6; }
.button[hidden], .hide-project-button[hidden] { display: none; }
.button-primary { background: var(--accent); color: #fffdfa; }
.button-primary:hover { transform: translateY(-1px); background: var(--accent-dark); }
.button-outline { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.button-outline:hover { border-color: #d3a296; background: #fff8f4; }
.action-note { color: #9ba29d; font-size: 10px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 65px;
  padding-top: 35px;
}

.detail-section { padding: 0 0 29px; }
.detail-section + .detail-section { padding-top: 25px; border-top: 1px solid var(--line); }
.detail-section .eyebrow { margin-bottom: 9px; }
.detail-section h2 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: -.025em; }
.detail-section > p:not(.eyebrow) { max-width: 610px; margin: 11px 0 0; color: #59645f; font-size: 13px; line-height: 1.8; }
.section-caption { color: var(--muted) !important; font-size: 11px !important; }
.project-discussion { min-width: 0; margin-top: 20px; }

.fact-card {
  padding: 19px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 250, .73);
}

.fact-card .eyebrow { margin-bottom: 13px; }
.fact-card dl { margin: 0; }
.fact-card dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #eeeee7; }
.fact-card dt { color: #929a94; font-size: 10px; }
.fact-card dd { max-width: 145px; margin: 0; color: #45524b; font-size: 10px; text-align: right; overflow-wrap: anywhere; }
.fact-card dd a:hover { color: var(--accent-dark); }
.fact-topics { margin-top: 8px; }

.source-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  transition: background .16s ease;
}

.source-card:hover { background: rgba(255, 254, 250, .8); }
.source-card strong, .source-card small { display: block; }
.source-card strong { font-size: 10px; }
.source-card small { max-width: 185px; margin-top: 4px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }

.helpful-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 15px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 254, 250, .68);
}

.vote-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.vote-login-note { color: var(--muted); font-size: 12px; }

.helpful-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 33px;
  padding: 0 11px;
  border: 1px solid #e7c9bc;
  border-radius: 6px;
  background: #fff8f4;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 640;
}

.helpful-button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-wash); }
.helpful-button.is-voted { border-color: #cddfcf; background: var(--green-wash); color: var(--green); }
.helpful-count { color: #858f89; font-size: 10px; }
.helpful-count strong { color: var(--ink); }

.empty-state {
  display: grid;
  justify-items: center;
  padding: 63px 20px 70px;
  text-align: center;
}

.empty-icon { color: #b7c1b9; font-size: 32px; line-height: 1; }
.empty-state h2 { margin: 15px 0 0; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.empty-state p { max-width: 410px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.text-link { margin-top: 16px; color: var(--accent-dark); font-size: 11px; font-weight: 620; }
.text-link span { margin-left: 3px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.sync-status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #79a27d; }

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
  padding: 16px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.admin-summary > div { display: flex; flex-direction: column; gap: 6px; }
.admin-summary > div span { color: var(--muted); font-size: 13px; }
.admin-summary > div strong { font-family: var(--serif); font-size: 24px; font-weight: 400; }

.topic-manager { margin: 14px 0 2px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 254, 250, .55); }
.topic-manager summary { padding: 10px 13px; color: #59665f; cursor: pointer; font-size: 13px; font-weight: 600; }
.topic-manager[open] summary { border-bottom: 1px solid var(--line); }
.topic-manager form { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.4fr) auto; align-items: end; gap: 12px; padding: 13px; }
.topic-manager form label { display: grid; gap: 6px; color: #59665f; font-size: 12px; }
.topic-manager form label span { color: #87918a; font-weight: 400; }
.topic-manager input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fffefa; color: var(--ink); font-size: 13px; }
.topic-manager p { margin: 0; padding: 0 13px 12px; color: #79847d; font-size: 12px; line-height: 1.5; }

.review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 0 13px; }
.review-tabs { display: flex; gap: 6px; }
.review-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.review-tabs a[aria-selected="true"] { background: #e9e9e1; color: var(--ink); font-weight: 650; }
.review-tabs a span { color: #929a94; font-family: var(--mono); font-size: 11px; }
.review-toolbar-tools { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.review-sort { color: #79837c; font-size: 12px; }
.review-page-size { display: inline-flex; align-items: center; gap: 8px; color: #59665f; font-size: 12px; }
.review-source-filter { display: inline-flex; align-items: center; gap: 8px; color: #59665f; font-size: 12px; }
.review-page-size select, .review-source-filter select { min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fffefa; color: var(--ink); font-size: 13px; }
.review-list { border-top: 1px solid var(--line); }
.review-pagination { display: flex; justify-content: center; padding: 22px 0 0; }
.review-pagination .button { padding: 10px 24px; font-size: 14px; }

.analysis-view { padding: 17px 0 8px; }
.analysis-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.analysis-heading h1 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: -.025em; }
.analysis-heading p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.analysis-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.analysis-metric { display: grid; gap: 6px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 254, 250, .68); }
.analysis-metric > span { color: #59665f; font-size: 13px; font-weight: 600; }
.analysis-metric > strong { color: var(--ink); font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.15; }
.analysis-metric > small { color: #79847d; font-size: 11px; }
.analysis-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); align-items: start; gap: 16px; margin-top: 18px; }
.analysis-breakdowns { display: grid; gap: 16px; }
.analysis-panel { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 254, 250, .68); }
.analysis-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.analysis-panel-heading h2 { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 400; }
.analysis-panel-heading p { margin: 4px 0 0; color: #79847d; font-size: 12px; }
.analysis-panel-heading > strong { color: #59665f; font-size: 12px; font-weight: 550; text-align: right; }
.activity-chart { display: grid; gap: 7px; }
.activity-row, .analysis-topic-row, .weekday-average-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 32px; align-items: center; gap: 10px; }
.activity-row { grid-template-columns: 95px minmax(0, 1fr) 32px; }
.activity-day { display: flex; align-items: center; gap: 5px; }
.activity-row time, .analysis-topic-row > span, .weekday-average-row > span { color: #59665f; font-size: 12px; }
.activity-weekend { padding: 2px 4px; border-radius: 3px; background: #f1eee3; color: #74694c; font-size: 9px; font-weight: 600; }
.activity-row > strong, .analysis-topic-row > strong, .weekday-average-row > strong { color: var(--ink); font-size: 12px; font-weight: 600; text-align: right; }
.analysis-meter { display: block; width: 100%; height: 8px; overflow: hidden; appearance: none; border: 0; border-radius: 99px; background: #e9ebe5; }
.analysis-meter::-webkit-progress-bar { border-radius: 99px; background: #e9ebe5; }
.analysis-meter::-webkit-progress-value { border-radius: 99px; background: #83a28a; }
.analysis-meter::-moz-progress-bar { border-radius: 99px; background: #83a28a; }
.analysis-note { margin: 15px 0 0; color: #79847d; font-size: 12px; line-height: 1.6; }
.analysis-note code { font-family: var(--mono); }
.analysis-breakdown { display: grid; gap: 11px; }
.analysis-breakdown-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #59665f; font-size: 13px; }
.analysis-breakdown-row strong { color: var(--ink); font-size: 14px; }
.analysis-topics, .weekday-average-list { display: grid; gap: 11px; }
.analysis-topic-row[hidden] { display: none; }
.topic-general-toggle { display: inline-flex; align-items: center; gap: 7px; color: #59665f; cursor: pointer; font-size: 12px; white-space: nowrap; }
.topic-general-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
.analysis-topic-row { grid-template-columns: minmax(90px, 1fr) minmax(55px, 1.2fr) 32px; }
.weekday-range { display: inline-flex; align-items: center; gap: 8px; color: #59665f; font-size: 12px; }
.weekday-range select { min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fffefa; color: var(--ink); font-size: 12px; }
.analysis-empty { margin: 0; color: #79847d; font-size: 13px; }

.review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(205px, 265px);
  gap: 25px;
  padding: 19px 3px;
  border-bottom: 1px solid var(--line);
}

.review-card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 10px; }
.review-card-title a { font-family: var(--serif); font-size: 18px; }
.review-card-title a:hover { color: var(--accent-dark); }
.review-card-title span { color: #79847d; font-family: var(--mono); font-size: 11px; }
.review-card-main > p { margin: 8px 0; color: #59665f; font-size: 14px; line-height: 1.65; }
.review-card-meta { display: flex; flex-wrap: wrap; gap: 12px; color: #748078; font-size: 12px; }
.review-card-meta a { color: var(--accent-dark); }
.review-source-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.review-source-tags span { padding: 3px 7px; border: 1px solid #dfe3d9; border-radius: 999px; color: #59665f; font-size: 10px; }
.review-card-controls { display: grid; align-content: center; gap: 9px; }
.review-card[aria-busy="true"] .review-card-controls { opacity: .7; }
.review-field-label { color: #79847d; font-size: 12px; }
.review-self-hosted { display: flex; align-items: center; gap: 8px; color: #59665f; font-size: 12px; }
.review-self-hosted input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.review-category { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 254, 250, .85); color: #45524b; font-size: 13px; }
.review-reason { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 254, 250, .7); color: var(--ink); font-size: 13px; }
.review-reason::placeholder { color: #a4aaa4; }
.review-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.review-action { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: transparent; color: #59645f; cursor: pointer; font-size: 12px; }
.review-action:hover { border-color: #c9cfc5; background: #fffefa; }
.category-action { border-color: #d7d8ce; color: #59645f; }
.category-action:hover { border-color: #aab3a8; background: #f0f2ec; }
.keep-action { border-color: #cddfcf; background: #f1f7f1; color: var(--green); }
.keep-action:hover { border-color: #a9c5ad; background: #e5f1e7; }
.not-ready-action { border-color: #e6d7ab; background: #fbf7e9; color: #806b30; }
.not-ready-action:hover { border-color: #d3bf86; background: #f5efd9; }
.filter-action { border-color: #e3b0a4; background: #fff4f0; color: var(--accent-dark); }
.filter-action:hover { border-color: #d98a7b; background: #f9e9e3; }
.review-footnote { margin: 22px 0 0; color: #79847d; font-size: 12px; }
.review-footnote code { font-family: var(--mono); }
.compact-empty { padding-top: 48px; }
.review-list .empty-state p { font-size: 14px; }

.about-copy { max-width: 620px; padding: 0 0 75px; }
.about-copy p { margin: 0 0 16px; color: #58645e; font-size: 14px; line-height: 1.85; }
.about-copy ol { margin: 0 0 16px; padding-left: 25px; color: #58645e; font-size: 16px; line-height: 1.85; }
.about-copy li + li { margin-top: 8px; }
.about-copy .text-link { display: inline-block; margin-top: 5px; }
.terms-copy h2 { margin: 28px 0 9px; color: var(--ink); font-family: var(--serif); font-size: 21px; font-weight: 400; }
.terms-copy .terms-updated { margin-bottom: 20px; color: var(--soft); font-size: 12px; }
.privacy-copy h2 { margin: 28px 0 9px; color: var(--ink); font-family: var(--serif); font-size: 21px; font-weight: 400; }
.privacy-copy .terms-updated { margin-bottom: 20px; color: var(--soft); font-size: 12px; }
.faq-item + .faq-item { margin-top: 21px; padding-top: 20px; border-top: 1px solid var(--line); }
.faq-item h2 { margin: 0 0 8px; color: var(--ink); font-family: var(--serif); font-size: 21px; font-weight: 400; }
.faq-item p { margin-bottom: 0; }
.faq-item .text-link { display: inline; }

.loading-state { display: flex; align-items: center; gap: 10px; min-height: 45vh; justify-content: center; color: var(--muted); font-family: var(--serif); font-size: 15px; }
.loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.button-spinner { width: 11px; height: 11px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: min(390px, calc(100vw - 32px)); padding: 12px 15px; transform: translateY(10px); border: 1px solid #d5d9d0; border-radius: 8px; background: #fffefa; box-shadow: 0 10px 35px rgba(33, 39, 36, .12); color: var(--ink); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.site-footer { margin-top: 47px; padding: 23px 0 27px; border-top: 1px solid var(--line-strong); }
.footer-brand { font-size: 15px; }
.footer-brand .wordmark-mark { width: 19px; height: 19px; border-radius: 6px; }
.footer-brand .wordmark-mark::after { width: 5px; height: 5px; }
.site-footer > p { margin: 8px 0 14px; color: #8a938c; font-size: 10px; }
.local-admin .site-footer > p { font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 7px; color: #9ca39d; font-size: 9px; }
.footer-links a:hover { color: var(--accent-dark); }
body:not(.local-admin) .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
body:not(.local-admin) .site-footer > p { margin: 0 0 0 auto; text-align: right; }
.noscript { margin: 20px; color: var(--accent-dark); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes pulse { 50% { opacity: .35; transform: scale(.85); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 34px, 600px); }
  .site-header { height: 69px; gap: 22px; }
  .header-account { font-size: 11px; }
  .header-login { padding: 7px 10px; }
  .local-admin .site-header { min-height: 69px; height: auto; flex-wrap: wrap; gap: 10px 18px; padding: 12px 0; }
  .local-admin .admin-sync-status { flex: 1 0 100%; align-items: flex-start; max-width: 100%; text-align: left; }
  .local-admin .admin-sync-main { justify-content: flex-start; }
  .wordmark { font-size: 17px; }
  body:not(.local-admin) .wordmark-name { display: none; }
  .primary-nav { gap: 18px; }
  .primary-nav a { font-size: 11px; }
  .page-intro { padding: 52px 0 33px; }
  .page-intro h1 { font-size: clamp(41px, 11vw, 59px); }
  .intro-copy { font-size: 13px; }
  .feed-row { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 17px 2px; }
  .project-title { font-size: 19px; }
  .project-description { font-size: 11px; }
  .feed-toolbar { min-height: 52px; }
  .feed-count { display: none; }
  .search-form input { width: 135px; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .topic-card { min-height: 144px; padding: 15px; }
  .topic-card-title { font-size: 20px; }
  .detail { padding-top: 27px; }
  .detail-heading { padding: 34px 0 29px; }
  .detail-heading h1 { font-size: 44px; }
  .detail-grid { grid-template-columns: 1fr; gap: 12px; padding-top: 28px; }
  .detail-aside { grid-row: 1; }
  .fact-card { max-width: none; }
  .fact-card dl > div { gap: 18px; }
  .fact-card dd { max-width: 60%; }
  .admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-summary .button { grid-column: 1 / -1; justify-self: start; }
  .topic-manager form { grid-template-columns: 1fr; }
  .topic-manager form .button { justify-self: start; }
  .analysis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-layout { grid-template-columns: 1fr; }
  .analysis-breakdowns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-card { grid-template-columns: 1fr; gap: 13px; }
  .review-card-controls { max-width: 360px; }
  .submission-layout { grid-template-columns: 1fr; }
  .submission-review-card { grid-template-columns: 1fr; gap: 12px; }
  .review-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .review-tabs { width: 100%; flex-wrap: wrap; }
  .review-tabs a { flex: 1 1 auto; justify-content: center; }
  .review-toolbar-tools { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
}

@media (max-width: 430px) {
  .page-shell { width: calc(100% - 28px); }
  .site-header { gap: 8px; }
  .wordmark { gap: 7px; font-size: 15px; }
  .wordmark-mark { width: 20px; height: 20px; border-radius: 7px; }
  .primary-nav { gap: 9px; margin-left: auto; }
  .primary-nav a { font-size: 10px; }
  .header-account { gap: 6px; font-size: 10px; }
  .header-login { padding: 6px 7px; }
  .header-user { max-width: 70px; }
  .feed-context { gap: 7px; font-size: 10px; }
  .search-form input { width: 115px; padding-left: 7px; font-size: 10px; }
  .search-form kbd { display: none; }
  .project-domain { font-size: 9px; }
  .topic-grid { grid-template-columns: 1fr 1fr; }
  .analysis-breakdowns { grid-template-columns: 1fr; }
  .analysis-heading h1 { font-size: 26px; }
  .analysis-panel { padding: 14px; }
  .analysis-panel-heading { flex-direction: column; }
  .analysis-panel-heading > strong { text-align: left; }
  .topic-card { min-height: 133px; padding: 13px; }
  .topic-card-title { margin-top: 14px; font-size: 18px; }
  .topic-card-copy { font-size: 9px; }
  .detail-actions { align-items: flex-start; flex-direction: column; gap: 9px; }
  .detail-heading .eyebrow { font-size: 8px; }
  .helpful-box { align-items: flex-start; flex-direction: column; }
  .demo-note { align-items: flex-start; flex-wrap: wrap; font-size: 10px; }
  .demo-note span:last-child { flex-basis: 100%; padding-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body:not(.local-admin) .eyebrow { font-size: 12px; }
body:not(.local-admin) .primary-nav a { font-size: 15px; }
body:not(.local-admin) .demo-note { font-size: 13px; }
body:not(.local-admin) .feed-context { font-size: 14px; }
body:not(.local-admin) .feed-count { font-size: 12px; }
body:not(.local-admin) .search-form input { font-size: 14px; }
body:not(.local-admin) .search-form kbd { font-size: 11px; }
body:not(.local-admin) .row-index { font-size: 13px; }
body:not(.local-admin) .project-domain { font-size: 12px; }
body:not(.local-admin) .project-description { font-size: 15px; }
body:not(.local-admin) .row-meta { font-size: 12px; }
body:not(.local-admin) .topic-pill { min-height: 26px; font-size: 12px; }
body:not(.local-admin) .active-topic { font-size: 14px; }
body:not(.local-admin) .active-topic strong { font-size: 15px; }
body:not(.local-admin) .topic-card-count { font-size: 11px; }
body:not(.local-admin) .topic-card-copy { font-size: 13px; }
body:not(.local-admin) .back-link { font-size: 14px; }
body:not(.local-admin) .button { font-size: 13px; }
body:not(.local-admin) .action-note { font-size: 12px; }
body:not(.local-admin) .detail-section > p:not(.eyebrow) { font-size: 15px; }
body:not(.local-admin) .section-caption { font-size: 13px !important; }
body:not(.local-admin) .fact-card dt,
body:not(.local-admin) .fact-card dd { font-size: 12px; }
body:not(.local-admin) .source-card strong { font-size: 12px; }
body:not(.local-admin) .source-card small { font-size: 11px; }
body:not(.local-admin) .helpful-button,
body:not(.local-admin) .helpful-count { font-size: 12px; }
body:not(.local-admin) .empty-state p { font-size: 14px; }
body:not(.local-admin) .text-link { font-size: 13px; }
body:not(.local-admin) .site-footer > p { font-size: 12px; }
body:not(.local-admin) .about-copy p { font-size: 16px; }
body:not(.local-admin) .loading-state { font-size: 16px; }
body:not(.local-admin) .toast { font-size: 14px; }

@media (max-width: 760px) {
  body:not(.local-admin) .primary-nav a { font-size: 14px; }
  body:not(.local-admin) .project-domain { font-size: 11px; }
  body:not(.local-admin) .project-description { font-size: 14px; }
}

@media (max-width: 430px) {
  body:not(.local-admin) .primary-nav a { font-size: 12px; }
  body:not(.local-admin) .feed-context { font-size: 12px; }
  body:not(.local-admin) .search-form input { font-size: 12px; }
  body:not(.local-admin) .topic-card-copy { font-size: 12px; }
}
