/* Crucible — forge & ember design system */

:root {
  color-scheme: dark;

  --void: #070605;
  --coal: #0f0d0b;
  --iron: #171412;
  --steel: #211e1b;
  --rim: #342f2a;
  --rim-bright: #4a433c;

  --ember-deep: #9a3412;
  --ember: #c2410c;
  --flame: #ea580c;
  --heat: #f97316;
  --molten: #f59e0b;
  --gold: #fbbf24;

  --text: #fafaf9;
  --text-soft: #e7e5e4;
  --text-muted: #c4bfba;
  --text-dim: #8a837c;

  --font-display: "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-heat: 0 0 80px rgba(234, 88, 12, 0.12);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px rgba(0, 0, 0, 0.35);

  --focus-ring: 0 0 0 2px var(--void), 0 0 0 4px var(--gold);
  --transition: 220ms ease;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--void);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(234, 88, 12, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 30% at 85% 20%, rgba(245, 158, 11, 0.08), transparent 50%),
    linear-gradient(180deg, var(--coal) 0%, var(--void) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

a {
  color: var(--molten);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--flame);
  color: var(--void);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

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

.muted.is-error {
  color: #fca5a5;
}

.small {
  font-size: 0.875rem;
}

/* ——— Typography ——— */

h1,
h2,
h3,
h4,
.logo,
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0.75rem 0 1.25rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

h4 {
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.25rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--iron);
  border: 1px solid var(--rim);
  color: var(--gold);
}

/* ——— Layout ——— */

.site-header {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.nav.bar {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--rim);
  background: rgba(7, 6, 5, 0.94);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  isolation: isolate;
  overflow: hidden;
}

.nav.bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/static/header-hero.svg") center / cover no-repeat;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.nav.bar > * {
  position: relative;
  z-index: 1;
}

html.page-hold body > .skip-link,
html.page-hold body > header,
html.page-hold body > main,
html.page-hold body > footer,
html.page-hold body > .site-footer {
  opacity: 0;
  visibility: hidden;
}

.reveal-item {
  animation: reveal-down 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes reveal-down {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-enter {
  animation: none;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: normal;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  background: var(--steel);
  color: var(--text);
}

button.nav-link {
  appearance: none;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.user-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8.25rem;
  height: 3.15rem;
  margin-left: 0.35rem;
  padding: 2px;
  border-radius: 15px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  background-color: rgba(249, 115, 22, 0.22);
  background-image: linear-gradient(
    to bottom right,
    #f97316 0%,
    rgba(249, 115, 22, 0) 32%
  );
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.18);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.user-profile:hover,
.user-profile:focus-visible {
  background-color: rgba(249, 115, 22, 0.72);
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.55), 0 0 0 1px rgba(251, 191, 36, 0.35);
  outline: none;
  color: #fff;
}

.user-profile[aria-current="page"] {
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.45);
}

.user-profile-inner {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  background-color: #14110f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-profile-inner svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: #fff;
  flex-shrink: 0;
}

.user-profile-inner p {
  margin: 0;
}

.nav-link--dim {
  color: var(--text-dim);
}

.hero {
  padding: 2rem 1.5rem 5rem;
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--heat);
  margin: 0;
}

.lead {
  color: var(--text-muted);
  font-size: 1.1875rem;
  line-height: 1.65;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

/* ——— Pricing ——— */

.price-card {
  display: inline-grid;
  gap: 0.5rem;
  margin: 2rem 0 1.75rem;
  padding: 1.5rem 1.75rem;
  text-align: left;
  border: 1px solid var(--rim);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(33, 30, 27, 0.95), rgba(23, 20, 18, 0.98));
  box-shadow: var(--shadow-card), var(--shadow-heat);
}

.price-region-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.price-region {
  margin-bottom: 0.25rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rim);
  background: rgba(12, 10, 9, 0.8);
  color: var(--text);
  font: inherit;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}

.price-unit {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.price-note {
  font-size: 0.875rem;
  color: var(--text-dim);
  padding-top: 0.25rem;
  border-top: 1px solid var(--rim);
  margin-top: 0.25rem;
}

/* ——— Buttons ——— */

[hidden] {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--rim-bright);
  border-radius: var(--radius-md);
  background: var(--steel);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--rim);
  border-color: var(--rim-bright);
  color: var(--text);
}

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

.btn:disabled,
.btn.btn-disabled,
.btn.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn.is-loading {
  pointer-events: none;
}

.btn.primary {
  border: none;
  background: linear-gradient(135deg, var(--ember) 0%, var(--heat) 45%, var(--molten) 100%);
  color: var(--void);
  font-family: var(--font-display);
  font-weight: 600;
  box-shadow: 0 4px 24px rgba(234, 88, 12, 0.35), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--flame) 0%, var(--heat) 50%, var(--gold) 100%);
  color: var(--void);
  box-shadow: 0 6px 32px rgba(249, 115, 22, 0.45), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.google-btn {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
  font-weight: 500;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem 0 0.85rem;
  box-shadow: none;
}

.google-btn:hover {
  background: #f8f9fa;
  color: #1f1f1f;
  border-color: #747775;
}

.google-g {
  display: block;
  flex-shrink: 0;
}

.login-google {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-google .btn {
  width: 100%;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 26rem);
  margin: 2.5rem auto 4rem;
  padding: 0.4em 2em 1.6em;
  background-color: #14110f;
  border-radius: 25px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4) inset,
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(249, 115, 22, 0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.login-card:hover,
.login-card:focus-within {
  transform: scale(1.02);
  border-color: rgba(249, 115, 22, 0.7);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.25),
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 0 36px rgba(249, 115, 22, 0.38);
}

#heading {
  text-align: center;
  margin: 1.6em 0 0.2em;
  color: #fff;
  font-size: 1.35rem;
  font-family: var(--font-display);
}

.login-card-status {
  text-align: center;
  margin: 0 0 0.6em;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-or {
  text-align: center;
  margin: 0.35em 0 0.15em;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  border-radius: 25px;
  padding: 0.7em 0.9em;
  border: 1px solid rgba(249, 115, 22, 0.12);
  outline: none;
  color: white;
  background-color: #171412;
  box-shadow: inset 2px 5px 12px rgb(5, 5, 5), 0 0 12px rgba(249, 115, 22, 0.08);
}

.field:focus-within {
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: inset 2px 5px 12px rgb(5, 5, 5), 0 0 16px rgba(249, 115, 22, 0.35);
}

.input-icon {
  height: 1.3em;
  width: 1.3em;
  flex-shrink: 0;
  fill: #f97316;
}

.input-field {
  background: none;
  border: none;
  outline: none;
  width: 100%;
  color: #e7e5e4;
  font: inherit;
}

.input-field::placeholder {
  color: #8a837c;
}

.login-card-btns {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  margin-top: 1.6em;
}

.login-btn {
  padding: 0.55em 1.25em;
  border-radius: 6px;
  border: none;
  outline: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  background-color: #252019;
  color: white;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
}

.login-btn:hover,
.login-btn:focus-visible {
  background-color: #0b0a09;
  color: #fff;
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.35);
}

.login-btn-primary {
  background: linear-gradient(135deg, #c2410c 0%, #f97316 55%, #fbbf24 100%);
  color: #1c1008;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.4);
}

.login-btn-primary:hover,
.login-btn-primary:focus-visible {
  background: linear-gradient(135deg, #ea580c 0%, #fbbf24 100%);
  color: #1c1008;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.5);
}

.login-card.no-google .login-google,
.login-card.no-google .login-or {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .login-card:hover,
  .login-card:focus-within {
    transform: none;
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ——— Features ——— */

.features {
  padding: 0 1.5rem 5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}

.card {
  position: relative;
  background: linear-gradient(160deg, var(--iron) 0%, var(--coal) 100%);
  border: 1px solid var(--rim);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--molten), var(--ember-deep));
  border-radius: 3px 0 0 3px;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(234, 88, 12, 0.12);
  color: var(--heat);
}

.card-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ——— App pages ——— */

.app {
  background: var(--void);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.container--wide {
  max-width: 960px;
}

.page-title {
  margin-bottom: 1.5rem;
}

.panel {
  background: linear-gradient(160deg, var(--iron) 0%, var(--coal) 100%);
  border: 1px solid var(--rim);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.admin-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rim);
}

.admin-row:last-child {
  border-bottom: 0;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--steel);
  border: 1px solid var(--rim);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gold);
}

/* ——— Forms ——— */

label {
  display: block;
  margin: 1rem 0 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
}

label:first-child {
  margin-top: 0;
}

label.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  font-weight: 400;
  color: var(--text-soft);
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rim);
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input::placeholder {
  color: var(--text-dim);
}

input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--flame);
  cursor: pointer;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--rim-bright);
}

/* ——— Status & chips ——— */

.chip {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.25);
  color: var(--heat);
  margin: 0 0.35rem 0.35rem 0;
  font-size: 0.8125rem;
  font-weight: 700;
}

.status-active {
  color: #86efac;
  font-weight: 700;
}

.status-provisioning {
  color: var(--gold);
  font-weight: 700;
}

.status-sleeping,
.status-stopped {
  color: var(--text-dim);
  font-weight: 700;
}

.connect-host {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 1.0625rem;
  color: var(--gold);
  word-break: break-all;
}

.connect-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.connect-row .stat-label {
  display: block;
  margin-bottom: 0.35rem;
}

.code-block {
  background: var(--void);
  border: 1px solid var(--rim);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow: auto;
  margin-top: 1rem;
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(234, 88, 12, 0.1);
  border: 1px solid rgba(234, 88, 12, 0.2);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.message:empty {
  display: none;
}

.message.is-error {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

/* ——— Toast ——— */

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  max-width: 24rem;
  margin-left: auto;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: var(--iron);
  border: 1px solid var(--rim);
  color: var(--text-soft);
  font-size: 0.9375rem;
  box-shadow: var(--shadow-card);
  z-index: 200;
}

.toast[hidden] {
  display: none;
}

.toast-success {
  border-color: rgba(134, 239, 172, 0.35);
  background: linear-gradient(160deg, rgba(22, 40, 28, 0.98), var(--iron));
}

.toast-error {
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(160deg, rgba(40, 22, 22, 0.98), var(--iron));
}

.toast-info {
  border-color: rgba(249, 115, 22, 0.35);
}

/* ——— Footer ——— */

.site-footer {
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--rim);
  text-align: center;
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* ——— Loading ——— */

.loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.loading::before {
  content: "";
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--rim);
  border-top-color: var(--flame);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .loading::before {
    animation: none;
    border-top-color: var(--flame);
  }
}

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

.wizard-stage {
  position: relative;
}

.wizard-panel:not(.is-current) {
  display: none !important;
}

.wizard-panel.is-enter {
  animation: wizard-in 260ms ease;
}

@keyframes wizard-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-panel.is-enter {
    animation: none;
  }
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .size-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

.size-card {
  appearance: none;
  text-align: left;
  border: 1px solid var(--rim);
  background: var(--void);
  color: var(--text-soft);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.8rem;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.size-card:hover:not(:disabled) {
  border-color: var(--rim-bright);
  transform: translateY(-1px);
}

.size-card.is-selected {
  border-color: var(--heat);
  background: rgba(234, 88, 12, 0.14);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.25);
}

.size-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.size-card:disabled .size-card-fit {
  color: var(--text-muted);
}

.size-card-ram {
  display: block;
  font-weight: 800;
  color: var(--text);
}

.size-card-price {
  display: block;
  margin-top: 0.2rem;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.875rem;
}

.size-card-fit {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.price-estimate {
  margin: 0.85rem 0 0;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

.recommend-card {
  margin: 1.1rem 0 1.35rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--rim);
  background: rgba(249, 115, 22, 0.06);
}

.recommend-card h3,
.scale-subhead {
  margin: 1.1rem 0 0.35rem;
  font-size: 1rem;
}

.recommend-card h3 {
  margin-top: 0;
}

.scale-split,
.scale-stack {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.dash-section summary {
  cursor: pointer;
  list-style: none;
}

.dash-section summary h2 {
  display: inline;
  margin: 0;
}

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

.catalog-list {
  gap: 0.65rem;
}

.settings-grid {
  display: grid;
  gap: 0.85rem 1.25rem;
  grid-template-columns: 1fr;
  margin: 1rem 0 1.25rem;
}

.settings-grid .span-2 {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.field-inline label {
  margin: 0;
  flex: 0 0 auto;
}

.field-inline select {
  flex: 1;
}

.recommend-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .recommend-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.scale-group-split {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@media (min-width: 640px) {
  .scale-group-split {
    grid-template-columns: 1fr 1fr;
  }
}

.scale-group {
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid var(--rim);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.scale-group .scale-subhead {
  margin-top: 0;
}

.slider-row {
  margin-top: 0.85rem;
}

.slider-row:first-child {
  margin-top: 0;
}

.slider-row label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
}

.slider-value {
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

.slider-row > p {
  margin: 0.4rem 0 0;
}

.wizard-rail {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.wizard-dot {
  cursor: pointer;
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--rim);
  background: var(--iron);
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 700;
}

.wizard-dot.is-active {
  border-color: var(--heat);
  color: var(--gold);
  background: rgba(234, 88, 12, 0.12);
  transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}

.wizard-dot.is-done {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.35);
}

.confirm-list {
  margin: 0;
}

.confirm-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rim);
}

.confirm-list dt {
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.confirm-list dd {
  margin: 0;
  color: var(--text);
}

.chip-fieldset {
  border: 0;
  padding: 0;
  margin: 1rem 0 0;
}

.chip-fieldset legend {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-btn {
  appearance: none;
  border: 1px solid var(--rim);
  background: var(--void);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.chip-btn.is-selected {
  border-color: var(--heat);
  color: var(--gold);
  background: rgba(234, 88, 12, 0.14);
}

.chip-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toggle-row {
  margin-top: 1rem;
}

input[type="range"] {
  --range-progress: 50%;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 1.75rem;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--flame) 0%,
    var(--flame) var(--range-progress),
    var(--rim) var(--range-progress),
    var(--rim) 100%
  );
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--rim);
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--flame);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--heat);
  border: 3px solid var(--void);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--heat);
  border: 3px solid var(--void);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:hover::-moz-range-thumb {
  transform: scale(1.08);
}

input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:active::-moz-range-thumb {
  transform: scale(1.18);
  box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.3);
}

input[type="range"]:focus-visible {
  outline: none;
  box-shadow: none;
}

input[type="range"]:focus-visible::-webkit-slider-thumb,
input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22), 0 0 0 5px var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  input[type="range"]::-webkit-slider-thumb,
  input[type="range"]::-moz-range-thumb {
    transition: none;
  }
}

.start-status {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--rim);
  background: var(--iron);
  color: var(--text-soft);
}

.start-status.is-error {
  border-color: #f87171;
  color: #fecaca;
}

.join-card {
  margin: 1rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rim-bright);
  background: var(--iron);
  box-shadow: var(--shadow-heat);
}

.join-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.join-address {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold);
  word-break: break-all;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
