:root {
  --bg: #0d0f14;
  --bg-elev: #161a22;
  --bg-card: #1b202b;
  --border: #2a3140;
  --text: #e9edf4;
  --muted: #9aa4b5;
  --gold: #f5c518;
  --gold-soft: rgba(245, 197, 24, 0.14);
  --radius: 14px;
  --maxw: 860px;
  --nav-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(245, 197, 24, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Sticky top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: rgba(13, 15, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand-logo { height: 32px; width: auto; display: block; }

.topnav-links { display: flex; gap: 20px; flex-wrap: wrap; }
.topnav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.topnav-links a:hover { color: var(--gold); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 20px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: min(440px, 80vw);
  height: auto;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 30px rgba(245, 197, 24, 0.18));
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  margin: 0 0 40px;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  width: 100%;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  padding: 24px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.link-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: var(--bg-elev);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  text-decoration: none;
}
.link-title { font-size: 1.18rem; font-weight: 700; color: #fff; }
.link-desc { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.link-go { margin-top: auto; color: var(--gold); font-weight: 700; font-size: 0.95rem; }

/* ---------- Document sections ---------- */
.doc-main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.doc-section {
  scroll-margin-top: calc(var(--nav-h) + 16px);
  padding: 44px 0;
  border-top: 1px solid var(--border);
}
.doc-section:first-child { border-top: none; }

.doc-head { margin-bottom: 24px; }
.doc-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  color: #fff;
  letter-spacing: -0.5px;
}
.doc-head h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin-top: 14px;
  background: var(--gold);
  border-radius: 2px;
}
.updated { color: var(--muted); font-size: 0.9rem; margin: 12px 0 0; }

.doc-body { font-size: 1rem; }
.doc-body h3 {
  margin: 34px 0 10px;
  font-size: 1.28rem;
  color: #fff;
}
.sec-num { color: var(--gold); }

.doc-body p { margin: 0 0 14px; color: #d4dae5; }
.doc-body p.clause { padding-left: 2.6em; text-indent: -2.6em; }
.doc-body p.sub { padding-left: 4em; text-indent: -1.4em; color: #c3cbd8; }
.clause-num { color: var(--gold); font-weight: 700; margin-right: 6px; }

.doc-body ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.doc-body li { position: relative; padding-left: 1.6em; margin-bottom: 8px; color: #d4dae5; }
.doc-body li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
}

.top-btn {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 18px;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 10px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.92rem;
}
.top-btn:hover { background: var(--gold); color: #0d0f14; text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer .age { margin: 0; color: var(--gold); font-weight: 700; letter-spacing: 0.5px; }

@media (max-width: 520px) {
  .hero { padding-top: 36px; }
  .links { grid-template-columns: 1fr; }
  .topnav-links { gap: 14px; }
  .topnav-links a { font-size: 0.82rem; }
}
