/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --text-muted: #555;
  --accent: #2c5f8a;
  --accent-hover: #1e4468;
  --border: #ddd;
  --card-bg: #fff;
  --max-width: 820px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* === HEADER === */
.site-header {
  border-bottom: 3px double var(--border);
  background: var(--card-bg);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1rem;
  text-align: center;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* === NAV === */
.site-nav {
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.nav-inner a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.nav-inner a:hover,
.nav-inner a.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

/* === MAIN CONTENT === */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  flex: 1;
  width: 100%;
}

/* === HERO (homepage) === */
.hero {
  text-align: center;
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* === SECTION HEADINGS === */
.section-heading {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* === DOCUMENT CARDS === */
.doc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  transition: box-shadow 0.2s;
}

.doc-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.doc-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.doc-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.doc-card-title a {
  color: var(--text);
}

.doc-card-title a:hover {
  color: var(--accent);
}

.doc-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.doc-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.doc-card-meta .category-tag {
  display: inline-block;
  background: #eef3f8;
  color: var(--accent);
  padding: 0.15em 0.5em;
  border-radius: 3px;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.doc-card .btn {
  margin-top: 0.5rem;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* === FILTERS (documents page) === */
.filters {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: #eef3f8;
}

.search-input {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  flex: 1;
  min-width: 180px;
  max-width: 300px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* === SUBMISSION PAGE === */
.submit-info {
  background: #eef3f8;
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.92rem;
  border-radius: 0 4px 4px 0;
}

.submit-info ul {
  margin: 0.5rem 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.submit-info li {
  margin-bottom: 0.25rem;
}

.form-embed {
  margin: 2rem 0;
}

.form-embed iframe {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* === ABOUT PAGE === */
.about-content h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.about-content h2:first-child {
  margin-top: 0;
}

.about-content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.about-content ul {
  margin: 0 0 1rem 1.25rem;
}

.about-content li {
  margin-bottom: 0.35rem;
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer p {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* === PAGE HEADER === */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* === CTA BLOCK === */
.cta-block {
  text-align: center;
  padding: 2rem;
  margin-top: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.cta-block h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.cta-block p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .site-title {
    font-size: 1.8rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    display: none;
  }

  .nav-inner.open {
    display: flex;
  }

  .nav-inner a {
    text-align: center;
    border-bottom: 1px solid var(--border);
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    max-width: 100%;
  }

  .content {
    padding: 1.5rem 1rem;
  }
}
