:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --page: #f4f6f8;
  --blue: #185abc;
  --green: #18815a;
  --amber: #a86600;
  --red: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.button,
.ghost-button,
.danger-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  cursor: pointer;
}

.nav a {
  color: #344054;
  font-size: 14px;
}

.nav a:hover {
  background: #eef2f6;
}

.button {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.ghost-button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.danger-button {
  background: #fff;
  color: var(--red);
  border-color: #f0c7c2;
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #172033;
}

.hero-content {
  position: relative;
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  color: #fff;
  padding: 54px 0 90px;
}

.eyebrow {
  color: #9ee0bf;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 790px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  font-size: 19px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero .ghost-button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0;
}

.section.tight {
  padding-top: 28px;
}

.section h2 {
  font-size: 30px;
  margin: 0 0 14px;
  letter-spacing: 0;
}

.section-lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 26px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel,
.card,
.form-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card {
  padding: 20px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.card p,
.card li {
  color: var(--muted);
  line-height: 1.65;
}

.platform-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.platform b,
.platform span {
  display: block;
}

.platform span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.form-panel {
  width: min(780px, calc(100% - 40px));
  margin: 34px auto 70px;
  padding: 24px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: #344054;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 18px;
}

.checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
}

.message {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.message.error {
  color: var(--red);
}

.message.success {
  color: var(--green);
}

.portal {
  width: min(1260px, calc(100% - 32px));
  margin: 22px auto 60px;
}

.portal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.portal-header h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

.portal-header p {
  margin: 0;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  cursor: pointer;
}

.tabs button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.doc-nav,
.admin-list {
  overflow: hidden;
}

.doc-nav button {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  padding: 13px 14px;
  cursor: pointer;
}

.doc-nav button.active {
  background: #eaf1ff;
  color: var(--blue);
  font-weight: 800;
}

.doc-body {
  min-height: 620px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.markdown {
  line-height: 1.72;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  letter-spacing: 0;
  line-height: 1.25;
}

.markdown pre {
  overflow: auto;
  padding: 14px;
  background: #111827;
  color: #e5e7eb;
  border-radius: 8px;
}

.markdown code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.markdown :not(pre) > code {
  background: #edf2f7;
  color: #243b53;
  padding: 2px 5px;
  border-radius: 5px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.asset-meta {
  display: grid;
  gap: 5px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

.sha {
  word-break: break-all;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid #edf0f4;
  padding: 10px;
  vertical-align: top;
  font-size: 13px;
}

.table th {
  background: #f8fafc;
  color: #344054;
}

.admin-tools {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f6;
}

.status.approved,
.status.admin {
  background: #e7f6ee;
  color: var(--green);
}

.status.pending {
  background: #fff4df;
  color: var(--amber);
}

.status.rejected,
.status.suspended {
  background: #fee4e2;
  color: var(--red);
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .topbar {
    position: static;
    align-items: flex-start;
    padding: 14px 18px;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: 44px;
  }

  .grid,
  .platform-list,
  .two-col,
  .asset-grid,
  .admin-tools {
    grid-template-columns: 1fr;
  }

  .portal-header {
    flex-direction: column;
  }
}
