:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --surface: #fffdf8;
  --ink: #171717;
  --muted: #67645e;
  --line: #d8d1c5;
  --navy: #0d3b66;
  --gold: #d89a2b;
  --green: #476653;
  --clay: #9a5d42;
  --shadow: 0 20px 60px rgba(28, 24, 18, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

body.modal-open {
  overflow: hidden;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid transparent;
  background: rgba(247, 244, 238, 0.84);
  backdrop-filter: blur(18px);
}

.site-header[data-elevated="true"] {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(24, 22, 19, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 112px;
  font-weight: 750;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  color: var(--muted);
  font-size: 15px;
}

.desktop-nav a {
  padding: 8px 0;
}

.desktop-nav a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 253, 248, 0.64);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.admin-entry:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 0 18px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.nav-cta {
  font-size: 14px;
}

.button.primary,
.nav-cta:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.62);
}

.button.compact {
  min-height: 40px;
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.button.full {
  width: 100%;
}

.hero {
  position: relative;
  display: grid;
  min-height: 88vh;
  padding: 124px 40px 42px;
  overflow: hidden;
  isolation: isolate;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.02) contrast(1.03);
  transform-origin: 58% 44%;
  animation: heroVisualDrift 9s ease-in-out infinite alternate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(247, 244, 238, 0.99) 0%, rgba(247, 244, 238, 0.94) 32%, rgba(247, 244, 238, 0.58) 50%, rgba(247, 244, 238, 0.06) 100%),
    linear-gradient(0deg, rgba(247, 244, 238, 0.28), rgba(247, 244, 238, 0) 35%),
    radial-gradient(circle at 76% 34%, rgba(216, 154, 43, 0.08), transparent 32%);
}

@keyframes heroVisualDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.055) translate3d(-1.5%, -0.8%, 0);
  }
}

.hero-copy {
  align-self: end;
  max-width: 920px;
}

.eyebrow,
.section-kicker,
.preview-label {
  margin: 0 0 14px;
  color: var(--clay);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 22px;
  max-width: 900px;
  font-size: 52px;
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-title-line {
  display: block;
}

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

section {
  padding: 96px 40px;
}

.section-copy {
  max-width: 540px;
}

.section-copy h2 {
  margin-bottom: 18px;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: 0;
}

.section-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.article-index {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 92px;
  border-top: 1px solid var(--line);
  background: #f1eee7;
}

.article-index--list-only {
  grid-template-columns: 1fr;
}

.sticky-copy {
  position: sticky;
  top: 112px;
  align-self: start;
}

.article-list {
  min-width: 0;
}

.article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 24px;
  min-height: 82px;
  border-top: 1px solid #c7c0b3;
  color: var(--ink);
}

.article-row:last-of-type {
  border-bottom: 1px solid #c7c0b3;
}

.article-row span {
  overflow-wrap: anywhere;
  font-size: 24px;
  font-weight: 730;
  line-height: 1.25;
}

.article-row small {
  color: #77736b;
  font-size: 18px;
  font-weight: 650;
  text-align: right;
}

.article-row:hover {
  color: var(--navy);
}

.article-row.is-draft {
  cursor: pointer;
}

.draft-note {
  margin: 18px 0 0;
  color: var(--muted);
}

.empty-section-note {
  margin: 40px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
  color: var(--muted);
  font-size: 17px;
}

.skills {
  background: var(--surface);
}

.skill-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  margin-top: 44px;
}

.skill-tabs {
  display: grid;
  gap: 10px;
  align-content: start;
}

.skill-tab {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fbf8f2;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.skill-tab.is-active,
.skill-tab:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.skill-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 32px;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(13, 59, 102, 0.08), transparent 46%),
    #fffdf8;
  box-shadow: var(--shadow);
}

.skill-preview h3,
.report-panel h3 {
  margin-bottom: 14px;
  font-size: 30px;
  line-height: 1.2;
}

.skill-preview p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.demo-panel {
  align-self: stretch;
  border: 1px solid #d9d1c4;
  border-radius: 8px;
  padding: 22px;
  background: rgba(247, 244, 238, 0.72);
}

.demo-panel label,
.diagnosis-form label,
.diagnosis-form legend {
  display: grid;
  gap: 8px;
  color: #34312d;
  font-size: 14px;
  font-weight: 720;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 8px 0 18px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfc6b8;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.skill-output {
  display: grid;
  gap: 10px;
}

.skill-output span {
  border: 1px solid #ded6ca;
  border-radius: 8px;
  padding: 12px;
  background: #fffdf8;
  color: #34312d;
}

.diagnosis:not(.diagnosis-modal) {
  background: #f5f0e7;
}

.diagnosis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  margin-top: 44px;
  align-items: start;
}

.diagnosis-form,
.report-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.diagnosis-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 28px;
}

.diagnosis-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid #ddd3c5;
  border-radius: 8px;
  padding: 18px;
}

.diagnosis-form fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 560;
}

.diagnosis-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.diagnosis-form .full {
  grid-column: 1 / -1;
}

.report-panel {
  position: sticky;
  top: 96px;
  padding: 28px;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 144px;
  height: 144px;
  margin: 22px 0;
  border: 10px solid #ead8ba;
  border-top-color: var(--gold);
  border-right-color: var(--navy);
  border-radius: 50%;
}

.score-ring strong {
  font-size: 36px;
  line-height: 1;
}

.score-ring span {
  color: var(--muted);
  font-size: 13px;
}

.report-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.report-list div {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.report-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.report-list dd {
  margin: 6px 0 0;
  color: var(--ink);
  line-height: 1.6;
}

.diagnosis-modal[hidden] {
  display: none;
}

.diagnosis-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 26px;
  background: transparent;
}

.diagnosis-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 23, 0.36);
  backdrop-filter: blur(12px);
}

.diagnosis-dialog {
  position: relative;
  width: min(1180px, 100%);
  max-height: calc(100vh - 52px);
  overflow: auto;
  border: 1px solid rgba(216, 209, 197, 0.9);
  border-radius: 8px;
  padding: 34px;
  background: #f5f0e7;
  box-shadow: 0 28px 100px rgba(23, 23, 23, 0.28);
}

.modal-close,
.nudge-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.88);
  color: var(--ink);
  cursor: pointer;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  font-size: 24px;
  line-height: 1;
}

.diagnosis-nudge {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 35;
  width: 310px;
  transform: translateY(-50%);
  border: 1px solid rgba(216, 209, 197, 0.92);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 22px 70px rgba(28, 24, 18, 0.16);
  backdrop-filter: blur(18px);
}

.diagnosis-nudge[hidden] {
  display: none;
}

.diagnosis-nudge h2 {
  margin-bottom: 10px;
  padding-right: 24px;
  font-size: 22px;
  line-height: 1.25;
}

.diagnosis-nudge p:not(.section-kicker) {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.nudge-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  font-size: 19px;
  line-height: 1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 40px;
  border-top: 1px solid var(--line);
  background: #171717;
  color: #fffdf8;
}

.site-footer p {
  margin: 8px 0 0;
  color: #d5cec0;
}

.site-footer a {
  color: #efd8ad;
}

.footer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}

.footer-icp {
  color: #d5cec0 !important;
  font-size: 13px;
}

.footer-icp:hover {
  color: #fffdf8 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.simple-page {
  min-height: 100vh;
}

.reserved {
  display: grid;
  align-content: center;
  min-height: 100vh;
  max-width: 800px;
  padding: 140px 40px 80px;
}

.reserved h1 {
  margin-bottom: 18px;
  font-size: 52px;
}

.reserved p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding: 0 20px;
  }

  .desktop-nav {
    display: none;
  }

  .nav-cta {
    min-height: 38px;
    padding: 0 12px;
  }

  .header-actions {
    gap: 6px;
  }

  .hero {
    min-height: 90vh;
    padding: 112px 22px 32px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-visual img {
    object-position: 56% center;
    opacity: 0.82;
  }

  section {
    padding: 72px 22px;
  }

  .article-index,
  .skill-shell,
  .skill-preview,
  .diagnosis-layout {
    grid-template-columns: 1fr;
  }

  .sticky-copy,
  .report-panel {
    position: static;
  }

  .skill-preview {
    min-height: auto;
    padding: 24px;
  }

  .diagnosis-form {
    grid-template-columns: 1fr;
  }

  .diagnosis-dialog {
    padding: 28px 22px;
  }

  .diagnosis-nudge {
    top: auto;
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
    transform: none;
  }
}

@media (max-width: 620px) {
  .brand span {
    display: none;
  }

  h1 {
    font-size: 34px;
  }

  .section-copy h2,
  .reserved h1 {
    font-size: 30px;
  }

  .hero-actions,
  .input-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(247, 244, 238, 0.99) 0%, rgba(247, 244, 238, 0.93) 58%, rgba(247, 244, 238, 0.72) 100%),
      linear-gradient(0deg, rgba(247, 244, 238, 0.18), rgba(247, 244, 238, 0) 40%);
  }

  .button,
  .nav-cta {
    white-space: normal;
    text-align: center;
  }

  .article-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .article-row span {
    font-size: 21px;
  }

  .article-row small {
    text-align: left;
  }

  .diagnosis-form fieldset {
    grid-template-columns: 1fr;
  }

  .diagnosis-modal {
    padding: 12px;
  }

  .diagnosis-dialog {
    max-height: calc(100vh - 24px);
    padding: 24px 16px;
  }

  .site-footer {
    display: grid;
  }

  .footer-actions {
    align-items: flex-start;
    text-align: left;
  }
}
