@import url("/css/site-nav.css");

:root {
  --bg: #0f0e0c;
  --surface: #1a1814;
  --surface2: #221f1a;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f5f0e8;
  --muted: #9c958a;
  --accent: #e8b86d;
  --accent-dim: rgba(232, 184, 109, 0.14);
  --law: #7eb8da;
  --law-dim: rgba(126, 184, 218, 0.1);
  --company: #6ecf9a;
  --company-dim: rgba(110, 207, 154, 0.12);
  --employee: #c4a5f5;
  --employee-dim: rgba(196, 165, 245, 0.12);
  --ok: #6ecf9a;
  --warn: #f0a060;
  --danger: #e87878;
  --radius: 14px;
  --max: 1080px;
}

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

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 45% at 10% -5%, rgba(232, 184, 109, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 35% at 95% 5%, rgba(126, 184, 218, 0.07), transparent 50%),
    var(--bg);
  line-height: 1.55;
}

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

.page { max-width: var(--max); margin: 0 auto; padding: 1.25rem 1rem 3rem; }

.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 1.5rem;
}
.back { color: var(--muted); font-size: 0.88rem; }
.back:hover { color: var(--accent); text-decoration: none; }
.top-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.top-link {
  font-size: 0.82rem; font-weight: 600; padding: 0.4rem 0.75rem; border-radius: 999px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
}
.top-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.top-link.primary { background: var(--accent-dim); border-color: rgba(232, 184, 109, 0.35); color: var(--accent); }

.hero { margin-bottom: 1.75rem; max-width: 42rem; }
.hero h1 {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.hero .lead { color: var(--muted); font-size: 1rem; margin-bottom: 0.65rem; }
.hero .meta { font-size: 0.78rem; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.toc-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.65rem;
}
.toc a {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  margin-bottom: 0.15rem;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.toc a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); }
.toc-extra { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--border); }
.toc-extra a { font-size: 0.8rem; }

.topic {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.25rem;
  scroll-margin-top: 1rem;
}
.topic-head { margin-bottom: 1.15rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.topic-head h2 {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}
.topic-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.65rem; }
.tag {
  font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 6px;
  background: var(--law-dim); color: var(--law);
}
.topic-summary { color: var(--muted); font-size: 0.95rem; }

.blocks { display: grid; gap: 0.85rem; }
.block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.95rem 1rem;
}
.block-head {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 0.65rem;
}
.block-head.law { color: var(--law); }
.block-head.cond { color: var(--accent); }
.block-head.pay { color: var(--ok); }
.block-head.rights { color: #8ec8f0; }
.block-head.warn { color: var(--warn); }
.block-head.company { color: var(--company); }
.block-head.employee { color: var(--employee); }

.law-item {
  padding: 0.65rem 0.75rem;
  border-left: 3px solid var(--law);
  background: var(--law-dim);
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}
.law-item:last-child { margin-bottom: 0; }
.law-item cite {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.55rem;
  font-style: normal; font-weight: 600;
  font-size: 0.76rem; color: var(--law); margin-bottom: 0.35rem;
}

.year-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(232, 184, 109, 0.28);
  white-space: nowrap;
}
.year-badge.newer {
  color: var(--ok);
  background: rgba(110, 207, 154, 0.14);
  border-color: rgba(110, 207, 154, 0.35);
}

.year-note {
  border-color: rgba(110, 207, 154, 0.22);
  background: rgba(110, 207, 154, 0.08);
}

.sources li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.55rem;
}
.sources .source-name { color: var(--text); }

.list { margin: 0; padding-left: 1.15rem; font-size: 0.9rem; }
.list li { margin-bottom: 0.4rem; }
.list.warn li { color: #f5c99a; }

.pay-box { font-size: 0.9rem; }
.pay-box p { margin-bottom: 0.45rem; }
.pay-note { font-size: 0.84rem; color: var(--muted); margin-top: 0.35rem; }
.pay-link {
  display: inline-block; margin-top: 0.65rem;
  font-size: 0.84rem; font-weight: 600; padding: 0.45rem 0.8rem;
  border-radius: 8px; background: rgba(110, 207, 154, 0.12);
  border: 1px solid rgba(110, 207, 154, 0.3); color: var(--ok);
  text-decoration: none;
}
.pay-link:hover { background: rgba(110, 207, 154, 0.2); text-decoration: none; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.25rem;
  scroll-margin-top: 1rem;
}
.panel h2 {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  list-style: none;
}
.step {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  font-size: 0.78rem; font-weight: 700; margin-bottom: 0.45rem;
}
.step strong { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
.step span { font-size: 0.84rem; color: var(--muted); }

.faq { display: grid; gap: 0.5rem; }
.faq-cat { margin-bottom: 1.35rem; scroll-margin-top: 1rem; }
.faq-cat:last-child { margin-bottom: 0; }
.faq-cat-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--accent);
}
.faq-cat-intro {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

.faq-index {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.faq-index-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.faq-index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.faq-index-links a {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  text-decoration: none;
}
.faq-index-links a:hover {
  color: var(--accent);
  border-color: rgba(232, 184, 109, 0.45);
  text-decoration: none;
}
.faq-index-links a[href="#faq-dual-path-policy"] {
  color: var(--accent);
  border-color: rgba(232, 184, 109, 0.5);
  font-weight: 700;
}

.prio-table {
  display: grid;
  gap: 0.45rem;
  font-size: 0.86rem;
}
.prio-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.prio-head {
  background: transparent;
  border-style: dashed;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.prio-level {
  font-weight: 800;
  font-size: 0.82rem;
}
.prio-solves { color: var(--muted); }
.prio-detail { display: block; margin-top: 0.35rem; font-size: 0.78rem; color: var(--accent); }
.prio-row.tone-critical { border-color: rgba(232, 120, 120, 0.35); }
.prio-row.tone-critical .prio-level { color: var(--danger); }
.prio-row.tone-high { border-color: rgba(240, 160, 96, 0.35); }
.prio-row.tone-high .prio-level { color: var(--warn); }
.prio-row.tone-mid .prio-level { color: var(--accent); }
.prio-row.tone-low .prio-level { color: var(--muted); }

@media (max-width: 640px) {
  .prio-row { grid-template-columns: 3rem 1fr; }
  .prio-row > span:last-child { grid-column: 2; }
  .prio-head { display: none; }
}

.contact-table { display: grid; gap: 0.5rem; font-size: 0.86rem; }
.contact-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto auto;
  gap: 0.4rem 0.65rem;
  align-items: baseline;
  padding: 0.7rem 0.8rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.contact-region { font-weight: 700; color: var(--accent); font-size: 0.78rem; }
.contact-name { color: var(--text); grid-column: 2; }
.contact-phone { font-weight: 700; color: var(--law); white-space: nowrap; }
.contact-link { font-size: 0.78rem; font-weight: 600; }
.contact-note { grid-column: 2 / -1; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) {
  .contact-row { grid-template-columns: 1fr; }
  .contact-note { grid-column: 1; }
}

.faq details {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 0.75rem 0.9rem;
  font-size: 0.9rem; font-weight: 600; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { padding: 0 0.9rem 0.85rem; font-size: 0.86rem; color: var(--muted); }

.sources { font-size: 0.88rem; color: var(--muted); }
    .sources ul { margin: 0.5rem 0 0 1.1rem; }
    .ref-item {
      padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.06);
      font-size: 0.88rem; line-height: 1.5;
    }
    .ref-item:last-child { border-bottom: none; }
    .ref-period { font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-bottom: 0.2rem; }
.hero .hero-note {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(232, 184, 109, 0.08);
  border: 1px solid rgba(232, 184, 109, 0.18);
}
.hero-jump {
  margin: 0.75rem 0 0;
}
.hero-jump a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(232, 184, 109, 0.35);
  color: var(--accent);
  text-decoration: none;
}
.hero-jump a:hover { text-decoration: none; filter: brightness(1.08); }

.purpose-banner {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.ref-intro { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.75rem; }

.ref-details summary {
  cursor: pointer;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  list-style: none;
  margin-bottom: 0.75rem;
}
.ref-details summary::-webkit-details-marker { display: none; }
.ref-details[open] summary { margin-bottom: 1rem; }

.retry-btn {
  margin-top: 0.5rem;
  padding: 0.55rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.retry-btn:active { opacity: 0.85; }

.disclaimer {
  margin-top: 1.5rem; font-size: 0.78rem; color: var(--muted);
  line-height: 1.55; opacity: 0.9;
}

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .toc {
    position: static;
    display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.75rem;
  }
  .toc-label, .toc-extra { display: none; }
  .toc a {
    display: inline-block; padding: 0.35rem 0.6rem;
    border: 1px solid var(--border); border-left: 1px solid var(--border);
    border-radius: 999px; margin: 0; font-size: 0.78rem;
  }
  .toc a.active { border-color: var(--accent); }
}
