:root {
  --paper: #fffdf7;
  --paper2: #f7ede0;
  --ink: #3a2e22;
  --muted: #8a6a44;
  --line: #d4a373;
  --blue: #8b4a2b;
  --blue2: #b23a2e;
  --accent: #f5c518;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fdf6ec 0%, #f7ede0 100%);
  background-attachment: fixed;
  font-size: 15px;
  line-height: 1.7;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.banner {
  background: #b23a2e;
  color: #fff8ec;
  text-align: center;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-family: sans-serif;
}
header {
  background: linear-gradient(180deg, #fffdf7 0%, #f9f0e0 100%);
  border-bottom: 3px double var(--line);
  padding: 16px 22px;
  display: flex;
  gap: 24px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(120, 80, 40, 0.08);
}
.logo {
  font-family: Georgia, serif;
  font-size: 30px;
  white-space: nowrap;
  color: #6b4423;
}
.logo b { font-weight: 400; color: #b23a2e; }
.search-wrap { flex: 1; position: relative; max-width: 760px; }
.search {
  width: 100%;
  border: 1px solid #c9a97a;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 15px;
  background: #fffdf7;
  font-family: sans-serif;
  color: var(--ink);
}
.search:focus { outline: 2px solid var(--line); }
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 46px;
  background: #fffdf7;
  border: 1px solid var(--line);
  box-shadow: 0 5px 18px rgba(120, 80, 40, 0.15);
  display: none;
  max-height: 380px;
  overflow: auto;
  z-index: 20;
  border-radius: 4px;
}
.search-results a {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid #f0dcc0;
}
.search-results a:hover { background: #fdf6ec; text-decoration: none; }
.search-results small { display: block; color: var(--muted); margin-top: 3px; font-family: sans-serif; }
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-width: 1400px;
  margin: 0 auto;
}
.sidebar {
  background: var(--paper2);
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 105px);
  padding: 22px 18px;
  font-family: sans-serif;
}
.sidebar h3 {
  font-size: 11px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-family: sans-serif;
}
.sidebar ul { list-style: none; margin: 0 0 22px; padding: 0; }
.sidebar li { margin: 7px 0; font-size: 14px; }
main {
  background: var(--paper);
  padding: 30px 42px 70px;
  min-height: calc(100vh - 105px);
}
h1 {
  font: 400 36px Georgia, serif;
  border-bottom: 2px solid var(--line);
  margin: 0 0 20px;
  padding-bottom: 8px;
  color: #5a3a1e;
}
h2 {
  font: 400 24px Georgia, serif;
  border-bottom: 1px solid #e0cba8;
  padding-bottom: 5px;
  margin-top: 30px;
  color: #6b4423;
}
h3 { font-size: 17px; margin-top: 22px; color: #8b4a2b; }
p, li { line-height: 1.7; }
.hero {
  background: linear-gradient(135deg, #fdf6ec 0%, #f0dcc0 100%);
  border: 1px solid var(--line);
  padding: 24px 28px;
  margin-bottom: 24px;
  border-radius: 4px;
}
.hero h1 { border: 0; margin: 0 0 8px; padding: 0; }
.hero h2 { border: 0; margin: 0 0 6px; }
.hero a { font-weight: bold; }
.notice {
  border: 1px solid var(--line);
  background: #fdf6ec;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  font-family: sans-serif;
  border-radius: 3px;
  color: #6b4423;
}
.infobox {
  float: right;
  width: 310px;
  margin: 0 0 20px 28px;
  border: 1px solid var(--line);
  border-collapse: collapse;
  background: #fdf6ec;
  font-size: 14px;
  font-family: sans-serif;
  border-radius: 3px;
  overflow: hidden;
}
.infobox th {
  background: #f0dcc0;
  font-family: Georgia, serif;
  font-size: 18px;
  padding: 9px;
  border: 1px solid var(--line);
  color: #5a3a1e;
}
.infobox td { border: 1px solid #e0cba8; padding: 7px; vertical-align: top; }
.infobox .label { font-weight: 700; width: 38%; background: #f7e9d3; color: #6b4423; }
.categories {
  clear: both;
  margin-top: 30px;
  border: 1px solid var(--line);
  background: #fdf6ec;
  padding: 12px 16px;
  font-size: 13px;
  font-family: sans-serif;
  border-radius: 3px;
}
.articlegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.articlecard {
  border: 1px solid var(--line);
  background: #fdf6ec;
  padding: 18px;
  min-height: 135px;
  border-radius: 4px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.articlecard:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(120, 80, 40, 0.12);
}
.articlecard a { font: 400 20px Georgia, serif; }
.articlecard p { color: var(--muted); font-size: 14px; margin-bottom: 6px; font-family: sans-serif; }
.articlecard small { color: var(--muted); font-size: 12px; font-family: sans-serif; }
.grid-title { margin-top: 32px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.stat {
  background: #fdf6ec;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 3px;
  font-family: sans-serif;
  font-size: 13px;
  color: #6b4423;
}
.stat b { font-size: 20px; display: block; color: #b23a2e; font-family: Georgia, serif; }
.category {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  font-family: sans-serif;
}
.category h3 { margin: 0 0 7px; font-family: Georgia, serif; }
.quote {
  border-left: 4px solid var(--line);
  background: #fdf6ec;
  padding: 12px 18px;
  margin: 18px 0;
  font-style: italic;
  color: #6b4423;
}
.footer {
  border-top: 1px solid var(--line);
  background: #f0dcc0;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-family: sans-serif;
}
@media (max-width: 800px) {
  header { padding: 12px; flex-wrap: wrap; gap: 10px; }
  .logo { font-size: 25px; }
  .search-wrap { flex-basis: 100%; max-width: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar ul { display: flex; flex-wrap: wrap; gap: 8px 14px; }
  .sidebar li { margin: 0; }
  main { padding: 22px 16px 50px; }
  .infobox { float: none; width: 100%; margin: 0 0 20px; }
  h1 { font-size: 30px; }
}
