:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #eff1f5;
  --text: #202126;
  --secondary: #80838d;
  --line: rgba(30,35,50,.075);
  --accent: #0878ee;
  --accent-hover: #0069db;
  --header: rgba(247,248,250,.88);
  --shadow: 0 8px 36px rgba(25,35,55,.025);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #202125;
  --surface: #292b30;
  --surface-soft: #32343b;
  --text: #f0f1f4;
  --secondary: #a2a5af;
  --line: rgba(230,235,255,.075);
  --accent: #529dff;
  --accent-hover: #70adff;
  --header: rgba(32,33,37,.9);
  --shadow: 0 8px 30px rgba(0,0,0,.035);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; opacity: .7; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: rgba(70,145,255,.2); }
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px;
  margin: auto;
  padding: 17px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { display: inline-flex; align-items: center; font-size: 24px; font-weight: 800; letter-spacing: -1.2px; }
.brand span { font-weight: 400; }
.brand i { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; margin: 12px 0 0 4px; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.profile-chip { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 500; }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-soft); }
.theme-toggle {
  width: 37px; height: 37px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--text);
  transition: transform .25s, background .25s;
}
.theme-toggle:hover { transform: rotate(12deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
.navigation {
  max-width: 1124px; margin: 0 auto;
  display: flex; gap: 8px; padding: 24px 0 8px;
  overflow-x: auto; scrollbar-width: none;
}
.navigation::-webkit-scrollbar { display: none; }
.navigation a {
  padding: 10px 18px; border-radius: 24px;
  color: var(--secondary); font-size: 13px;
  white-space: nowrap; transition: background .2s, color .2s;
}
.navigation a:hover { color: var(--text); }
.navigation a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.page {
  max-width: 1180px; margin: auto; padding: 30px 28px 100px;
  min-height: 72vh;
  animation: enter-page .55s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes enter-page {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .16s ease both fade-out; }
::view-transition-new(root) { animation: .3s ease both fade-in; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.eyebrow { font-size: 10px; letter-spacing: 2.2px; font-weight: 650; color: var(--secondary); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(42px, 5.8vw, 72px); line-height: 1.04; letter-spacing: -.055em; font-weight: 650; margin-bottom: 25px; }
h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.035em; font-weight: 600; }
h3 { font-size: 20px; letter-spacing: -.025em; font-weight: 600; }
p { line-height: 1.65; }
.text-secondary { color: var(--secondary); }
.lead { font-size: 19px; color: var(--secondary); letter-spacing: -.3px; line-height: 1.5; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 25px;
  box-shadow: var(--shadow);
  transition: background-color .3s, border-color .3s;
}
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 24px;
  padding: 14px 24px; min-height: 46px; border-radius: 28px;
  border: 0; font-size: 13px; font-weight: 550;
  transition: transform .2s, background .2s;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { background: var(--surface-soft); color: var(--text); }
.button-full { width: 100%; margin-top: 25px; }
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr;
  align-items: center; min-height: 430px; padding: 25px 38px 40px;
}
.hero .eyebrow { display: block; margin-bottom: 24px; }
.hero-name { overflow-wrap: anywhere; }
.hero .button { margin-top: 12px; }
.skin-stage { min-width: 0; min-height: 390px; position: relative; display: grid; place-items: center; }
.skin-orbit {
  position: absolute; width: min(310px, 90%); aspect-ratio: 1;
  background: radial-gradient(circle at 35% 25%, rgba(91,158,255,.13), rgba(118,144,211,.04) 72%);
  border-radius: 50%;
  border: 1px solid var(--line);
}
#skin { position: relative; max-width: 100%; }
.model-hint {
  position: absolute; bottom: 0; font-size: 11px;
  color: var(--secondary); letter-spacing: .3px;
}
#skin-caption[hidden] { display: none !important; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.metric { padding: 26px; min-height: 158px; }
.metric-label { font-size: 13px; color: var(--secondary); }
.metric strong {
  display: block; font-size: clamp(25px, 2.8vw, 36px);
  font-weight: 600; letter-spacing: -.045em; margin: 20px 0 12px;
  overflow-wrap: anywhere;
}
.metric-hint { font-size: 11px; color: var(--secondary); }
.section-heading { margin: 68px 0 24px; }
.section-heading h2 { margin-bottom: 8px; }
.section-heading p { color: var(--secondary); font-size: 14px; margin-bottom: 0; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature-card {
  position: relative; display: flex; gap: 22px; align-items: center;
  padding: 32px; transition: transform .3s, background .3s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--secondary); font-size: 13px; margin: 0; max-width: 260px; }
.feature-symbol { font-size: 36px; color: var(--accent); }
.link-arrow { position: absolute; top: 22px; right: 24px; color: var(--secondary); }
.page-heading { padding: 38px 0 40px; }
.page-heading h1 { margin: 18px 0; font-size: clamp(38px, 5vw, 60px); }
.page-heading .lead { font-size: 17px; margin: 0; }
.details-card { margin-top: 24px; padding: 34px; }
.details-card h2 { font-size: 23px; }
.details-list { margin: 0; }
.details-list > div {
  padding: 19px 0; display: flex; justify-content: space-between; gap: 25px;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.details-list > div:last-child { border-bottom: 0; }
dt { color: var(--secondary); }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.footnote { color: var(--secondary); font-size: 12px; margin-top: 18px; }
.case-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.case-card { padding: 34px; text-align: center; }
.case-art {
  height: 150px; display: grid; place-items: center; margin-bottom: 24px;
  border-radius: 18px; font-size: 65px; font-weight: 500; letter-spacing: -6px;
}
.blue { background: rgba(71,146,244,.09); color: #6b9fea; }
.purple { background: rgba(156,125,220,.09); color: #ac8bda; }
.teal { background: rgba(69,165,166,.09); color: #6cafb0; }
.orange { background: rgba(207,160,103,.09); color: #c5a070; }
.case-card h2 { font-size: 21px; margin-bottom: 14px; }
.case-count { font-size: 36px; letter-spacing: -1px; font-weight: 600; }
.case-card p { margin: 12px 0 0; font-size: 12px; color: var(--secondary); }
.empty-state { text-align: center; padding: 65px 28px; }
.empty-symbol {
  display: grid; place-items: center; width: 76px; height: 76px;
  border-radius: 24px; margin: 0 auto 28px; background: var(--surface-soft);
  color: var(--accent); font-size: 32px;
}
.empty-state h2 { font-size: 29px; }
.empty-state p { max-width: 440px; margin: 0 auto 28px; color: var(--secondary); font-size: 15px; }
.account-card { padding: 38px; max-width: 800px; }
.account-heading { display: flex; gap: 22px; align-items: center; margin-bottom: 32px; }
.account-heading h2 { margin: 8px 0 0; overflow-wrap: anywhere; }
.large-avatar {
  flex-shrink: 0; width: 72px; height: 72px; display: grid; place-items: center;
  border-radius: 24px; background: var(--surface-soft); color: var(--accent); font-size: 28px;
}
.logout-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line);
}
.logout-row p { margin: 0; font-size: 12px; color: var(--secondary); }
.login-page { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; padding-top: 75px; padding-bottom: 80px; }
.login-intro h1 { margin: 25px 0; font-size: clamp(42px, 5.5vw, 66px); }
.login-card { padding: 40px; }
.login-card h2 { margin: 18px 0 12px; font-size: 30px; }
.login-card > p { font-size: 14px; }
label { display: block; margin: 24px 0 9px; font-size: 12px; font-weight: 550; }
input {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 13px; padding: 15px 16px; color: var(--text); font-size: 16px;
}
input::placeholder { color: var(--secondary); font-size: 14px; }
.form-note { font-size: 12px !important; color: var(--secondary); margin: 22px 0 0; text-align: center; }
.alert { padding: 13px 16px; background: rgba(212,83,83,.09); color: #d65c5c; border-radius: 12px; font-size: 13px; }
.login-art { position: relative; width: 190px; height: 160px; margin-top: 36px; }
.art-tile { position: absolute; width: 105px; height: 105px; border-radius: 28px; }
.tile-back { left: 65px; top: 12px; background: var(--surface-soft); transform: rotate(13deg); }
.tile-front {
  top: 28px; left: 20px; background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: 33px; letter-spacing: -3px; transform: rotate(-10deg); box-shadow: var(--shadow);
}
.tile-front span { color: var(--accent); }
.art-dot { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); left: 153px; top: 125px; }
.footer {
  max-width: 1124px; margin: auto; padding: 28px 0 38px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center;
}
.footer .brand { font-size: 18px; }
.footer > span { font-size: 11px; color: var(--secondary); }
.reveal { opacity: 1; transform: none; }
.reveal.is-pending { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1), background-color .3s;
}
@media (max-width: 1180px) {
  .navigation { margin: 0 28px; }
  .footer { margin: 0 28px; }
}
@media (max-width: 850px) {
  .hero { padding-left: 10px; padding-right: 0; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .login-page { gap: 35px; }
  .login-card { padding: 28px; }
  .feature-card { padding: 28px; gap: 16px; }
}
@media (max-width: 600px) {
  .header-inner { padding: 15px 20px; }
  .profile-chip > span:last-child { display: none; }
  .header-actions { gap: 12px; }
  .navigation { margin: 0; padding: 17px 16px 4px; gap: 3px; }
  .navigation a { padding: 10px 14px; font-size: 12px; }
  .page { padding: 20px 20px 60px; }
  .hero { grid-template-columns: 1fr; padding: 28px 4px 32px; }
  .hero h1 { font-size: 51px; }
  .hero .lead { font-size: 17px; }
  .skin-stage { min-height: 370px; margin-top: 24px; }
  .metric-grid { gap: 12px; }
  .metric { padding: 21px; min-height: 145px; border-radius: 21px; }
  .metric strong { font-size: 28px; }
  .metric-label { font-size: 12px; }
  .metric-hint { font-size: 10px; }
  .section-heading { margin-top: 44px; }
  .section-heading h2 { font-size: 26px; }
  .feature-grid, .case-grid { grid-template-columns: 1fr; }
  .page-heading { padding: 25px 0 30px; }
  .page-heading h1 { font-size: 42px; }
  .page-heading .lead { font-size: 15px; }
  .details-card, .account-card { padding: 25px; }
  .details-list > div { font-size: 13px; }
  .account-heading { gap: 16px; }
  .account-heading h2 { font-size: 24px; }
  .large-avatar { width: 58px; height: 58px; border-radius: 19px; }
  .logout-row { align-items: flex-start; flex-direction: column; }
  .login-page { grid-template-columns: 1fr; gap: 30px; padding-top: 38px; }
  .login-intro h1 { font-size: 48px; }
  .login-intro .lead { font-size: 17px; }
  .login-art { display: none; }
  .login-card { padding: 28px; }
  .footer { margin: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal.is-pending { opacity: 1; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
