*,
*::before,
*::after {
  box-sizing: border-box;
}

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f18;
  --surface: #0f1724;
  --surface-2: #101d2d;
  --border: rgba(255, 255, 255, 0.14);
  --text: #eef2f7;
  --muted: rgba(238, 242, 247, 0.72);
  --accent: #c7a74c;
  --accent-2: #3b82f6;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --radius: 16px;
  --max: 1060px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: rgba(15, 23, 42, 0.14);
  --text: #0b1220;
  --muted: rgba(11, 18, 32, 0.68);
  --accent: #b58e2f;
  --accent-2: #1d4ed8;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.78);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  text-decoration: none;
  min-width: 260px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(199, 167, 76, 0.18), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(199, 167, 76, 0.25);
}

.brand-text {
  display: grid;
  gap: 0.1rem;
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.header-nav {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.header-nav a {
  text-decoration: none;
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
}

.header-nav a:hover {
  color: var(--text);
  background: rgba(199, 167, 76, 0.12);
}

.header-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.btn {
  font: inherit;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn:hover {
  filter: brightness(1.03);
}

.btn.primary {
  border-color: rgba(199, 167, 76, 0.5);
  background: linear-gradient(135deg, rgba(199, 167, 76, 0.22), rgba(59, 130, 246, 0.18));
}

.btn.ghost {
  background: transparent;
}

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.1rem 2.5rem;
}

.hero {
  padding: 1.6rem 0 1.2rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.0rem, 4.8vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0.85rem 0 0;
}

.cta-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.05rem;
}

.muted {
  color: var(--muted);
}

.hero-card {
  border-radius: var(--radius);
  border: 1px solid rgba(199, 167, 76, 0.25);
  background: radial-gradient(1100px 520px at 0% 0%, rgba(199, 167, 76, 0.18), transparent 55%),
    radial-gradient(900px 520px at 100% 10%, rgba(59, 130, 246, 0.18), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.95rem;
}

.hero-card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.seal {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(199, 167, 76, 0.6);
  background: rgba(199, 167, 76, 0.12);
  position: relative;
  overflow: hidden;
}

.seal::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 180deg, rgba(199, 167, 76, 0.65), rgba(59, 130, 246, 0.55), rgba(199, 167, 76, 0.65));
  opacity: 0.35;
}

.seal-ring {
  position: relative;
  z-index: 1;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.seal-center {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.hero-card-title {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hero-card-sub {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-card-body {
  display: grid;
  gap: 0.6rem;
}

.stat {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .stat {
  background: rgba(15, 23, 42, 0.04);
}

.stat-k {
  font-weight: 750;
}

.stat-v {
  color: var(--muted);
  text-align: right;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid var(--border);
}

.tag.ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
}

.tag.warn {
  border-color: rgba(199, 167, 76, 0.35);
  background: rgba(199, 167, 76, 0.12);
}

.section {
  padding: 1.45rem 0;
}

.section-alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(199, 167, 76, 0.06);
  border-radius: var(--radius);
  padding-left: 1rem;
  padding-right: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.section-head .lead {
  margin-top: 0.55rem;
}

.grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.95rem;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.grid2 {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.95rem;
}

@media (max-width: 900px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.12);
  padding: 1rem 1.05rem;
}

html[data-theme="light"] .card {
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.list {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.row-title {
  margin: 0;
}

.row-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.input {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  min-width: 14rem;
  background: var(--surface);
  color: var(--text);
}

.label {
  display: block;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0.8rem;
  background: var(--surface);
  color: var(--text);
  font: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  resize: vertical;
}

.code {
  margin: 0.85rem 0 0;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.24);
  overflow: auto;
  max-height: 44vh;
  font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

html[data-theme="light"] .code {
  background: rgba(15, 23, 42, 0.045);
}

.footer {
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}

.footer-links a:hover {
  color: var(--text);
}

.modal {
  width: min(880px, calc(100vw - 2rem));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 1rem;
}
