:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #59636e;
  --stroke: #d0d7de;
  --accent: #5347e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --sidebar: #fbfbfd;
  --max: 880px;
  --topbar: 56px;
  --sidebar-w: 232px;
  --bs-primary: #5347e5;
  --bs-link-color: #5347e5;
  --bs-link-hover-color: #4338ca;
  --bs-body-color: #1f2328;
  --bs-body-bg: #f4f5f8;
  --bs-border-color: #d0d7de;
  --bs-font-sans-serif: "Aileron", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-line-height: 1.5;
  --bs-border-radius: 8px;
}

html[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --text: #e6edf3;
  --muted: #9198a1;
  --stroke: #30363d;
  --accent: #8b84f0;
  --accent-hover: #a5a0f5;
  --accent-soft: #21262d;
  --sidebar: #010409;
  --bs-primary: #8b84f0;
  --bs-link-color: #8b84f0;
  --bs-link-hover-color: #a5a0f5;
  --bs-body-color: #e6edf3;
  --bs-body-bg: #0d1117;
  --bs-border-color: #30363d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--bs-font-sans-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.brand-logo {
  display: block;
  height: auto;
}

.brand-logo--dark {
  display: none;
}

html[data-theme="dark"] .brand-logo--light {
  display: none;
}

html[data-theme="dark"] .brand-logo--dark {
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topbar);
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--stroke);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark .brand-logo {
  width: 129px;
  height: 28px;
}

.top-search {
  position: relative;
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
}

.top-search-field {
  position: relative;
}

.top-search-field .bi {
  position: absolute;
  left: 12px;
  top: 50%;
  width: auto;
  height: auto;
  font-size: 0.95rem;
  line-height: 1;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.top-search-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.top-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--bg);
  font: inherit;
  color: var(--text);
}

.top-search input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, white);
  border-color: var(--accent);
  background: var(--surface);
}

.search-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  padding: 6px;
  max-height: min(70vh, 420px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 14%, transparent);
}

.search-menu[hidden] {
  display: none;
}

.search-hit {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.search-hit:hover,
.search-hit.is-active {
  background: var(--accent-soft);
  text-decoration: none;
}

.search-hit strong {
  font-size: 0.92rem;
}

.search-hit-meta,
.search-hit-blurb {
  color: var(--muted);
  font-size: 0.8rem;
}

.search-hit-blurb {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-menu-empty,
.search-menu-more {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.search-menu-more a {
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.create-fab {
  display: none;
}

.top-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
}

.top-bell:hover {
  text-decoration: none;
  background: var(--bg);
}

.top-bell .bi {
  font-size: 1.05rem;
  line-height: 1;
}

.top-bell-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.side-link-count {
  margin-left: auto;
  min-width: 1.25rem;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid transparent;
  padding-left: 8px;
}

.notice-item + .notice-item {
  border-top: 1px solid var(--stroke);
}

.notice-item.is-unread {
  border-left-color: var(--accent);
}

.notice-item-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  padding: 14px 4px;
  color: inherit;
  min-width: 0;
}

.notice-item-link:hover {
  text-decoration: none;
}

.notice-item-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.notice-item.is-unread .notice-item-body {
  font-weight: 700;
}

.notice-item-when {
  flex-shrink: 0;
  font-size: 0.85rem;
}

.notice-item-read {
  flex-shrink: 0;
}

.notice-item-read .ghost-btn {
  height: 32px;
  padding: 0 10px;
  font-size: 0.85rem;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.ghost-btn:hover {
  text-decoration: none;
  background: var(--bg);
}

.top-user {
  gap: 8px;
  padding-left: 6px;
  padding-right: 10px;
  max-width: 180px;
}

.top-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--stroke);
  flex-shrink: 0;
}

.top-user-avatar.avatar-fallback {
  font-size: 0.65rem;
}

.top-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.nav-scrim {
  display: none;
}

.nav-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle-btn .bi {
  font-size: 1.25rem;
  line-height: 1;
}

.nav-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.app-frame {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--topbar));
}

.sidebar {
  position: sticky;
  top: var(--topbar);
  align-self: flex-start;
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: calc(100vh - var(--topbar));
  max-height: calc(100vh - var(--topbar));
  padding: 16px 12px 24px;
  background: var(--sidebar);
  border-right: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar:hover {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent;
}

.sidebar:hover::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sidebar:hover::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar:hover::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-label {
  margin: 16px 8px 6px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-nav .side-label:first-child {
  margin-top: 4px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.925rem;
}

.side-link .bi {
  width: 1em;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  color: var(--muted);
}

.side-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}

.side-link:hover {
  text-decoration: none;
  background: var(--accent-soft);
  color: var(--accent);
}

.side-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.side-link.is-active .bi,
.side-link:hover .bi,
.side-link.is-active svg,
.side-link:hover svg {
  color: currentColor;
}

.side-signout {
  margin: 8px 0 0;
  flex-shrink: 0;
}

.side-signout button {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.side-signout button:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.side-signout-btn {
  margin-top: 8px;
  flex-shrink: 0;
}

.side-about {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  flex-shrink: 0;
}

.side-theme {
  margin-top: auto;
  padding-top: 16px;
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}

.theme-toggle:hover .theme-toggle-icon {
  color: currentColor;
}

.theme-toggle-icon .bi {
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle-icon svg {
  width: 16px;
  height: 16px;
}

.theme-toggle-icon--sun,
.theme-toggle-label--to-light {
  display: none;
}

html[data-theme="dark"] .theme-toggle-icon--moon,
html[data-theme="dark"] .theme-toggle-label--to-dark {
  display: none;
}

html[data-theme="dark"] .theme-toggle-icon--sun,
html[data-theme="dark"] .theme-toggle-label--to-light {
  display: inline-flex;
}

html[data-theme="dark"] .theme-toggle-label--to-light {
  display: inline;
}

.confirm-dialog {
  width: min(400px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 48px color-mix(in srgb, var(--text) 18%, transparent);
}

.confirm-dialog::backdrop {
  background: rgb(15 23 42 / 45%);
}

html[data-theme="dark"] .confirm-dialog::backdrop {
  background: rgb(1 4 9 / 65%);
}

.confirm-dialog-form {
  padding: 20px 20px 16px;
}

.confirm-dialog-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.confirm-dialog-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.925rem;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.side-about-title {
  margin: 0 0 6px;
  font-weight: 650;
  font-size: 0.9rem;
}

.side-about p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.side-about a {
  font-size: 0.82rem;
  font-weight: 600;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.site-main--board,
.site-main--idea,
.site-main--profile,
.site-main--workspace,
.site-main--legal,
.site-main--auth {
  width: min(1180px, calc(100% - 40px));
}

.site-main--auth {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 48px;
  padding-bottom: 64px;
}

.auth-panel {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px 24px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface);
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.auth-brand:hover {
  text-decoration: none;
}

.auth-brand .brand-logo {
  width: 148px;
  height: 32px;
}

.auth-title {
  margin: 0;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-lead {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-providers {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-weight: 600;
}

.auth-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-btn:hover {
  text-decoration: none;
}

html[data-theme="dark"] .auth-btn.btn-dark {
  background: #e6edf3;
  border-color: #e6edf3;
  color: #0d1117;
}

html[data-theme="dark"] .auth-btn.btn-dark:hover {
  background: #fff;
  border-color: #fff;
  color: #0d1117;
}

html[data-theme="dark"] .auth-btn.btn-outline-dark {
  color: var(--text);
  border-color: var(--stroke);
}

html[data-theme="dark"] .auth-btn.btn-outline-dark:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.auth-legal {
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-legal a {
  color: var(--muted);
}

.auth-legal a:hover {
  color: var(--text);
}

.auth-legal span {
  margin: 0 6px;
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 32px;
  color: var(--muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.site-footer-tagline {
  margin: 0;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-left: auto;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

.site-main--board + .site-footer,
.site-main--idea + .site-footer,
.site-main--profile + .site-footer,
.site-main--workspace + .site-footer,
.site-main--legal + .site-footer,
.app-main:has(.site-main--board) .site-footer,
.app-main:has(.site-main--idea) .site-footer,
.app-main:has(.site-main--profile) .site-footer,
.app-main:has(.site-main--workspace) .site-footer,
.app-main:has(.site-main--legal) .site-footer {
  width: min(1180px, calc(100% - 40px));
}

.hero h1,
.hero-copy h1 {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  font-weight: 800;
}

.hero p,
.empty-board p,
.hero-copy p {
  color: var(--muted);
  margin: 0;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.search-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  max-width: 28rem;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  font: inherit;
}

.search-shell .search-header {
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

.search-header-copy {
  min-width: 0;
}

.search-shell .search-form {
  margin: 0;
  max-width: none;
  width: 100%;
  align-items: stretch;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-field .bi {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 0.95rem;
  line-height: 1;
}

.search-field .form-control {
  height: 44px;
  padding-left: 38px;
  background: var(--bg);
  border-color: var(--stroke);
  color: var(--text);
}

.search-field .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  background: var(--surface);
}

.search-pills {
  margin: 0;
}

.search-meta {
  margin: 4px 0 0;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 16px 18px 14px;
}

.search-result-link {
  display: block;
  color: inherit;
}

.search-result-link:hover {
  text-decoration: none;
}

.search-result-link h2 {
  margin: 8px 0 6px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.search-result-link:hover h2 {
  color: var(--accent);
}

.search-result-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
  font-size: 0.82rem;
}

.search-result-meta .avatar-sm {
  width: 20px;
  height: 20px;
}

.search-probes {
  margin-top: 8px;
}

.search-probes .section-head {
  margin-bottom: 10px;
}

.probe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.search-result--probe .search-result-meta .bi {
  font-size: 0.9rem;
  line-height: 1;
}

.probe-owner-note {
  margin: 10px 0 0;
  max-width: 40rem;
}

.probe-shell .visibility-pill .bi {
  font-size: 0.85rem;
  line-height: 1;
}

.probe-shell .idea-card .nav-form {
  margin-top: 12px;
}

.danger-zone .section-head h2 {
  color: var(--text);
}

.btn-outline-danger {
  color: #cf222e;
  border-color: color-mix(in srgb, #cf222e 35%, var(--stroke));
  background: var(--surface);
}

.btn-outline-danger:hover {
  color: #fff;
  background: #cf222e;
  border-color: #cf222e;
}

html[data-theme="dark"] .btn-outline-danger {
  color: #ff7b72;
  border-color: color-mix(in srgb, #ff7b72 40%, var(--stroke));
}

html[data-theme="dark"] .btn-outline-danger:hover {
  color: #0d1117;
  background: #ff7b72;
  border-color: #ff7b72;
}

.cite-shell .idea-header {
  padding-bottom: 0;
}

.cite-version-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 14px 0 16px;
  border-top: 1px solid var(--stroke);
}

.cite-version-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
}

.cite-version-pill:hover {
  text-decoration: none;
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--stroke));
}

.cite-version-pill.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--stroke));
  background: var(--accent-soft);
}

.cite-panel {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.cite-panel .section-head {
  margin-bottom: 6px;
}

.cite-panel .section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.cite-help {
  margin: 0 0 14px;
  max-width: 40rem;
}

.cite-field {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.cite-field .form-control {
  flex: 1;
  min-width: 0;
  height: 42px;
  background: var(--bg);
  border-color: var(--stroke);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.cite-field .btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cite-meta {
  font-size: 0.82rem;
  word-break: break-all;
}

.export-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: var(--bg);
  color: inherit;
}

.export-card:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--stroke));
  background: var(--surface);
}

.export-card:hover strong {
  color: var(--accent);
}

.export-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
  font-size: 1.05rem;
}

.export-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.export-copy strong {
  font-size: 0.92rem;
}

.export-copy .muted {
  font-size: 0.8rem;
}

.export-card > .bi-download {
  color: var(--muted);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .cite-field {
    flex-direction: column;
  }
}

html[data-theme="dark"] .tone-green { background: #12261c; color: #56d364; }
html[data-theme="dark"] .tone-blue { background: #121d2e; color: #79b8ff; }
html[data-theme="dark"] .tone-red { background: #2d1214; color: #ff7b72; }
html[data-theme="dark"] .tone-orange { background: #2a1a0c; color: #ffa657; }
html[data-theme="dark"] .tone-yellow { background: #2a2308; color: #e3b341; }
html[data-theme="dark"] .tone-purple { background: #1c1a33; color: #a5a0f5; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.board-feed {
  min-width: 0;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.95fr);
  gap: 20px 28px;
  align-items: center;
  padding: 28px 24px 24px 28px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
}

.hero-copy {
  min-width: 0;
}

.hero-art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  max-height: 280px;
}

.hero-art img,
.hero-art svg {
  width: 100%;
  max-width: 420px;
  max-height: 280px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center bottom;
}

.hero-copy p {
  margin: 0 0 18px;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.text-link {
  font-weight: 600;
  font-size: 0.925rem;
}

.board-facets {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.facet-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.facet-kicker {
  margin: 0;
  min-width: 3.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.board-pills {
  margin: 0;
  flex: 1;
  gap: 6px;
}

.board-pills li {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.board-pills li.is-on {
  background: transparent;
  border-color: transparent;
}

.board-pills a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.2;
}

.board-pills a:hover {
  text-decoration: none;
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--stroke));
}

.board-pills li.is-on a,
.board-pills li.is-on a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

html[data-theme="dark"] .board-pills li.is-on a,
html[data-theme="dark"] .board-pills li.is-on a:hover {
  color: #0d1117;
}

.pills:not(.board-pills) li.is-on {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--stroke));
}

.niche-note {
  margin: 10px 0 0;
}

.board-section {
  margin-top: 28px;
  scroll-margin-top: calc(var(--topbar) + 12px);
}

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

.section-head h2,
.rail-card h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.trend-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trend-card,
.rail-card,
.fork-row {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.trend-card {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.trend-card-link {
  color: inherit;
  display: block;
  flex: 1;
}

.trend-card-link:hover {
  text-decoration: none;
}

.trend-card h3 {
  margin: 8px 0 6px;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.trend-card-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trend-by,
.trend-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.trend-meta {
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
}

.trend-meta svg {
  width: 14px;
  height: 14px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.4;
}

.tone-green { background: #e8f6ee; color: #17653a; }
.tone-blue { background: #e7f1fb; color: #185fa5; }
.tone-red { background: #fdecec; color: #b42318; }
.tone-orange { background: #fff1e5; color: #9a4a00; }
.tone-yellow { background: #fff8c5; color: #7a5c00; }
.tone-purple { background: #eef0ff; color: #4338ca; }

.lane-shift {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.collect-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.collect-form .form-select {
  width: auto;
  min-width: 10rem;
  max-width: 16rem;
}

.fork-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fork-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.fork-glyph {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.fork-glyph svg {
  width: 16px;
  height: 16px;
}

.fork-copy a {
  font-weight: 650;
  color: var(--text);
}

.fork-copy p {
  margin: 2px 0 0;
  font-size: 0.82rem;
}

.board-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--topbar) + 16px);
}

.rail-card {
  padding: 16px;
}

.contrib-list,
.topic-cloud {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.contrib-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contrib-list li {
  display: grid;
  grid-template-columns: 1.1rem 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
}

.contrib-rank {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.contrib-list a {
  grid-column: 3;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.contrib-list .muted {
  grid-column: 3;
  font-size: 0.75rem;
}

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

.topic-cloud a:hover {
  text-decoration: none;
  filter: brightness(0.97);
}

.rail-cta {
  padding: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--stroke));
}

.rail-cta-kicker {
  margin: 0 0 6px;
  font-weight: 700;
}

.rail-cta p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

.avatar-sm {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--stroke);
}

.fork-row .avatar-sm,
.contrib-list .avatar-sm {
  width: 28px;
  height: 28px;
}

.avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
}

.idea-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.idea-card {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 8px;
}

.idea-card h2,
.idea-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.idea-card p {
  margin: 0;
}

.idea-form,
.idea-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.idea-form label {
  font-weight: 600;
  margin-top: 8px;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.idea-form input[type="text"],
.idea-form textarea,
.stack-form input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  font: inherit;
  width: 100%;
}

.idea-form textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--stroke);
}

.button.danger {
  background: #cf222e;
}

.danger-panel {
  padding: 16px 20px;
  background: #fff8c5;
  border: 1px solid #d4a72c;
  border-radius: 6px;
  margin: 0 0 16px;
}

.danger-panel p:first-child {
  margin-top: 0;
}

.danger-panel p:last-child {
  margin-bottom: 0;
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
}

.stack-form select {
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  font: inherit;
}

.stack-form fieldset {
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 0;
  display: grid;
  gap: 8px;
}

.stack-form legend {
  padding: 0 4px;
  font-weight: 600;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
}

.prose {
  line-height: 1.55;
}

.prose p:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.preview-panel {
  margin-top: 32px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 6px;
}

.preview-panel h2 {
  margin-top: 0;
}

.profile-ideas {
  margin-top: 32px;
}

.profile-ideas h2 {
  font-size: 1rem;
  margin: 0;
}

.empty-board {
  margin-top: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 8px;
}

.empty-board h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.nav-form {
  display: inline;
  margin: 0;
}

.nav-form button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.nav-form button:hover {
  text-decoration: underline;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.button svg,
.button .bi {
  width: 16px;
  height: 16px;
  font-size: 1rem;
  line-height: 1;
}

.button:hover {
  text-decoration: none;
  background: var(--accent-hover);
  color: #fff;
}

.flash {
  color: #9a6700;
  background: #fff8c5;
  border: 1px solid #d4a72c;
  border-radius: 6px;
  padding: 8px 12px;
}

ul.flash {
  list-style: none;
  margin: 0 0 16px;
}

.profile {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.avatar {
  border-radius: 50%;
  border: 1px solid var(--stroke);
}

.profile-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.profile-identity {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--stroke);
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.profile-copy h1 {
  margin: 0 0 4px;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  font-weight: 750;
}

.profile-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-name {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text);
}

.profile-meta {
  margin: 0;
}

.profile-topics,
.profile-intros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
}

.profile-topics .topic-chip {
  text-decoration: none;
}

.visibility-pill.is-open {
  background: #eaf8ef;
  border-color: #b7e0c4;
  color: #17653a;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 16rem;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.profile-panel {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px 22px;
}

.profile-panel .section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-panel .section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.profile-idea-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-idea-card {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--bg);
}

.profile-idea-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.profile-idea-link:hover {
  text-decoration: none;
}

.profile-idea-link h3 {
  margin: 8px 0 4px;
  font-size: 1rem;
  color: var(--text);
}

.profile-idea-link:hover h3 {
  color: var(--accent);
}

.profile-idea-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-idea-meta {
  margin: 10px 0 0;
  font-size: 0.8rem;
}

.profile-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-score-note {
  margin: 0;
  font-size: 0.8rem;
}

.profile-rail .facets {
  margin: 0;
  display: block;
}

.profile-rail .facets h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.profile-rail .facets dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  margin: 0;
}

.profile-rail .facets dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-rail .facets dd {
  margin: 0;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 650;
}

@media (max-width: 1100px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  .profile-header {
    flex-direction: column;
    padding: 18px;
  }

  .profile-identity {
    flex-direction: column;
  }

  .profile-copy h1 {
    font-size: 1.45rem;
  }

  .profile-idea-grid {
    grid-template-columns: 1fr;
  }
}

.muted {
  color: var(--muted);
}

.pills {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pills li {
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.875rem;
}

.pills.board-pills li {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.pills a {
  color: inherit;
  text-decoration: none;
}

.stack-form textarea {
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  font: inherit;
  width: 100%;
}

.reasons {
  margin: 8px 0 12px;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form {
  margin-top: 16px;
  max-width: none;
}

.comment-form textarea {
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  font: inherit;
  width: 100%;
}

.diff {
  margin: 24px 0;
}

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

.diff-old,
.diff-new {
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  background: var(--surface);
}

.diff-old {
  background: #fff5f5;
}

.diff-new {
  background: #f0fff4;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
  font-size: 0.9rem;
}

.house-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.house-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.house-nav-link .bi {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.house-nav-link:hover {
  text-decoration: none;
  background: var(--accent-soft);
  color: var(--accent);
}

.house-nav-link:hover .bi,
.house-nav-link.is-active .bi {
  color: currentColor;
}

.house-nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.house-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.house-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.house-status.is-up {
  color: #1a7f37;
  border-color: color-mix(in srgb, #1a7f37 28%, var(--stroke));
  background: color-mix(in srgb, #1a7f37 8%, var(--surface));
}

.house-status.is-down {
  color: #cf222e;
  border-color: color-mix(in srgb, #cf222e 28%, var(--stroke));
  background: color-mix(in srgb, #cf222e 8%, var(--surface));
}

.house-status.is-skipped {
  color: var(--muted);
  border-color: var(--stroke);
  background: var(--surface);
}

html[data-theme="dark"] .house-status.is-up {
  color: #3fb950;
  border-color: color-mix(in srgb, #3fb950 35%, var(--stroke));
  background: color-mix(in srgb, #3fb950 12%, var(--surface));
}

html[data-theme="dark"] .house-status.is-down {
  color: #ff7b72;
  border-color: color-mix(in srgb, #ff7b72 35%, var(--stroke));
  background: color-mix(in srgb, #ff7b72 12%, var(--surface));
}

.house-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.house-grid--providers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.house-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--text);
}

.house-tile:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--stroke));
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  color: var(--text);
}

.house-tile-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
  font-size: 1.15rem;
}

.house-tile-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.house-tile-body strong {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.house-tile-body .muted {
  font-size: 0.85rem;
}

.house-tile-arrow {
  color: var(--muted);
  flex-shrink: 0;
}

.house-provider-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.house-provider-top h2 {
  margin: 0;
}

.house-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.house-pill.is-live {
  color: #1a7f37;
  border-color: color-mix(in srgb, #1a7f37 30%, var(--stroke));
  background: color-mix(in srgb, #1a7f37 10%, var(--surface));
}

.house-pill.is-open {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--stroke));
  background: var(--accent-soft);
}

.house-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.house-meta div {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--stroke);
}

.house-meta dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.house-meta dd {
  margin: 0;
  font-weight: 650;
  font-size: 0.9rem;
}

.house-person-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.house-person-main .avatar-sm {
  width: 28px;
  height: 28px;
}

.house-person-main h3 {
  margin: 0 0 2px;
  font-size: 1rem;
}

@media (max-width: 800px) {
  .house-grid,
  .house-grid--providers {
    grid-template-columns: 1fr;
  }

  .house-meta {
    grid-template-columns: 1fr;
  }
}

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  vertical-align: middle;
}

.note-panel {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 6px;
}

.note-panel p {
  margin: 0;
}

.facets {
  margin: 16px 0;
  display: grid;
  gap: 16px;
}

.facets h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.facets dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  margin: 0;
}

.facets dt {
  color: var(--muted);
}

.facets dd {
  margin: 0;
  text-align: right;
}

.legal {
  max-width: var(--max);
}

.legal h1 {
  margin-top: 0;
}

@media (min-width: 640px) {
  .facets {
    grid-template-columns: 1fr 1fr;
  }

  .facets > p {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .facets {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .board {
    grid-template-columns: 1fr;
  }

  .board-rail {
    position: static;
  }

  .trend-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 24px 20px 20px;
  }

  .hero-art {
    order: -1;
    max-height: 200px;
    margin: 0 auto;
  }

  .hero-art img,
  .hero-art svg {
    max-width: 280px;
    max-height: 200px;
  }

  .facet-kicker {
    min-width: 100%;
  }

  .trend-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .top-create {
    display: none;
  }

  .create-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 36;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent);
  }

  .create-fab:hover {
    color: #fff;
    text-decoration: none;
    background: var(--accent-hover);
  }

  html[data-theme="dark"] .create-fab {
    color: #0d1117;
  }

  html[data-theme="dark"] .create-fab:hover {
    color: #0d1117;
  }

  .create-fab .bi {
    font-size: 1.45rem;
    line-height: 1;
  }

  .site-main,
  .site-footer {
    padding-bottom: 72px;
  }

  .nav-toggle-btn {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    z-index: 30;
    top: var(--topbar);
    left: 0;
    bottom: 0;
    height: auto;
    max-height: none;
    align-self: stretch;
    transform: translateX(-105%);
    box-shadow: 8px 0 24px rgb(15 23 42 / 8%);
    transition: transform 0.18s ease;
  }

  .nav-scrim {
    display: none;
    position: fixed;
    inset: var(--topbar) 0 0;
    z-index: 25;
    background: rgb(15 23 42 / 28%);
  }

  .nav-toggle:checked ~ .sidebar {
    transform: none;
  }

  .nav-toggle:checked ~ .nav-scrim {
    display: block;
  }
}

@media (max-width: 640px) {
  .diff-pair {
    grid-template-columns: 1fr;
  }

  .top-search {
    display: none;
  }

  .site-main,
  .site-footer,
  .app-main:has(.site-main--board) .site-footer,
  .app-main:has(.site-main--idea) .site-footer,
  .app-main:has(.site-main--profile) .site-footer,
  .app-main:has(.site-main--workspace) .site-footer,
  .app-main:has(.site-main--legal) .site-footer {
    width: calc(100% - 24px);
  }
}

.site-main--editor {
  width: min(1180px, calc(100% - 40px));
}

.editor-header {
  margin-bottom: 20px;
}

.editor-header h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.editor-header p {
  margin: 0;
  color: var(--muted);
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.editor-form {
  max-width: none;
}

.editor-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.section-description {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.875rem;
}

.editor-details {
  border: 0;
  padding: 0;
  margin: 0;
}

.editor-details > summary {
  list-style: none;
  cursor: pointer;
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.editor-details > summary::-webkit-details-marker {
  display: none;
}

.editor-details > summary::after {
  content: "Show";
  float: right;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--muted);
}

.editor-details[open] > summary::after {
  content: "Hide";
}

.editor-details > summary + .section-description {
  margin-top: 8px;
}

.field {
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.required {
  color: #cf222e;
}

.field-error {
  margin: 6px 0 0;
  color: #cf222e;
  font-size: 0.8rem;
}

.char-count {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.char-count.is-short {
  color: #9a6700;
}

.char-count.is-over,
.field.is-invalid .char-count {
  color: #cf222e;
}

.field.is-invalid input,
.field.is-invalid textarea,
input.is-invalid,
textarea.is-invalid {
  border-color: #cf222e;
}

.icon-input {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.idea-icon {
  width: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.idea-icon svg {
  width: 18px;
  height: 18px;
}

.icon-input input {
  flex: 1;
}

.tag-input {
  min-height: 42px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: var(--surface);
}

.tag-chips {
  display: contents;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
}

.tag-remove {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0 0 0 2px;
  line-height: 1;
}

.tag-input input {
  border: 0;
  outline: none;
  flex: 1;
  min-width: 8rem;
  padding: 4px;
  font: inherit;
  background: transparent;
}

.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.ask-chips button {
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--muted);
}

.ask-chips button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.visibility-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}

.visibility-option:last-of-type {
  margin-bottom: 0;
}

.visibility-option.is-selected,
.visibility-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.visibility-option strong {
  display: block;
  font-size: 0.9rem;
}

.visibility-option .muted {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
}

.bottom-actions {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.draft-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.editor-rail {
  position: sticky;
  top: calc(var(--topbar) + 16px);
}

.preview-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  color: var(--text);
}

.preview-header {
  padding: 16px;
  border-bottom: 1px solid var(--stroke);
  background: var(--bg);
}

.preview-title {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.preview-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.preview-icon svg {
  width: 18px;
  height: 18px;
}

.preview-title h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.preview-owner {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-tags {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-tags li {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
}

.preview-body {
  padding: 16px;
  background: var(--surface);
}

.preview-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.preview-section {
  margin-top: 16px;
}

.preview-section h3 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.preview-section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.preview-footer {
  border-top: 1px solid var(--stroke);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  background: var(--bg);
}

.preview-checks {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text);
}

.preview-checks li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--stroke);
  font-size: 0.8rem;
}

.preview-checks li:last-child {
  border-bottom: 0;
}

.preview-checks [data-check-mark] {
  color: var(--muted);
  font-weight: 650;
}

.preview-checks .is-done [data-check-mark] {
  color: #1a7f37;
}

html[data-theme="dark"] .preview-checks .is-done [data-check-mark] {
  color: #3fb950;
}

.editor-tips .section-description {
  margin-bottom: 8px;
}

.idea-form.editor-form input[type="text"].form-control,
.idea-form.editor-form textarea.form-control,
.comment-form .form-control,
.stack-form .form-control {
  padding: 10px 12px;
  border-radius: 8px;
}

.idea-form.editor-form textarea.form-control {
  min-height: 0;
}

.comment-form .help-text,
.stack-form .help-text,
.idea-form .help-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.comment-form .form-label,
.stack-form .form-label {
  font-weight: 650;
}

.field.is-invalid .form-control,
.form-control.is-invalid {
  border-color: #cf222e;
}

.editor-form .visibility-option {
  font-weight: 400;
  margin-top: 0;
}

.editor-form .visibility-option .form-check-input {
  margin-top: 0.2rem;
}

.editor-form .tag-input input[type="text"] {
  padding: 4px;
  border: 0;
  width: auto;
}

@media (max-width: 960px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-rail {
    position: static;
  }
}

.site-main--editor + .site-footer,
.app-main:has(.site-main--editor) .site-footer {
  width: min(1180px, calc(100% - 40px));
}

.idea-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.idea-header {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 24px 24px 0;
}

.idea-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  font-size: 0.8rem;
  color: var(--muted);
}

.idea-crumb a {
  color: var(--accent);
}

.idea-title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.idea-title-copy h1 {
  margin: 0 0 8px;
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.idea-description {
  margin: 0;
  max-width: 46rem;
  color: var(--muted);
  line-height: 1.7;
}

.idea-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.visibility-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.visibility-pill svg {
  width: 12px;
  height: 12px;
}

.idea-owner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.idea-owner a {
  color: inherit;
}

.idea-avatar {
  width: 28px;
  height: 28px;
}

.idea-parent {
  margin: 8px 0 0;
}

.idea-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
}

.idea-topics .topic-chip {
  text-decoration: none;
}

.idea-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  max-width: 24rem;
}

.idea-actions form {
  margin: 0;
}

.idea-actions .btn {
  white-space: nowrap;
}

.idea-note {
  margin: 16px 0 0;
}

.idea-interest-note {
  margin: 12px 0 0;
}

.repo-tabs {
  display: flex;
  gap: 4px;
  margin-top: 20px;
  overflow-x: auto;
}

.repo-tab {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.repo-tab:hover,
.repo-tab.is-active {
  color: var(--text);
  text-decoration: none;
}

.repo-tab.is-active {
  border-bottom-color: var(--accent);
}

.idea-shell:not(.is-tabbed):has(.idea-panel:target) .repo-tab.is-active {
  color: var(--muted);
  border-bottom-color: transparent;
}

.idea-shell:not(.is-tabbed):not(:has(.idea-panel:target)) .repo-tab[href="#brief"],
.idea-shell:not(.is-tabbed):has(#brief:target) .repo-tab[href="#brief"],
.idea-shell:not(.is-tabbed):has(#comments:target) .repo-tab[href="#comments"],
.idea-shell:not(.is-tabbed):has(#proposals:target) .repo-tab[href="#proposals"],
.idea-shell:not(.is-tabbed):has(#builds:target) .repo-tab[href="#builds"],
.idea-shell:not(.is-tabbed):has(#forks:target) .repo-tab[href="#forks"],
.idea-shell:not(.is-tabbed):has(#history:target) .repo-tab[href="#history"],
.idea-shell:not(.is-tabbed):has(#amplify:target) .repo-tab[href="#amplify"],
.idea-shell:not(.is-tabbed):has(#probes:target) .repo-tab[href="#probes"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.7rem;
  color: var(--muted);
}

.idea-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.idea-brief,
.idea-rail .side-card,
.idea-panel.profile-ideas {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 10px;
}

.idea-brief {
  padding: 28px;
}

.idea-brief h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.idea-brief h3 {
  margin: 28px 0 10px;
  font-size: 1rem;
}

.idea-brief .prose,
.idea-brief .problem-box {
  color: var(--muted);
}

.problem-box {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  border-radius: 6px;
}

.problem-box p:first-child {
  margin-top: 0;
}

.problem-box p:last-child {
  margin-bottom: 0;
}

.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.timeline-item {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 18px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-line {
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: var(--stroke);
}

.timeline-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  z-index: 1;
}

.timeline-content strong {
  font-size: 0.88rem;
}

.timeline-content small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.idea-activity-card,
.idea-panel.profile-ideas {
  padding: 20px 22px;
  margin-top: 0;
}

.idea-brief .idea-activity-card {
  margin-top: 28px;
  padding: 20px 0 0;
  border-top: 1px solid var(--stroke);
}

.idea-shell:not(.is-tabbed) .idea-panel:target {
  display: block !important;
}

.idea-shell:not(.is-tabbed):has(.idea-panel:target) .idea-panel:not(:target) {
  display: none !important;
}

.idea-activity-card .section-head {
  margin-bottom: 4px;
}

.idea-activity-card h3,
.idea-panel.profile-ideas > h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--stroke);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.activity-icon svg {
  width: 14px;
  height: 14px;
}

.activity-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.activity-text strong {
  color: var(--text);
}

.activity-text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.idea-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.stat-list {
  margin: 0;
}

.stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--stroke);
  font-size: 0.82rem;
}

.stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat dt {
  color: var(--muted);
  font-weight: 400;
}

.stat dd {
  margin: 0;
  font-weight: 650;
}

.fork-parent,
.fork-child {
  display: block;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 12px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
}

.fork-parent {
  background: var(--accent-soft);
}

.fork-parent:hover,
.fork-child:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--stroke));
}

.fork-parent strong,
.fork-child strong {
  display: block;
  font-size: 0.82rem;
}

.fork-parent small,
.fork-child small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.75rem;
}

.fork-children {
  margin: 10px 0 0 18px;
  padding-left: 14px;
  border-left: 1px dashed var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fork-child.is-current,
.fork-parent.is-current {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--stroke));
}

.contributor-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contributor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contributor-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contributor-info small {
  color: var(--muted);
  font-size: 0.75rem;
}

.side-cta {
  background: linear-gradient(145deg, var(--accent-soft), var(--surface));
}

.side-cta .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1100px) {
  .idea-layout {
    grid-template-columns: 1fr;
  }

  .idea-actions {
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  .idea-title-row {
    flex-direction: column;
  }

  .idea-header {
    padding: 18px 16px 0;
  }

  .idea-brief {
    padding: 20px;
  }

  .idea-title-copy h1 {
    font-size: 1.45rem;
  }
}

.site-main--legal {
  width: min(820px, calc(100% - 40px));
}

.workspace-shell,
.legal-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.legal-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.workspace-header h1,
.legal-header h1 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  font-weight: 750;
}

.workspace-header p {
  margin: 0;
  max-width: 46rem;
}

.workspace-header p + p {
  margin-top: 8px;
}

.legal-header p {
  margin: 0;
  max-width: none;
}

.legal-header .muted {
  font-size: 0.85rem;
}

.legal-header > p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.workspace-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.workspace-panel {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.workspace-panel:last-child {
  margin-bottom: 0;
}

.workspace-panel h2,
.workspace-rail .side-card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.workspace-panel .section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.workspace-panel .section-head h2 {
  margin: 0;
}

.workspace-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workspace-card {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--bg);
}

.workspace-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.workspace-card-top {
  margin-bottom: 8px;
}

.workspace-blurb {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.workspace-bullets {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.workspace-bullets li + li {
  margin-top: 6px;
}

.workspace-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.workspace-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workspace-rail-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.identity-card {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg);
}

.identity-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.identity-card p {
  margin: 0 0 10px;
}

.identity-card p:last-child {
  margin-bottom: 0;
}

.legal-body {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 28px 32px 36px;
}

.legal-body h2 {
  margin-top: 1.6rem;
  font-size: 1.1rem;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body h3 {
  margin-top: 1.1rem;
  font-size: 0.98rem;
}

.stack-form .form-select,
.comment-form .form-select {
  width: 100%;
}

@media (max-width: 1100px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .workspace-header,
  .legal-header,
  .legal-body {
    padding: 18px;
  }

  .workspace-header {
    flex-direction: column;
  }

  .identity-grid {
    grid-template-columns: 1fr;
  }

  .site-main--legal {
    width: calc(100% - 24px);
  }
}
