/* ============================================
   LOTOPEDIA.COM — Global Stylesheet
   Ensiklopedia Lotere & Permainan Angka
   Wiki / Encyclopedia Style
   ============================================ */

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --border: #a2a9b1;
  --border-light: #c8ccd1;
  --text: #202122;
  --text-secondary: #54595d;
  --link: #0645ad;
  --link-visited: #0b0080;
  --link-hover: #663399;
  --accent-bg: #eaecf0;
  --infobox-header: #b8d4e3;
  --infobox-label: #e8f0f5;
  --toc-bg: #f8f9fa;
  --warning-bg: #fef6e7;
  --warning-border: #fc3;
  --success-bg: #d5fdf4;
  --success-border: #14866d;
  --font-serif: 'Linux Libertine', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Source Sans Pro', -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

/* ---- HEADER ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 8px 0;
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-logo {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.site-logo span {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 13px;
  margin-left: 8px;
  font-family: var(--font-sans);
}
.site-nav {
  display: flex;
  gap: 20px;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}
.site-nav a:hover { color: var(--link); }

/* ---- TABS ---- */
.tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}
.tabs-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.tab {
  padding: 8px 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab.active {
  color: var(--text);
  border-bottom-color: var(--link);
  font-weight: 600;
}

/* ---- MAIN LAYOUT ---- */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}
.main-container.full-width {
  grid-template-columns: 1fr;
}
@media (max-width: 768px) {
  .main-container { grid-template-columns: 1fr; }
}

/* ---- CONTENT ---- */
.content-area {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 24px 28px;
}
.article-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin-bottom: 16px;
  line-height: 1.2;
}
.article-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-style: italic;
}

/* ---- NOTICE BOXES ---- */
.notice-box {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 12.5px;
  line-height: 1.5;
}
.notice-box strong { font-weight: 600; }
.notice-box.info {
  background: #eaf3fb;
  border-color: #36c;
}
.notice-box.success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

/* ---- TOC ---- */
.toc {
  background: var(--toc-bg);
  border: 1px solid var(--border-light);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: inline-block;
  min-width: 260px;
}
.toc-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  text-align: center;
}
.toc ol {
  padding-left: 24px;
  font-size: 12.5px;
  line-height: 1.8;
}
.toc a { color: var(--link); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc ol ol { padding-left: 16px; font-size: 12px; }

/* ---- HEADINGS ---- */
h2.section-heading {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 400;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
  margin: 24px 0 12px 0;
}
h3.subsection-heading {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  margin: 18px 0 8px 0;
}

/* ---- CONTENT ELEMENTS ---- */
.content-area p {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.65;
}
.content-area a { color: var(--link); text-decoration: none; }
.content-area a:hover { text-decoration: underline; }
.content-area a:visited { color: var(--link-visited); }
.content-area ul, .content-area ol {
  padding-left: 28px;
  margin-bottom: 12px;
}
.content-area li { margin-bottom: 4px; font-size: 14px; }

/* ---- DATA TABLE ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.data-table th {
  background: var(--accent-bg);
  text-align: left;
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  font-weight: 600;
}
.data-table td {
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  vertical-align: top;
}
.data-table tr:hover td {
  background: #f0f4f8;
}

/* ---- INFOBOX ---- */
.infobox {
  background: var(--surface);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
  font-size: 12.5px;
}
.infobox-header {
  background: var(--infobox-header);
  text-align: center;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-serif);
}
.infobox-image {
  text-align: center;
  padding: 12px;
  background: var(--accent-bg);
}
.infobox-image-placeholder {
  width: 180px;
  height: 60px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  font-family: var(--font-serif);
  color: var(--text);
  letter-spacing: 2px;
}
.infobox-caption {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-secondary);
  padding: 4px 12px 8px;
  background: var(--accent-bg);
}
.infobox-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-bottom: 1px solid var(--border-light);
}
.infobox-label {
  background: var(--infobox-label);
  padding: 5px 8px;
  font-weight: 600;
  border-right: 1px solid var(--border-light);
  font-size: 12px;
}
.infobox-value {
  padding: 5px 8px;
  font-size: 12px;
}

/* ---- REFERENCES ---- */
.references {
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  margin-top: 24px;
  padding-top: 12px;
}
.references h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--text);
}
.references ol { padding-left: 24px; line-height: 1.8; }
.ref-tag {
  font-size: 10.5px;
  color: var(--link);
  vertical-align: super;
  text-decoration: none;
}

/* ---- SIDEBAR ---- */
.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
  font-size: 12.5px;
}
.sidebar-box-header {
  background: var(--accent-bg);
  padding: 6px 10px;
  font-weight: 600;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-box-content {
  padding: 10px;
  line-height: 1.6;
}
.sidebar-box-content a { color: var(--link); text-decoration: none; }
.sidebar-box-content ul { padding-left: 16px; }
.sidebar-box-content li { margin-bottom: 3px; font-size: 12px; }

/* ---- CATEGORIES ---- */
.categories {
  background: var(--accent-bg);
  border: 1px solid var(--border-light);
  padding: 8px 12px;
  margin-top: 20px;
  font-size: 12px;
}
.categories span { font-weight: 600; margin-right: 8px; }
.categories a { color: var(--link); text-decoration: none; margin-right: 6px; }

/* ---- EDIT INFO ---- */
.edit-info {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}
.edit-info a { color: var(--text-secondary); }

/* ---- FOOTER ---- */
.site-footer {
  max-width: 1200px;
  margin: 30px auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  font-size: 11.5px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}
.site-footer a { color: var(--text-secondary); text-decoration: none; }

/* ---- HOMEPAGE SPECIFIC ---- */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
@media (max-width: 600px) {
  .featured-grid { grid-template-columns: 1fr; }
}
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 14px 16px;
}
.featured-card h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 6px;
}
.featured-card h3 a { color: var(--link); text-decoration: none; }
.featured-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.fact-box {
  background: var(--toc-bg);
  border: 1px solid var(--border-light);
  padding: 12px 16px;
  margin: 16px 0;
}
.fact-box h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.fact-box ul { padding-left: 20px; font-size: 13px; }
.fact-box li { margin-bottom: 4px; }

/* ---- ARTICLE INDEX ---- */
.index-columns {
  column-count: 3;
  column-gap: 24px;
  margin: 16px 0;
}
@media (max-width: 768px) {
  .index-columns { column-count: 2; }
}
@media (max-width: 480px) {
  .index-columns { column-count: 1; }
}
.index-section {
  break-inside: avoid;
  margin-bottom: 16px;
}
.index-section h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 2px;
  margin-bottom: 6px;
  color: var(--text);
}
.index-section ul {
  list-style: none;
  padding: 0;
}
.index-section li {
  font-size: 13px;
  line-height: 1.7;
}
.index-section li a { color: var(--link); text-decoration: none; }

/* ---- CONTACT FORM ---- */
.contact-info {
  margin: 16px 0;
}
.contact-info dt {
  font-weight: 600;
  font-size: 13px;
  margin-top: 12px;
}
.contact-info dd {
  font-size: 14px;
  margin-left: 0;
  margin-top: 2px;
}

/* ---- LEGAL PAGES ---- */
.legal-content h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  margin: 16px 0 8px 0;
}
.legal-content p {
  font-size: 13.5px;
  margin-bottom: 10px;
}
.legal-content ul {
  padding-left: 24px;
  margin-bottom: 10px;
}
.legal-content li {
  font-size: 13.5px;
  margin-bottom: 4px;
}

/* ---- SITEMAP PAGE ---- */
.sitemap-section {
  margin-bottom: 24px;
}
.sitemap-section h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 3px;
  margin-bottom: 8px;
}
.sitemap-section ul {
  list-style: none;
  padding: 0;
  column-count: 2;
  column-gap: 20px;
}
@media (max-width: 600px) {
  .sitemap-section ul { column-count: 1; }
}
.sitemap-section li {
  font-size: 13px;
  line-height: 1.8;
  break-inside: avoid;
}
.sitemap-section li a { color: var(--link); text-decoration: none; }
.sitemap-section li a:hover { text-decoration: underline; }
