:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17221f;
  background: #f5f7f5;
  --green: #146b59;
  --dark: #123f35;
  --muted: #687571;
  --line: #dce4df;
  --surface: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f5f7f5; }
a { color: inherit; }

.topbar {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { color: var(--dark); font-size: 1.1rem; font-weight: 800; text-decoration: none; letter-spacing: .03em; }
.brand span { color: var(--green); font-weight: 500; }
.project-count { color: var(--muted); font-size: .85rem; }

.page { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 70px; }
.page-heading { display: flex; gap: 24px; align-items: end; justify-content: space-between; margin-bottom: 28px; }
h1 { margin: 0; color: var(--dark); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); }

.search { display: block; width: min(280px, 100%); }
.search input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: var(--surface); color: inherit; }
.search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20, 107, 89, .12); }

.project-list { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.list-header, .project-row { display: grid; grid-template-columns: minmax(210px, 1.7fr) minmax(150px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(170px, auto); gap: 20px; align-items: center; }
.list-header { padding: 12px 18px; background: #f0f4f1; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.project-row { min-height: 82px; padding: 15px 18px; border-top: 1px solid var(--line); font-size: .9rem; }
.project-row > div:not(.project-name):not(.actions) { overflow: hidden; color: #3e4d48; text-overflow: ellipsis; white-space: nowrap; }
.project-name strong, .project-name small { display: block; }
.project-name strong { color: var(--dark); font-size: .98rem; }
.project-name small { margin-top: 4px; color: var(--muted); font-size: .74rem; text-transform: capitalize; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }
.action { padding: 8px 11px; border-radius: 6px; font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.action.open { background: var(--dark); color: white; }
.action.read-more { border: 1px solid var(--line); color: var(--green); }
.action:hover { opacity: .82; }
.empty-state { padding: 55px 20px; color: var(--muted); text-align: center; }
.overview-dialog { width: min(620px, calc(100% - 32px)); padding: 30px; border: 0; border-radius: 10px; color: #17221f; box-shadow: 0 24px 80px rgba(0, 0, 0, .22); }
.overview-dialog::backdrop { background: rgba(12, 30, 26, .48); }
.dialog-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.5rem; }
.dialog-label { margin: 0 0 8px; color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.overview-dialog h2 { margin: 0 0 18px; color: var(--dark); font-size: 1.45rem; }
.overview-body { color: #3e4d48; line-height: 1.65; white-space: pre-wrap; }
footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 20px 0 40px; color: var(--muted); font-size: .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
  .page-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .list-header { display: none; }
  .project-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; padding: 18px; }
  .project-name, .actions { grid-column: 1 / -1; }
  .project-row > div:not(.project-name):not(.actions) { white-space: normal; }
  .project-row > div:not(.project-name):not(.actions)::before { display: block; margin-bottom: 3px; color: var(--muted); content: attr(data-label); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
  .actions { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .topbar, .page, footer { width: min(100% - 28px, 1180px); }
  .page { padding-top: 38px; }
  .project-row { grid-template-columns: 1fr; }
}
