:root {
  --bg: #f4efe6;
  --paper: #fffaf4;
  --paper-strong: #f6ede1;
  --line: #d9c8b3;
  --text: #1f1b17;
  --muted: #67584c;
  --accent: #17324d;
  --accent-soft: #e8eff6;
  --shadow: 0 18px 40px rgba(38, 28, 18, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(184, 138, 67, 0.12), transparent 30%),
    linear-gradient(180deg, #f7f1e8 0%, var(--bg) 100%);
  color: var(--text);
}

.archive-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.archive-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(23, 50, 77, 0.98), rgba(17, 31, 47, 0.94));
  color: #f9f4ec;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.archive-header::after {
  content: "";
  position: absolute;
  inset: auto -90px -110px auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(184, 138, 67, 0.24), transparent 70%);
}

.archive-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: rgba(255, 244, 230, 0.72);
}

.archive-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.05;
}

.archive-summary {
  width: min(760px, 100%);
  margin: 14px 0 0;
  color: rgba(255, 244, 230, 0.82);
  font-size: 1.05rem;
  line-height: 1.65;
}

.archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.archive-link,
.acta-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.archive-link {
  color: #fff7ee;
  border-color: rgba(255, 255, 255, 0.18);
}

.archive-link.primary {
  background: linear-gradient(135deg, #c97a47, #b8693b);
  border-color: transparent;
}

.archive-link:hover,
.archive-link:focus-visible,
.acta-open:hover,
.acta-open:focus-visible {
  transform: translateY(-1px);
}

.archive-link:hover,
.archive-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.archive-link.primary:hover,
.archive-link.primary:focus-visible {
  background: linear-gradient(135deg, #d2814c, #bf7040);
}

.archive-controls {
  margin-top: 22px;
  background: rgba(255, 250, 244, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.archive-controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.7fr) auto;
  gap: 14px;
  align-items: end;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.field-input,
.field-select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  font: inherit;
  color: var(--text);
  background: #fffdf9;
}

.field-input:focus,
.field-select:focus {
  outline: 2px solid rgba(23, 50, 77, 0.14);
  border-color: #8fa5bb;
}

.archive-count {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.archive-list {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.acta-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.acta-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.acta-card h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.18;
  color: var(--accent);
}

.acta-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.acta-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.acta-meta strong {
  color: var(--text);
}

.acta-summary {
  margin: 18px 0 0;
  line-height: 1.7;
  color: #2f2620;
}

.acta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.acta-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--muted);
  font-size: 0.84rem;
}

.acta-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(217, 200, 179, 0.8);
}

.acta-hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.acta-open {
  background: #fff;
  color: var(--accent);
}

.acta-open:hover,
.acta-open:focus-visible {
  background: #faf4ec;
  border-color: #c0ab90;
}

.empty-state {
  margin-top: 22px;
  background: rgba(255, 250, 244, 0.78);
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .archive-controls-grid {
    grid-template-columns: 1fr;
  }

  .acta-card-head,
  .acta-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .archive-shell {
    width: min(100% - 20px, 100%);
    padding: 18px 0 36px;
  }

  .archive-header,
  .archive-controls,
  .acta-card {
    border-radius: 20px;
    padding: 18px;
  }

  .acta-card h2 {
    font-size: 1.3rem;
  }
}
