:root {
  color-scheme: light dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f8f9fb;
  color: #111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fb;
}

.container {
  width: min(780px, 94vw);
  margin: 4rem auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: 0 40px 60px -45px rgba(15, 23, 42, 0.26);
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: -0.02em;
}

.subtitle {
  margin-top: 0.5rem;
  color: #475569;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-inline: auto;
  width: min(420px, 100%);
}

.search-form input[type="text"] {
  padding: 0.85rem 1rem;
  border: 1px solid #cbd5f5;
  border-radius: 12px;
  font-size: 1rem;
}

.search-form button {
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.search-form button:hover,
.search-form button:focus-visible {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

article {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  background: #fdfdfd;
}

article h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #1e293b;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  margin-bottom: 0.65rem;
  color: #0f172a;
}

li strong {
  display: inline-block;
  min-width: 160px;
}

.date-nav {
  margin: 2.5rem 0 2rem;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.date-nav a {
  color: #1d4ed8;
  text-decoration: none;
}

.date-nav a:hover,
.date-nav a:focus-visible {
  text-decoration: underline;
}

.footer {
  text-align: center;
  margin-top: 2rem;
  color: #475569;
  font-size: 0.9rem;
}

.footer a {
  color: inherit;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    background-color: #0f172a;
    color: #e2e8f0;
  }

  body {
    background: #0f172a;
    color: #e2e8f0;
  }

  .container {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 40px 80px -50px rgba(15, 23, 42, 0.7);
  }

  article {
    background: #111c33;
    border-color: rgba(148, 163, 184, 0.2);
  }

  li strong {
    color: #94a3b8;
  }

  .subtitle,
  .footer {
    color: #cbd5f5;
  }
}
