:root {
  color-scheme: light;
  --steel-950: #13212b;
  --steel-900: #1d303d;
  --steel-800: #294555;
  --steel-700: #365f72;
  --steel-600: #477c92;
  --steel-500: #5d91a6;
  --steel-300: #9fc2cf;
  --steel-200: #c4d9e1;
  --steel-100: #e3edf1;
  --steel-50: #f4f8fa;
  --ink: #16232b;
  --muted: #5f707b;
  --surface: #ffffff;
  --line: #d5e1e6;
  --success: #27875a;
  --success-soft: #e3f5eb;
  --warning: #a76507;
  --warning-soft: #fff2ce;
  --danger: #bc3d46;
  --danger-soft: #fee9e9;
  --black: #11181c;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 22px 55px rgba(24, 49, 63, .12);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--steel-50);
  font-family: Inter, ui-sans-serif, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 3px solid rgba(71, 124, 146, .38); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 100;
  padding: 11px 16px;
  color: white;
  background: var(--steel-900);
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(213, 225, 230, .88);
  background: rgba(244, 248, 250, .9);
  backdrop-filter: blur(18px);
}
.site-nav {
  display: flex;
  align-items: center;
  min-height: 72px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  text-decoration: none;
}
.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  background: linear-gradient(145deg, var(--steel-500), var(--steel-800));
  border: 1px solid rgba(19, 33, 43, .16);
  border-radius: 11px;
  box-shadow: 0 7px 17px rgba(41, 69, 85, .2);
  font-family: Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  transform: rotate(-4deg);
}
.site-brand strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.site-brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 5px; }
.nav-links a {
  padding: 10px 12px;
  color: #41545f;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--steel-900); background: var(--steel-100); }
.nav-links .nav-account { margin-left: 7px; color: white; background: var(--steel-800); }
.nav-links .nav-account:hover { color: white; background: var(--steel-700); }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--steel-900);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 21px;
}

.page-shell { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr);
  gap: 68px;
  align-items: center;
  min-height: 620px;
  padding-top: 76px;
  padding-bottom: 82px;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 20px;
  right: 3%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(93, 145, 166, .2), rgba(159, 194, 207, .08) 45%, transparent 70%);
  border-radius: 50%;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--steel-500); }
.hero h1, .page-intro h1 {
  max-width: 760px;
  margin: 0;
  color: var(--steel-950);
  font-size: clamp(42px, 5.7vw, 72px);
  line-height: .99;
  letter-spacing: -.055em;
}
.hero h1 span { color: var(--steel-600); }
.hero-copy > p:not(.eyebrow) { max-width: 650px; margin: 26px 0 0; color: #536772; font-size: 19px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--steel-800); box-shadow: 0 12px 28px rgba(41, 69, 85, .2); }
.button-primary:hover { background: var(--steel-700); }
.button-secondary { color: var(--steel-900); background: white; border-color: var(--line); }
.button-secondary:hover { border-color: var(--steel-300); box-shadow: 0 9px 20px rgba(41, 69, 85, .08); }
.button-danger { color: var(--danger); background: white; border-color: #edc8cb; }

.code-window {
  overflow: hidden;
  color: #d8e9f0;
  background: var(--steel-950);
  border: 1px solid rgba(19, 33, 43, .2);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 70px rgba(19, 33, 43, .24);
  transform: rotate(1.2deg);
}
.window-bar { display: flex; align-items: center; gap: 7px; height: 48px; padding: 0 17px; background: #1a2b36; border-bottom: 1px solid rgba(255,255,255,.07); }
.window-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--steel-500); }
.window-bar i:nth-child(2) { background: #e3b853; }
.window-bar i:nth-child(3) { background: #54ad7b; }
.window-bar span { margin-left: auto; color: #8fa8b5; font-family: Consolas, monospace; font-size: 11px; }
.code-body { min-height: 330px; padding: 28px; font-family: Consolas, "SFMono-Regular", monospace; font-size: 13px; line-height: 1.9; }
.code-body .comment { color: #7996a5; }
.code-body .op { color: #9fcbdc; }
.code-body .fn { color: #f2ca72; }
.code-body .number { color: #84cda4; }
.render-result { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding: 13px 14px; color: #cce8d8; background: rgba(39, 135, 90, .14); border: 1px solid rgba(95, 190, 137, .22); border-radius: 9px; font-family: Inter, sans-serif; font-size: 12px; }
.render-result i { width: 8px; height: 8px; background: #55bd83; border-radius: 50%; box-shadow: 0 0 12px rgba(85,189,131,.7); }

.section { padding: 86px 0; }
.section-tinted { background: var(--steel-100); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-heading h2 { max-width: 680px; margin: 0; color: var(--steel-950); font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -.04em; }
.section-heading p { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.6; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.feature-card, .stat-card {
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(24, 49, 63, .055);
}
.feature-number { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 34px; color: var(--steel-800); background: var(--steel-100); border-radius: 9px; font-family: Consolas, monospace; font-size: 12px; font-weight: 800; }
.feature-card h3 { margin: 0 0 10px; color: var(--steel-950); font-size: 19px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.text-link { display: inline-flex; margin-top: 20px; color: var(--steel-700); font-size: 13px; font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.security-strip { display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; background: var(--steel-950); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.security-copy { padding: 52px; color: white; }
.security-copy .eyebrow { color: var(--steel-300); }
.security-copy h2 { margin: 0; font-size: clamp(30px, 4vw, 45px); letter-spacing: -.04em; }
.security-copy p { color: #aec2cd; line-height: 1.7; }
.security-list { display: grid; align-content: center; gap: 1px; background: rgba(255,255,255,.08); }
.security-list div { display: flex; gap: 15px; padding: 23px 30px; color: #dbe9ee; background: #203643; }
.security-list b { color: white; }
.security-list span { color: var(--steel-300); }

.site-footer { margin-top: 70px; padding: 28px 0 36px; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; }
.site-footer .page-shell { display: flex; justify-content: space-between; gap: 20px; }

.page-intro { padding: 66px 0 38px; }
.page-intro h1 { font-size: clamp(38px, 5vw, 58px); }
.page-intro > p:not(.eyebrow) { max-width: 700px; margin: 20px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }

.auth-layout { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(450px, 1.28fr); gap: 22px; align-items: start; padding: 50px 0 85px; }
.auth-aside { position: sticky; top: 102px; padding: 38px; color: white; background: linear-gradient(150deg, var(--steel-900), var(--steel-700)); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.auth-aside h1 { margin: 0; font-size: 38px; letter-spacing: -.045em; }
.auth-aside p { color: #d1e0e6; line-height: 1.65; }
.trust-list { display: grid; gap: 13px; margin-top: 30px; }
.trust-item { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; }
.trust-item i { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 auto; color: var(--steel-900); background: #cce2e9; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 900; }
.auth-card, .account-card, .opcode-panel { padding: 32px; background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 30px; padding: 5px; background: var(--steel-100); border-radius: 11px; }
.auth-tab { min-height: 40px; padding: 0 10px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 13px; font-weight: 750; }
.auth-tab[aria-selected="true"] { color: var(--steel-900); background: white; box-shadow: 0 4px 10px rgba(41,69,85,.09); }
.auth-panel[hidden], .step[hidden] { display: none; }
.form-heading { margin-bottom: 23px; }
.form-heading h2 { margin: 0; color: var(--steel-950); font-size: 26px; letter-spacing: -.025em; }
.form-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { color: #334954; font-size: 13px; font-weight: 750; }
.field small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.field input, .field textarea, .field select {
  width: 100%;
  color: var(--ink);
  background: #fbfdfe;
  border: 1px solid #c9d9df;
  border-radius: 9px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input { min-height: 45px; padding: 0 13px; }
.field textarea { min-height: 132px; padding: 12px 13px; line-height: 1.55; resize: vertical; }
.field input:focus, .field textarea:focus { background: white; border-color: var(--steel-600); box-shadow: 0 0 0 3px rgba(71,124,146,.12); outline: 0; }
.field input[readonly] { color: var(--muted); background: var(--steel-50); }
.form-actions { display: flex; align-items: center; gap: 13px; margin-top: 24px; }
.form-actions .button { border: 0; }
.form-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.verification-box { padding: 22px; background: var(--steel-50); border: 1px solid var(--steel-200); border-radius: var(--radius); }
.code-input { max-width: 220px; font-family: Consolas, monospace !important; font-size: 22px !important; font-weight: 800; letter-spacing: .25em; text-align: center; }
.dev-code { margin: 14px 0 0; padding: 11px 13px; color: #68440d; background: var(--warning-soft); border: 1px solid #eed99b; border-radius: 8px; font-size: 12px; }

.notice { display: none; margin: 0 0 20px; padding: 13px 15px; border-radius: 9px; font-size: 13px; line-height: 1.5; }
.notice[data-visible="true"] { display: block; }
.notice[data-kind="error"] { color: #852c33; background: var(--danger-soft); border: 1px solid #f3c7ca; }
.notice[data-kind="success"] { color: #1c6945; background: var(--success-soft); border: 1px solid #bfe5cf; }
.notice[data-kind="warning"] { color: #744b09; background: var(--warning-soft); border: 1px solid #ead292; }
.notice[data-kind="standard"] { color: white; background: var(--black); }

.account-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; padding-bottom: 70px; }
.profile-summary { align-self: start; padding: 28px; color: white; background: var(--steel-900); border-radius: var(--radius-lg); }
.avatar { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 22px; color: var(--steel-900); background: var(--steel-200); border-radius: 20px; font-size: 24px; font-weight: 850; }
.profile-summary h2 { margin: 0; font-size: 22px; }
.profile-summary p { margin: 7px 0 0; color: #b9ced7; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.profile-links { display: grid; gap: 6px; margin-top: 28px; }
.profile-links a { padding: 10px 12px; color: #dbe9ee; border-radius: 8px; font-size: 13px; text-decoration: none; }
.profile-links a:hover { background: rgba(255,255,255,.07); }
.account-card h2 { margin: 0 0 7px; font-size: 26px; }
.account-card > p { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.account-tools { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.loading-card { min-height: 280px; display: grid; place-items: center; color: var(--muted); }

.opcode-toolbar { position: sticky; top: 73px; z-index: 20; padding: 18px 0; background: rgba(244,248,250,.94); backdrop-filter: blur(14px); }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.search-box { position: relative; }
.search-box input { width: 100%; min-height: 48px; padding: 0 46px 0 15px; background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.search-box span { position: absolute; right: 15px; top: 14px; color: var(--steel-600); }
.opcode-count { display: grid; place-items: center; min-width: 120px; padding: 0 16px; color: white; background: var(--steel-800); border-radius: 10px; font-family: Consolas, monospace; font-size: 12px; }
.filter-list { display: flex; gap: 7px; padding: 12px 0 0; overflow-x: auto; scrollbar-width: thin; }
.filter-chip { flex: 0 0 auto; min-height: 34px; padding: 0 12px; color: var(--steel-800); background: white; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 800; }
.filter-chip[aria-pressed="true"] { color: white; background: var(--steel-800); border-color: var(--steel-800); }
.essentials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 12px 0 40px; }
.essential-card { padding: 20px; background: var(--steel-900); border-radius: var(--radius); }
.essential-card h3 { margin: 0 0 12px; color: white; font-size: 15px; }
.essential-card code { display: block; overflow-x: auto; padding: 10px 12px; color: #d7eef6; background: rgba(0,0,0,.22); border-radius: 7px; font-size: 12px; white-space: nowrap; }
.essential-card p { margin: 11px 0 0; color: #a9c1cc; font-size: 12px; line-height: 1.5; }
.legend-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--steel-600); }
.legend-row .context i { background: #d89a2f; }
.opcode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-bottom: 70px; }
.opcode-card { position: relative; min-width: 0; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.opcode-card[data-collision="true"] { border-color: #e7ce8a; box-shadow: inset 3px 0 #d89a2f; }
.opcode-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.opcode-symbol { color: var(--steel-950); font-family: Consolas, monospace; font-size: 23px; font-weight: 850; }
.family-tag { padding: 5px 7px; color: var(--steel-800); background: var(--steel-100); border-radius: 6px; font-family: Consolas, monospace; font-size: 9px; font-weight: 800; }
.opcode-card h3 { margin: 17px 0 6px; font-size: 14px; }
.opcode-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.opcode-example { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; padding: 9px 10px; overflow: hidden; color: #d7eaf1; background: var(--steel-950); border-radius: 7px; }
.opcode-example code { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { flex: 0 0 auto; padding: 4px 7px; color: var(--steel-300); background: transparent; border: 0; font-size: 10px; }
.empty-state { grid-column: 1 / -1; padding: 55px 20px; color: var(--muted); text-align: center; background: white; border: 1px dashed var(--steel-300); border-radius: var(--radius); }

@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links { position: absolute; top: 72px; right: 16px; left: 16px; display: none; align-items: stretch; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
  .nav-links[data-open="true"] { display: grid; }
  .nav-links .nav-account { margin-left: 0; text-align: center; }
  .hero { grid-template-columns: 1fr; gap: 48px; min-height: auto; }
  .hero-copy > p:not(.eyebrow) { font-size: 17px; }
  .code-window { max-width: 620px; transform: none; }
  .feature-grid, .opcode-grid { grid-template-columns: repeat(2, 1fr); }
  .security-strip { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { position: static; }
  .account-grid { grid-template-columns: 1fr; }
  .profile-summary { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-items: center; }
  .profile-summary .avatar { grid-row: 1 / 3; margin: 0; }
  .profile-links { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .site-nav, .page-shell { padding-right: 17px; padding-left: 17px; }
  .site-brand small { display: none; }
  .hero { padding-top: 52px; padding-bottom: 62px; }
  .hero h1 { font-size: 42px; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .code-body { min-height: 280px; padding: 20px; font-size: 11px; }
  .section { padding: 64px 0; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 15px; }
  .feature-grid, .opcode-grid, .essentials-grid { grid-template-columns: 1fr; }
  .security-copy { padding: 34px 26px; }
  .site-footer .page-shell { display: block; }
  .site-footer p:last-child { margin-top: 7px; }
  .auth-layout { padding-top: 24px; }
  .auth-aside { padding: 28px; }
  .auth-card, .account-card, .opcode-panel { padding: 22px; }
  .auth-tabs { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .form-actions, .account-tools { align-items: stretch; flex-direction: column; }
  .profile-summary { grid-template-columns: 1fr; }
  .profile-summary .avatar { grid-row: auto; margin-bottom: 17px; }
  .profile-links { grid-column: auto; grid-template-columns: 1fr; }
  .search-row { grid-template-columns: 1fr; }
  .opcode-count { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
