:root {
  --background: #ffffff;
  --surface: #f9f9fa;
  --surface-low: #f3f3f4;
  --text: #1a1c1d;
  --muted: #5d5f5f;
  --border: #e4e4e7;
  --primary: #000000;
  --on-primary: #ffffff;
  --focus: #000000;
  --panel-dark: #0a0f12;
  --font: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
}

a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.login-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 20px 40px;
  background: #fff;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark,
.brand-logo,
.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 16px;
}

.brand-logo {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  object-fit: contain;
}

.dashboard-brand .brand-logo,
.editor-brand .brand-logo {
  width: 98px;
  height: 98px;
  filter: none;
}

.login-card {
  width: min(100%, 400px);
  margin-top: -6vh;
}

.login-card h1 {
  margin: 0 0 40px;
  color: var(--text);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
}

.email-form {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 16px;
}

.button {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}

.button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

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

.button-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button-primary:hover {
  opacity: 0.84;
}

.button-secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface-low);
}

.email-form {
  margin-bottom: 16px;
}

.email-form label,
.check-label,
.legal-copy,
.signup-copy {
  font-size: 14px;
  line-height: 1.4;
}

.email-form label {
  color: var(--text);
  font-weight: 600;
}

.signup-field {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.signup-field[hidden] {
  display: none;
}

.email-form input[type="text"],
.email-form input[type="email"],
.email-form input[type="password"] {
  width: 100%;
  min-height: 56px;
  margin-top: -8px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.email-form input::placeholder {
  color: #8b8d8d;
}

.email-form input:focus {
  border-color: var(--primary);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 4px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 500;
}

.check-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.signup-copy {
  margin: 28px 0 0;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}

.text-button:hover {
  text-decoration: underline;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 15, 18, 0.34);
  backdrop-filter: blur(18px);
}

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

.auth-modal-card {
  position: relative;
  width: min(100%, 440px);
  padding: 32px;
  border: 1px solid rgba(207, 196, 197, 0.7);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 30px 90px rgba(10, 15, 18, 0.18);
  animation: premium-enter 360ms ease both;
}

.auth-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(207, 196, 197, 0.82);
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-modal-card h2 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 32px;
  line-height: 1.05;
}

.auth-modal-card > p:not(.modal-eyebrow),
.password-reset-state {
  color: var(--muted);
  line-height: 1.45;
}

.password-reset-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

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

.password-reset-step[hidden] {
  display: none;
}

.password-reset-step label {
  margin-bottom: -6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.password-reset-step input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
}

.password-reset-step input:focus {
  border-color: var(--primary);
}

.password-reset-state {
  min-height: 20px;
  margin: -2px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.password-reset-state[data-tone="error"] {
  color: #93000a;
}

.password-reset-state[data-tone="success"] {
  color: #147a45;
}

.legal-copy {
  position: absolute;
  bottom: 24px;
  left: 50%;
  width: min(calc(100% - 40px), 400px);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
}

.legal-copy a {
  text-decoration: underline;
}

.art-panel {
  position: relative;
  display: none;
  min-height: 100vh;
  overflow: hidden;
  background: var(--panel-dark);
}

.art-image {
  position: absolute;
  inset: 0;
  background-image: url("https://lh3.googleusercontent.com/aida-public/AB6AXuCvl3Tmge0OhByDWbfRLYyBGbf6gV6oIKtmj9dE05ng9mZugnuoEmRF2fWOjd-BRwFXWddaK9hkTR95qYZ78Tgs3jeWusvRJaoALIBxLHXC9gaphPeFwVzBdQ623AZ5VNMZSsoROlVB672bIsCcNZ-2T8yNPYtkLCgEAkwubrVZxOKnVZf2isdJJlpoi3LgyZJMkSJvL0OdFULeO55N-OhSUqfViZGwlYjn_i_J2D_xO6aUvU-rezQ4rCOk7IrcXIQgCWxV3swfeexK");
  background-position: center;
  background-size: cover;
  mix-blend-mode: screen;
  opacity: 0.9;
}

.art-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(35deg, #000 0%, transparent 58%, rgba(30, 58, 138, 0.22) 100%);
}

.art-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(56vw, 420px);
  height: auto;
  opacity: 0.2;
  transform: translate(-50%, -50%);
}

.art-mark circle,
.art-mark path {
  fill: none;
  stroke: #fff;
  stroke-width: 0.5;
}

.message-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--surface);
}

.message-panel {
  width: min(100%, 420px);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #fff;
  text-align: center;
}

.message-panel h1 {
  margin: 8px 0 24px;
  font-size: 32px;
  line-height: 1.2;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.primary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
}

.onboarding-page {
  position: relative;
  min-height: 100vh;
  background-color: var(--surface);
  background-image: url("https://lh3.googleusercontent.com/aida-public/AB6AXuBNmiUje324cNoILiSnoy9CmnEcyDBVV3eXh2s2a80LwWBDDDHGMmTXd7LPw4qFGt4XafLSi1Mq-7Ak5wMBB4ftyF5hivVGgfr5qShdVF5Fk5aoTHuleyDyvg2ERjtf7ejW7WioEbIv8IQ7TZ4LO0ZPPik93fy4lo0oXJlU5g0Agu_n26fZur-V7ljymBGOKhAK_L6tKBig3YqOpSwTUfgBkXCjbebJ4HQmUtqf2gcpUiSpxFEqlQPbbvgIidLdP_TRSRPVv3QDYJGr");
  background-position: center;
  background-size: cover;
  color: var(--text);
  overflow: hidden;
}

.onboarding-page::before,
.onboarding-page::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
}

.onboarding-page::before {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.95), transparent 26%),
    radial-gradient(circle at 76% 68%, rgba(198, 198, 207, 0.3), transparent 28%);
  filter: blur(28px);
  opacity: 0.75;
  animation: ambient-drift 14s ease-in-out infinite alternate;
}

.onboarding-page::after {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.035), rgba(255, 255, 255, 0.12));
  opacity: 0.55;
  animation: ambient-slide 18s linear infinite;
}

.onboarding-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 48px 20px;
}

.typeform-card {
  position: relative;
  width: min(100%, 520px);
  min-height: 430px;
  animation: fade-in 520ms ease both;
}

.type-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateY(10px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.type-step.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.step-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
}

.step-kicker span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-variant, #e2e2e3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.step-kicker i {
  display: block;
  width: 34px;
  height: 1px;
  background: var(--border);
}

.type-step h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}

.type-step p {
  margin: -10px auto 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.tag-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.tag-entry input,
.source-panel input[type="url"] {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
  font-size: 24px;
  line-height: 1.3;
  outline: 0;
}

.tag-entry input:focus,
.source-panel input[type="url"]:focus {
  border-color: var(--primary);
}

.compact-button {
  width: auto;
  min-height: 44px;
  padding: 0 20px;
}

.tag-list {
  display: flex;
  min-height: 42px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.tag-pill span {
  color: var(--muted);
}

.type-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 8px;
}

.type-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.split-actions {
  gap: 12px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.choice-card {
  display: flex;
  min-height: 122px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  padding: 18px;
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.choice-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.choice-card input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.choice-card strong {
  font-size: 16px;
}

.choice-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.source-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.source-panel[hidden] {
  display: none;
}

.source-panel label {
  font-size: 14px;
  font-weight: 700;
}

.source-panel input[type="file"] {
  width: 100%;
  border: 1px dashed var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  padding: 20px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background:
    linear-gradient(rgba(249, 249, 250, 0.72), rgba(249, 249, 250, 0.72)),
    url("https://lh3.googleusercontent.com/aida/ADBb0uiP1kRRpWxHdWuhF55ri5Tedos9EtIiSZAtYmKiKWu3pHQiW6804tUEdCvEK2DNucPGnjMsgbS8XqpEKSkO1zU4G8NS27-prNlI-vHvVWqMdwFfmj2bYQ21w6d5gEX65m5NCqYrPebsvw3azNptNWAJb7gaVeDuCrixTUIi-10D17N1YO7x1SIoJS4V4tjE7LiymYp3L9HNsrS_VnubeknnPWQ49gBlPnADWwuv7AvHDDPK3-Q7K6ZhpxPH") center / cover;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity 260ms ease;
}

.loading-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.loader-ring {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(207, 196, 197, 0.55);
  border-radius: 50%;
}

.loader-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: subtle-spin 1.8s linear infinite;
}

.loader-ring span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%);
}

.loading-overlay h2 {
  margin: 18px 0 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
}

.loading-overlay p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.dashboard-page {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.98), transparent 30%),
    linear-gradient(145deg, rgba(10, 15, 18, 0.045), transparent 34%),
    linear-gradient(315deg, rgba(48, 64, 86, 0.1), transparent 42%),
    #f4f5f2;
  color: var(--text);
  overflow-x: hidden;
}

.dashboard-grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(10, 15, 18, 0.026) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 15, 18, 0.026) 1px, transparent 1px);
  background-size: 112px 112px;
  mask-image: radial-gradient(circle at center, black 18%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle at center, black 18%, transparent 76%);
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  width: min(calc(100% - 40px), 1180px);
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 8px 20px;
  border: 1px solid rgba(207, 196, 197, 0.56);
  border-radius: 0 0 26px 26px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary);
  box-shadow: 0 14px 36px rgba(10, 15, 18, 0.1);
  backdrop-filter: blur(18px);
}

.dashboard-brand,
.dashboard-nav,
.dashboard-header form {
  display: inline-flex;
  align-items: center;
}

.dashboard-brand {
  gap: 10px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-brand:hover,
.dashboard-nav a:hover {
  text-decoration: none;
}

.dashboard-nav {
  gap: 28px;
}

.dashboard-nav a,
.logout-button {
  border: 0;
  background: transparent;
  color: rgba(10, 15, 18, 0.58);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: color 160ms ease, opacity 160ms ease;
}

.dashboard-nav a.is-active,
.dashboard-nav a:hover,
.logout-button:hover {
  color: var(--primary);
}

.dashboard-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 88px 24px 96px;
}

.dashboard-hero {
  display: flex;
  width: min(100%, 760px);
  flex-direction: column;
  align-items: center;
  margin: 0 auto 84px;
  text-align: center;
}

.dashboard-kicker {
  margin: 0 0 24px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-hero h1 {
  margin: 0 0 30px;
  color: var(--primary);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
}

.dashboard-hero h1 span {
  color: #33404c;
  font-weight: 600;
}

.job-prompt {
  display: flex;
  width: min(100%, 680px);
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.job-prompt:focus-within {
  border-color: #33404c;
  background: rgba(255, 255, 255, 0.94);
}

.job-input-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2px 2px 0;
}

.job-input-toolbar select {
  min-height: 42px;
  max-width: 100%;
  padding: 0 42px 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background-color: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.job-prompt textarea {
  width: 100%;
  min-height: 94px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 17px;
  line-height: 1.5;
  outline: 0;
  padding: 8px 4px 2px;
}

.job-prompt textarea::placeholder {
  color: rgba(76, 69, 70, 0.55);
}

.job-prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 2px;
}

.job-prompt-footer span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.job-submit {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
}

.job-submit:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.template-section {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.template-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.template-heading h2 {
  margin: 0;
  color: var(--primary);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}

.template-heading span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.template-card {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  cursor: pointer;
}

.template-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 480ms ease;
}

.template-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.56), transparent 48%);
  opacity: 0.85;
  transition: opacity 220ms ease;
}

.template-card:hover img {
  transform: scale(1.04);
}

.template-card:hover::after {
  opacity: 1;
}

.template-card span {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.dashboard-page::before,
.dashboard-page::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.dashboard-page::before {
  inset: -24%;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.92), transparent 22%),
    radial-gradient(circle at 80% 22%, rgba(45, 58, 72, 0.16), transparent 24%),
    radial-gradient(circle at 50% 88%, rgba(198, 198, 207, 0.22), transparent 30%);
  filter: blur(36px);
  animation: ambient-drift 16s ease-in-out infinite alternate;
}

.dashboard-page::after {
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(12, 18, 22, 0.035), rgba(255, 255, 255, 0.12));
  animation: ambient-slide 22s linear infinite alternate;
}

.dashboard-header,
.flow-copy,
.flow-card {
  opacity: 0;
}

.dashboard-page.is-ready .dashboard-header {
  animation: premium-enter 560ms ease both;
}

.dashboard-page.is-ready .flow-copy {
  animation: premium-enter 640ms ease 90ms both;
}

.dashboard-page.is-ready .flow-card {
  animation: premium-enter 720ms ease 160ms both;
}

.resume-flow {
  display: flex;
  width: min(100%, 880px);
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.flow-copy {
  text-align: center;
}

.flow-card {
  position: relative;
  width: min(100%, 760px);
  min-height: 568px;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.flow-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.flow-progress span {
  color: rgba(76, 69, 70, 0.55);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.flow-progress span.is-active {
  color: var(--primary);
}

.flow-progress i {
  display: block;
  width: 42px;
  height: 1px;
  background: rgba(126, 117, 118, 0.28);
}

.flow-step {
  position: absolute;
  inset: 72px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.flow-step.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.flow-eyebrow {
  margin: 0;
  color: #33404c;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.flow-step h2 {
  margin: 0;
  max-width: 640px;
  color: var(--primary);
  font-size: 32px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.12;
}

.flow-step > p:not(.flow-eyebrow),
.template-lock-copy {
  max-width: 560px;
  margin: -8px 0 2px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.source-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
}

.source-choice {
  display: flex;
  min-height: 164px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(207, 196, 197, 0.66);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.source-choice:hover,
.source-choice.is-selected {
  border-color: #33404c;
  background: rgba(255, 255, 255, 0.74);
  transform: translateY(-2px);
}

.source-choice .material-symbols-outlined {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #0a0f12;
  color: #fff;
  font-size: 21px;
}

.source-choice strong {
  color: var(--primary);
  font-size: 16px;
  line-height: 1.2;
}

.source-choice small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.linkedin-job-links {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -8px;
}

.linkedin-job-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(207, 196, 197, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 12px;
}

.linkedin-job-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

.flow-step textarea {
  width: 100%;
  min-height: 174px;
  resize: vertical;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
  font-size: 24px;
  line-height: 1.35;
  outline: 0;
}

.flow-step textarea:focus {
  border-color: var(--primary);
}

.flow-step textarea::placeholder {
  color: rgba(76, 69, 70, 0.46);
}

.flow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 8px;
}

.flow-button {
  width: auto;
  min-width: 148px;
  padding: 0 24px;
}

.template-heading {
  justify-content: space-between;
  margin-bottom: 0;
}

.template-heading .flow-eyebrow {
  margin-bottom: 8px;
}

.template-heading h2 {
  font-size: 30px;
}

.template-lock-copy {
  margin-top: -12px;
}

.flow-step .template-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.template-card {
  text-align: left;
  transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.template-card img {
  width: 100%;
  min-height: 245px;
  aspect-ratio: 0.72;
  object-fit: cover;
  object-position: top center;
  border-radius: 18px;
}

.template-card span {
  display: block;
  margin-top: 12px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}

.template-card:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.template-card:not(:disabled):hover,
.template-card.is-selected {
  border-color: #0a0f12;
  transform: translateY(-2px);
}

.template-card.is-selected {
  outline: 3px solid rgba(10, 15, 18, 0.16);
  outline-offset: 3px;
}

.template-card:focus-visible,
.source-choice:focus-visible,
.job-submit:focus-visible,
.logout-button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.latex-page {
  min-height: 100vh;
  padding: 32px;
  background:
    linear-gradient(145deg, rgba(10, 15, 18, 0.055), transparent 34%),
    linear-gradient(315deg, rgba(48, 64, 86, 0.08), transparent 42%),
    #f7f8f7;
}

.latex-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.latex-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.latex-header h1 {
  margin: 8px 0;
  font-size: 32px;
  line-height: 1.15;
}

.latex-header p {
  margin: 0;
  color: var(--muted);
}

.latex-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.latex-actions button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.secondary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
}

.secondary-link:hover {
  text-decoration: none;
  background: #fff;
}

.latex-output {
  min-height: 70vh;
  margin: 0;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #0a0f12;
  color: #f8fafc;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.resume-loading {
  z-index: 30;
  background:
    linear-gradient(rgba(249, 249, 250, 0.78), rgba(249, 249, 250, 0.78)),
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(145deg, rgba(10, 15, 18, 0.05), transparent 46%),
    #f4f5f2;
  transform: scale(1.01);
  transition: opacity 320ms ease, transform 420ms ease;
}

.resume-loading.is-visible {
  transform: scale(1);
}

.resume-loading h2,
.resume-loading p,
.resume-loading .loader-ring {
  animation: premium-enter 520ms ease both;
}

.resume-loading h2 {
  animation-delay: 80ms;
}

.resume-loading p {
  animation-delay: 140ms;
}

.loading-percent {
  display: block;
  margin-top: 18px;
  color: #101417;
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  animation: premium-enter 520ms ease 180ms both;
}

.loading-track {
  width: min(420px, 78vw);
  height: 8px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 20, 23, 0.1);
  box-shadow: inset 0 1px 3px rgba(16, 20, 23, 0.08);
}

.loading-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #101417, #5f6f68);
  transition: width 520ms ease;
}

.loading-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(560px, 86vw);
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.loading-steps li {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(16, 20, 23, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: rgba(16, 20, 23, 0.52);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.loading-steps li.is-active {
  border-color: rgba(16, 20, 23, 0.2);
  background: #101417;
  color: #fff;
}

.generate-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(85, 140, 255, 0.2), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(17, 229, 181, 0.16), transparent 24%),
    radial-gradient(circle at 50% 110%, rgba(190, 78, 255, 0.16), transparent 32%),
    #05070b;
  color: #f8fafc;
  overflow: hidden;
}

.generate-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: min(calc(100% - 40px), 1180px);
  margin: 0 auto;
  padding: 52px 0;
}

.generate-copy h1 {
  max-width: 680px;
  margin: 10px 0 16px;
  color: #fff;
  font-size: clamp(44px, 7vw, 86px);
  font-weight: 900;
  line-height: 0.94;
}

.generate-copy p {
  margin: 0;
  color: rgba(248, 250, 252, 0.72);
  font-size: 18px;
  font-weight: 700;
}

#generate-percent {
  display: block;
  margin-top: 28px;
  color: #ffffff;
  font-size: clamp(72px, 13vw, 162px);
  font-weight: 900;
  line-height: 0.88;
  text-shadow: 0 0 38px rgba(90, 177, 255, 0.3);
}

.generate-track {
  width: min(560px, 86vw);
  height: 10px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.generate-track span {
  display: block;
  width: 1%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #26f7c8, #49a2ff, #d45bff);
  box-shadow: 0 0 24px rgba(73, 162, 255, 0.45);
  transition: width 260ms linear;
}

.generate-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(680px, 90vw);
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.generate-steps li {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(248, 250, 252, 0.5);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.generate-steps li.is-active {
  border-color: rgba(38, 247, 200, 0.45);
  background: rgba(38, 247, 200, 0.12);
  color: #eafffa;
}

.generate-skeleton {
  display: grid;
  place-items: center;
}

.skeleton-sheet {
  display: grid;
  width: min(100%, 460px);
  min-height: 620px;
  gap: 13px;
  align-content: start;
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(24px);
}

.sk-line,
.sk-rule {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.sk-line::before,
.sk-rule::before {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: skeleton-sweep 1.35s ease-in-out infinite;
}

.sk-line {
  height: 13px;
}

.sk-title {
  width: 72%;
  height: 26px;
}

.sk-short {
  width: 42%;
}

.sk-mid {
  width: 66%;
}

.sk-rule {
  height: 3px;
  margin: 14px 0 6px;
}

.generate-error {
  grid-column: 1 / -1;
  padding: 18px 20px;
  border: 1px solid rgba(255, 104, 104, 0.38);
  border-radius: 22px;
  background: rgba(255, 104, 104, 0.12);
  color: #ffe5e5;
}

.generate-error p {
  margin: 8px 0 12px;
}

.generate-error a {
  color: #fff;
  font-weight: 900;
}

@keyframes skeleton-sweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(260%); }
}

.editor-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.98), transparent 32%),
    linear-gradient(145deg, rgba(10, 15, 18, 0.045), transparent 34%),
    #f4f5f2;
  color: var(--text);
  overflow: hidden;
}

.editor-topbar {
  display: none;
  min-height: 64px;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(207, 196, 197, 0.58);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
}

.editor-brand {
  color: var(--primary);
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 16px;
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.editor-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.editor-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.editor-button.primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.editor-button.primary:disabled {
  border-color: #a3a3a3;
  background: #a3a3a3;
  color: #f8fafc;
  opacity: 1;
}

.editor-button.secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
}

.editor-shell {
  display: grid;
  height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  background: rgba(207, 196, 197, 0.52);
}

.editor-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.72);
}

.pane-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(207, 196, 197, 0.52);
}

.pane-header h1 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.1;
}

.pane-header span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 11px;
}

.code-pane .CodeMirror {
  height: calc(100vh - 72px);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.84);
}

.editor-hidden-log {
  position: fixed;
  right: 18px;
  bottom: 104px;
  z-index: 70;
  width: min(520px, calc(100% - 36px));
  max-height: 220px;
  border: 1px solid rgba(207, 196, 197, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 54px rgba(10, 15, 18, 0.12);
}

.editor-hidden-log:not([open]) {
  display: none;
}

.editor-floating-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 80;
  display: grid;
  width: min(calc(100% - 28px), 1120px);
  min-height: 64px;
  grid-template-columns: minmax(150px, auto) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(207, 196, 197, 0.74);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 70px rgba(10, 15, 18, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(22px);
}

.editor-live-status,
.editor-floating-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.editor-live-status {
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.editor-ai-form {
  position: relative;
  display: flex;
  min-height: 48px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.16), rgba(124, 166, 255, 0.72), rgba(161, 255, 219, 0.66), rgba(0, 0, 0, 0.18));
  background-size: 320% 320%;
  box-shadow:
    0 12px 34px rgba(80, 95, 118, 0.12),
    0 0 32px rgba(124, 166, 255, 0.18);
  animation: editor-ai-ambient 7s ease-in-out infinite;
}

.editor-ai-form::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  z-index: 0;
}

.editor-ai-form::after {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 20% 45%, rgba(124, 166, 255, 0.24), transparent 34%),
    radial-gradient(circle at 78% 48%, rgba(161, 255, 219, 0.22), transparent 32%);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
  animation: editor-ai-drift 8s ease-in-out infinite alternate;
}

.editor-ai-form input {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  min-height: 44px;
  padding: 0 6px 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.editor-ai-form input::placeholder {
  color: rgba(10, 15, 18, 0.48);
  font-weight: 700;
}

.editor-ai-form input:focus {
  background: transparent;
  box-shadow: none;
}

.editor-ai-form input:disabled {
  cursor: wait;
  opacity: 0.72;
}

.editor-ai-submit {
  position: relative;
  z-index: 1;
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.editor-ai-submit:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.04);
}

.editor-ai-submit:disabled,
.editor-ai-form.is-working .editor-ai-submit {
  cursor: wait;
  opacity: 0.56;
}

.editor-autosave-label {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(20, 126, 60, 0.12);
  border-radius: 999px;
  background: #e9f9ef;
  color: #126b36;
  font-size: 12px;
  font-weight: 900;
}

@keyframes editor-ai-ambient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes editor-ai-drift {
  from {
    transform: translateX(-4%) rotate(0deg);
  }
  to {
    transform: translateX(4%) rotate(8deg);
  }
}

.editor-live-status span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: rgba(10, 15, 18, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 11px;
}

.editor-live-status span[data-state="busy"] {
  border-color: rgba(169, 117, 0, 0.24);
  background: #fff4c2;
  color: #7a5200;
}

.editor-live-status span[data-state="success"] {
  border-color: rgba(20, 126, 60, 0.22);
  background: #dff7e8;
  color: #126b36;
}

.editor-live-status span[data-state="error"] {
  border-color: rgba(147, 0, 10, 0.22);
  background: #ffe0e0;
  color: #93000a;
}

.pdf-preview-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #dfe0e0;
}

.pdf-preview-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #fff;
}

.empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-preview[hidden] {
  display: none;
}

.compile-log-panel {
  max-height: 180px;
  overflow: auto;
  border-top: 1px solid rgba(207, 196, 197, 0.52);
  background: #0a0f12;
  color: #f8fafc;
}

.compile-log-panel summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
}

.compile-log-panel pre {
  margin: 0;
  padding: 0 14px 14px;
  white-space: pre-wrap;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.history-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.94), transparent 26%),
    linear-gradient(135deg, rgba(10, 15, 18, 0.05), transparent 38%),
    linear-gradient(315deg, rgba(76, 86, 98, 0.08), transparent 42%),
    #f4f5f2;
  color: var(--text);
}

.history-header,
.history-intro,
.history-shell {
  opacity: 0;
}

.history-page.is-ready .history-header {
  animation: premium-enter 560ms ease both;
}

.history-page.is-ready .history-intro {
  animation: premium-enter 640ms ease 80ms both;
}

.history-page.is-ready .history-shell {
  animation: premium-enter 720ms ease 140ms both;
}

.history-main {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  padding: 160px 0 64px;
}

.history-intro {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.history-intro h1 {
  margin: 8px 0;
  color: var(--primary);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.05;
}

.history-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.history-shell {
  display: grid;
  min-height: 640px;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  transition: grid-template-columns 420ms ease;
}

.history-list-panel {
  border: 1px solid rgba(207, 196, 197, 0.68);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(22px);
}

.history-list-panel {
  padding: 18px;
}

.history-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.history-new-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  background: #0a0f12;
  color: #fff;
  font-size: 12px;
  padding: 0 14px;
}

.history-new-link:hover {
  text-decoration: none;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-row {
  display: grid;
  min-height: 86px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.history-row:hover,
.history-row.is-active {
  border-color: rgba(10, 15, 18, 0.22);
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.history-row-index {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: #0a0f12;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.history-row strong,
.history-row small {
  display: block;
}

.history-row strong {
  color: var(--primary);
  font-size: 15px;
  line-height: 1.2;
}

.history-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.history-open-label {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  background: #0a0f12;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  padding: 0 12px;
}

.history-detail {
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(24px) scale(0.985);
  transition: opacity 320ms ease, transform 420ms ease;
}

.history-detail.is-opening,
.history-detail.is-ready {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.history-detail[hidden] {
  display: none;
}

.history-empty-state,
.history-loading {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.history-empty-state .material-symbols-outlined {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 20px;
  background: #0a0f12;
  color: #fff;
  font-size: 26px;
}

.history-empty-state h2 {
  margin: 6px 0 0;
  color: var(--primary);
  font-size: 26px;
}

.history-loading strong,
.history-loading span {
  display: block;
}

.history-loading.is-error {
  color: #93000a;
}

.detail-loader {
  animation: detail-loader-enter 360ms ease both;
}

.history-loader-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(10, 15, 18, 0.14);
  border-top-color: #0a0f12;
  border-radius: 50%;
  animation: subtle-spin 900ms linear infinite;
}

.history-detail-inner {
  display: grid;
  gap: 18px;
  max-height: min(84vh, 980px);
  overflow-y: auto;
  padding: 22px;
  animation: detail-slide-in 420ms ease both;
}

.history-detail-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.history-back {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  cursor: pointer;
}

.history-detail-top h2 {
  margin: 5px 0;
  color: var(--primary);
  font-size: 28px;
  line-height: 1.12;
}

.history-detail-top p:last-child {
  margin: 0;
  color: var(--muted);
}

.history-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.history-rule {
  min-height: 84px;
  padding: 15px;
  border: 1px solid rgba(207, 196, 197, 0.62);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  animation: rule-rise 500ms ease both;
}

.history-rule span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.history-rule strong {
  display: block;
  margin-top: 8px;
  color: var(--primary);
  font-size: 13px;
  line-height: 1.35;
}

.history-card-section {
  display: grid;
  gap: 9px;
}

.history-card-section label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.history-card-section textarea,
.history-latex-panel textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(207, 196, 197, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--primary);
  outline: 0;
}

.history-card-section textarea {
  min-height: 116px;
  padding: 14px;
  font: inherit;
}

.history-source-link {
  display: block;
  overflow-wrap: anywhere;
  padding: 14px;
  border: 1px solid rgba(207, 196, 197, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--primary);
}

.history-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-action {
  width: auto;
  min-width: 126px;
  text-decoration: none;
}

.history-latex-panel {
  display: grid;
  gap: 10px;
}

.history-latex-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.history-latex-panel textarea {
  min-height: 330px;
  padding: 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.choose-plan-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.94), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(217, 219, 219, 0.52), transparent 24%),
    linear-gradient(135deg, rgba(10, 15, 18, 0.05), transparent 44%),
    #f4f5f2;
  color: var(--text);
}

.choose-plan-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(calc(100% - 32px), 1120px);
  min-height: 100vh;
  align-content: center;
  gap: 30px;
  margin: 0 auto;
  padding: 64px 0;
}

.choose-plan-copy,
.choose-plan-grid,
.choose-plan-state {
  opacity: 0;
}

.choose-plan-page.is-ready .choose-plan-copy {
  animation: premium-enter 620ms ease both;
}

.choose-plan-page.is-ready .choose-plan-grid {
  animation: premium-enter 720ms ease 120ms both;
}

.choose-plan-page.is-ready .choose-plan-state {
  animation: premium-enter 720ms ease 200ms both;
}

.choose-plan-copy {
  width: min(100%, 660px);
  margin: 0 auto;
  text-align: center;
}

.choose-plan-copy h1 {
  margin: 8px 0 10px;
  color: var(--primary);
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.98;
}

.choose-plan-copy p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.choose-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.choose-plan-loading {
  grid-column: 1 / -1;
  display: grid;
  min-height: 260px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.choose-plan-loading.is-error {
  color: #93000a;
}

.choose-plan-card {
  display: flex;
  min-height: 460px;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(207, 196, 197, 0.68);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(20px);
  transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.choose-plan-card:hover,
.choose-plan-card.is-selected {
  border-color: rgba(10, 15, 18, 0.26);
  transform: translateY(-3px);
}

.choose-plan-card.is-current {
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.16), transparent 28%),
    #0a0f12;
  color: #fff;
}

.choose-plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.choose-plan-card-top .material-symbols-outlined {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  background: #0a0f12;
  color: #fff;
}

.choose-plan-card.is-current .choose-plan-card-top .material-symbols-outlined {
  background: #fff;
  color: #0a0f12;
}

.choose-plan-card small {
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(207, 196, 197, 0.68);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.choose-plan-card.is-current small {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.82);
}

.choose-plan-card h2 {
  margin: 0;
  color: var(--primary);
  font-size: 28px;
}

.choose-plan-card.is-current h2 {
  color: #fff;
}

.choose-plan-price {
  color: var(--primary);
  font-size: 44px;
  font-weight: 850;
  line-height: 1;
}

.choose-plan-card.is-current .choose-plan-price {
  color: #fff;
}

.choose-plan-price span {
  color: var(--muted);
  font-size: 14px;
}

.choose-plan-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.choose-plan-card li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.choose-plan-card.is-current li {
  color: rgba(255, 255, 255, 0.76);
}

.choose-plan-card li .material-symbols-outlined {
  color: var(--primary);
  font-size: 18px;
}

.choose-plan-card.is-current li .material-symbols-outlined {
  color: #fff;
}

.choose-plan-card .button {
  width: 100%;
  margin-top: auto;
}

.choose-plan-state {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.credits-popup {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(244, 245, 242, 0.78), rgba(244, 245, 242, 0.78)),
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.96), transparent 36%);
  backdrop-filter: blur(14px);
}

.credits-popup[hidden] {
  display: none;
}

.credits-dialog {
  display: grid;
  width: min(100%, 520px);
  gap: 16px;
  padding: 32px;
  border: 1px solid rgba(207, 196, 197, 0.72);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 90px rgba(10, 15, 18, 0.14);
  text-align: center;
  animation: premium-enter 520ms ease both;
}

.credits-dialog h2 {
  margin: 0;
  color: var(--primary);
  font-size: 34px;
  line-height: 1.05;
}

.credits-dialog p {
  margin: 0;
  color: var(--muted);
}

.credits-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.credits-dialog small {
  min-height: 18px;
  color: var(--muted);
  font-weight: 800;
}

.profile-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.98), transparent 30%),
    radial-gradient(circle at 18% 18%, rgba(223, 224, 224, 0.48), transparent 24%),
    linear-gradient(145deg, rgba(10, 15, 18, 0.04), transparent 42%),
    #f4f5f2;
  color: var(--text);
}

.profile-header,
.profile-hero,
.profile-stats,
.profile-description-panel,
.plan-manager,
.profile-actions {
  opacity: 0;
}

.profile-page.is-ready .profile-header {
  animation: premium-enter 560ms ease both;
}

.profile-page.is-ready .profile-hero {
  animation: premium-enter 640ms ease 80ms both;
}

.profile-page.is-ready .profile-stats {
  animation: premium-enter 700ms ease 140ms both;
}

.profile-page.is-ready .profile-description-panel {
  animation: premium-enter 720ms ease 180ms both;
}

.profile-page.is-ready .plan-manager {
  animation: premium-enter 760ms ease 240ms both;
}

.profile-page.is-ready .profile-actions {
  animation: premium-enter 760ms ease 300ms both;
}

.profile-main {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), 1120px);
  margin: 0 auto;
  padding: 156px 0 72px;
}

.profile-hero {
  display: grid;
  justify-items: center;
  gap: 22px;
  margin-bottom: 36px;
  text-align: center;
}

.profile-avatar {
  display: grid;
  width: 128px;
  height: 128px;
  place-items: center;
  border: 1px solid rgba(207, 196, 197, 0.64);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(226, 226, 227, 0.64)),
    #fff;
  color: var(--primary);
  font-size: 40px;
  font-weight: 900;
}

.profile-identity {
  display: grid;
  width: min(100%, 460px);
  gap: 8px;
}

.profile-identity input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.12;
  outline: 0;
  text-align: center;
}

.profile-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.profile-stat-card {
  display: grid;
  min-height: 156px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid rgba(207, 196, 197, 0.68);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, transform 180ms ease;
}

.profile-stat-card:hover {
  border-color: rgba(10, 15, 18, 0.24);
  transform: translateY(-2px);
}

.profile-stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-stat-card strong {
  color: var(--primary);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.profile-description-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 58px;
  padding: 24px;
  border: 1px solid rgba(207, 196, 197, 0.68);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
}

.profile-description-panel h2 {
  margin: 6px 0;
  color: var(--primary);
  font-size: 26px;
  line-height: 1.16;
}

.profile-description-panel p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.profile-description-panel textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 16px;
  border: 1px solid rgba(207, 196, 197, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  font: inherit;
  line-height: 1.55;
  outline: 0;
}

.profile-description-panel textarea:focus {
  border-color: rgba(10, 15, 18, 0.36);
  box-shadow: 0 0 0 4px rgba(10, 15, 18, 0.07);
}

.plan-manager {
  display: grid;
  gap: 26px;
}

.plan-heading {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.plan-heading h1 {
  margin: 8px 0;
  color: var(--primary);
  font-size: 36px;
  line-height: 1.12;
}

.plan-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  position: relative;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(207, 196, 197, 0.68);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
}

.plan-card.is-current {
  border-color: #0a0f12;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, 0.2), transparent 28%),
    #0a0f12;
  color: #fff;
}

.plan-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-card h2 {
  margin: 0;
  color: var(--primary);
  font-size: 20px;
}

.plan-card.is-current h2 {
  color: #fff;
}

.plan-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.plan-card.is-current .plan-subtitle {
  color: rgba(255, 255, 255, 0.68);
}

.plan-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(207, 196, 197, 0.68);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 0 10px;
}

.plan-card.is-current .plan-badge {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.plan-price {
  color: var(--primary);
  font-size: 42px;
  font-weight: 850;
  line-height: 1;
}

.plan-card.is-current .plan-price {
  color: #fff;
}

.plan-price span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.plan-card.is-current .plan-price span {
  color: rgba(255, 255, 255, 0.68);
}

.plan-features {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.plan-card.is-current .plan-features li {
  color: rgba(255, 255, 255, 0.84);
}

.plan-features .material-symbols-outlined {
  margin-top: -2px;
  color: var(--primary);
  font-size: 18px;
}

.plan-card.is-current .plan-features .material-symbols-outlined {
  color: #fff;
}

.plan-button {
  min-height: 48px;
  margin-top: auto;
  border: 1px solid rgba(207, 196, 197, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  opacity: 1;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.plan-button:hover:not(:disabled) {
  border-color: rgba(10, 15, 18, 0.28);
  background: #fff;
  transform: translateY(-1px);
}

.plan-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.plan-card.is-current .plan-button {
  border-color: #fff;
  background: #fff;
  color: #0a0f12;
  opacity: 1;
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 42px;
}

.profile-actions .button {
  width: auto;
  min-width: 148px;
  text-decoration: none;
}

#profile-save-state {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@keyframes detail-slide-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes detail-loader-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rule-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes premium-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes ambient-drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(2%, 1.5%, 0) scale(1.04);
  }
}

@keyframes ambient-slide {
  from {
    transform: translateX(-5%);
  }

  to {
    transform: translateX(5%);
  }
}

@media (min-width: 768px) {
  .topbar {
    padding-right: 64px;
    padding-left: 64px;
  }

  .login-panel {
    padding-right: 64px;
    padding-left: 64px;
  }
}

@media (min-width: 1024px) {
  .login-shell {
    grid-template-columns: 1fr 1fr;
  }

  .art-panel {
    display: block;
  }
}

@media (max-width: 520px) {
  .login-panel {
    justify-content: flex-start;
    padding-top: 112px;
    padding-bottom: 116px;
    overflow-y: auto;
  }

  .login-card {
    margin-top: 0;
  }

  .login-card h1 {
    margin-bottom: 28px;
    font-size: 30px;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .typeform-card {
    min-height: 590px;
  }

  .type-step h1 {
    font-size: 26px;
  }

  .tag-entry,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .type-actions {
    flex-direction: column;
  }
}

@media (max-width: 780px) {
  .dashboard-header {
    width: min(calc(100% - 24px), 1180px);
    align-items: flex-start;
    border-radius: 22px;
    flex-direction: column;
    padding: 14px 16px;
  }

  .dashboard-nav {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .dashboard-main {
    padding-top: 64px;
  }

  .dashboard-hero {
    margin-bottom: 56px;
  }

  .dashboard-hero h1 {
    font-size: 30px;
  }

  .resume-flow {
    gap: 22px;
  }

  .flow-card {
    min-height: 760px;
    padding: 22px;
    border-radius: 28px;
  }

  .flow-step {
    inset: 80px 22px 22px;
  }

  .flow-step h2 {
    font-size: 26px;
  }

  .source-choice-grid,
  .flow-step .template-grid {
    grid-template-columns: 1fr;
  }

  .source-choice {
    min-height: 126px;
  }

  .flow-step textarea {
    font-size: 19px;
  }

  .flow-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .flow-button {
    width: 100%;
  }

  .job-prompt-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .job-submit {
    align-self: flex-end;
  }

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

  .editor-page {
    overflow: auto;
  }

  .editor-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .editor-shell {
    height: auto;
    grid-template-columns: 1fr;
  }

  .editor-pane {
    min-height: 70vh;
  }

  .editor-floating-bar {
    grid-template-columns: 1fr;
    border-radius: 28px;
    padding: 12px;
  }

  .editor-live-status,
  .editor-floating-actions {
    justify-content: center;
  }

  .code-pane .CodeMirror {
    height: 64vh;
  }

  .pdf-preview-wrap {
    min-height: 68vh;
  }

  .history-main {
    width: min(calc(100% - 24px), 1180px);
    padding-top: 172px;
  }

  .history-intro h1 {
    font-size: 34px;
  }

  .history-shell,
  .history-shell.has-detail {
    grid-template-columns: 1fr;
  }

  .history-shell.has-detail .history-row small {
    display: block;
  }

  .history-rule-grid {
    grid-template-columns: 1fr;
  }

  .history-actions-row {
    align-items: stretch;
    flex-direction: column;
  }

  .history-action {
    width: 100%;
  }

  .choose-plan-shell {
    width: min(calc(100% - 24px), 1120px);
    min-height: auto;
    padding: 96px 0 44px;
  }

  .choose-plan-grid {
    grid-template-columns: 1fr;
  }

  .profile-main {
    width: min(calc(100% - 24px), 1120px);
    padding-top: 172px;
  }

  .profile-identity input {
    font-size: 28px;
  }

  .profile-stats,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .profile-description-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .plan-heading h1 {
    font-size: 30px;
  }

  .profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-actions .button {
    width: 100%;
  }
}

@media (min-width: 781px) and (max-width: 1040px) {
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Dark product layer */
.dashboard-page,
.history-page,
.profile-page {
  --text: #edf4ff;
  --muted: #9aa9bb;
  --border: rgba(146, 170, 205, 0.22);
  --primary: #f8fbff;
  --surface: rgba(12, 18, 29, 0.78);
  background:
    radial-gradient(circle at 13% 8%, rgba(71, 142, 255, 0.24), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(20, 244, 187, 0.16), transparent 24%),
    radial-gradient(circle at 52% 96%, rgba(205, 77, 255, 0.16), transparent 34%),
    linear-gradient(135deg, #05070d 0%, #0a101a 52%, #06080e 100%);
  color: var(--text);
}

.dashboard-page::before,
.history-page::before,
.profile-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: radial-gradient(circle at center, black 18%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle at center, black 18%, transparent 76%);
}

.dashboard-page::after,
.history-page::after,
.profile-page::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 18%, rgba(88, 163, 255, 0.18), transparent 22%),
    radial-gradient(circle at 82% 34%, rgba(50, 255, 202, 0.12), transparent 20%),
    radial-gradient(circle at 48% 88%, rgba(223, 83, 255, 0.12), transparent 26%);
  filter: blur(34px);
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

.dashboard-header,
.history-header,
.profile-header {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(248, 251, 255, 0.9);
  color: #05070d;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.dashboard-brand,
.dashboard-nav a,
.logout-button {
  color: #05070d;
}

.dashboard-nav a.is-active,
.dashboard-nav a:hover,
.logout-button:hover {
  color: #2458ff;
}

.dashboard-kicker,
.flow-eyebrow,
.template-heading span,
.history-list-top,
.history-row small,
.history-detail-top p:last-child,
.history-rule span,
.history-card-section label,
.history-latex-head,
.profile-identity p,
.profile-stat-card span,
.profile-description-panel p:last-child,
.plan-heading p:last-child,
#profile-save-state {
  color: var(--muted);
}

.flow-step h2,
.template-heading h2,
.history-intro h1,
.history-row strong,
.history-detail-top h2,
.history-rule strong,
.history-empty-state h2,
.profile-identity input,
.profile-stat-card strong,
.profile-description-panel h2,
.plan-heading h1,
.plan-card h2,
.plan-price {
  color: var(--primary);
}

.source-choice,
.flow-step textarea,
.template-card,
.history-list-panel,
.history-row,
.history-rule,
.history-card-section textarea,
.history-latex-panel textarea,
.history-source-link,
.profile-avatar,
.profile-stat-card,
.profile-description-panel,
.profile-description-panel textarea,
.plan-card,
.choose-plan-card {
  border-color: rgba(146, 170, 205, 0.22);
  background: rgba(11, 17, 28, 0.72);
  color: var(--text);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
}

.source-choice,
.template-card,
.history-list-panel,
.history-row,
.profile-stat-card,
.profile-description-panel,
.plan-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.source-choice::before,
.template-card::before,
.history-list-panel::before,
.history-row::before,
.profile-stat-card::before,
.profile-description-panel::before,
.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  background: conic-gradient(from var(--glow-angle, 0deg), #28f7c8, #4ba3ff, #d65bff, #28f7c8);
  opacity: 0;
  transition: opacity 220ms ease;
  animation: neon-border-spin 7s linear infinite;
}

.source-choice::after,
.history-list-panel::after,
.history-row::after,
.profile-stat-card::after,
.profile-description-panel::after,
.plan-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(17, 25, 40, 0.94), rgba(8, 12, 21, 0.9)),
    rgba(9, 13, 22, 0.92);
}

.template-card::before,
.history-list-panel::before,
.profile-description-panel::before,
.plan-card::before {
  opacity: 0.42;
}

.source-choice:hover::before,
.source-choice.is-selected::before,
.template-card:hover::before,
.template-card.is-selected::before,
.history-row:hover::before,
.history-row.is-active::before,
.profile-stat-card:hover::before,
.plan-card:hover::before,
.plan-card.is-current::before {
  opacity: 0.72;
}

.source-choice:hover,
.source-choice.is-selected,
.history-row:hover,
.history-row.is-active,
.profile-stat-card:hover,
.plan-button:hover:not(:disabled) {
  border-color: rgba(75, 163, 255, 0.46);
  transform: translateY(-2px);
}

.source-icon,
.history-row-index,
.history-open-label,
.history-new-link,
.history-empty-state .material-symbols-outlined,
.plan-card.is-current .plan-button,
.job-submit,
.flow-button.primary,
.button.primary {
  background: linear-gradient(135deg, #28f7c8, #4ba3ff 52%, #d65bff);
  color: #03050a;
  box-shadow: 0 12px 34px rgba(75, 163, 255, 0.26);
}

.flow-button.secondary,
.plan-button,
.history-back,
.job-prompt,
.job-input-toolbar select {
  border-color: rgba(146, 170, 205, 0.24);
  background: rgba(12, 18, 29, 0.72);
  color: var(--text);
}

.job-prompt textarea,
.flow-step textarea,
.history-card-section textarea,
.history-latex-panel textarea,
.profile-description-panel textarea {
  color: var(--text);
}

.job-prompt textarea::placeholder,
.flow-step textarea::placeholder,
.profile-description-panel textarea::placeholder {
  color: rgba(154, 169, 187, 0.64);
}

.plan-card.is-current {
  border-color: rgba(75, 163, 255, 0.5);
  background: rgba(8, 12, 21, 0.9);
}

.plan-card.is-current h2,
.plan-card.is-current .plan-price,
.plan-card.is-current .plan-features li {
  color: #f8fbff;
}

@keyframes neon-border-spin {
  to {
    --glow-angle: 360deg;
  }
}

@property --glow-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* Aero dark UI refresh from newuifiles */
.login-page,
.dashboard-page,
.history-page,
.profile-page {
  --aero-bg: #02030a;
  --aero-panel: rgba(12, 18, 31, 0.72);
  --aero-panel-strong: rgba(17, 25, 42, 0.84);
  --aero-border: rgba(255, 255, 255, 0.15);
  --aero-border-strong: rgba(255, 255, 255, 0.28);
  --aero-text: #f7fbff;
  --aero-muted: #a7b4c8;
  --aero-cyan: #36f5c5;
  --aero-blue: #67a4ff;
  --aero-violet: #d75cff;
  --text: var(--aero-text);
  --muted: var(--aero-muted);
  --border: var(--aero-border);
  --primary: var(--aero-text);
  --surface: var(--aero-panel);
  color: var(--aero-text);
  background:
    radial-gradient(circle at 10% 20%, rgba(39, 71, 126, 0.64) 0%, transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(54, 245, 197, 0.16) 0%, transparent 25%),
    radial-gradient(circle at 54% 92%, rgba(215, 92, 255, 0.18) 0%, transparent 32%),
    radial-gradient(circle at 10% 20%, #131b2e 0%, #000 100%);
}

.generate-page {
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

.generate-header {
  position: fixed;
  top: 28px;
  left: 50%;
  z-index: 50;
  display: flex;
  width: min(90%, 1280px);
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 10px 34px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(247, 249, 251, 0.72);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  transform: translateX(-50%);
  backdrop-filter: blur(24px);
}

.generate-brand,
.generate-nav,
.generate-header form {
  display: inline-flex;
  align-items: center;
}

.generate-brand {
  min-width: 190px;
}

.generate-nav {
  flex: 1;
  justify-content: center;
  gap: 42px;
}

.generate-nav a,
.generate-logout {
  border: 0;
  background: transparent;
  color: #191c1e;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.generate-nav a:hover {
  text-decoration: none;
  color: #000;
}

.generate-logout {
  min-height: 38px;
  padding: 0 22px;
  border: 1px solid rgba(118, 119, 125, 0.22);
  border-radius: 999px;
}

.generate-page .dashboard-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 24px;
  padding: 8px 18px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(190, 198, 224, 0.9);
  letter-spacing: 0.08em;
}

.generate-page .generate-copy h1 {
  font-family: var(--display-font);
}

.generate-page .brand-logo {
  width: 118px;
  height: 48px;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at center, black 18%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at center, black 18%, transparent 78%);
}

.login-panel {
  background: transparent;
}

.topbar,
.dashboard-header,
.history-header,
.profile-header {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 50;
  width: min(90%, 1280px);
  min-height: 68px;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 28px;
  border: 1px solid var(--aero-border);
  border-radius: 999px;
  background: rgba(14, 22, 38, 0.68);
  color: var(--aero-text);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(26px);
}

.topbar {
  justify-content: center;
}

.brand,
.dashboard-brand,
.dashboard-nav a,
.logout-button {
  color: var(--aero-text);
}

.dashboard-nav {
  gap: clamp(16px, 4vw, 42px);
}

.dashboard-nav a,
.logout-button {
  color: rgba(247, 251, 255, 0.68);
  letter-spacing: 0.01em;
}

.dashboard-nav a.is-active,
.dashboard-nav a:hover,
.logout-button:hover {
  color: #fff;
}

.dashboard-nav a.is-active {
  text-shadow: 0 0 22px rgba(103, 164, 255, 0.58);
}

.brand-logo,
.dashboard-brand .brand-logo,
.editor-brand .brand-logo {
  width: 116px;
  height: 74px;
  object-fit: contain;
}

.dashboard-main {
  padding-top: 140px;
}

.history-main,
.profile-main {
  padding-top: 150px;
}

.login-card,
.auth-modal-card {
  border: 1px solid var(--aero-border);
  border-radius: 34px;
  background: rgba(9, 14, 25, 0.7);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(32px);
}

.login-card {
  width: min(100%, 460px);
  padding: 34px;
}

.login-card h1,
.auth-modal-card h2 {
  color: #fff;
}

.email-form label,
.check-label,
.signup-copy,
.legal-copy,
.auth-modal-card > p:not(.modal-eyebrow),
.password-reset-state {
  color: var(--aero-muted);
}

.email-form input[type="text"],
.email-form input[type="email"],
.email-form input[type="password"],
.password-reset-step input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: var(--aero-text);
}

.email-form input:focus,
.password-reset-step input:focus {
  border-color: rgba(103, 164, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(103, 164, 255, 0.12);
}

.button-primary,
.flow-button.button-primary,
.job-submit,
.plan-card.is-current .plan-button {
  background: linear-gradient(135deg, var(--aero-cyan), var(--aero-blue) 52%, var(--aero-violet));
  color: #03050a;
  box-shadow: 0 16px 44px rgba(103, 164, 255, 0.26);
}

.button-secondary,
.flow-button.button-secondary,
.plan-button,
.history-new-link {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: var(--aero-text);
}

.resume-flow {
  width: min(100%, 1040px);
}

.flow-copy h1,
.history-intro h1,
.plan-heading h1 {
  color: #fff;
  text-shadow: 0 20px 64px rgba(0, 0, 0, 0.32);
}

.flow-copy h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
}

.flow-copy h1 span {
  color: rgba(247, 251, 255, 0.62);
  font-size: 0.42em;
  font-weight: 700;
}

.flow-card {
  width: min(100%, 900px);
  min-height: 620px;
  padding: 28px;
  border: 1px solid var(--aero-border);
  border-radius: 38px;
  background: rgba(8, 13, 25, 0.58);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(34px);
}

.flow-step {
  inset: 104px 28px 28px;
}

.flow-progress span {
  color: rgba(247, 251, 255, 0.46);
}

.flow-progress span.is-active,
.flow-eyebrow {
  color: var(--aero-cyan);
}

.flow-progress i {
  background: rgba(255, 255, 255, 0.15);
}

.source-choice,
.flow-step textarea,
.template-card,
.history-list-panel,
.history-row,
.profile-stat-card,
.profile-description-panel,
.plan-card {
  border-color: var(--aero-border);
  background: rgba(255, 255, 255, 0.055);
  color: var(--aero-text);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(26px);
}

.source-choice:hover,
.source-choice.is-selected,
.template-card:not(:disabled):hover,
.template-card.is-selected,
.history-row:hover,
.history-row.is-active,
.profile-stat-card:hover,
.plan-button:hover:not(:disabled) {
  border-color: rgba(103, 164, 255, 0.56);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-3px);
}

.source-choice .material-symbols-outlined,
.history-row-index,
.history-open-label,
.history-new-link,
.profile-avatar {
  background: linear-gradient(135deg, var(--aero-cyan), var(--aero-blue) 52%, var(--aero-violet));
  color: #03050a;
}

.flow-step h2,
.template-heading h2,
.template-card span,
.source-choice strong,
.history-row strong,
.profile-stat-card strong,
.profile-description-panel h2,
.plan-card h2,
.plan-price,
.profile-identity input {
  color: #fff;
}

.flow-step > p:not(.flow-eyebrow),
.template-lock-copy,
.source-choice small,
.template-heading span,
.history-intro p,
.history-row small,
.profile-stat-card span,
.profile-description-panel p:last-child,
.plan-subtitle,
.plan-price span,
.plan-features li {
  color: var(--aero-muted);
}

.flow-step textarea {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--aero-text);
  font-size: 21px;
}

.flow-step textarea:focus {
  border-color: rgba(103, 164, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(103, 164, 255, 0.12);
}

.job-settings-bar {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.model-setting {
  display: inline-flex;
  flex: 1 1 340px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--aero-muted);
}

.model-setting > .material-symbols-outlined {
  color: var(--aero-cyan);
  font-size: 21px;
}

.model-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.model-toggle button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(247, 251, 255, 0.7);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.model-toggle button.is-selected {
  background: #fff;
  color: #05070d;
}

.model-toggle button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.model-setting small {
  min-width: 180px;
  color: var(--aero-muted);
  font-size: 12px;
  font-weight: 800;
}

.flow-step .template-grid {
  gap: 20px;
}

.template-card {
  min-height: 360px;
  padding: 12px;
}

.template-card::after {
  display: none;
}

.template-card img {
  min-height: 300px;
  border-radius: 18px;
  object-fit: cover;
  object-position: top center;
}

.template-card span {
  position: static;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.history-list-panel,
.profile-description-panel,
.plan-card {
  border-radius: 34px;
}

.history-row {
  min-height: 98px;
}

.profile-avatar {
  border: 0;
  box-shadow: 0 18px 50px rgba(103, 164, 255, 0.25);
}

.profile-description-panel textarea {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.26);
  color: var(--aero-text);
}

.plan-card.is-current {
  border-color: rgba(103, 164, 255, 0.56);
  background:
    radial-gradient(circle at 90% 8%, rgba(54, 245, 197, 0.16), transparent 24%),
    rgba(9, 14, 25, 0.86);
}

@media (max-width: 780px) {
  .topbar,
  .dashboard-header,
  .history-header,
  .profile-header {
    top: 12px;
    width: calc(100% - 24px);
    min-height: auto;
    padding: 8px 12px;
    border-radius: 26px;
  }

  .dashboard-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand-logo,
  .dashboard-brand .brand-logo,
  .editor-brand .brand-logo {
    width: 98px;
    height: 58px;
  }

  .dashboard-main,
  .history-main,
  .profile-main {
    padding-top: 150px;
  }

  .login-card {
    padding: 26px;
  }

  .flow-card {
    min-height: 720px;
    padding: 20px;
  }

  .flow-step {
    inset: 96px 20px 20px;
  }

  .source-choice-grid,
  .flow-step .template-grid,
  .profile-stats,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .job-settings-bar {
    border-radius: 28px;
  }

  .model-setting {
    justify-content: flex-start;
  }
}

/* Exact Aether/Stitch redesign layer */
.login-page,
.dashboard-page,
.history-page,
.profile-page {
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --background: #f7f9fb;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-low: #f2f4f6;
  --surface-high: #e6e8ea;
  --text: #191c1e;
  --muted: #45464d;
  --border: rgba(255, 255, 255, 0.8);
  --primary: #000000;
  --on-primary: #ffffff;
  --aether-blue: #d0e1fb;
  --aether-lilac: #dae2fd;
  color: var(--text);
  background-color: #f7f9fb;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(208, 225, 251, 0.42), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(218, 226, 253, 0.42), transparent 25%);
  background-attachment: fixed;
}

.dashboard-page::before,
.dashboard-page::after,
.history-page::before,
.history-page::after,
.profile-page::before,
.profile-page::after,
.login-page::before {
  display: none;
}

.dashboard-grid-bg {
  background:
    radial-gradient(circle at 20% 16%, rgba(208, 225, 251, 0.32), transparent 24%),
    radial-gradient(circle at 80% 36%, rgba(218, 226, 253, 0.3), transparent 26%);
  filter: blur(60px);
  opacity: 0.7;
}

.topbar,
.dashboard-header,
.history-header,
.profile-header {
  top: 32px;
  width: calc(100% - 96px);
  max-width: 1440px;
  min-height: 78px;
  padding: 16px 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(247, 249, 251, 0.72);
  color: #000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.035);
  backdrop-filter: blur(24px);
}

.source-choice::before,
.source-choice::after,
.template-card::before,
.template-card::after,
.history-list-panel::before,
.history-list-panel::after,
.history-row::before,
.history-row::after,
.profile-stat-card::before,
.profile-stat-card::after,
.profile-description-panel::before,
.profile-description-panel::after,
.plan-card::before,
.plan-card::after {
  display: none;
}

.topbar {
  justify-content: flex-start;
}

.dashboard-brand {
  min-width: 180px;
}

.brand-logo,
.dashboard-brand .brand-logo,
.editor-brand .brand-logo {
  width: 118px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.brand,
.dashboard-brand,
.dashboard-nav a,
.logout-button {
  color: #000;
}

.dashboard-nav {
  flex: 1;
  justify-content: center;
  gap: 44px;
}

.dashboard-nav a,
.logout-button {
  color: #191c1e;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-nav a.is-active {
  color: #000;
  font-weight: 800;
  text-shadow: none;
  border-bottom: 3px solid #000;
  padding-bottom: 6px;
}

.dashboard-header form {
  min-width: 180px;
  justify-content: flex-end;
}

.logout-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(118, 119, 125, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.logout-button:hover {
  color: #000;
  background: #fff;
}

.dashboard-main {
  min-height: 100vh;
  padding: 220px 24px 92px;
}

.resume-flow {
  width: min(100%, 1128px);
  gap: 70px;
}

.flow-copy h1,
.history-intro h1,
.profile-identity input,
.plan-heading h1 {
  font-family: var(--display-font);
  color: #000;
  text-shadow: none;
}

.flow-copy h1 {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.flow-copy h1 span {
  display: block;
  margin-top: 10px;
  color: #191c1e;
  font-size: 0.34em;
  font-weight: 600;
  letter-spacing: 0;
}

.flow-card {
  width: min(100%, 1128px);
  min-height: 560px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.flow-progress {
  display: none;
}

.flow-step {
  inset: 0;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  gap: 22px;
}

.flow-eyebrow,
.dashboard-kicker {
  display: none;
}

.flow-step h2,
.template-heading h2 {
  font-family: var(--display-font);
  color: #000;
  font-size: 32px;
  font-weight: 700;
}

.flow-step > p:not(.flow-eyebrow),
.template-lock-copy,
.source-choice small,
.template-heading span,
.history-intro p,
.history-row small,
.profile-stat-card span,
.profile-description-panel p:last-child,
.plan-subtitle,
.plan-price span,
.plan-features li {
  color: #45464d;
}

.source-choice-grid {
  width: min(100%, 760px);
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-choice,
.flow-step textarea,
.template-card,
.history-list-panel,
.history-row,
.profile-stat-card,
.profile-description-panel,
.plan-card,
.login-card,
.auth-modal-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.7);
  color: #191c1e;
  box-shadow:
    0 4px 24px -1px rgba(0, 0, 0, 0.03),
    inset 1px 1px 0 rgba(255, 255, 255, 0.9),
    inset -1px -1px 0 rgba(0, 0, 0, 0.035);
  backdrop-filter: blur(24px);
}

.source-choice {
  min-height: 176px;
  border-radius: 24px;
  text-align: left;
}

.source-choice:hover,
.source-choice.is-selected,
.template-card:not(:disabled):hover,
.template-card.is-selected,
.history-row:hover,
.history-row.is-active,
.profile-stat-card:hover,
.plan-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-2px) scale(1.01);
}

.source-choice .material-symbols-outlined,
.history-open-label,
.history-new-link,
.profile-avatar {
  background: #000;
  color: #fff;
}

.source-choice strong,
.template-card span,
.history-row strong,
.profile-stat-card strong,
.profile-description-panel h2,
.plan-card h2,
.plan-price {
  color: #000;
}

.flow-step textarea {
  width: min(100%, 1128px);
  min-height: 90px;
  padding: 26px 86px 26px 82px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #191c1e;
  font-size: 20px;
  box-shadow: 0 30px 80px rgba(80, 95, 118, 0.12);
  resize: none;
}

.flow-step textarea:focus {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 30px 80px rgba(80, 95, 118, 0.14), 0 0 0 4px rgba(208, 225, 251, 0.55);
}

.flow-actions {
  justify-content: center;
}

.job-settings-bar {
  width: min(100%, 900px);
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 16px 52px rgba(80, 95, 118, 0.1);
}

.model-setting {
  color: #45464d;
}

.model-setting > .material-symbols-outlined {
  color: #000;
}

.model-toggle {
  border-color: rgba(118, 119, 125, 0.18);
  background: rgba(242, 244, 246, 0.8);
}

.model-toggle button {
  color: #45464d;
}

.model-toggle button.is-selected {
  background: #000;
  color: #fff;
}

.model-setting small {
  color: #45464d;
}

.button-primary,
.flow-button.button-primary,
.job-submit,
.plan-card.is-current .plan-button {
  background: #000;
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.button-secondary,
.flow-button.button-secondary,
.plan-button,
.history-new-link {
  border-color: rgba(118, 119, 125, 0.24);
  background: rgba(255, 255, 255, 0.72);
  color: #000;
}

.template-heading {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.flow-step .template-grid {
  width: min(100%, 1128px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-card {
  min-height: 348px;
  padding: 30px;
  border-radius: 24px;
}

.template-card img {
  min-height: 205px;
  border-radius: 14px;
}

.template-card.is-selected {
  outline: 3px solid rgba(0, 0, 0, 0.12);
}

.history-main {
  width: min(calc(100% - 32px), 1180px);
  padding-top: 172px;
}

.history-intro {
  max-width: 820px;
  margin-bottom: 84px;
}

.history-intro h1 {
  margin: 0 0 22px;
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

.history-intro p {
  font-size: 20px;
}

.history-shell,
.history-list-panel {
  display: block;
  min-height: auto;
}

.history-list-panel {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.history-list-top {
  margin-bottom: 26px;
}

.history-list {
  position: relative;
  display: grid;
  gap: 54px;
  padding-left: 108px;
}

.history-list::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 28px;
  width: 1px;
  background: rgba(118, 119, 125, 0.22);
}

.history-row {
  position: relative;
  min-height: 154px;
  grid-template-columns: 0 minmax(180px, 240px) minmax(0, 1fr) auto;
  gap: 30px;
  padding: 24px 32px;
  border-radius: 18px;
}

.history-row-index {
  position: absolute;
  top: 34px;
  left: -86px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  background: #d3e4fe;
  color: transparent;
  font-size: 0;
  box-shadow: 0 0 0 1px rgba(198, 198, 205, 0.7);
}

.history-thumb {
  display: grid;
  width: 220px;
  height: 118px;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(208, 225, 251, 0.95), rgba(224, 227, 229, 0.72)),
    #e0e3e5;
  overflow: hidden;
}

.history-thumb .material-symbols-outlined {
  color: rgba(25, 28, 30, 0.46);
  font-size: 40px;
}

.history-row-copy {
  min-width: 0;
  align-self: center;
}

.history-row strong {
  font-family: var(--display-font);
  font-size: 21px;
  font-weight: 800;
}

.history-row small {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.history-open-label {
  align-self: start;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f2f4f6;
  color: #45464d;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-main {
  width: min(calc(100% - 32px), 1040px);
  padding-top: 180px;
}

.profile-hero {
  margin-bottom: 46px;
}

.profile-avatar {
  width: 116px;
  height: 116px;
  border: 4px solid #fff;
  background: #131b2e;
  color: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.profile-identity input {
  font-size: clamp(42px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.profile-identity p {
  color: #45464d;
}

.profile-description-panel {
  width: min(100%, 760px);
  margin: -20px auto 58px;
  padding: 22px;
  border-radius: 24px;
}

.profile-description-panel textarea {
  border-color: rgba(118, 119, 125, 0.14);
  background: rgba(247, 249, 251, 0.72);
  color: #191c1e;
}

.profile-stats {
  gap: 24px;
  margin-bottom: 74px;
}

.profile-stat-card {
  min-height: 214px;
  place-items: stretch;
  align-content: space-between;
  padding: 24px;
  border-radius: 16px;
  text-align: left;
}

.profile-stat-card span {
  color: #38485d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-stat-card strong {
  font-family: var(--display-font);
  font-size: 50px;
  font-weight: 700;
  line-height: 1;
}

.plan-heading {
  margin-bottom: 44px;
}

.plan-heading h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.plans-grid {
  align-items: end;
  gap: 28px;
}

.plan-card {
  min-height: 420px;
  padding: 32px;
  border-radius: 18px;
}

.plan-card.is-current {
  transform: scale(1.05);
  border-color: rgba(19, 27, 46, 0.12);
  background: #131b2e;
  color: #fff;
  box-shadow: 0 28px 80px rgba(19, 27, 46, 0.24);
}

.plan-card.is-current::before {
  opacity: 0;
}

.plan-card.is-current .plan-badge {
  background: #dae2fd;
  color: #131b2e;
}

.plan-card.is-current .plan-button {
  background: #fff;
  color: #000;
}

.profile-actions {
  margin-top: 60px;
}

.login-page {
  background:
    radial-gradient(circle at 15% 50%, rgba(208, 225, 251, 0.42), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(218, 226, 253, 0.42), transparent 25%),
    #f7f9fb;
}

.login-panel {
  background: transparent;
}

.login-card {
  padding: 42px;
  border-radius: 28px;
}

.login-card h1,
.auth-modal-card h2 {
  color: #000;
  font-family: var(--display-font);
}

.email-form label,
.check-label,
.signup-copy,
.legal-copy,
.auth-modal-card > p:not(.modal-eyebrow),
.password-reset-state {
  color: #45464d;
}

.email-form input[type="text"],
.email-form input[type="email"],
.email-form input[type="password"],
.password-reset-step input {
  border-color: rgba(118, 119, 125, 0.2);
  background: rgba(247, 249, 251, 0.72);
  color: #191c1e;
}

.email-form input:focus,
.password-reset-step input:focus {
  border-color: rgba(0, 0, 0, 0.32);
  box-shadow: 0 0 0 4px rgba(208, 225, 251, 0.55);
}

@media (max-width: 900px) {
  .topbar,
  .dashboard-header,
  .history-header,
  .profile-header {
    top: 16px;
    width: calc(100% - 32px);
    min-height: auto;
    padding: 14px 18px;
  }

  .dashboard-header {
    gap: 14px;
  }

  .dashboard-brand,
  .dashboard-header form {
    min-width: auto;
  }

  .dashboard-nav {
    order: 3;
    flex-basis: 100%;
    gap: 20px;
  }

  .dashboard-main,
  .history-main,
  .profile-main {
    padding-top: 180px;
  }

  .flow-card {
    min-height: 720px;
  }

  .source-choice-grid,
  .flow-step .template-grid,
  .profile-stats,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .history-list {
    padding-left: 34px;
  }

  .history-list::before {
    left: 6px;
  }

  .history-row {
    grid-template-columns: 1fr;
  }

  .history-row-index {
    left: -34px;
  }

  .history-thumb {
    width: 100%;
  }

  .plan-card.is-current {
    transform: none;
  }
}

/* Compact white flow polish */
.login-page,
.dashboard-page,
.history-page,
.profile-page {
  background-color: #fff;
  background-image:
    radial-gradient(circle at 18% 42%, rgba(208, 225, 251, 0.28), transparent 24%),
    radial-gradient(circle at 82% 22%, rgba(218, 226, 253, 0.24), transparent 24%);
}

.dashboard-page.is-ready .dashboard-header,
.history-page.is-ready .history-header,
.profile-page.is-ready .profile-header,
.login-page .topbar {
  animation: none !important;
  opacity: 1 !important;
}

.topbar,
.dashboard-header,
.history-header,
.profile-header {
  left: 0 !important;
  right: 0 !important;
  width: min(calc(100% - 96px), 1180px) !important;
  min-height: 72px;
  margin: 0 auto !important;
  padding: 13px 34px;
  transform: none !important;
}

.dashboard-brand {
  min-width: 150px;
}

.dashboard-header form {
  min-width: 150px;
  margin-left: auto;
}

.dashboard-nav {
  position: absolute;
  left: 50%;
  flex: none;
  width: auto;
  transform: translateX(-50%);
}

.dashboard-main {
  padding-top: 156px;
  padding-bottom: 68px;
}

.resume-flow {
  width: min(100%, 920px);
  gap: 34px;
}

.flow-copy h1 {
  max-width: 730px;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.06;
}

.flow-copy h1 span {
  margin-top: 8px;
  font-size: 0.34em;
}

.flow-card {
  width: min(100%, 920px);
  min-height: 430px;
}

.flow-step {
  gap: 16px;
}

.flow-step h2,
.template-heading h2 {
  font-size: clamp(25px, 2.6vw, 34px);
}

.flow-step > p:not(.flow-eyebrow) {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  font-size: 15px;
}

.source-choice-grid {
  width: min(100%, 650px);
  gap: 14px;
  margin-top: 8px;
}

.source-choice {
  min-height: 132px;
  padding: 22px;
  border-radius: 22px;
}

.source-choice .material-symbols-outlined {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 24px;
}

.flow-step[data-step="1"] {
  max-width: 760px;
  margin: 0 auto;
}

.flow-step[data-step="1"] textarea {
  width: min(100%, 720px);
  min-height: 170px;
  padding: 20px 22px;
  border-radius: 24px;
  font-size: 16px;
  line-height: 1.55;
  resize: vertical;
}

.job-settings-bar {
  width: min(100%, 720px);
  margin-top: 2px;
  padding: 10px;
  border-radius: 24px;
  justify-content: space-between;
}

.model-setting {
  display: none !important;
}

.flow-button {
  min-width: 124px;
  min-height: 48px;
}

.flow-step[data-step="2"] {
  overflow: visible;
}

.flow-step .template-grid {
  width: min(100%, 820px);
  gap: 14px;
}

.template-card {
  display: grid;
  min-height: 0;
  height: 286px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
}

.template-card img {
  width: 100%;
  height: 220px;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
}

.template-card span {
  margin: 0;
}

.generate-page {
  min-height: 100vh;
  overflow: auto;
  background:
    radial-gradient(circle at 20% 36%, rgba(208, 225, 251, 0.28), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(218, 226, 253, 0.22), transparent 24%),
    #fff;
  color: #111;
}

.generate-page .dashboard-grid-bg {
  opacity: 0.25;
}

.generate-header {
  display: none;
}

.generate-shell {
  min-height: 100vh;
  width: min(calc(100% - 40px), 960px);
  grid-template-columns: minmax(0, 520px) minmax(260px, 360px);
  gap: clamp(28px, 5vw, 48px);
  padding: 64px 0;
}

.generate-copy {
  padding: 30px;
  border: 1px solid rgba(118, 119, 125, 0.13);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 28px 80px rgba(80, 95, 118, 0.1);
  backdrop-filter: blur(20px);
}

.generate-page .dashboard-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  border-color: rgba(118, 119, 125, 0.16);
  background: #f5f7fa;
  color: #4d535d;
}

.generate-copy h1,
.generate-page .generate-copy h1 {
  max-width: 420px;
  color: #000;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.98;
  text-shadow: none;
}

.generate-copy p {
  color: #45464d;
  font-size: 16px;
}

#generate-percent {
  margin-top: 20px;
  color: #000;
  font-size: clamp(58px, 10vw, 104px);
  text-shadow: none;
}

.generate-track {
  width: min(100%, 460px);
  height: 8px;
  margin-top: 20px;
  border: 0;
  background: #e8edf4;
}

.generate-track span {
  background: #000;
  box-shadow: none;
  transition: width 140ms linear;
}

.generate-steps {
  width: min(100%, 520px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.generate-steps li {
  min-height: 38px;
  border: 0;
  background: #f1f4f8;
  color: #616771;
}

.generate-steps li.is-active {
  background: #000;
  color: #fff;
}

.skeleton-sheet {
  width: min(100%, 340px);
  min-height: 460px;
  padding: 30px;
  border: 1px solid rgba(118, 119, 125, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 80px rgba(80, 95, 118, 0.14);
}

.sk-line,
.sk-rule {
  background: linear-gradient(90deg, #e8edf4, #f7f9fb, #e8edf4);
  background-size: 220% 100%;
}

@media (max-width: 900px) {
  .topbar,
  .dashboard-header,
  .history-header,
  .profile-header {
    width: calc(100% - 32px) !important;
  }

  .dashboard-nav {
    position: static;
    order: 3;
    flex: 1 1 100%;
    transform: none;
  }

  .dashboard-main {
    padding-top: 170px;
  }

  .flow-card {
    min-height: 620px;
  }

  .flow-step .template-grid {
    width: min(100%, 360px);
  }

  .template-card {
    height: auto;
    min-height: 0;
  }

  .generate-shell {
    grid-template-columns: 1fr;
    padding: 40px 0 96px;
  }
}

/* Clean history list polish */
.history-main {
  width: min(calc(100% - 40px), 1080px);
  padding-top: 154px;
  padding-bottom: 80px;
}

.history-intro {
  max-width: 760px;
  margin: 0 auto 54px;
  text-align: center;
}

.history-intro h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 4.8vw, 62px);
  letter-spacing: -0.035em;
}

.history-intro p {
  font-size: 18px;
  color: #4b515a;
}

.history-list-panel {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid rgba(118, 119, 125, 0.12);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 28px 90px rgba(80, 95, 118, 0.1);
  backdrop-filter: blur(22px);
}

.history-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0 4px 16px;
  border-bottom: 1px solid rgba(118, 119, 125, 0.1);
}

#history-count {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f5f7fa;
  color: #343942;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.history-new-link {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.history-new-link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.history-list {
  display: grid;
  gap: 12px;
  padding: 0;
}

.history-list::before {
  display: none;
}

.history-thumb {
  display: none !important;
}

.history-row {
  position: relative;
  display: grid;
  min-height: auto;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(118, 119, 125, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 251, 0.86));
  color: #111;
  box-shadow: none;
  text-align: left;
  backdrop-filter: none;
}

.history-row::before,
.history-row::after {
  display: none !important;
}

.history-row:hover,
.history-row.is-active {
  border-color: rgba(0, 0, 0, 0.16);
  background: #fff;
  box-shadow: 0 18px 44px rgba(80, 95, 118, 0.13);
  transform: translateY(-2px);
}

.history-row-index {
  position: static;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(118, 119, 125, 0.12);
  border-radius: 14px;
  background: #f0f5ff;
  color: #111;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.history-row-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
  align-self: center;
}

.history-row strong {
  max-width: 100%;
  color: #000;
  font-family: var(--display-font);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.history-row small {
  margin: 0;
  color: #5a6069;
  font-size: 14px;
  line-height: 1.35;
}

.history-open-label {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: #f2f4f6;
  color: #111;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-row:hover .history-open-label,
.history-row.is-active .history-open-label {
  background: #000;
  color: #fff;
}

.history-loading {
  border: 1px dashed rgba(118, 119, 125, 0.18);
  border-radius: 22px;
  background: rgba(247, 249, 251, 0.78);
}

@media (max-width: 760px) {
  .history-main {
    width: min(calc(100% - 28px), 1080px);
    padding-top: 170px;
  }

  .history-list-panel {
    padding: 14px;
    border-radius: 24px;
  }

  .history-list-top {
    align-items: stretch;
    flex-direction: column;
  }

  .history-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .history-open-label {
    grid-column: 1 / -1;
    width: 100%;
  }
}
