:root {
  --bg-main: #fff;
  --bg-light: #f8f9fa;
  --border: #a2a9b1;
  --text-main: #202122;
  --text-muted: #555;
  --font-main: Georgia, "Times New Roman", Times, serif;
  --max-width: 1100px;
  --link-color: #0645ad;
  --link-hover: #0b0080;
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-main);
  line-height: 1.7;
  background: var(--bg-main);
  color: var(--text-main);
  overflow-wrap: break-word;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

header,
footer {
  background: var(--bg-light);
  padding: 1rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

footer {
  border-top: 1px solid var(--border);
  border-bottom: none;
  margin-top: 2rem;
  font-size: 0.9rem;
}

header h1 {
  margin: 0.2rem 0;
  font-size: 2.2rem;
}

header p {
  margin: 0;
  color: var(--text-muted);
}

main {
  display: flex;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
  flex-wrap: wrap;
}

article {
  flex: 3;
  min-width: 280px;
}

article h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

article h2::after {
  content: "▼";
  font-size: 0.8rem;
  transition: transform var(--transition);
}

article h2.active::after {
  transform: rotate(-180deg);
}

section .content {
  display: none;
  padding-top: 0.6rem;
  animation: fadeIn 0.4s ease;
}

section.active .content {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* UPDATED: Wider Sidebar (380px) */
aside {
  flex: 0 0 380px;
  /* Fixed width */
  max-width: 380px;
  min-width: 300px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.95rem;
}

aside img {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
}

aside table {
  width: 100%;
  border-collapse: collapse;
}

aside th,
aside td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}

aside th {
  background: #f1f3f5;
  font-weight: 600;
  width: 40%;
  white-space: nowrap;
}

aside td,
aside td a {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

/* Mobile View */
@media (max-width: 900px) {
  main {
    flex-direction: column;
  }

  aside {
    flex: 1 1 auto;
    max-width: 500px;
    width: 100%;
    min-width: auto;
    margin: 0 auto 1.5rem;
  }
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.8rem;
  }

  article h2 {
    font-size: 1.2rem;
  }
}

/* Scrollbar for WebKit browsers */
*::-webkit-scrollbar {
  width: 0px;
}
