:root {
  --bg: #0a0b0d;
  --bg-soft: #101216;
  --surface: #15171c;
  --surface-2: #1c1f25;
  --text: #e7e9ec;
  --text-strong: #fafbfc;
  --muted: #9a9fa8;
  --muted-2: #767c86;
  --line: #262a31;
  --line-strong: #4c525c;
  --line-faint: #181a1f;
  --invert-bg: #e7e9ec;
  --invert-text: #0a0b0d;
  --invert-muted: #44484f;
  --invert-line: #cfd3d9;
  --invert-surface: #dddfe3;
  --overlay: rgba(5, 6, 8, 0.76);
  --accent: #5b7a9c;
  --accent-strong: #8aafd1;
  --accent-text: #081018;
  --accent-soft: rgba(90, 122, 156, 0.14);
  --accent-line: rgba(90, 122, 156, 0.42);
  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 40px);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
  --bg: #f4f5f6;
  --bg-soft: #eceeef;
  --surface: #e4e6e8;
  --surface-2: #dadde0;
  --text: #191b1e;
  --text-strong: #09090b;
  --muted: #585d64;
  --muted-2: #6f747b;
  --line: #cfd2d6;
  --line-strong: #94999f;
  --line-faint: #dde0e2;
  --invert-bg: #15171a;
  --invert-text: #f2f3f4;
  --invert-muted: #adb1b6;
  --invert-line: #34373c;
  --invert-surface: #1d2024;
  --overlay: rgba(244, 245, 246, 0.8);
  --accent: #3c5f82;
  --accent-strong: #2f4c69;
  --accent-text: #f4f8fc;
  --accent-soft: rgba(60, 95, 130, 0.1);
  --accent-line: rgba(60, 95, 130, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 220ms ease, color 220ms ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

a:hover {
  color: var(--text-strong);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p,
dl,
dd,
dt,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

code,
.mono {
  font-family: var(--mono);
}

::selection {
  background: var(--text);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--wrap), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.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;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skip:focus {
  top: 16px;
}

.label,
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted-2);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow-index {
  color: var(--text);
}

.muted {
  color: var(--muted);
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background-color 220ms ease, border-color 220ms ease;
}

.nav-inner {
  width: min(var(--wrap), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-name {
  color: var(--text-strong);
}

.brand-sub {
  color: var(--muted-2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 12px;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  transition: color 160ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 4px 0 2px;
  color: var(--text);
  font-size: 13px;
  transition: color 160ms ease;
}

.user-chip:hover {
  color: var(--text-strong);
}

.user-chip img,
.avatar-fallback {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.user-chip img {
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .user-name {
    display: none;
  }
}

.nav-console {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  transition: color 160ms ease;
}

.nav-console:hover {
  color: var(--text);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease;
}

.theme-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

.btn-solid {
  background: var(--invert-bg);
  border-color: var(--invert-bg);
  color: var(--invert-text);
}

.btn-solid:hover {
  background: var(--bg);
  border-color: var(--text);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.btn-sm {
  min-height: 44px;
  padding-inline: 16px;
  font-size: 12px;
}

.btn-lg {
  min-height: 54px;
  padding-inline: 26px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.arrow {
  display: inline-block;
  font-family: var(--mono);
  transition: transform 180ms ease;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* Splash intro */
.splash {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 22px);
  min-height: 88vh;
  padding: 96px var(--gutter) 64px;
  overflow: hidden;
  text-align: center;
  background: var(--bg);
}

.splash-mark {
  position: absolute;
  inset: 0;
  background-image: url("cicada-mark.png");
  background-repeat: no-repeat;
  background-position: center 42%;
  background-size: min(780px, 72%) auto;
  opacity: 0.16;
  pointer-events: none;
}

[data-theme="light"] .splash-mark {
  filter: invert(1);
  opacity: 0.1;
}

.splash-word {
  position: relative;
  margin: 0;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: clamp(3rem, 12vw, 8.5rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 0.96;
  text-wrap: balance;
}

.splash-scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: splash-bob 2.2s ease-in-out infinite;
}

@keyframes splash-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

@media (prefers-reduced-motion: reduce) {
  .splash-scroll {
    animation: none;
  }
}

@media (max-width: 640px) {
  .splash {
    min-height: 82vh;
    padding-top: 80px;
  }

  .splash-mark {
    background-size: min(520px, 92%) auto;
  }
}

/* Hero */
.hero {
  padding-top: clamp(48px, 7vw, 96px);
}

.hero-copy {
  max-width: 900px;
  padding-top: clamp(8px, 3vw, 36px);
}

.hero h1 {
  margin-top: clamp(22px, 3.4vw, 40px);
  color: var(--text-strong);
  font-size: clamp(2.05rem, 4.6vw, 4.2rem);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero-dim {
  color: var(--muted-2);
}

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(190px, 0.55fr);
  gap: clamp(24px, 5vw, 56px);
  margin-top: clamp(36px, 5vw, 56px);
  align-items: end;
}

.hero-sub {
  max-width: 48ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-note {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  padding-left: 22px;
  border-left: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.65;
}


.hero-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
}

.hero-specs div {
  padding: 18px 0;
}

.hero-specs div + div {
  padding-left: clamp(16px, 3vw, 32px);
  border-left: 1px solid var(--line);
}

.hero-specs dt {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-specs dd {
  margin-top: 7px;
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  letter-spacing: -0.02em;
}

/* Sections */
.section {
  margin-top: clamp(76px, 10vw, 148px);
  padding-top: clamp(48px, 6vw, 78px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.65fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: clamp(10px, 2vw, 20px);
}

.section-head h2 {
  color: var(--text-strong);
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.section-sub {
  max-width: 44ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.section-head--wide {
  grid-template-columns: minmax(0, 1fr);
}

.section-head--wide .section-sub {
  max-width: 62ch;
}

/* Process */
.process {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.process-row {
  display: grid;
  grid-template-columns: 72px minmax(180px, 0.8fr) minmax(0, 1.15fr);
  gap: clamp(18px, 4vw, 48px);
  align-items: start;
  padding: 30px 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color 180ms ease;
}

.process-row:hover {
  background: var(--surface);
}

.process-no {
  padding-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.process-row h3 {
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.process-row p {
  max-width: 54ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.16fr);
  border: 1px solid var(--line-strong);
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.6vw, 44px);
  background: var(--bg);
  transition: background-color 200ms ease, border-color 200ms ease;
}

.plan + .plan {
  border-left: 1px solid var(--line-strong);
}

.plan-free:hover {
  background: var(--surface);
}

.plan-vip {
  background: linear-gradient(160deg, #1c2733, #0a0d11 65%);
  color: #eef1f4;
  --text: #eef1f4;
  --text-strong: #fbfcfd;
  --muted: #b5c1cc;
  --muted-2: #8d99a4;
  --line: rgba(90, 122, 156, 0.3);
  --line-strong: rgba(138, 175, 209, 0.5);
  --line-faint: rgba(90, 122, 156, 0.18);
}

[data-theme="light"] .plan-vip {
  background: linear-gradient(160deg, #18212b, #0c1015 65%);
}

.plan-vip:hover {
  background: linear-gradient(160deg, #263442, #0e1217 65%);
}

.plan-vip .plan-flag {
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.plan-flag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 0 7px;
  border: 1px solid currentColor;
  color: inherit;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.plan-head h3 {
  max-width: 15ch;
  color: var(--text-strong);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.plan-price {
  flex-shrink: 0;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.plan-price span {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.plan-vip .plan-price {
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
}

.plan-list {
  flex: 1;
  margin: 22px 0 30px;
  padding: 0;
  list-style: none;
}

.plan-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-faint);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.plan-list li:last-child {
  border-bottom: 0;
}

.plan-btn {
  width: 100%;
}

.plan-vip .btn-solid {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-text);
}

.plan-vip .btn-solid:hover {
  background: transparent;
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

/* Security */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.security-item {
  padding: 26px 32px 34px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 180ms ease;
}

.security-item:nth-child(2n) {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.security-item:hover {
  background: var(--surface);
}

.security-no {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.security-item h3 {
  margin-top: 16px;
  color: var(--text);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.security-item p {
  max-width: 54ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(36px, 8vw, 120px);
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: 104px;
}

.faq-intro h2 {
  margin-top: 18px;
  color: var(--text-strong);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.faq-intro .section-sub {
  margin-top: 22px;
}

.faq {
  border-top: 1px solid var(--line-strong);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 60px;
  padding: 20px 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  transition: color 160ms ease;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  flex-shrink: 0;
  content: "+";
  color: var(--muted);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
  color: var(--accent-strong);
}

.faq summary:hover {
  color: var(--text-strong);
}

.faq details p {
  max-width: 70ch;
  padding: 0 42px 24px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.faq details a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* CTA */
.cta {
  margin-top: clamp(84px, 12vw, 168px);
  padding-top: clamp(54px, 8vw, 104px);
  border-top: 1px solid var(--line);
}

.cta-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: clamp(54px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
}

.cta h2 {
  margin-top: 18px;
  color: var(--text-strong);
  font-size: clamp(2.1rem, 4.2vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.cta .btn {
  flex-shrink: 0;
  margin-bottom: 8px;
}

/* Footer */
.footer {
  margin-top: clamp(48px, 7vw, 84px);
  border-top: 1px solid var(--line);
  padding: 34px 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.footer-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 24px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-meta {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.12em;
}

/* Console */
.work {
  padding-top: clamp(34px, 5vw, 58px);
}

.work-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-strong);
}

.work-head h1 {
  margin-top: 14px;
  color: var(--text-strong);
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.work-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.quota-strip {
  width: min(360px, 100%);
  padding-bottom: 4px;
}

.quota-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.quota-line span:last-child {
  text-align: right;
}

.quota-bar {
  height: 2px;
  margin-top: 10px;
  background: var(--line);
}

#quota-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent-strong);
  transition: width 420ms ease;
}

.gate-loading {
  margin-top: 32px;
  padding: 34px;
  border: 1px solid var(--line-strong);
}

.skeleton {
  display: block;
  height: 10px;
  background: linear-gradient(90deg, var(--surface) 20%, var(--surface-2) 40%, var(--surface) 60%);
  background-size: 400% 100%;
  animation: shimmer 1.6s linear infinite;
}

.skeleton-title {
  width: 34%;
  height: 26px;
  margin-bottom: 20px;
}

.skeleton-line {
  width: 100%;
  height: 12px;
  margin-top: 12px;
}

.skeleton-line.short {
  width: 56%;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* Auth */
.gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 76px);
}

.gate-intro h2 {
  max-width: 12ch;
  margin-top: 20px;
  color: var(--text-strong);
  font-size: clamp(2rem, 3.4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 0.94;
}

.gate-sub {
  max-width: 42ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.gate-facts {
  margin: 38px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.gate-facts li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.gate-facts span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.gate-facts p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.gate-panel {
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line-strong);
}

.auth-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  min-height: 52px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  transition: color 160ms ease, border-color 160ms ease;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.is-active {
  border-bottom-color: var(--accent-strong);
  color: var(--text);
}

.field {
  display: block;
  margin-top: 22px;
}

.field > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.field input::placeholder {
  color: var(--muted-2);
  opacity: 1;
}

.field input:hover {
  border-color: var(--muted);
}

.field input:focus {
  border-color: var(--text);
  outline: 1px solid var(--text);
  outline-offset: 0;
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-soft) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.field-pass {
  position: relative;
  display: block;
}

.field-pass input {
  padding-right: 74px;
}

.pass-toggle {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 64px;
  min-height: 50px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease;
}

.pass-toggle:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.auth-submit {
  margin-top: 24px;
}

.form-error {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--text);
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}

.form-error::before {
  content: "!";
  margin-right: 8px;
  font-family: var(--mono);
}

.link-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 160ms ease;
}

.link-btn:hover,
.text-link:hover {
  color: var(--text);
}

.link-btn:disabled {
  cursor: wait;
  opacity: 0.6;
}

.auth-forgot {
  margin-top: 8px;
}

.verify-panel {
  padding: 22px 0 6px;
  border-bottom: 1px solid var(--line);
}

.verify-mail {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.verify-mail span {
  display: block;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.verify-mail strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.verify-copy {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.verify-actions {
  margin-top: 20px;
}

.verify-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 6px;
}

.gate-note {
  margin-top: 20px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.65;
}

.gate-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gate-note a:hover {
  color: var(--text);
}

/* Editor */
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  margin-top: 32px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.editor {
  min-width: 0;
  border-right: 1px solid var(--line-strong);
}

.editor-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.tab {
  min-height: 54px;
  padding: 0 clamp(12px, 2vw, 18px);
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease;
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected="true"] {
  border-bottom-color: var(--accent-strong);
  color: var(--text);
}

.file-field {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--line);
}

.file-field input {
  flex: 1;
  min-width: 0;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.file-field input:focus {
  outline: 1px solid var(--text);
  outline-offset: -1px;
}

.file-pick {
  flex-shrink: 0;
  min-height: 54px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.file-pick:hover {
  background: var(--overlay);
}

.file-pick:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: -1px;
}

.editor-body {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(190px, 26vh, 280px);
  padding: 24px;
  background: var(--bg-soft);
}

.upload-state {
  width: 100%;
  max-width: 520px;
  padding: 30px 24px;
  border: 1px dashed var(--line-strong);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.upload-state:hover {
  border-color: var(--text);
}

.upload-state:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

.upload-state[aria-disabled="true"] {
  cursor: progress;
}

.upload-title {
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.upload-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.drop-hint {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--text);
  background: var(--overlay);
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.editor-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.editor-foot > .muted {
  margin-right: auto;
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.editor-foot .form-error {
  max-width: 46ch;
  margin: 0;
  padding: 7px 10px;
}

#run {
  flex-shrink: 0;
  min-width: 138px;
}

#run.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#run.is-busy::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: run-spin 700ms linear infinite;
}

.run-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.run-spinner {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: run-spin 700ms linear infinite;
}

@keyframes run-spin {
  to {
    transform: rotate(360deg);
  }
}

.result {
  padding: 22px 16px 26px;
  border-top: 1px solid var(--line-strong);
}

.result-success {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.result-check {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent-strong);
  border-radius: 50%;
}

.result-check::after {
  content: "";
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: rotate(-45deg) translate(1px, -1px);
}

.result-copy {
  flex: 1;
  min-width: 0;
}

.result-title {
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#result-name {
  margin-top: 4px;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.result-note {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.55;
}

.result-success .btn {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  #run.is-busy::before,
  .run-spinner {
    animation-duration: 1.8s;
  }
}

/* Side rail */
.side {
  min-width: 0;
}

.side-card {
  padding: 22px 20px;
  border-bottom: 1px solid var(--line);
}

.side-card:last-child {
  border-bottom: 0;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-state {
  margin-top: 22px;
  color: var(--text-strong);
  font-size: clamp(1.9rem, 2.6vw, 2.45rem);
  font-weight: 550;
  letter-spacing: -0.06em;
  line-height: 1;
}

.side-copy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.side-btn {
  width: 100%;
  margin-top: 18px;
}

.side-logout {
  margin-top: 4px;
}

.runs {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.runs > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-faint);
}

.runs > li:last-child {
  border-bottom: 0;
}

.run-name {
  display: block;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.run-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.runs-empty {
  color: var(--muted);
  font-size: 12px;
}

.run-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.run-skeleton .skeleton {
  height: 9px;
}

.run-skeleton .skeleton.short {
  width: 58%;
}

.side-quiet .text-link {
  margin-top: 8px;
}

/* Admin dashboard */
#admin-panel {
  padding-top: 8px;
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-strong);
}

.admin-head h1 {
  margin-top: 12px;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.admin-head .section-sub {
  margin-top: 10px;
  max-width: 48ch;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  background: var(--line);
  border: 1px solid var(--line);
}

.admin-stats div {
  padding: 20px;
  background: var(--bg);
}

.admin-stats dt {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-stats dd {
  margin-top: 10px;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-top: 36px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  padding: 10px 4px;
  margin-right: 24px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  transition: color 160ms ease, border-color 160ms ease;
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tab.is-active {
  border-bottom-color: var(--accent-strong);
  color: var(--text);
}

.admin-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.admin-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-faint);
  color: var(--text);
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table .admin-user-email {
  display: block;
  color: var(--muted-2);
  font-size: 11px;
}

.admin-empty {
  color: var(--muted-2);
  text-align: center;
  white-space: normal;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-pill.is-on {
  border-color: var(--accent-line);
  color: var(--accent-strong);
}

@media (max-width: 700px) {
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Dialog and toast */
.dialog {
  width: min(510px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--text);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

[data-theme="light"] .dialog::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin-top: 8px;
  color: var(--text-strong);
  font-size: 26px;
  letter-spacing: -0.05em;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  transition: border-color 160ms ease, color 160ms ease;
}

.icon-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.dialog-body {
  padding: 24px;
}

.pay-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pay-total {
  color: var(--text-strong);
  font-size: 28px;
  letter-spacing: -0.05em;
}

.pay-open {
  width: 100%;
  margin-top: 18px;
}

.pay-status {
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px dashed var(--line-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
}

.pay-status::before {
  content: "[ ]";
  margin-right: 8px;
}

.pay-status[data-state="paid"] {
  border-style: solid;
  border-color: var(--text);
}

.pay-status[data-state="paid"]::before {
  content: "[x]";
}

.pay-status[data-state="failed"] {
  border-style: dashed;
  border-color: var(--text);
}

.pay-status[data-state="failed"]::before {
  content: "[!]";
}

.pay-code {
  margin-top: 20px;
}

.pay-code code {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.pay-check {
  margin-top: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border: 1px solid var(--invert-bg);
  background: var(--invert-bg);
  color: var(--invert-text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
}

.noscript {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  padding: 14px;
  border: 1px solid var(--text);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

/* Documents */
.doc {
  max-width: 760px;
  padding-top: clamp(48px, 8vw, 96px);
}

.doc h1 {
  margin-top: 18px;
  color: var(--text-strong);
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 0.94;
}

.doc-meta {
  margin-top: 16px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc h2 {
  margin-top: 52px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  letter-spacing: -0.035em;
}

.doc p,
.doc ul {
  margin-top: 15px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.doc ul {
  padding-left: 20px;
}

.doc li {
  margin-top: 8px;
}

.doc a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9em;
}

/* Responsive */
@media (max-width: 1040px) {
  .nav-links {
    gap: 20px;
  }

  .hero-bottom {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-note {
    align-items: flex-start;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .work-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 900px) {
  .nav-inner {
    gap: 16px;
  }

  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2rem, 6.4vw, 3.6rem);
  }

  .hero-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 56px;
  }

  .hero-specs div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .hero-specs div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .section-sub {
    max-width: 58ch;
  }

  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan + .plan {
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .faq-intro {
    position: static;
  }

  .work-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .quota-strip {
    width: min(420px, 100%);
  }

  .gate {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .gate-intro h2 {
    max-width: 16ch;
  }

  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-card {
    border-right: 1px solid var(--line);
  }

  .side-card:nth-child(2n) {
    border-right: 0;
  }

  .side-card:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .nav-inner {
    min-height: 64px;
  }

  .theme-btn {
    min-width: 58px;
  }

  .nav-console {
    display: none;
  }

  .hero {
    padding-top: 42px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 8vw, 2.9rem);
    letter-spacing: -0.03em;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .process {
    border-top-color: var(--line);
  }

  .process-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px 16px;
    padding: 22px 8px;
  }

  .process-row h3 {
    grid-column: 2;
  }

  .process-row p {
    grid-column: 2;
  }

  .process-no {
    grid-row: 1 / span 2;
  }

  .security-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .security-item,
  .security-item:nth-child(2n) {
    padding: 24px 0 28px;
    border-left: 0;
  }

  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
  }

  .cta .btn {
    margin-bottom: 0;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-meta {
    margin-top: 4px;
  }

  .gate-loading {
    padding: 24px;
  }

  .work-grid {
    margin-top: 24px;
  }

  .editor-head {
    flex-wrap: wrap;
  }

  .tabs {
    flex: 1 1 auto;
  }

  .tab {
    flex: 1;
    padding-inline: 8px;
  }

  .file-field {
    flex: 1 0 100%;
    max-width: none;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .file-field input {
    min-height: 46px;
    border-left: 0;
    text-align: left;
  }

  .file-pick {
    min-height: 46px;
    padding: 0 12px;
    border-left: 1px solid var(--line);
  }

  .editor-body {
    min-height: 200px;
    padding: 22px 16px;
  }

  .editor-foot {
    flex-wrap: wrap;
  }

  .editor-foot > .muted {
    flex: 1 1 100%;
  }

  .editor-foot .form-error {
    flex: 1 1 100%;
    max-width: none;
  }

  #run {
    width: 100%;
  }

  .result-success {
    flex-wrap: wrap;
  }

  .result-success .btn {
    width: 100%;
  }

  .side {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-card {
    border-right: 0;
  }

  .side-card:last-child {
    border-top: 0;
  }

  .dialog-head,
  .dialog-body {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .brand {
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .nav-actions {
    gap: 2px;
  }

  .nav-actions .btn-sm {
    padding-inline: 12px;
  }

  .hero-specs {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-specs div,
  .hero-specs div + div,
  .hero-specs div:nth-child(3),
  .hero-specs div:nth-child(4) {
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero-specs div:first-child {
    border-top: 0;
  }

  .plan-head {
    flex-direction: column;
    gap: 16px;
  }

  .plan-price {
    text-align: left;
  }

  .gate-facts li {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .pay-total {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------
   Polish layer: kedalaman, ritme, dan gerak halus. Tetap monokrom.
   ------------------------------------------------------------------ */

:root {
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --ease: cubic-bezier(0.22, 0.68, 0.16, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -38px rgba(0, 0, 0, 0.95);
  --shadow-pop: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 32px 80px -32px rgba(0, 0, 0, 1);
  --halo: radial-gradient(60% 70% at 50% 0%, rgba(255, 255, 255, 0.06), transparent 70%);
}

[data-theme="light"] {
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 20px 50px -34px rgba(0, 0, 0, 0.28);
  --shadow-pop: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 30px 70px -30px rgba(0, 0, 0, 0.3);
  --halo: radial-gradient(60% 70% at 50% 0%, rgba(0, 0, 0, 0.05), transparent 70%);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 78% -12%, #101010 0%, transparent 60%),
    radial-gradient(900px 560px at -10% 22%, #080808 0%, transparent 58%);
  background-attachment: fixed;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(1100px 620px at 78% -12%, #f1f1f1 0%, transparent 60%),
    radial-gradient(900px 560px at -10% 22%, #f7f7f7 0%, transparent 58%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.nav {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(120%) blur(14px);
  -webkit-backdrop-filter: saturate(120%) blur(14px);
  border-bottom-color: var(--line-faint);
  transition: background-color 260ms var(--ease), border-color 260ms var(--ease), box-shadow 260ms var(--ease);
}

.nav.is-stuck {
  box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 0.9);
  border-bottom-color: var(--line);
}

.nav-links a::after {
  bottom: 10px;
  height: 1px;
  transform-origin: center;
  transition: transform 260ms var(--ease);
}

.theme-btn {
  border-radius: var(--r-sm);
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background-color 200ms var(--ease);
}

.theme-btn:hover {
  background: var(--surface);
}

.btn {
  border-radius: var(--r-sm);
  letter-spacing: 0.012em;
  transition: background-color 240ms var(--ease), color 240ms var(--ease),
    border-color 240ms var(--ease), transform 240ms var(--ease), box-shadow 240ms var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible,
.theme-btn:focus-visible,
.nav-console:focus-visible,
a:focus-visible {
  outline: 2px solid var(--text-strong);
  outline-offset: 3px;
}

.btn-solid {
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
}

.btn-solid:hover {
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.95);
}

[data-theme="light"] .btn-solid {
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.45);
}

.btn-ghost {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.btn-ghost:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.arrow {
  transition: transform 300ms var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.hero {
  position: relative;
  padding-top: clamp(56px, 8vw, 118px);
  padding-bottom: clamp(8px, 2vw, 24px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -12% 30% auto -10%;
  height: 420px;
  background: var(--halo);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

.hero-sub {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--muted);
}

.hero-note {
  border-left-color: var(--line-faint);
}

.section {
  padding-block: clamp(72px, 9vw, 132px);
}

.section-head h2 {
  text-wrap: balance;
}

.process-row {
  border-top-color: var(--line-faint);
  transition: background-color 300ms var(--ease), padding-inline 300ms var(--ease);
}

.process-row:hover {
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

.plan {
  border-radius: var(--r-lg);
  border-color: var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 60%, transparent), var(--bg-soft));
  box-shadow: var(--shadow-card);
  transition: transform 420ms var(--ease), border-color 320ms var(--ease), box-shadow 420ms var(--ease);
}

.plan:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-pop);
}

.plan.plan-vip {
  background: linear-gradient(160deg, #1c2733, #0a0d11 65%);
  border-color: var(--accent-line);
}

[data-theme="light"] .plan.plan-vip {
  background: linear-gradient(160deg, #18212b, #0c1015 65%);
}

.plan.plan-vip:hover {
  background: linear-gradient(160deg, #263442, #0e1217 65%);
  border-color: var(--accent-strong);
}

.security-item {
  border-radius: var(--r-md);
  transition: background-color 300ms var(--ease), transform 300ms var(--ease);
}

.security-item:hover {
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  transform: translateY(-2px);
}

.cta-inner {
  border-radius: var(--r-lg);
  border-color: var(--line);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(255, 255, 255, 0.07), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, transparent), var(--bg-soft));
  box-shadow: var(--shadow-card);
}

.side-card,
.gate,
.dialog {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.dialog {
  box-shadow: var(--shadow-pop);
}

.field input,
.file-field input,
textarea,
.auth-tab,
.pass-toggle {
  border-radius: var(--r-sm);
}

.field input:focus,
.file-field input:focus,
textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.nav-console {
  border-radius: var(--r-sm);
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}

.nav-console:hover {
  background: var(--surface);
}

.footer {
  border-top-color: var(--line-faint);
}

/* Reveal saat masuk viewport */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .plan,
  .security-item {
    transition: none;
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: clamp(56px, 12vw, 88px);
  }
  .btn {
    min-height: 48px;
  }
}

/* ------------------------------------------------------------------
   Halaman pemulihan kata sandi
   ------------------------------------------------------------------ */

.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reset-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.reset-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 76px) var(--gutter) clamp(32px, 6vw, 64px);
}

.reset-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.reset-aside {
  max-width: 440px;
}

.reset-aside .eyebrow {
  margin-bottom: 22px;
}

.reset-aside h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--text-strong);
}

.reset-lead {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
  max-width: 38ch;
}

.reset-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-faint);
}

.reset-points li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-faint);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.reset-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.reset-panel {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 62%, transparent), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: clamp(24px, 4vw, 38px);
  position: relative;
  overflow: hidden;
}

.reset-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 34%);
  opacity: 0.7;
  pointer-events: none;
}

.reset-panel > * {
  position: relative;
}

.reset-head {
  margin-bottom: 24px;
}

.reset-kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.reset-head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 560;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}

.reset-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
}

.reset-state {
  display: grid;
  gap: 14px;
}

.reset-state .field {
  display: grid;
  gap: 8px;
}

.reset-state .field > span:first-child {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.reset-state .field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 14px;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.reset-state .field input::placeholder {
  color: var(--muted-2);
}

.reset-state .field input:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.reset-loader {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  padding: 12px 0;
}

.reset-loader span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  border-top-color: var(--text);
  animation: reset-spin 900ms linear infinite;
}

@keyframes reset-spin {
  to {
    transform: rotate(360deg);
  }
}

.reset-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.reset-muted--start {
  max-width: 40ch;
}

.reset-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 2px;
}

.reset-meter span {
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  transition: background-color 220ms var(--ease);
}

.reset-meter span.on {
  background: var(--text-strong);
}

.reset-hint {
  margin: -4px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.reset-submit {
  width: 100%;
  justify-content: space-between;
  min-height: 50px;
  margin-top: 4px;
  text-decoration: none;
}

.reset-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.reset-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-strong);
  font-size: 16px;
}

.reset-icon--bad {
  border-color: var(--line-strong);
  color: var(--muted);
}

.reset-state h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.reset-state .form-error {
  margin: 0;
}

.reset-foot {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-faint);
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}

.reset-foot a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reset-foot a:hover {
  color: var(--text);
}

.reset-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter) 26px;
  border-top: 1px solid var(--line-faint);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .reset-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }
  .reset-aside {
    max-width: none;
  }
  .reset-aside h1 {
    font-size: clamp(30px, 8vw, 42px);
  }
  .reset-lead {
    margin-bottom: 0;
  }
  .reset-points {
    display: none;
  }
}

@media (max-width: 560px) {
  .reset-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .reset-aside .eyebrow {
    margin-bottom: 14px;
  }
}

.role-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-left: 7px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--surface);
}
