:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --ink: #17211c;
  --muted: #667069;
  --line: #d7ddd5;
  --panel: #ffffff;
  --accent: #1d6b5f;
  --accent-strong: #134c44;
  --gold: #b88917;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.shell { width: min(1180px, calc(100% - 32px)); margin: 18px auto 28px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 33, 28, 0.06);
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.05; }
h2 { font-size: 22px; }
h3 { font-size: 18px; line-height: 1.25; margin-top: 4px; }
.subtle, .meta { color: var(--muted); }
.subtle { margin-top: 8px; }
.count {
  white-space: nowrap;
  color: var(--accent-strong);
  border: 1px solid #bfd8d2;
  background: #eef7f4;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
}
label { display: grid; gap: 6px; color: #303a34; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid #c8d0ca;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fbfcfa;
  font: inherit;
}
textarea { resize: vertical; min-height: 94px; }
button {
  border: 0;
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--accent-strong); }
button:disabled { opacity: .65; cursor: wait; }
.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-strong);
}
.secondary-button:hover { background: #eef7f4; }
.browse-layout { display: grid; gap: 14px; }
.browse-panel { padding: 20px; }
.browse-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}
.browse-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 22px;
}
.browse-filters > label:first-child {
  flex: 2 1 260px;
  min-width: 220px;
}
.browse-filters .filter-control {
  flex: 1 1 136px;
  max-width: 240px;
}
.browse-filters .filter-control:nth-of-type(1) {
  flex-basis: 220px;
  max-width: 320px;
}
.browse-filters button {
  flex: 0 0 auto;
  min-height: 43px;
}
.panel-count {
  width: fit-content;
  margin: 14px 0 0 auto;
  color: var(--accent-strong);
  border: 1px solid #bfd8d2;
  background: #eef7f4;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
}
.smart-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid #bfd8d2;
  border-radius: 8px;
  background: #f3faf8;
  padding: 14px;
}
.smart-copy h2 { font-size: 18px; }
.smart-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 14px;
  align-items: stretch;
}
.smart-text textarea {
  min-height: 118px;
}
.smart-file {
  align-content: start;
  min-height: 118px;
  border: 1px dashed #89b9ad;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}
.smart-file-title {
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 850;
}
.smart-file-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.smart-file input {
  min-height: 36px;
  margin-top: 4px;
  background: #f7faf8;
}
.smart-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.smart-note {
  color: var(--muted);
  font-size: 13px;
}
.smart-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #bfd8d2;
  border-radius: 8px;
  background: #f3faf8;
  padding: 18px;
  color: var(--accent-strong);
}
.smart-loading p {
  margin-top: 4px;
  color: var(--muted);
}
.loading-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.loading-steps span {
  border: 1px solid #d7e4e0;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 750;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.loading-steps span.is-active {
  border-color: #8dc8bd;
  background: #e9f7f4;
  color: var(--accent-strong);
}
.loading-steps span.is-done {
  color: #738079;
  background: #f7faf8;
}
.smart-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 4px solid #d9ebe6;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: smart-spin 0.85s linear infinite;
}
@keyframes smart-spin {
  to { transform: rotate(360deg); }
}
.match-explanation {
  margin-top: 8px;
  color: var(--accent-strong);
  font-weight: 700;
}
.match-dimensions,
.match-caveats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.match-dimensions span,
.match-caveats span {
  border: 1px solid #bfd8d2;
  border-radius: 999px;
  background: #eef7f4;
  padding: 3px 8px;
}
.match-caveats strong {
  color: #7a3b1d;
}
.match-caveats span {
  border-color: #efc6b8;
  background: #fff3ef;
}
.match-action {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.account-status {
  display: block;
  width: fit-content;
  max-width: 100%;
  color: var(--accent-strong);
  border: 1px solid #bfd8d2;
  background: #eef7f4;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
  white-space: normal;
}
.account-form {
  display: grid;
  gap: 10px;
}
.profile-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.profile-form[hidden] {
  display: none;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.account-actions button {
  min-height: 39px;
  padding: 10px 12px;
}
.auth-field.is-hidden {
  display: none;
}
.auth-note,
.auth-mode-note {
  color: var(--muted);
  font-size: 13px;
}
.auth-mode-note {
  border-left: 3px solid #bfd8d2;
  padding-left: 9px;
}
.auth-note:empty,
.auth-mode-note:empty {
  display: none;
}
.auth-note.is-success {
  color: var(--accent-strong);
  font-weight: 700;
}
.auth-note.is-error {
  color: #8a2f19;
  font-weight: 700;
}
.checkbox-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.checkbox-line input {
  width: auto;
  min-width: 16px;
}
.site-menu {
  position: relative;
  flex: 0 0 auto;
}
.site-menu summary {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] summary {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 107, 95, 0.14);
}
.hamburger-lines,
.hamburger-lines::before,
.hamburger-lines::after {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-strong);
}
.hamburger-lines {
  position: relative;
}
.hamburger-lines::before,
.hamburger-lines::after {
  content: "";
  position: absolute;
  left: 0;
}
.hamburger-lines::before { top: -6px; }
.hamburger-lines::after { top: 6px; }
.menu-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 4px;
  width: min(420px, calc(100vw - 32px));
  min-width: 320px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(23, 33, 28, 0.14);
}
.settings-menu {
  gap: 8px;
}
.menu-section-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.menu-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}
.menu-options a {
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  font-weight: 700;
}
.menu-options a:hover {
  background: #eef7f4;
  text-decoration: none;
}
.menu-link-button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
}
.menu-link-button:hover {
  background: #eef7f4;
  color: var(--ink);
}
.filter-label {
  display: block;
  margin-bottom: 6px;
  color: #303a34;
  font-weight: 700;
}
.filter-control { position: relative; min-width: 0; }
.filter-dropdown {
  position: relative;
  width: 100%;
}
.filter-dropdown summary {
  display: block;
  width: 100%;
  min-height: 43px;
  border: 1px solid #c8d0ca;
  border-radius: 6px;
  padding: 10px 34px 10px 11px;
  color: var(--ink);
  background: #fbfcfa;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-dropdown summary::-webkit-details-marker { display: none; }
.filter-dropdown summary::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 18px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
}
.filter-dropdown[open] summary {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 107, 95, 0.14);
}
.filter-dropdown[open] summary::after { transform: rotate(180deg); }
.checkbox-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  display: grid;
  gap: 6px;
  width: max(100%, min(320px, calc(100vw - 32px)));
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(23, 33, 28, 0.14);
}
.filter-control:nth-last-of-type(-n + 2) .checkbox-options {
  left: auto;
  right: 0;
}
.checkbox-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: #fbfcfa;
  color: #303a34;
  font-size: 13px;
  font-weight: 650;
}
.checkbox-choice input { width: auto; }
.checkbox-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkbox-choice strong {
  color: var(--muted);
  font-size: 12px;
}
.muted-choice {
  color: var(--muted);
  display: block;
}
.opportunity-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.opportunity-row {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 56px 16px 16px;
  min-width: 0;
  overflow: hidden;
}
.opportunity-row.is-linked {
  cursor: pointer;
}
.opportunity-row.is-linked:hover {
  border-color: #9ecdc5;
  box-shadow: 0 8px 24px rgba(27, 76, 68, 0.08);
}
.row-main { min-width: 0; }
.opportunity-row p { margin-top: 8px; color: #404b45; }
.opportunity-row h3,
.opportunity-row h3 a,
.opportunity-row p,
.meta,
.budget {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.opportunity-row h3 a { display: inline; }
.favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: #fff;
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
}
.favorite-button:hover {
  background: #fff7f7;
  color: #9c2f3d;
}
.favorite-button.is-favorite {
  border-color: #e7a1aa;
  background: #fff0f2;
  color: #b3263a;
}
.favorite-button[data-login-required="true"] {
  opacity: .55;
}
.favorite-button[data-login-required="true"]:hover {
  background: #eef7f4;
  color: var(--accent-strong);
}
.favorite-button.show-login-tip::after {
  content: "Bitte einloggen";
  position: absolute;
  z-index: 4;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
  width: max-content;
  max-width: 150px;
  border: 1px solid #bfd8d2;
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(23, 33, 28, 0.12);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.budget {
  margin-top: 8px;
  color: var(--accent-strong);
  font-weight: 750;
}
.rejected-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  color: #7a301d;
}
.rejected-reasons strong { margin-right: 2px; }
.rejected-reasons span {
  border: 1px solid #e3b8a9;
  border-radius: 999px;
  background: #fff2ee;
  padding: 3px 8px;
  font-size: 12px;
}
.empty {
  margin-top: 22px;
  border: 1px dashed #b9c5bd;
  border-radius: 8px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
.breakdown { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.breakdown span { border-right: 1px solid var(--line); padding-right: 8px; }
.breakdown span:last-child { border-right: 0; }
.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(480px, calc(100vw - 36px));
  padding: 14px 14px 14px 16px;
  border: 1px solid #bfd8d2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(23, 33, 28, 0.18);
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-banner strong {
  color: var(--accent-strong);
}
.cookie-banner p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.cookie-banner button {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 10px 13px;
}

/* Public directory layout */
.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 16px auto 28px;
}
.browse-layout {
  gap: 12px;
}
.browse-panel {
  padding: 0;
  overflow: visible;
}
.browse-head {
  align-items: center;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #e4e9e2;
}
.browse-head h1 {
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: 0;
}
.browse-head .subtle {
  max-width: 760px;
  margin-top: 7px;
}
.site-menu summary {
  width: 44px;
  min-height: 44px;
}
.smart-panel {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #d9e9e5;
  border-radius: 0;
  background: #f1faf7;
  padding: 14px 20px 16px;
}
.smart-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}
.smart-copy h2 {
  font-size: 17px;
}
.smart-copy .subtle {
  margin-top: 0;
}
.smart-fields {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 14px;
  margin-top: 10px;
}
.smart-text textarea {
  min-height: 92px;
}
.smart-file {
  min-height: 92px;
  padding: 13px 14px;
}
.smart-actions {
  margin-top: 10px;
}
.smart-actions button {
  min-height: 40px;
  padding: 10px 14px;
}
.browse-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) repeat(5, minmax(138px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 0;
  padding: 16px 20px 18px;
}
.browse-filters > label:first-child,
.browse-filters .filter-control,
.browse-filters .filter-control:nth-of-type(1) {
  flex: initial;
  max-width: none;
  min-width: 0;
}
.filter-label,
.browse-filters > label:first-child {
  font-size: 13px;
}
.filter-dropdown summary,
.browse-filters input,
.browse-filters select {
  min-height: 42px;
}
.filter-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.filter-footer button {
  min-height: 42px;
  padding: 10px 14px;
}
.panel-count {
  margin: 0 0 0 auto;
  padding: 7px 12px;
}
.results-panel {
  margin: 0 20px 20px;
  border-top: 1px solid #e4e9e2;
  background: linear-gradient(90deg, #eef3ef 0 4px, transparent 4px);
  padding: 16px 0 0 18px;
}
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 10px;
}
.results-head h2 {
  font-size: 18px;
}
.results-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.opportunity-list {
  gap: 10px;
}
.locked-results {
  position: relative;
  display: grid;
  gap: 10px;
  max-height: 390px;
  overflow: hidden;
  border-radius: 8px;
}
.locked-results::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(246, 247, 242, 0.18), rgba(246, 247, 242, 0.82));
  pointer-events: none;
}
.locked-results .opportunity-row {
  filter: blur(3px);
  user-select: none;
  pointer-events: none;
}
.locked-results-overlay {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 82px;
  transform: translateX(-50%);
  display: grid;
  gap: 5px;
  width: min(380px, calc(100% - 32px));
  border: 1px solid #bfd8d2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 36px rgba(23, 33, 28, 0.16);
  padding: 15px 16px;
  color: var(--accent-strong);
  text-align: center;
}
.locked-results-overlay span {
  color: var(--muted);
  font-size: 13px;
}
.opportunity-row {
  border-color: #dce3da;
  padding: 17px 58px 16px 16px;
  box-shadow: 0 8px 18px rgba(23, 33, 28, 0.035);
}
.opportunity-row h3 {
  font-size: 17px;
  line-height: 1.28;
}
.opportunity-row p {
  margin-top: 9px;
  line-height: 1.5;
}
.meta {
  font-size: 14px;
}
.breakdown {
  gap: 6px;
  margin-top: 11px;
}
.breakdown span {
  border: 1px solid #e0e6df;
  border-radius: 999px;
  background: #fbfcfa;
  padding: 3px 8px;
}
.favorite-button[data-login-required="true"] {
  color: #8a948e;
  background: #fbfcfa;
  cursor: pointer;
}
@media (max-width: 860px) {
  .browse-head {
    padding: 18px 16px 14px;
  }
  .smart-panel,
  .browse-filters {
    padding-left: 16px;
    padding-right: 16px;
  }
  .browse-filters {
    grid-template-columns: 1fr;
  }
  .browse-filters > label:first-child,
  .browse-filters .filter-control,
  .browse-filters .filter-control:nth-of-type(1),
  .browse-filters button {
    flex-basis: 100%;
    max-width: none;
  }
  .smart-fields { grid-template-columns: 1fr; }
  .filter-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
  .panel-count {
    justify-self: start;
    margin-left: 0;
  }
  .results-panel {
    margin: 0 16px 16px;
    padding-left: 14px;
  }
  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    align-items: flex-start;
  }
}

/* Polished public directory */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 64px;
  padding: 0 max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid #e4e9e2;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}
.brand,
.topnav,
.top-actions {
  display: flex;
  align-items: center;
}
.brand {
  gap: 10px;
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 850;
}
.brand-link {
  text-decoration: none;
}
.brand:hover,
.topnav a:hover {
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
}
.topnav {
  gap: 28px;
  min-width: 0;
}
.topnav a,
.topnav button {
  position: relative;
  padding: 22px 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #26312b;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.topnav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.topnav button:hover {
  background: transparent;
  color: var(--accent-strong);
}
.top-actions {
  justify-content: end;
  gap: 14px;
}
.shell {
  margin-top: 26px;
}
.browse-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.browse-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 28px;
  align-items: center;
  padding: 14px 8px 26px;
  border: 0;
}
.browse-head h1 {
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.02;
  max-width: 780px;
}
.browse-head .subtle {
  max-width: 620px;
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.35;
}
.hero-visual {
  position: relative;
  justify-self: end;
  width: 210px;
  height: 150px;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 14px 8px 4px 36px;
  border-radius: 40% 60% 48% 52%;
  background: #d7f2eb;
}
.hero-document {
  position: absolute;
  left: 16px;
  top: 42px;
  display: grid;
  gap: 11px;
  width: 115px;
  padding: 18px 16px;
  border: 3px solid var(--accent-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 9px 9px 0 #9ed8cc;
}
.hero-document span {
  height: 8px;
  border-radius: 999px;
  background: #2a776b;
}
.hero-document span:nth-child(2) { width: 78%; }
.hero-document span:nth-child(3) { width: 58%; }
.hero-lens {
  position: absolute;
  right: 28px;
  top: 26px;
  width: 76px;
  height: 76px;
  border: 8px solid var(--accent-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}
.hero-lens::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 10px;
  right: -46px;
  bottom: -23px;
  border-radius: 999px;
  background: var(--accent-strong);
  transform: rotate(45deg);
  transform-origin: left center;
}
.smart-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
  border: 1px solid #c8e1db;
  border-radius: 12px;
  background: #f2fbf8;
  padding: 24px 26px 16px;
  box-shadow: 0 14px 34px rgba(23, 33, 28, 0.055);
}
.smart-copy {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}
.smart-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.smart-copy h2 {
  font-size: 21px;
}
.smart-fields {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 20px;
  align-items: end;
}
.smart-text {
  position: relative;
}
.smart-text textarea {
  height: 128px;
  min-height: 128px;
  padding: 16px;
}
.char-counter {
  position: absolute;
  right: 14px;
  bottom: 43px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.smart-file {
  display: grid;
  align-content: center;
  justify-items: center;
  align-self: end;
  min-height: 128px;
  height: 128px;
  overflow: visible;
  border-color: #8ec8bc;
  background: #fbfffd;
  text-align: center;
  padding: 14px;
}
.smart-file input {
  display: block;
  width: min(100%, 330px);
  margin-top: 10px;
  height: auto;
  min-height: 42px;
  padding: 6px 10px;
  line-height: normal;
}
.smart-file input::file-selector-button {
  height: 30px;
  margin: 3px 8px 3px 0;
  vertical-align: middle;
}
.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  border: 1px solid #dce5e0;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
}
.file-preview[hidden] {
  display: none;
}
.file-preview strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.smart-actions {
  justify-content: space-between;
}
.smart-actions button::after {
  content: " ->";
}
.smart-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #d8e6e0;
  border-radius: 12px;
  background: #fbfffd;
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.smart-more button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
  font-weight: 850;
  cursor: pointer;
}
.smart-more button:hover {
  background: var(--accent-strong);
}
.smart-more.is-complete {
  color: var(--accent-strong);
}
.browse-filters {
  position: relative;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, 1fr)) minmax(130px, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: #fff;
  padding: 24px 20px 18px;
}
.filter-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.filter-heading h2 {
  font-size: 22px;
}
.filter-heading h2::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -2px;
  clip-path: polygon(0 0, 100% 0, 62% 46%, 62% 100%, 38% 100%, 38% 46%);
  background: var(--accent);
}
.filter-tabs {
  display: flex;
  gap: 12px;
}
.filter-tabs button {
  min-height: auto;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 7px 3px;
  font-size: 13px;
}
.filter-tabs button.is-active {
  border-bottom-color: var(--accent);
  color: var(--accent-strong);
}
.filter-tabs button:hover {
  background: transparent;
}
.favorite-quick-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  border: 1px solid #bfe0d8;
  border-radius: 999px;
  background: #f3fbf8;
  padding: 7px 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.favorite-quick-filter input {
  width: 15px;
  min-height: auto;
  margin: 0;
}
.favorite-quick-filter[hidden],
.browse-filters .advanced-filter[hidden] {
  display: none !important;
}
.advanced-filter {
  display: none;
}
.browse-filters.show-advanced .advanced-filter {
  display: block;
}
.filter-dropdown summary {
  border-radius: 8px;
}
.checkbox-options {
  width: max(100%, min(280px, calc(100vw - 32px)));
}
.filter-footer {
  justify-content: start;
  gap: 16px;
}
.filter-footer .panel-count {
  margin-left: auto;
}
.reset-button {
  background: transparent;
  color: var(--accent);
  padding-left: 0;
  padding-right: 0;
}
.reset-button:hover {
  background: transparent;
  color: var(--accent-strong);
  text-decoration: underline;
}
.results-panel {
  margin: 0 0 0;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #fff;
  padding: 18px 20px 20px;
}
.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.results-head h2 {
  font-size: 18px;
}
.results-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.sort-control {
  display: grid;
  gap: 6px;
  width: min(250px, 100%);
  min-width: 210px;
  color: #303a34;
  font-size: 13px;
  font-weight: 800;
}
.sort-control select {
  min-height: 42px;
  border-radius: 8px;
}
.opportunity-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(240px, 300px);
  gap: 18px;
  align-items: start;
  padding: 16px;
  border-color: #dce5e0;
  box-shadow: 0 9px 20px rgba(23, 33, 28, 0.045);
  overflow: visible;
}
.funder-cell {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  min-height: 0;
  border-right: 1px solid #edf1ee;
  padding-right: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}
.funder-cell span {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.funder-logo {
  display: grid;
  place-items: center;
  width: 74px;
  min-height: 62px;
  border: 1px solid #e4eae5;
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
}
.fit-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  border: 1px solid #bfe0d8;
  border-radius: 999px;
  background: #eaf8f4;
  color: var(--accent-strong);
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 850;
}
.fit-badge.is-strong {
  background: #ddf7ed;
}
.fit-badge.is-possible {
  background: #f5f8ea;
  border-color: #d9e4b8;
}
.row-facts {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-self: end;
  width: min(100%, 270px);
  border-left: 1px solid #edf1ee;
  padding: 42px 46px 0 18px;
  position: relative;
}
.fact {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 2px 8px;
}
.fact::before {
  content: "";
  grid-row: 1 / span 2;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border: 1.5px solid #8abdb3;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--accent) 0 3px, transparent 3.5px);
}
.fact span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.fact strong {
  color: #2c3932;
  font-size: 13px;
  line-height: 1.25;
}
.row-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  align-items: start;
}
.row-actions .favorite-button {
  position: relative;
  top: auto;
  right: auto;
}
.admin-info-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #b8d5ce;
  border-radius: 999px;
  background: #eef7f4;
  color: var(--accent-strong);
  padding: 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}
.admin-info-button:hover {
  background: #dff1ed;
  color: var(--accent-strong);
}
.admin-info-popover {
  position: absolute;
  z-index: 25;
  top: 42px;
  right: 0;
  display: grid;
  gap: 8px;
  width: min(620px, calc(100vw - 48px));
  max-height: 440px;
  overflow: auto;
  border: 1px solid #b8d5ce;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(23, 33, 28, 0.18);
  padding: 12px;
}
.admin-info-popover[hidden] {
  display: none;
}
.admin-info-popover strong {
  color: var(--accent-strong);
}
.admin-info-popover pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #26312b;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 33, 28, 0.34);
}
.modal-backdrop[hidden] {
  display: none;
}
.modal-card {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid #c8d8d3;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 33, 28, 0.24);
  padding: 26px;
}
.modal-card h2 {
  font-size: 24px;
  margin-right: 40px;
}
.modal-card p {
  margin-top: 12px;
  color: #3f4a44;
}
.impressum-card h3 {
  margin: 20px 0 6px;
  color: var(--accent-strong);
  font-size: 15px;
}
.impressum-card address {
  color: #3f4a44;
  font-style: normal;
  line-height: 1.6;
}
.privacy-card {
  width: min(820px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
}
.privacy-card h3 {
  scroll-margin-top: 18px;
}
.feedback-button {
  position: static;
  min-height: 42px;
  border: 1px solid #b8ddd5;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-strong);
  padding: 0 16px;
  font-weight: 850;
}
.feedback-button:hover {
  background: #eef7f4;
}
.feedback-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.feedback-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.feedback-form select,
.feedback-form input,
.feedback-form textarea {
  width: 100%;
}
.feedback-form textarea {
  resize: vertical;
}
.feedback-privacy {
  margin: 0;
  border-left: 3px solid #b8ddd5;
  padding-left: 10px;
  font-size: 13px;
}
.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.feedback-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.feedback-note[data-kind="success"] {
  color: var(--accent-strong);
}
.feedback-note[data-kind="error"] {
  color: #9b2f17;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  padding: 0;
  font-size: 24px;
  line-height: 1;
}
.modal-close:hover {
  background: #eef7f4;
}
.modal-mail {
  display: inline-flex;
  margin-top: 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 11px 14px;
  font-weight: 850;
}
.modal-mail:hover {
  background: var(--accent-strong);
  text-decoration: none;
}
.smart-usage-popup {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 4px;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid #b8ddd5;
  border-radius: 12px;
  background: #f1fbf8;
  box-shadow: 0 18px 54px rgba(23, 33, 28, 0.18);
  color: var(--accent-strong);
  padding: 16px 18px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.smart-usage-popup strong {
  font-size: 15px;
}
.smart-usage-popup span {
  color: #3f4a44;
  font-size: 13px;
}
.smart-usage-popup.is-limit {
  border-color: #f0c2ae;
  background: #fff8f4;
  color: #8a2c12;
}
.smart-usage-popup.is-hiding {
  opacity: 0;
  transform: translateY(8px);
}
.detail-shell {
  width: min(1060px, calc(100% - 32px));
}
.detail-page {
  display: grid;
  gap: 28px;
  padding: 28px;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 40px;
  border: 1px solid #bfe0d8;
  border-radius: 999px;
  background: #f4fbf8;
  color: var(--accent-strong);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}
.detail-back:hover {
  border-color: #8fc6bb;
  background: #eaf8f4;
  text-decoration: none;
}
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 28px;
  align-items: start;
}
.detail-eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 850;
}
.detail-hero h1 {
  max-width: 760px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.02;
}
.detail-lead {
  max-width: 740px;
  margin-top: 18px;
  color: #3e4a43;
  font-size: 18px;
  line-height: 1.55;
}
.detail-summary-card {
  border: 1px solid #d8e4df;
  border-radius: 12px;
  background: #f5fbf9;
  padding: 18px;
}
.detail-summary-card dl {
  display: grid;
  gap: 16px;
  margin: 0;
}
.detail-summary-card div {
  border-bottom: 1px solid #dce8e3;
  padding-bottom: 13px;
}
.detail-summary-card div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.detail-summary-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.detail-summary-card dd {
  margin: 4px 0 0;
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 850;
}
.detail-content {
  display: grid;
  gap: 18px;
}
.detail-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid #e2e8e4;
  padding-top: 20px;
}
.detail-section h2 {
  color: var(--accent-strong);
  font-size: 21px;
}
.detail-section p {
  max-width: 830px;
  color: #2f3933;
  font-size: 16px;
  line-height: 1.65;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.detail-tags li {
  border: 1px solid #d6e5df;
  border-radius: 999px;
  background: #fbfdfb;
  color: #405049;
  padding: 7px 11px;
  font-size: 14px;
  font-weight: 700;
}
.detail-note {
  border: 1px solid #ecd7ba;
  border-radius: 10px;
  background: #fffaf2;
  padding: 16px;
}
.detail-note h2 {
  color: #75521d;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e2e8e4;
  padding-top: 22px;
}
.detail-source-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
  font-weight: 850;
  text-decoration: none;
}
.detail-source-button:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto auto;
  }
  .topnav {
    display: none;
  }
  .top-actions {
    justify-self: end;
  }
  .browse-head {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    justify-self: start;
  }
  .opportunity-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }
  .row-facts {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    padding: 12px 54px 0 0;
    border-left: 0;
    border-top: 1px solid #edf1ee;
  }
  .row-actions {
    top: 14px;
    right: 14px;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 14px;
  }
  .shell {
    width: min(100% - 20px, 1180px);
  }
  .browse-head h1 {
    font-size: 34px;
  }
  .browse-head .subtle {
    font-size: 16px;
  }
  .hero-visual {
    display: none;
  }
  .smart-panel {
    padding: 18px 16px 14px;
  }
  .smart-copy {
    grid-template-columns: 1fr;
  }
  .smart-fields {
    grid-template-columns: 1fr;
  }
  .detail-page {
    padding: 20px;
  }
  .detail-hero {
    grid-template-columns: 1fr;
  }
  .browse-filters {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }
  .filter-heading {
    align-items: start;
    flex-wrap: wrap;
  }
  .filter-tabs {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }
  .favorite-quick-filter {
    margin-left: 0;
  }
  .filter-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
  .filter-footer .panel-count {
    margin-left: 0;
  }
  .results-panel {
    padding: 14px 12px 16px;
  }
  .results-head {
    align-items: stretch;
    flex-direction: column;
  }
  .sort-control {
    width: 100%;
    min-width: 0;
  }
  .opportunity-row {
    grid-template-columns: 1fr;
  }
  .funder-cell {
    grid-template-columns: auto 1fr;
    justify-items: start;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #edf1ee;
    padding: 0 0 12px;
    text-align: left;
  }
  .row-facts {
    grid-column: auto;
  }
  .row-facts {
    border-left: 0;
    border-top: 1px solid #edf1ee;
    justify-self: stretch;
    width: 100%;
    padding: 12px 48px 0 0;
  }
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 13px;
  }
  .cookie-banner button {
    width: 100%;
  }
  .feedback-button {
    min-height: 38px;
    padding: 0 12px;
  }
}
