/* 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 {
  --bg: #f5f8fd;
  --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 {
    --bg: #090d13;
    --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(--bg); color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 78px;
}
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;
  position: sticky; top: 0; z-index: 15;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.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;
}
.menu-btn {
  display: inline-flex; align-items: center; gap: 7px; margin-left: 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  background: var(--brand-wash); color: var(--brand);
  border-radius: 999px; padding: 8px 16px; min-height: 44px;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.menu-btn:active { transform: scale(0.96); }
.menu-btn svg { width: 19px; height: 19px; }
.menu-panel {
  position: absolute; top: calc(100% + 8px); right: 12px; z-index: 40;
  width: min(330px, calc(100vw - 24px));
  background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 16px;
  box-shadow: var(--shadow-lift); padding: 10px;
  animation: fadeUp 180ms var(--ease-out);
}
.menu-panel .menu-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); padding: 8px 10px 6px;
}
.menu-panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 10px; border-radius: 10px; min-height: 44px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15.5px;
  transition: background-color 160ms var(--ease-out);
}
.menu-panel a:hover { background: var(--brand-wash); color: var(--brand); }
.menu-panel .chev { color: var(--gold); font-weight: 700; font-size: 19px; }
.menu-panel .menu-sep { border-top: 1px solid var(--rule-soft); margin: 6px 4px; }

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 {
  position: relative; overflow: hidden;
  background:
    radial-gradient(420px 200px at 88% -40px, color-mix(in srgb, var(--teal) 55%, transparent), transparent 70%),
    radial-gradient(360px 220px at -60px 110%, color-mix(in srgb, var(--brand) 65%, transparent), transparent 70%),
    linear-gradient(140deg, var(--brand-deep) 30%, color-mix(in srgb, var(--brand-deep) 55%, var(--brand)) 78%, color-mix(in srgb, var(--brand) 70%, var(--teal)));
  color: var(--on-deep);
  border-radius: 20px; padding: 32px 24px 28px; margin: 8px 0 8px;
  box-shadow: var(--shadow-lift);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.14;
  background-image:
    linear-gradient(color-mix(in srgb, var(--on-deep) 60%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--on-deep) 60%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(320px 190px at 85% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(320px 190px at 85% 0%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; right: 26px; top: 24px; width: 12px; height: 12px;
  background: var(--gold); pointer-events: none;
  box-shadow: -18px 14px 0 -2px var(--gold), 16px 30px 0 -4px var(--teal), -6px 44px 0 -5px var(--on-deep);
  opacity: 0.9;
}
.hero { padding-bottom: 64px; }
.hero > * { position: relative; z-index: 1; }
.hero .pixel-scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 44px; z-index: 0; opacity: 0.55; }
.hero h1 { color: var(--on-deep); font-size: 44px; margin: 0 0 8px; letter-spacing: -0.02em; position: relative; }
.hero .tagline { color: var(--on-deep-soft); font-size: 18px; margin-bottom: 24px; position: relative; }
.hero .search { position: relative; }
.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: 14px;
  border: none; background: var(--paper); color: var(--ink);
  min-height: 58px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 0%, transparent), var(--shadow-card);
  transition: box-shadow 180ms var(--ease-out);
}
.search input:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 55%, transparent), var(--shadow-lift); }
.search-row { display: flex; gap: 8px; align-items: stretch; }
.search-row input { flex: 1; min-width: 0; }
.search-btn {
  flex: none; width: 58px; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--brand)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  transition: transform 160ms var(--ease-out);
}
.search-btn:active { transform: scale(0.94); }
.search-btn svg { width: 24px; height: 24px; }
.exq { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.exq span { color: var(--on-deep-soft); font-size: 14px; font-weight: 600; }
.exq a {
  color: var(--on-deep); text-decoration: none; font-size: 14px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--on-deep) 38%, transparent);
  background: color-mix(in srgb, var(--on-deep) 8%, transparent);
  border-radius: 999px; padding: 7px 14px; min-height: 36px; display: inline-flex; align-items: center;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.exq a:active { transform: scale(0.96); }
.welcome {
  background: color-mix(in srgb, var(--gold) 9%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow-card);
}
.home section.welcome { margin-top: 20px; }
.welcome p { color: var(--ink-soft); }
.welcome a { font-weight: 700; text-decoration: none; }
.welcome a:hover { text-decoration: underline; }
.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: 40px; }
.home section > h2 {
  padding-bottom: 8px; display: flex; align-items: center; gap: 10px;
}
.home section > h2::before {
  content: ""; flex: none; width: 11px; height: 11px; background: var(--gold);
  box-shadow: 4px 4px 0 -1px color-mix(in srgb, var(--gold) 45%, transparent);
}
.qlist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.qlist li { border: none; }
.qlist a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; text-decoration: none; color: var(--ink);
  min-height: 48px; font-size: 16.5px; font-weight: 600;
  background: var(--paper-soft); border: 1px solid var(--rule-soft); border-radius: 12px;
  transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.qlist a::after { content: "\2192"; color: var(--brand); font-weight: 700; flex: none; }
.qlist a:hover { border-color: var(--brand); background: var(--brand-wash); }
.qlist a:active { transform: scale(0.98); }
.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 {
  position: relative; overflow: hidden;
  background: var(--paper); color: var(--ink); text-decoration: none;
  padding: 18px 16px 16px; border-radius: 14px; 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::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--teal) 60%, var(--gold));
}
.door:hover { box-shadow: var(--shadow-lift); }
.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: 13px; font-weight: 700; display: inline-block; margin-top: 10px;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  padding: 2px 10px; border-radius: 999px;
}
.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: linear-gradient(135deg, var(--brand), var(--teal)); border-color: transparent; color: var(--on-brand); box-shadow: var(--shadow-card); }
.gloss-def {
  margin-top: 12px; background: var(--paper-soft); border: 1px solid var(--rule-soft);
  border-left: 4px solid var(--gold);
  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 {
  position: relative; overflow: hidden;
  background: var(--brand-wash); border: 1px solid var(--rule-soft);
  border-radius: 12px; padding: 16px; margin: 16px 0 20px;
  box-shadow: var(--shadow-card);
}
.summary-box::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--teal) 60%, var(--gold));
}
.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: inline-flex; gap: 4px; margin: 0 0 20px; flex-wrap: wrap;
  background: var(--paper-soft); border: 1px solid var(--rule-soft);
  border-radius: 999px; padding: 4px;
}
.level-switch button {
  border: none; background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 8px 20px; font-size: 15px; cursor: pointer;
  min-height: 44px; font-family: var(--font-body); font-weight: 600;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.level-switch button:active { transform: scale(0.97); }
.level-switch button.on { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-card); }
.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;
}
.foot-links a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.foot-links a:hover { color: var(--brand); text-decoration: underline; }
/* Bottom navigation, app style ala Merdeka Pangan */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; max-width: 560px; margin: 0 auto;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--rule-soft);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--ink-soft); text-decoration: none; font-size: 11px; font-weight: 600;
  padding: 6px 0; border-radius: 10px; min-height: 48px; justify-content: center;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.bottom-nav a:hover { color: var(--brand); background: var(--brand-wash); }
.bottom-nav a:active { transform: scale(0.96); }
.bottom-nav svg { width: 22px; height: 22px; }
/* 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, .exq a, .search-btn, .bottom-nav a, .qlist a, .menu-btn, .menu-panel a { transition: none; }
  .menu-panel { animation: none; }
}
