:root {
  color-scheme: light;
  --page: #f4f2ec;
  --paper: #fffdf8;
  --ink: #151515;
  --muted: #67645e;
  --line: #d9d2c4;
  --green: #148365;
  --green-soft: #e4f3ed;
  --amber: #b7651e;
  --amber-soft: #f8ead8;
  --blue: #235c9b;
  --blue-soft: #e7eef7;
  --shadow: 0 24px 70px rgba(28, 25, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 21, 21, 0.035) 1px, transparent 1px),
    var(--page);
  background-size: 42px 42px;
}

a,
button {
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(255, 253, 248, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-size: 20px;
  font-weight: 800;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.top-actions a,
.top-actions button,
.secondary-button,
.console-actions a,
.console-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.84);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.top-actions a:hover,
.top-actions button:hover,
.secondary-button:hover,
.console-actions a:hover,
.console-actions button:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  background: #ffffff;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 48px;
}

.portal {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(330px, 0.96fr);
  gap: clamp(26px, 5vw, 54px);
  align-items: center;
  min-height: calc(100vh - 172px);
}

.portal-copy {
  padding: clamp(8px, 2vw, 18px) 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: 0;
}

.summary {
  max-width: 630px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--ink);
  box-shadow: 0 12px 30px rgba(21, 21, 21, 0.18);
  transition: transform 0.18s ease, background 0.18s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #000000;
}

.secondary-button {
  min-height: 48px;
  padding: 0 22px;
}

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

.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 164px;
  padding: 22px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.entry-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 128px;
  height: 128px;
  border: 1px solid currentColor;
  opacity: 0.12;
  transform: rotate(18deg);
}

.entry-card:hover {
  transform: translateY(-2px);
  border-color: currentColor;
}

.entry-card strong {
  margin-top: 22px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  letter-spacing: 0;
}

.entry-card small {
  margin-top: 16px;
  color: var(--muted);
  word-break: break-all;
}

.entry-kicker {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.accent-green {
  color: var(--green);
  background: linear-gradient(135deg, #fffdf8 0%, var(--green-soft) 100%);
}

.accent-amber {
  color: var(--amber);
  background: linear-gradient(135deg, #fffdf8 0%, var(--amber-soft) 100%);
}

.accent-ink {
  grid-column: 1 / -1;
  color: var(--blue);
  background: linear-gradient(135deg, #fffdf8 0%, var(--blue-soft) 100%);
}

.entry-card .entry-kicker {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.console-shell {
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 4px 16px;
}

.console-head .eyebrow {
  margin-bottom: 8px;
}

.console-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

iframe {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

  .top-actions {
    justify-content: flex-start;
  }

  main {
    padding-top: 34px;
  }

  .portal {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .console-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .console-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 20px, 1180px);
  }

  .topbar {
    padding: 14px 12px;
  }

  .top-actions a,
  .top-actions button,
  .primary-button,
  .secondary-button,
  .console-actions a,
  .console-actions button {
    width: 100%;
  }

  .primary-actions,
  .top-actions,
  .console-actions {
    width: 100%;
  }

  h1 {
    font-size: 42px;
  }

  .summary {
    font-size: 16px;
  }

  iframe {
    min-height: 680px;
  }
}
