/* Hallmark stamp: WikiAgent premium pass, genre editorial, job: read and find, theme: encyclopedia reference, direction: premium depth over plain wiki (Han 2026-11-29) */
/* palette and font follow the Ramah Indonesia direction Han approved in the designer desk 2026-11-29: blue, teal, agent gold, Plus Jakarta Sans */
:root {
  --paper: #ffffff;
  --paper-soft: #f4f7fb;
  --ink: #1c2430;
  --ink-soft: #5a6472;
  --rule: #d3dae4;
  --rule-soft: #e6ebf2;
  --brand: #2563eb;
  --brand-deep: #16295e;
  --brand-wash: #edf3fe;
  --teal: #0891b2;
  --gold: #d97706;
  --on-brand: #ffffff;
  --on-deep: #f2f6ff;
  --on-deep-soft: #bccdf2;
  --link: #2563eb;
  --focus: #2563eb;
  --shadow-card: 0 0 0 1px rgba(22, 41, 94, 0.05), 0 1px 2px rgba(22, 41, 94, 0.06), 0 8px 24px -12px rgba(22, 41, 94, 0.28);
  --shadow-lift: 0 0 0 1px rgba(22, 41, 94, 0.06), 0 2px 4px rgba(22, 41, 94, 0.07), 0 16px 32px -16px rgba(22, 41, 94, 0.32);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-body: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", "Iowan Old Style", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1117;
    --paper-soft: #141a23;
    --ink: #e9edf3;
    --ink-soft: #a3adbb;
    --rule: #39434f;
    --rule-soft: #232b36;
    --brand: #6ea8fe;
    --brand-deep: #101d3d;
    --brand-wash: #131f38;
    --teal: #38b6d3;
    --gold: #f0a832;
    --on-brand: #0d1526;
    --on-deep: #eef3ff;
    --on-deep-soft: #a9bde6;
    --link: #6ea8fe;
    --focus: #6ea8fe;
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.07);
    --shadow-lift: 0 0 0 1px rgba(255, 255, 255, 0.09);
}
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--brand); color: var(--on-brand); padding: 8px 16px; border-radius: 8px;
  text-decoration: none; transition: top 160ms var(--ease-out);
}
.skip-link:focus { top: 10px; color: var(--on-brand); }

/* Header */
.site-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; row-gap: 8px;
  padding: 12px 16px; border-top: 4px solid var(--brand);
  border-bottom: 1px solid var(--rule-soft);
  max-width: 1080px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 22px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand-mark {
  position: relative;
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  background: var(--brand); color: var(--on-brand);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 700; font-size: 17px;
  box-shadow: var(--shadow-card);
}
.brand-mark::after {
  content: ""; position: absolute; right: 4px; bottom: 4px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 8px; flex: none;
  box-shadow: var(--shadow-card); background: #fff;
}
.site-head nav { display: flex; align-items: center; }
.site-head nav a {
  color: var(--ink-soft); text-decoration: none; margin-left: 16px;
  font-size: 14.5px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center;
}
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }
.lang-btn {
  border: 1px solid var(--rule); border-radius: 8px; padding: 4px 12px;
  color: var(--ink) !important;
}

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 44px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
h1 { font-size: 32px; line-height: 1.2; margin: 8px 0 16px; letter-spacing: -0.015em; text-wrap: balance; }
h2 {
  font-size: 23px; line-height: 1.3; margin: 36px 0 12px;
  letter-spacing: -0.01em;
  overflow-wrap: break-word; min-width: 0;
}
p { margin: 0 0 12px; text-wrap: pretty; }

/* Home hero */
.hero {
  background: var(--brand-deep); color: var(--on-deep);
  border-radius: 16px; padding: 28px 24px; margin: 8px 0 8px;
  box-shadow: var(--shadow-lift);
}
.hero h1 { color: var(--on-deep); font-size: 42px; margin: 0 0 8px; }
.hero .tagline { color: var(--on-deep-soft); font-size: 18px; margin-bottom: 24px; }
.search label {
  display: block; font-family: var(--font-head); font-size: 21px; font-weight: 600;
  margin-bottom: 8px; color: var(--on-deep);
}
.search input {
  width: 100%; padding: 16px; font-size: 17px; border-radius: 12px;
  border: none; background: var(--paper); color: var(--ink);
  min-height: 56px; box-shadow: var(--shadow-card);
}
.search input:focus { outline: 3px solid var(--brand); outline-offset: 2px; }
#search-results a {
  display: block; padding: 12px 8px; color: var(--link); text-decoration: none;
  border-bottom: 1px solid var(--rule-soft); min-height: 44px;
}
.hero #search-results { background: var(--paper); color: var(--ink); border-radius: 12px; margin-top: 8px; overflow: hidden; }
.hero #search-results a { padding: 12px 16px; }
.home section { margin-top: 36px; }
.home section > h2 { padding-bottom: 8px; border-bottom: 2px solid var(--brand); display: inline-block; padding-right: 24px; }
.qlist { list-style: none; padding: 0; margin: 8px 0 0; }
.qlist li { border-bottom: 1px solid var(--rule-soft); }
.qlist a {
  display: block; padding: 12px 4px; text-decoration: none; color: var(--link);
  min-height: 44px; font-size: 17px;
}
.qlist a:hover { text-decoration: underline; }
.doors { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
@media (min-width: 560px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.door {
  background: var(--paper); color: var(--ink); text-decoration: none;
  padding: 16px; border-radius: 12px; border: 1px solid var(--rule-soft);
  box-shadow: var(--shadow-card);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  display: block;
}
.door:active { transform: scale(0.98); }
.door .door-name { font-family: var(--font-head); font-weight: 700; font-size: 18px; display: block; margin-bottom: 4px; }
.door .door-desc { color: var(--ink-soft); font-size: 15px; display: block; line-height: 1.5; }
.door .door-count { color: var(--gold); font-size: 13.5px; font-weight: 600; display: block; margin-top: 8px; }
.gloss-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gchip {
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font-size: 15px; cursor: pointer;
  min-height: 44px; font-family: var(--font-body);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.gchip:active { transform: scale(0.97); }
.gchip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.gloss-def {
  margin-top: 12px; background: var(--paper-soft); border: 1px solid var(--rule-soft);
  border-radius: 12px; padding: 12px 16px; font-size: 16px;
}
.newest ul { list-style: none; padding: 0; margin: 8px 0 0; }
.newest li { padding: 12px 4px; border-bottom: 1px solid var(--rule-soft); }
.newest a { text-decoration: none; font-weight: 600; font-size: 17px; }
.newest a:hover { text-decoration: underline; }
.newest .desc { display: block; color: var(--ink-soft); font-size: 15px; margin-top: 2px; }
.newest .date { color: var(--ink-soft); font-size: 13.5px; }

/* Article */
.crumbs { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.crumbs a { color: var(--ink-soft); }
.article h1 { border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.summary-box {
  background: var(--brand-wash); border: 1px solid var(--rule-soft);
  border-top: 4px solid var(--brand);
  border-radius: 12px; padding: 16px; margin: 16px 0 20px;
  box-shadow: var(--shadow-card);
}
.summary-box .sum-label {
  display: block; font-weight: 700; font-size: 14.5px; color: var(--gold);
  margin-bottom: 8px;
}
.summary-box p:last-child { margin-bottom: 0; }
.toc {
  background: var(--paper-soft); border: 1px solid var(--rule-soft);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 20px; font-size: 15.5px;
  box-shadow: var(--shadow-card);
}
.toc .toc-title { font-weight: 700; margin-bottom: 8px; font-family: var(--font-head); }
.toc ol { margin: 0; padding-left: 24px; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.level-switch { display: flex; gap: 8px; margin: 0 0 20px; flex-wrap: wrap; }
.level-switch button {
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 8px 20px; font-size: 15px; cursor: pointer;
  min-height: 44px; font-family: var(--font-body);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.level-switch button:active { transform: scale(0.97); }
.level-switch button.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.article-body .enter { animation: fadeUp 180ms var(--ease-out); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.article-body h2 { padding-bottom: 8px; border-bottom: 1px solid var(--rule-soft); }
.sources { border-top: 1px solid var(--rule); margin-top: 32px; padding-top: 16px; font-size: 15px; }
.sources h2 { border-bottom: none; font-size: 19px; margin-top: 0; }
.sources ol, .sources ul { padding-left: 20px; }
.updated, .badge { color: var(--ink-soft); font-size: 14px; }
.related h2 { font-size: 19px; }
.related ul { padding-left: 20px; }
.site-foot {
  border-top: 1px solid var(--rule); padding: 20px 16px 28px; color: var(--ink-soft);
  font-size: 14px; max-width: 760px; margin: 0 auto;
}
.site-foot .foot-brand {
  font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--ink);
  display: block; margin-bottom: 8px;
}
/* Glossary hub */
.az-letters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.az-letters a {
  border: 1px solid var(--rule); border-radius: 8px; padding: 6px 12px;
  text-decoration: none; font-weight: 700; min-height: 44px;
  display: inline-flex; align-items: center; background: var(--paper);
}
.az-letters a:hover { border-color: var(--brand); text-decoration: underline; }
.gloss-more { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .article-body .enter { animation: none; }
  .door, .gchip, .level-switch button, .skip-link { transition: none; }
}
