:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #eaecf0;
  --ink: #202122;
  --muted: #54595d;
  --line: #c8ccd1;
  --teal: #3366cc;
  --teal-dark: #0645ad;
  --amber: #a05a2c;
  --red: #b32424;
  --violet: #6b4ba1;
  --green-soft: #e6f2ea;
  --amber-soft: #f5ead7;
  --red-soft: #f8e4e4;
  --violet-soft: #ece7f5;
  --shadow: 0 12px 30px rgba(32, 33, 34, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

.adsense-slot {
  width: min(100% - 32px, 1120px);
  min-height: 90px;
  margin: 24px auto;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

button:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

button.primary:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

button.warn {
  border-color: var(--amber);
  color: #7a4b00;
}

button.danger {
  border-color: var(--red);
  color: var(--red);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.45;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-shell {
  min-height: 100vh;
}

.workbench-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  border-top: 1px solid var(--line);
}

.landing {
  min-height: 94vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 24px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f8fafc;
  padding: 18px 28px 28px;
}

.landing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.92) 38%, rgba(248, 250, 252, 0.55) 68%, rgba(248, 250, 252, 0.9) 100%);
  pointer-events: none;
}

.landing-visual {
  position: absolute;
  z-index: -2;
  inset: 60px -8vw auto auto;
  width: min(1080px, 72vw);
  aspect-ratio: 16 / 9;
  opacity: 0.88;
  pointer-events: none;
}

.landing-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 44px;
}

.landing-mini-brand,
.landing-nav-actions,
.landing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-mini-brand {
  color: var(--ink);
  font-weight: 800;
}

.landing-nav-actions a,
.landing-nav-actions button {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.landing-nav-actions button {
  min-height: 32px;
  padding: 5px 9px;
}

.brand-mark-image {
  display: block;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.small-mark {
  width: 32px;
  height: 32px;
}

.landing-brand-image {
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 18px 30px rgba(15, 36, 64, 0.12));
}

.landing-center {
  align-self: center;
  justify-self: center;
  width: min(860px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.landing-wordmark {
  display: grid;
  gap: 6px;
}

.landing-wordmark h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
}

.landing-wordmark p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.landing-search {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid #a2a9b1;
  background: var(--surface);
  position: relative;
  overflow: visible;
}

.landing-search input {
  min-height: 50px;
  border: 0;
  border-radius: 0;
  font-size: 17px;
}

.landing-search button {
  min-height: 50px;
  border-width: 0 0 0 1px;
  border-color: #a2a9b1;
  border-radius: 0;
  padding: 0 22px;
}

.landing-actions {
  justify-content: center;
}

.landing-actions button,
.landing-panel button,
.landing-results button {
  padding-inline: 12px;
}

.landing-panel a {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.landing-message {
  width: min(620px, 100%);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fa;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

.landing-results {
  width: min(700px, 100%);
  display: grid;
  gap: 8px;
  text-align: left;
}

.landing-results button {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-height: 54px;
  text-align: left;
}

.landing-results span {
  color: var(--muted);
  font-size: 12px;
}

.landing-preview {
  width: min(780px, 100%);
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(32, 33, 34, 0.06);
}

.landing-preview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.landing-preview h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.landing-preview p {
  margin: 0;
  color: #30363d;
  line-height: 1.56;
}

.landing-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.landing-preview-meta a {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}

.account-panel {
  width: min(480px, 100%);
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fa;
  padding: 16px;
  text-align: left;
}

.account-panel strong {
  font-size: 18px;
}

.landing-panels {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(180px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.landing-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fa;
  padding: 16px;
  text-align: left;
}

.landing-panel-link {
  color: var(--ink);
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.landing-panel-link:hover,
.landing-panel-link:focus-visible {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  outline: none;
}

.landing-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
}

.landing-panel strong {
  color: var(--ink);
  font-size: 26px;
}

.landing-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.feature-panel {
  background: #ffffff;
}

.mediation-page {
  display: grid;
  gap: 18px;
}

.mediation-list {
  display: grid;
  gap: 12px;
}

.mediation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.mediation-item:hover,
.mediation-item:focus-visible {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  outline: none;
}

.mediation-item-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.mediation-item h2,
.mediation-item p {
  margin: 0;
}

.mediation-item h2 {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.mediation-item-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.landing-topic-list {
  display: grid;
  gap: 7px;
}

.landing-topic-list button {
  justify-content: start;
  text-align: left;
}

.feature-panel .button-row {
  margin-top: 4px;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #f1f3f5;
  padding: 22px;
  overflow: auto;
}

.brand {
  display: grid;
  gap: 4px;
  margin-bottom: 22px;
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand p,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-section {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.page-list {
  display: grid;
  gap: 8px;
}

.page-button {
  width: 100%;
  display: grid;
  gap: 4px;
  justify-items: start;
  min-height: 58px;
  padding: 10px;
  text-align: left;
}

.page-button.active {
  border-color: var(--teal);
  background: white;
}

.page-button strong {
  font-size: 14px;
}

.page-button span {
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  overflow: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 249, 250, 0.92);
  backdrop-filter: blur(10px);
  padding: 16px 24px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
}

.link-stat {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.workspace {
  display: grid;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.queue-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.compact-header {
  padding: 14px 16px;
}

.compact-header h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.queue-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.queue-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.panel-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.page-content {
  min-height: 260px;
  white-space: pre-wrap;
  line-height: 1.58;
  font-size: 16px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.split.tight {
  gap: 8px;
}

.signal-list {
  display: grid;
  gap: 8px;
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 8px 10px;
  font-size: 13px;
}

.signal-row span {
  color: var(--teal-dark);
  font-weight: 800;
}

.proposal-list {
  display: grid;
  gap: 16px;
}

.challenge-thread {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.challenge-sides {
  margin: 0;
  display: grid;
  gap: 6px;
}

.challenge-sides dt {
  font-weight: 700;
  color: var(--teal-dark);
}

.challenge-sides dd {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.challenge-verdict {
  border-left: 4px solid var(--teal-dark);
  background: rgba(51, 102, 204, 0.06);
  padding: 12px 16px;
  border-radius: 4px;
}

.challenge-verdict.verdict-revert {
  border-left-color: #a4442c;
  background: rgba(164, 68, 44, 0.07);
}

.compact-list .proposal-body {
  gap: 12px;
}

.proposal {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.proposal-head {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.proposal-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.proposal-title-row h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge.ready,
.badge.accepted {
  background: var(--green-soft);
  color: var(--teal-dark);
}

.badge.needs {
  background: var(--amber-soft);
  color: #7a4b00;
}

.badge.rejected,
.badge.risk {
  background: var(--red-soft);
  color: var(--red);
}

.badge.analysis {
  background: var(--violet-soft);
  color: var(--violet);
}

.proposal-body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.diff-box {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  min-height: 160px;
  padding: 12px;
  white-space: pre-wrap;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.diff-box.compact {
  max-height: 220px;
  min-height: 90px;
  overflow: auto;
  font-size: 13px;
}

.translation-preview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
}

.section-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-title-row .section-title {
  margin: 0;
}

.mini-badge {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 4px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.corpus-box {
  border-top: 1px solid rgba(32, 33, 34, 0.1);
  padding-top: 18px;
}

.corpus-results {
  display: grid;
  gap: 8px;
}

.corpus-result {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-height: 52px;
  padding: 9px 10px;
  text-align: left;
}

.corpus-result span {
  color: var(--muted);
  font-size: 12px;
}

.corpus-preview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
}

.candidate-list,
.issue-list,
.response-list {
  display: grid;
  gap: 10px;
}

.candidate,
.issue,
.response {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  padding: 12px;
}

.candidate {
  display: grid;
  gap: 10px;
}

.candidate h4,
.issue h4 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.candidate-content {
  border-left: 3px solid var(--teal);
  padding-left: 10px;
  white-space: pre-wrap;
  color: #30363d;
  line-height: 1.45;
}

.source-box {
  border-left: 3px solid var(--amber);
  padding-left: 10px;
  white-space: pre-wrap;
  color: #30363d;
  font-size: 13px;
  line-height: 1.45;
}

.attribution-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--violet);
  border-radius: 7px;
  background: white;
  padding: 12px;
  color: #30363d;
  font-size: 13px;
  line-height: 1.45;
}

.attribution-box p {
  margin: 0;
}

.attribution-box a,
.license-page a {
  color: var(--teal-dark);
  font-weight: 700;
}

.watch-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.watch-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.history-list,
.audit-list,
.prompt-list {
  display: grid;
  gap: 8px;
}

.history-item,
.audit-item {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--line);
  padding-left: 10px;
}

.prompt {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.prompt.warning {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: #7a4b00;
}

.decision-box {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fa;
  padding: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fa;
  padding: 12px;
}

.review-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.review-actions button {
  padding: 7px 8px;
  font-size: 12px;
}

.review-box textarea {
  min-height: 78px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.license-page,
.policy-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
  line-height: 1.6;
}

.license-page > header,
.policy-page > header {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.license-page h1,
.license-page h2,
.policy-page h1,
.policy-page h2 {
  margin: 0;
  letter-spacing: 0;
}

.license-page h1,
.policy-page h1 {
  font-size: 32px;
  line-height: 1.1;
}

.license-page h2,
.policy-page h2 {
  margin-top: 28px;
  font-size: 20px;
}

.license-page p,
.license-page li,
.policy-page p,
.policy-page li {
  color: #30363d;
}

.license-page .back-link,
.policy-page .back-link {
  display: inline-flex;
  margin-top: 28px;
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.policy-nav a,
.site-footer a {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}

.policy-page .effective-date {
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.site-footer p {
  margin: 10px 0 0;
}

/* Buttons rendered as links */
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.button-link:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.button-link.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.button-link.primary:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

/* Slim site header (article / source / find / tools routes) */
.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 249, 250, 0.94);
  backdrop-filter: blur(10px);
  padding: 10px 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.header-search {
  justify-self: center;
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid #a2a9b1;
  border-radius: 7px;
  overflow: visible;
  background: var(--surface);
  position: relative;
}

.header-search input {
  min-height: 38px;
  border: 0;
  border-radius: 0;
}

.header-search button {
  min-height: 38px;
  border-width: 0 0 0 1px;
  border-color: #a2a9b1;
  border-radius: 0;
  padding: 0 16px;
}

.search-suggestions {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid #a2a9b1;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-suggestions:empty {
  display: none;
}

.search-suggestion-list {
  display: grid;
}

.search-suggestion,
.search-suggestion-state {
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.search-suggestion:last-child {
  border-bottom: 0;
}

.search-suggestion {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
}

.search-suggestion:hover {
  background: #f8f9fa;
}

.search-suggestion-state {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.suggestion-thumb,
.find-result-thumb {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 72px;
  background: #f1f3f5;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 700;
}

.suggestion-thumb img,
.find-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suggestion-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 14px;
}

.suggestion-copy strong,
.suggestion-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-copy strong {
  color: var(--ink);
}

.suggestion-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.header-actions a,
.header-actions button {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.header-actions button {
  min-height: 32px;
  padding: 5px 9px;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

/* Recently edited (home) */
.recent {
  display: grid;
  gap: 14px;
}

.recent-head {
  display: grid;
  gap: 2px;
}

.recent-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.recent-card {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.recent-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.recent-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.recent-card-head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0;
}

.recent-excerpt {
  margin: 0;
  color: #30363d;
  font-size: 14px;
  line-height: 1.5;
}

.recent-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.recent-summary {
  font-size: 12px;
  font-style: italic;
}

/* Alphabetical article index */
.home-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 0;
  font-size: 14px;
}

.home-links a,
.alphabet-nav a,
.article-index-group a {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}

.article-index {
  display: grid;
  gap: 18px;
}

.article-index-section {
  display: grid;
  gap: 14px;
}

.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-block: 1px solid var(--line);
  padding-block: 12px;
}

.alphabet-nav a {
  min-width: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 6px 8px;
  text-align: center;
  font-size: 13px;
}

.alphabet-nav a.active {
  border-color: var(--teal);
  background: #e8f5f3;
  color: var(--teal-dark);
}

.article-index-groups {
  display: grid;
  gap: 18px;
}

.article-index-group {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.article-index-group h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0;
}

.article-index-group ul {
  columns: 3 220px;
  margin: 0;
  padding-left: 18px;
}

.article-index-group-content {
  display: grid;
  gap: 14px;
}

.article-index-group li {
  break-inside: avoid;
  margin: 0 0 8px;
  padding-right: 18px;
}

.article-index-group li span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.source-corpus-index {
  border-top: 0;
  padding-top: 0;
}

.source-browse-list {
  columns: 3 240px;
  margin: 0;
  padding-left: 18px;
}

.source-browse-list li {
  break-inside: avoid;
  margin: 0 0 8px;
  padding-right: 18px;
}

.source-browse-list a {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}

.source-browse-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.browse-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Search results (find route) */
.find {
  display: grid;
  gap: 16px;
}

.find h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
}

.find-results {
  display: grid;
  gap: 10px;
}

.find-create-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px 18px;
}

.find-create-prompt p {
  margin: 0 0 6px;
  color: var(--muted);
}

.find-create-prompt strong {
  color: var(--ink);
  font-size: 16px;
}

.find-result {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 140ms ease, transform 140ms ease;
}

.visual-result {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.visual-result > div {
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 14px 16px;
}

.find-result-thumb {
  min-height: 86px;
}

.find-result:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.find-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.find-result-head strong {
  font-size: 17px;
}

.find-result p {
  margin: 0;
  font-size: 13px;
}

/* Article (read) view */
.article {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}

.article-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.article-header h1 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.article-byline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.article-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.share-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--teal-dark);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.share-link:hover {
  border-color: var(--teal);
  background: #f0f4ff;
  color: var(--teal-dark);
  transform: translateY(-1px);
}

.share-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.article-header-actions {
  display: inline-flex;
  gap: 8px;
  flex-shrink: 0;
}

.article-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.article-tabs a {
  border: 1px solid transparent;
  border-bottom: 0;
  color: var(--teal-dark);
  padding: 9px 13px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.article-tabs a.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  margin-bottom: -1px;
}

.article-tab-panel {
  display: grid;
  gap: 18px;
}

.dispute-markers {
  border: 1px solid var(--amber);
  border-left-width: 4px;
  border-radius: 7px;
  background: var(--amber-soft);
  padding: 12px;
}

.article-body {
  font-size: 16px;
  line-height: 1.65;
  color: #1c1d1e;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  margin: 22px 0 10px;
}

.article-body h2 {
  font-size: 23px;
}

.article-body h3 {
  font-size: 19px;
  border-bottom: 0;
}

.article-body h4 {
  font-size: 16px;
  border-bottom: 0;
}

.article-body p {
  margin: 0 0 14px;
}

.article-body ul,
.article-body ol,
.article-body dl {
  margin: 0 0 14px;
  padding-left: 26px;
}

.article-body li {
  margin: 4px 0;
}

.article-body dt {
  font-weight: 700;
  margin: 8px 0 2px;
}

.article-body dd {
  margin: 3px 0 3px 18px;
}

.article-body dd.source-indent-depth-2 {
  margin-left: 38px;
}

.article-body dd.source-indent-depth-3,
.article-body dd.source-indent-depth-4 {
  margin-left: 58px;
}

.article-body .mw-parser-output {
  color: #202122;
  font-family: sans-serif;
  line-height: 1.625;
  overflow-wrap: break-word;
}

.article-body .mw-parser-output::after {
  content: "";
  display: block;
  clear: both;
}

.article-body .mw-parser-output p {
  margin: 0.5em 0 1em;
}

.article-body .mw-parser-output .thumb {
  max-width: 100%;
  font-size: 88.4%;
  line-height: 1.4;
}

.article-body .mw-parser-output .floatright,
.article-body .mw-parser-output .tright {
  float: right;
  clear: right;
  margin: 0.5em 0 1.3em 1.4em;
}

.article-body .mw-parser-output .floatleft,
.article-body .mw-parser-output .tleft {
  float: left;
  clear: left;
  margin: 0.5em 1.4em 1.3em 0;
}

.article-body .mw-parser-output .tnone {
  float: none;
  clear: none;
  margin: 0.5em 0 1.3em;
}

.article-body .mw-parser-output .thumbinner {
  max-width: 100%;
  box-sizing: content-box;
  border: 1px solid #c8ccd1;
  background: #f8f9fa;
  color: #202122;
  padding: 3px;
  text-align: center;
  overflow: hidden;
}

.article-body .mw-parser-output .thumbimage {
  background: #fff;
}

.article-body .mw-parser-output .thumb img,
.article-body .mw-parser-output figure img.mw-file-element {
  max-width: 100%;
  height: auto;
}

.article-body .mw-parser-output .thumbcaption {
  box-sizing: border-box;
  padding: 3px;
  text-align: left;
  word-break: normal;
  overflow-wrap: break-word;
}

.article-body .mw-parser-output .tmulti .thumbinner {
  padding: 0;
}

.article-body .mw-parser-output .tmulti .thumbcaption {
  width: 100%;
  padding: 3px 0 0;
}

.article-body .mw-parser-output h2,
.article-body .mw-parser-output h3,
.article-body .mw-parser-output h4 {
  border-bottom: 0;
  font-family: inherit;
  letter-spacing: 0;
  margin: 0;
  padding: 0;
}

.article-body .mw-parser-output h2 {
  font-family: "Linux Libertine", Georgia, Times, "Source Serif 4", serif;
  font-size: 1.5em;
  font-weight: 400;
  line-height: 1.375;
}

.article-body .mw-parser-output h3 {
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1.6;
}

.article-body .mw-parser-output h4 {
  font-size: 1em;
  font-weight: 700;
  line-height: 1.6;
}

.article-body .mw-parser-output .mw-heading {
  margin-bottom: 0.25em;
}

.article-body .mw-parser-output .mw-heading2 {
  border-bottom: 1px solid #a2a9b1;
  font-family: "Linux Libertine", Georgia, Times, "Source Serif 4", serif;
  font-size: 1.5em;
  font-weight: 400;
  line-height: 1.375;
  margin-top: 0.25em;
  padding-top: 0.5em;
  padding-bottom: 0.17em;
}

.article-body .mw-parser-output .mw-heading3 {
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1.6;
  margin-top: 0.25em;
  padding-top: 0.5em;
}

.article-body .mw-parser-output .mw-heading h2,
.article-body .mw-parser-output .mw-heading h3,
.article-body .mw-parser-output .mw-heading h4 {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.article-body .mw-parser-output ul,
.article-body .mw-parser-output ol {
  margin: 0.3em 0 0 1.6em;
  padding-left: 0;
}

.article-body .mw-parser-output dl {
  margin: 0.2em 0 0.5em;
  padding-left: 0;
}

.article-body .mw-parser-output li {
  margin: 0;
}

.article-body .mw-parser-output dt {
  font-weight: 700;
  margin: 0;
}

.article-body .mw-parser-output dd {
  margin: 0 0 0.1em 1.6em;
}

.article-body .mw-parser-output ol.references {
  font-size: 90%;
  margin: 0 0 0.5em 3.2em;
  padding-left: 0;
}

.article-body .mw-parser-output a {
  color: #36c;
  text-decoration: none;
}

.article-body .mw-parser-output a:hover {
  text-decoration: underline;
}

.article-body table.wikitable {
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  background-color: #f8f9fa;
  color: #202122;
  margin: 1em 0;
  font-size: 100%;
}

.article-body table.wikitable caption {
  font-weight: 700;
}

.article-body table.wikitable > tr > th,
.article-body table.wikitable > tr > td,
.article-body table.wikitable > * > tr > th,
.article-body table.wikitable > * > tr > td {
  border: 1px solid #a2a9b1;
  padding: 0.2em 0.4em;
}

.article-body table.wikitable > tr > th,
.article-body table.wikitable > * > tr > th {
  background-color: #eaecf0;
  text-align: center;
}

.article-body .source-table-wrap {
  margin: 14px 0 18px;
  overflow-x: auto;
}

.article-body .source-table {
  border-collapse: collapse;
  min-width: 520px;
  width: 100%;
  font-size: 14px;
  line-height: 1.45;
}

.article-body .source-table th,
.article-body .source-table td {
  border: 1px solid var(--line);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
}

.article-body .source-table th {
  background: #f6f8fa;
  color: var(--ink);
  font-weight: 700;
}

.article-body .source-table tbody tr:nth-child(even) {
  background: #fbfcfd;
}

.article-body a {
  color: var(--teal-dark);
  text-decoration: none;
}

.article-body a:hover {
  text-decoration: underline;
}

.article-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.article-section.first-section {
  border-top: 0;
  padding-top: 0;
}

.source-code-view {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
}

.propose-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

/* Wikipedia-backed article banner */
.source-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--violet);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--violet-soft);
  padding: 14px 16px;
}

.source-banner strong {
  font-size: 15px;
}

.source-banner p {
  margin: 2px 0 0;
}

/* Tools: all-pages index rows */
.page-index-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 140ms ease, transform 140ms ease;
}

.page-index-row:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.page-index-row strong {
  font-size: 15px;
}

.page-index-row p {
  margin: 2px 0 0;
}

/* Account overlay */
.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: start center;
  padding: 80px 18px;
  background: rgba(32, 33, 34, 0.32);
}

.account-overlay .account-panel {
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.auth-tabs button {
  flex: 1;
  border-color: transparent;
  background: transparent;
  font-weight: 700;
  color: var(--muted);
}

.auth-tabs button.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.auth-error {
  margin: 0;
  border: 1px solid var(--red);
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
  padding: 10px 11px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.login-cta {
  display: grid;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
}

.login-cta p {
  margin: 0;
  color: var(--muted);
}

.verify-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--amber-soft);
  color: #7a4b00;
  border-bottom: 1px solid var(--amber);
  padding: 8px 16px;
  font-size: 14px;
}

.verify-banner button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
}

.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: auto;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  justify-self: start;
}

.link-button:hover {
  border: 0;
  transform: none;
  text-decoration: underline;
}

.corpus-result {
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 1040px) {
  .workbench-shell,
  .landing-panels {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .page-grid,
  .watch-box,
  .split,
  .diff-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace,
  .topbar,
  .sidebar,
  .landing {
    padding: 14px;
  }

  .landing-search {
    grid-template-columns: 1fr;
  }

  .landing-search button {
    border-width: 1px 0 0;
  }

  .landing-visual {
    inset: 82px -42vw auto auto;
    width: 122vw;
    opacity: 0.24;
  }

  .landing-nav {
    align-items: flex-start;
  }

  .landing-nav,
  .landing-nav-actions {
    flex-direction: column;
  }

  .landing-center {
    align-self: start;
  }

  .landing-preview-head {
    display: grid;
  }

  .review-actions {
    grid-template-columns: 1fr 1fr;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .header-search {
    justify-self: stretch;
    width: 100%;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .article-header,
  .source-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .article-body .mw-parser-output .floatright,
  .article-body .mw-parser-output .tright,
  .article-body .mw-parser-output .floatleft,
  .article-body .mw-parser-output .tleft {
    float: none;
    clear: both;
    margin: 0.8em auto 1.2em;
  }

  .article-body .mw-parser-output .thumbinner {
    margin-left: auto;
    margin-right: auto;
  }

  .article-index-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .article-index-group ul {
    columns: 1;
  }

  .source-browse-list {
    columns: 1;
  }

  .mediation-item {
    grid-template-columns: 1fr;
  }

  .mediation-item-meta {
    justify-content: start;
  }

  .page-shell {
    padding: 14px;
  }
}
