:root {
  --ink: #17202f;
  --muted: #667085;
  --line: #d9dee8;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --green: #23a36f;
  --red: #d94a48;
  --amber: #d99b28;
  --blue: #2f6fed;
  --shadow: 0 18px 46px rgba(23, 32, 47, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.auth-locked {
  min-height: 100vh;
  overflow: hidden;
}

body.auth-locked .hero,
body.auth-locked main,
body.auth-locked footer {
  display: none;
}

.password-gate {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #18202f;
}

body:not(.auth-locked) .password-gate {
  display: none;
}

.password-card {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.password-card h1 {
  margin: 24px 0 10px;
  font-size: 32px;
  line-height: 1.15;
}

.password-card p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

.password-card form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.password-card input,
.password-card button {
  min-height: 46px;
  border-radius: 8px;
  font: inherit;
}

.password-card input {
  width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.password-card input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.password-card input:focus {
  border-color: var(--green);
}

.password-card button {
  padding: 0 18px;
  border: 0;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.password-error {
  min-height: 22px;
  margin-top: 12px;
  color: #ffb2ac;
  font-weight: 800;
}

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

.hero {
  min-height: 600px;
  color: #fff;
  background: #18202f;
}

.topbar,
.hero-body,
.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--green), var(--amber));
  box-shadow: 14px 0 0 rgba(255, 255, 255, 0.22);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.nav-links a:hover {
  color: #fff;
}

.hero-body {
  padding: 92px 0 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
}

.hero-subtitle {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 19px;
  line-height: 1.75;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-panel > div {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.panel-number {
  display: block;
  font-size: 42px;
  line-height: 1;
  font-weight: 950;
}

.panel-label {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.section {
  padding-top: 76px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.row-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.doc-content,
.module-evidence {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 47, 0.05);
}

.module-evidence {
  margin: 0 0 18px;
  overflow: hidden;
}

.module-evidence .image-open {
  height: 220px;
}

.doc-content {
  padding: 28px;
  margin-bottom: 8px;
}

.doc-content h3 {
  margin: 34px 0 18px;
  font-size: 26px;
}

.doc-content h3:first-child {
  margin-top: 0;
}

.doc-content h4 {
  margin: 30px 0 10px;
  font-size: 21px;
}

.doc-content p {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.9;
}

.image-open {
  width: 100%;
  height: 260px;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  position: relative;
  cursor: zoom-in;
  background: #f0f3f8;
}

.image-open img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-open span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(23, 32, 47, 0.72);
  font-weight: 800;
  font-size: 12px;
}

figcaption {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

figcaption a,
.modal-actions a {
  flex: none;
  min-height: 34px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 900;
}

footer {
  padding: 28px max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  background: #e9edf4;
  font-size: 13px;
}

.image-modal[aria-hidden="true"] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 30, 0.72);
}

.modal-panel {
  width: min(1180px, 96vw);
  max-height: 94vh;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-toolbar {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.modal-toolbar button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

#modalImage {
  width: 100%;
  height: 100%;
  max-height: calc(94vh - 56px);
  object-fit: contain;
  background: #f0f3f8;
}

@media (max-width: 920px) {
  .hero-body,
  .section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .topbar,
  .row-heading,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
  }
}
