:root {
  --text: #1a2233;
  --muted: #5c6578;
  --border: #dde1e8;
  --border-strong: #c8ced8;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-muted: #eef0f4;
  --accent: #1e4a7a;
  --accent-hover: #163a61;
  --accent-soft: #e6eef7;
  --accent-muted: #8fa8c4;
  --error: #9b1c1c;
  --error-bg: #fdeeee;
  --success: #1e6b3a;
  --success-bg: #e8f5ec;
  --warn-bg: #fff6e8;
  --founder-bg: #f3eef8;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(26, 34, 51, 0.06), 0 4px 16px rgba(26, 34, 51, 0.04);
  --shadow-lg: 0 8px 32px rgba(26, 34, 51, 0.08);
  --max: 1040px;
  --sidebar-width: 11.25rem;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "IBM Plex Sans", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.35rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 0 0 1rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  overflow: visible;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 0.85rem 0;
}

.logo {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 0.25rem;
  overflow: visible;
  line-height: 0;
}

.logo picture {
  display: block;
}

.logo img {
  display: block;
  width: min(20rem, 52vw);
  height: auto;
  max-width: none;
}

.nav-auth {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
  margin-left: auto;
}

/* Site layout */

.site-body {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  align-items: start;
}

.site-sidebar {
  position: sticky;
  top: 5rem;
}

.site-main {
  min-width: 0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.sidebar-link {
  display: block;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--surface-muted);
}

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

.sidebar-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.5rem;
  padding: 0 0.65rem;
}

.sidebar-cta {
  margin: 1.5rem 0 0;
  padding: 0 0.15rem;
}

.button-block {
  display: block;
  width: 100%;
  text-align: center;
}

.sidebar-featured {
  margin-top: 1.75rem;
  padding: 1rem 0.65rem 0;
  border-top: 1px solid var(--border);
}

.sidebar-featured .sidebar-heading {
  padding: 0;
}

.sidebar-featured-title {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.sidebar-featured-title:hover { color: var(--accent); }

.sidebar-featured p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.request-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 1rem;
  box-shadow: var(--shadow);
}

.request-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.request-accordion-panel {
  border-bottom: 1px solid var(--border);
}

.request-accordion-panel:last-child {
  border-bottom: 0;
}

.request-accordion-panel summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  list-style: none;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
}

.request-accordion-label {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.request-accordion-panel summary::-webkit-details-marker {
  display: none;
}

.request-accordion-panel summary::after {
  content: '+';
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
}

.request-accordion-panel[open] summary {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.request-accordion-panel[open] summary .request-accordion-label {
  color: var(--accent);
}

.request-accordion-panel[open] summary::after {
  content: '−';
}

.request-accordion-count {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--accent-muted);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.request-accordion-panel .request-list {
  margin: 0;
  padding: 0.15rem 0 0.35rem;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--surface-muted);
}

.request-accordion-panel .request-list li {
  display: block;
  padding: 0.7rem 1.15rem 0.7rem 1.35rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  font-size: 0.92rem;
  line-height: 1.45;
}

.request-accordion-panel .request-list li:last-child {
  border-bottom: 0;
}

.request-accordion-panel .request-list li a {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--accent);
  text-decoration: none;
}

.request-accordion-panel .request-list li a:hover {
  text-decoration: underline;
}

.request-accordion-panel .request-list li .request-detail {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.88rem;
  font-weight: 400;
}

.nav-link {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.search-form { margin-left: 0.25rem; }

.discovery-search {
  margin-left: 0;
}

.discovery-search input {
  width: 100%;
}

.search-form input {
  width: 11rem;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-form input:focus {
  outline: none;
  border-color: var(--accent-muted);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Main */

.site-main {
  padding-top: 0;
}

.page-section {
  margin-bottom: 2.75rem;
}

.page-section:last-child { margin-bottom: 0; }

.page-head {
  margin-bottom: 2rem;
}

.page-head-discovery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.page-head-discovery .discovery-search {
  flex: 0 1 14rem;
  min-width: 11rem;
}

.page-head .lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 38rem;
}

/* Hero */

.hero {
  margin: 0 0 2.5rem;
  padding: 2.25rem 2rem;
  background: linear-gradient(135deg, #1e4a7a 0%, #2a5f8f 48%, #1a2233 100%);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  color: #fff;
  max-width: 22rem;
  margin-bottom: 0.75rem;
}

.hero .hero-lede {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  max-width: 32rem;
  margin-bottom: 1.5rem;
}

.hero-discovery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.hero-discovery .discovery-search {
  flex: 0 1 14rem;
  min-width: 11rem;
  margin-left: auto;
}

.hero .discovery-search input {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.hero .discovery-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.hero .discovery-search input:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero .button {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero .button-secondary {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.hero .button-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Project types */

.project-types-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}

.project-types-heading h2 { margin-bottom: 0.25rem; }

.project-types-heading > a {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-types-list {
  border-top: 1px solid var(--border);
}

.project-type-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.project-type-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-type-icon {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
}

.project-type-count {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
}

.project-type-copy h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.project-type-copy h3 a {
  color: var(--text);
  text-decoration: none;
}

.project-type-copy h3 a:hover { color: var(--accent); }

.project-type-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-type-copy .project-type-empty { margin-top: 0.25rem; }

.project-type-empty a { font-weight: 600; }

/* Buttons */

.button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  transition: background 0.15s, transform 0.1s;
}

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

.button:active { transform: translateY(1px); }

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.button-secondary:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.button-small {
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
}

.link-button {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  padding: 0.35rem 0.55rem;
}

.link-button:hover { color: var(--accent-hover); }

/* Flash */

.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin: 1rem auto 0;
  max-width: var(--max);
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.flash-notice {
  background: var(--accent-soft);
  border-color: #c5d8ef;
  color: var(--accent-hover);
}

.flash-error {
  background: var(--error-bg);
  border-color: #f0caca;
  color: var(--error);
}

/* Cards & grids */

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

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.project-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-muted);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.03);
}

.project-card-body {
  padding: 1.1rem 1.15rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
}

.project-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.project-card h3 a:hover { color: var(--accent); }

.project-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  flex: 1;
}

.project-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
  max-width: 100%;
}

.project-card-featured .project-card-image {
  width: min(42%, 360px);
  min-height: 220px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.project-card-featured .project-card-body {
  padding: 1.5rem 1.75rem;
  justify-content: center;
}

.project-card-featured h3 { font-size: 1.35rem; }

.card-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

/* Request lists (homepage Projects / Requests) */

.opportunity-list,
.request-list,
.projects-request-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.opportunity-list li,
.request-list li,
.projects-request-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.projects-request-list li {
  align-items: center;
}

.projects-request-title {
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.projects-request-title:hover { color: var(--accent); }

.opportunity-list li a,
.request-list li a {
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.opportunity-list li a:hover,
.request-list li a:hover { color: var(--accent); }

.need-type,
.request-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.help-offer {
  margin-top: 1.25rem;
  margin-bottom: 0;
}

/* Update list */

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

.update-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.update-list li:last-child { border-bottom: 0; }

.update-list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.update-list a:hover { color: var(--accent); }

/* Project page */

.project-page {
  max-width: 720px;
}

.project-hero {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.project-header { margin-bottom: 2rem; }

.project-header .lede {
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.banner {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin: 0.75rem 0;
  border: 1px solid transparent;
}

.banner-archived {
  background: var(--surface-muted);
  border-color: var(--border);
  color: var(--muted);
}

.banner-founder {
  background: var(--founder-bg);
  border-color: #ddd0ea;
  color: #4a3a5c;
}

.current-status {
  padding: 0.65rem 0.9rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
}

.project-page section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.project-page section:last-of-type { border-bottom: 0; }

.help-today {
  font-size: 1.05rem;
  color: var(--text);
}

.needs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.need-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.15rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow);
}

.need-item h3 { color: var(--text); }

.needs-completed li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.needs-completed li:last-child { border-bottom: 0; }

.update-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.update-item:last-child { border-bottom: 0; }

.owner-line {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}

.project-links ul {
  padding-left: 1.2rem;
  margin: 0;
}

/* Prose & markdown */

.prose {
  font-size: 1.02rem;
  line-height: 1.65;
}

.prose p { margin: 0 0 1rem; }

.prose ul, .prose ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.prose li { margin-bottom: 0.35rem; }

.prose strong { font-weight: 600; }

.prose a { font-weight: 500; }

.prose h2, .prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
}

/* Progress */

.progress-bar {
  height: 6px;
  background: var(--surface-muted);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.65rem 0 0.35rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #3a7ab8);
  border-radius: 999px;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.pip-progress {
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

/* Forms */

.form {
  max-width: 28rem;
}

.form-wide { max-width: 42rem; }

.form label {
  display: block;
  margin-bottom: 1.1rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.form input,
.form textarea,
.form select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent-muted);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-wide textarea { max-width: none; }

.form .prefix {
  display: inline-block;
  margin-right: 0.25rem;
  color: var(--muted);
}

.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.inline-form { display: inline; margin-left: 0.5rem; }

.action-bar {
  margin: 1.25rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.action-bar .inline-form { margin-left: 0; }

.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}

.filters .form-row label { min-width: 10rem; }

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.form-row label { flex: 1; min-width: 6rem; }

/* Status badges */

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-published { background: var(--success-bg); color: var(--success); }
.status-draft { background: var(--warn-bg); color: #8a5a00; }
.status-archived { background: var(--surface-muted); color: var(--muted); }

/* Lists */

.my-projects-list,
.project-list,
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.my-project-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow);
}

.my-project-edit {
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.my-project-item:hover .my-project-edit,
.my-project-item:focus-within .my-project-edit {
  opacity: 1;
}

@media (hover: none) {
  .my-project-edit { opacity: 1; }
}

.my-project-edit:hover { color: var(--accent); }

.my-project-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}

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

.my-project-item .status-badge {
  flex-shrink: 0;
  margin-left: auto;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.category-list li a {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}

.category-list li a:hover {
  border-color: var(--accent-muted);
  color: var(--accent);
  transform: translateY(-1px);
}

.project-status-line { margin-bottom: 1.5rem; }

/* Editor */

.editor-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.form-compact {
  margin-bottom: 1.25rem;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.need-editor { margin-bottom: 0.75rem; }
.update-editor-item { margin-bottom: 1rem; }

.type-legend {
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.type-legend summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.type-legend dl {
  margin: 0.75rem 0 0;
  padding: 0;
}

.type-legend dt {
  font-weight: 600;
  color: var(--text);
  margin-top: 0.65rem;
}

.type-legend dt:first-child { margin-top: 0; }

.type-legend dd {
  margin: 0.2rem 0 0;
  line-height: 1.45;
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 400;
}

.form-error {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: var(--error-bg);
  border: 1px solid #f0caca;
  color: var(--error);
  font-size: 0.95rem;
}

/* About / FAQ content */

.content-page section {
  margin-bottom: 2rem;
}

.content-page ul {
  padding-left: 1.25rem;
}

.content-page li { margin-bottom: 0.45rem; }

.content-page code {
  font-size: 0.88em;
  background: var(--surface-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding: 1.75rem 0 2.5rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  margin-right: 1.25rem;
  text-decoration: none;
  font-weight: 500;
}

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

/* Responsive */

@media (max-width: 768px) {
  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-auth { margin-left: auto; }

  .hero-discovery {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-discovery .discovery-search {
    margin-left: 0;
    flex: 1 1 auto;
    max-width: none;
  }

  .page-head-discovery {
    align-items: stretch;
  }

  .page-head-discovery .discovery-search {
    flex: 1 1 auto;
    max-width: none;
  }

  .site-body {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .site-sidebar {
    position: static;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
  }

  .sidebar-nav ul { margin-bottom: 0.75rem; }
  .sidebar-cta { grid-column: 1 / -1; }

  .hero { padding: 1.5rem 1.25rem; }

  .project-types-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-card-featured { flex-direction: column; }
  .project-card-featured .project-card-image {
    width: 100%;
    min-height: 180px;
  }
}

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

  .logo img {
    width: 2.75rem;
    height: auto;
  }
}

/* Homepage and navigation refinement */

body { background: var(--surface); }

:root {
  --max: 1200px;
  --sidebar-width: 10.625rem;
}

.site-header {
  position: static;
  background: var(--surface);
  backdrop-filter: none;
  border-bottom: 0;
}

.header-inner {
  min-height: 7.5rem;
  flex-wrap: nowrap;
  gap: 1.5rem;
  padding: 1rem 1.25rem 0.75rem;
}

.logo { margin-right: 0; }

.logo img { width: min(30.5rem, 52vw); }

.site-tagline {
  margin: 0 0 0 auto;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.3;
  white-space: nowrap;
}

.site-tagline em {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-auth { margin-left: 0; }

.site-body {
  gap: 1.5625rem;
  padding-top: 0.4rem;
  padding-bottom: 2rem;
}

.site-sidebar {
  top: 1rem;
  padding-top: 0.15rem;
}

.sidebar-nav ul {
  margin-bottom: 0;
}

.sidebar-link {
  padding: 0.18rem 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 400;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  background: transparent;
  color: var(--accent);
}

.sidebar-link.is-active { font-weight: 700; }

.sidebar-nav .discovery-search {
  margin: 1.75rem 0 1.9rem;
}

.sidebar-nav .search-form input {
  width: 9.1rem;
  padding: 0.36rem 0.65rem;
  font-size: 0.82rem;
  font-style: italic;
}

.sidebar-cta {
  margin: 0 0 1.9rem;
  padding: 0;
}

.sidebar-launch {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.sidebar-launch:hover { color: var(--accent-hover); }

.sidebar-account { margin-top: 1.75rem !important; }

.home-featured {
  display: grid;
  grid-template-columns: 7.8rem minmax(0, 1fr);
  gap: 3.1rem;
  min-height: 8.7rem;
  align-items: start;
  padding: 0.55rem 0 1.2rem;
  border-bottom: 1px solid var(--border);
}

.home-featured-image {
  display: block;
  width: 7.8rem;
  height: 6.9rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, #071a31, #146f95 61%, #d9e7db 62%);
}

.home-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-featured-copy {
  padding-top: 0.05rem;
}

.home-featured-label {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-featured h1 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
}

.home-featured h1 a {
  color: var(--text);
  text-decoration: none;
}

.home-featured h1 a:hover { color: var(--accent); }

.home-featured-copy > p:last-child {
  max-width: 35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.home-project-types { margin-top: 0.5rem; }

.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;
}

.home-project-types-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.25rem;
}

.home-project-type {
  min-width: 0;
  border-bottom: 1px solid var(--border);
}

.home-project-type > a {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.85rem;
  min-height: 4.25rem;
  align-items: center;
  padding: 0.45rem 0;
  color: inherit;
  text-decoration: none;
}

.home-project-type > a:hover h3 { color: var(--accent); }

.home-project-type .project-type-icon {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.home-project-type h3 {
  margin: 0 0 0.18rem;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.2;
}

.home-project-type .project-type-count {
  margin: 0;
  color: var(--accent);
  font-size: 0.86em;
  font-weight: 600;
}

.home-project-type p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.28;
}

.home-project-type-empty {
  display: block;
  margin-top: 0.15rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .header-inner {
    min-height: auto;
    flex-wrap: wrap;
  }

  .site-tagline {
    margin-left: 0;
    order: 3;
    width: 100%;
  }

  .site-body { gap: 1rem; }

  .site-sidebar { padding-top: 0; }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
  }

  .sidebar-nav ul,
  .sidebar-nav .discovery-search,
  .sidebar-cta {
    margin: 0 0 0.7rem;
  }

  .sidebar-account { margin-top: 0 !important; }

  .home-featured { gap: 1.25rem; }
}

@media (max-width: 640px) {
  .logo img { width: 2.75rem; }

  .site-tagline {
    font-size: 0.9rem;
    white-space: normal;
  }

  .site-tagline em { font-size: 0.84rem; }

  .home-featured {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 1rem;
    min-height: auto;
  }

  .home-featured-image {
    width: 5rem;
    height: 4.5rem;
  }

  .home-featured h1 { font-size: 1.25rem; }

  .home-project-types-grid { grid-template-columns: 1fr; }
}
/* Administration */

.admin-body {
  background: var(--surface);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: 0.75rem max(1.25rem, calc((100% - 58rem) / 2));
  border-bottom: 1px solid var(--border);
}

.admin-brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.admin-container {
  width: min(58rem, calc(100% - 2.5rem));
  margin: 2rem auto;
}

.admin-page-head {
  margin-bottom: 2rem;
}

.admin-page-head p {
  margin: 0;
  color: var(--muted);
}

.admin-list {
  padding-left: 1.25rem;
  margin: 0 0 2rem;
}

.admin-list li {
  margin-bottom: 0.65rem;
}
