:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --ink: #1f2320;
  --muted: #68706a;
  --faint: #8e958f;
  --line: #dfe4df;
  --line-strong: #c9d0ca;
  --accent: #275b4f;
  --accent-soft: #eaf3ef;
  --row-hover: #fbfcfb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 245, 0.92);
  backdrop-filter: blur(12px);
}

.topbar-inner,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  color: var(--ink);
  text-decoration: none;
}

.brand-title {
  font-size: 1rem;
  font-weight: 720;
}

.brand-subtitle,
.topbar-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.topbar-meta {
  white-space: nowrap;
}

.intro {
  display: grid;
  gap: 10px;
  max-width: 780px;
  padding: 42px 0 24px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2rem, 4vw, 3.65rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.intro p:last-child {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.02rem;
}

.database-shell {
  margin-bottom: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: clip;
  box-shadow: 0 14px 44px rgba(31, 35, 32, 0.06);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(145px, 180px)) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.filter-group {
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: uppercase;
}

input,
select,
button {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
}

input,
select {
  padding: 0 10px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ghost-button {
  padding: 0 12px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
  font-weight: 680;
  white-space: nowrap;
}

.archive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.archive-head h2 {
  margin: 0;
  font-size: 1rem;
}

.archive-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
}

.status-pill {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f7f8f7;
  font-size: 0.78rem;
  font-weight: 680;
}

.table-head,
.tip-card {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(150px, 0.78fr) minmax(80px, 0.42fr) minmax(260px, 1.35fr) minmax(88px, 0.36fr);
  gap: 14px;
  align-items: start;
}

.table-head {
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f4f6f4;
  font-size: 0.76rem;
  font-weight: 760;
  text-transform: uppercase;
}

.tips-list {
  display: grid;
}

.tip-card {
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.tip-card:hover {
  background: var(--row-hover);
}

.tip-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tip-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.tip-subtle,
.tip-category,
.tip-age,
.tip-note {
  min-width: 0;
  color: var(--muted);
}

.tip-category {
  color: var(--ink);
}

.tip-age {
  white-space: nowrap;
}

.tip-note {
  color: var(--ink);
}

.tip-link a {
  color: var(--accent);
  font-weight: 680;
  text-decoration: none;
}

.tip-link a:hover {
  text-decoration: underline;
}

.cell-label {
  display: none;
}

.empty-state {
  margin: 0;
  padding: 28px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 980px) {
  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-group:first-child {
    grid-column: 1 / -1;
  }

  .table-head {
    display: none;
  }

  .tip-card {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding: 16px;
  }

  .tip-category,
  .tip-age,
  .tip-note,
  .tip-link {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
  }

  .cell-label {
    display: block;
    color: var(--faint);
    font-size: 0.76rem;
    font-weight: 760;
    text-transform: uppercase;
  }
}

@media (max-width: 620px) {
  .topbar-inner,
  main {
    width: min(100% - 24px, 1180px);
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .intro {
    padding: 32px 0 20px;
  }

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

  .archive-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .tip-category,
  .tip-age,
  .tip-note,
  .tip-link {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

