:root {
  color-scheme: dark;
  --night-950: #070b1f;
  --night-900: #0d1330;
  --night-800: #151d42;
  --surface: rgba(20, 29, 66, 0.78);
  --surface-strong: rgba(25, 35, 77, 0.96);
  --line: rgba(188, 201, 255, 0.16);
  --text: #f7f8ff;
  --muted: #b8c2e2;
  --violet: #a98bff;
  --violet-strong: #8d6bff;
  --mint: #72e6c1;
  --blue: #76b8ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 4%, rgba(107, 78, 255, 0.2), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(63, 204, 198, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--night-950), var(--night-900) 48%, #0a1029);
  font-size: 1rem;
  line-height: 1.7;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.25) 0 1px, transparent 1.5px);
  background-position: 0 0, 37px 61px;
  background-size: 120px 120px, 180px 180px;
  content: "";
  opacity: 0.22;
  pointer-events: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: #d1c5ff;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: #ffffff;
}

button,
select {
  font: inherit;
}

button,
.button {
  min-height: 3.25rem;
  border: 0;
  border-radius: 0.9rem;
  padding: 0.8rem 1.35rem;
  color: #090d20;
  background: linear-gradient(135deg, var(--mint), #9af2d8);
  box-shadow: 0 12px 30px rgba(55, 216, 174, 0.19);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover,
.button:hover {
  color: #090d20;
  box-shadow: 0 16px 36px rgba(55, 216, 174, 0.28);
  filter: brightness(1.04);
  transform: translateY(-2px);
}

button:focus-visible,
.button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(118, 184, 255, 0.85);
  outline-offset: 3px;
}

.site-header {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  border-radius: 1rem;
  padding: 0.35rem;
}

.brand img {
  width: auto;
  height: 2.65rem;
}

.page-shell {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}

.calculator-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34rem;
  padding: 3rem 1rem;
}

.calculator-stage::before {
  position: absolute;
  top: 1rem;
  left: 50%;
  width: min(38rem, 88vw);
  aspect-ratio: 1;
  border: 1px solid rgba(169, 139, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 3rem rgba(169, 139, 255, 0.025),
    0 0 0 7rem rgba(114, 230, 193, 0.018);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

.calculator-card,
.results-card {
  position: relative;
  width: min(39rem, 100%);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(24, 34, 75, 0.92), rgba(13, 20, 49, 0.88));
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(18px);
}

.calculator-card::after,
.results-card::after {
  position: absolute;
  top: -5rem;
  right: -4rem;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: rgba(169, 139, 255, 0.12);
  content: "";
  filter: blur(4px);
  pointer-events: none;
}

.site-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.calculator-card h1,
.calculator-card h2,
.results-card h1,
.results-card h2 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.65rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.time-form {
  margin-top: 1.8rem;
}

.time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 0.85fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

select {
  width: 100%;
  min-height: 3.35rem;
  appearance: none;
  border: 1px solid rgba(188, 201, 255, 0.2);
  border-radius: 0.9rem;
  padding: 0.75rem 2.25rem 0.75rem 0.9rem;
  color: var(--text);
  background-color: rgba(7, 12, 33, 0.72);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) calc(50% - 2px),
    calc(100% - 0.7rem) calc(50% - 2px);
  background-repeat: no-repeat;
  background-size: 0.32rem 0.32rem, 0.32rem 0.32rem;
  cursor: pointer;
}

.primary-action {
  width: 100%;
}

.choice-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.choice {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.choice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.choice button,
.choice .button {
  min-width: 6.5rem;
  text-align: center;
}

.choice-secondary button,
.choice-secondary .button {
  color: var(--text);
  background: rgba(169, 139, 255, 0.14);
  box-shadow: none;
}

.choice-secondary button:hover,
.choice-secondary .button:hover {
  color: #fff;
  background: rgba(169, 139, 255, 0.24);
}

.results-card[hidden] {
  display: none;
}

.result-intro {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.time-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.25rem 0;
}

.time-result {
  display: grid;
  place-items: center;
  min-height: 4.8rem;
  border: 1px solid rgba(114, 230, 193, 0.25);
  border-radius: 1rem;
  color: var(--mint);
  background: rgba(114, 230, 193, 0.075);
  font-size: clamp(1.22rem, 4vw, 1.7rem);
  font-weight: 760;
  letter-spacing: -0.02em;
}

.time-results-six .time-result:nth-child(-n + 2) {
  border-color: rgba(188, 201, 255, 0.15);
  color: var(--muted);
  background: rgba(188, 201, 255, 0.045);
}

.result-note {
  margin: 0.75rem 0;
  color: var(--blue);
}

.result-explainer {
  color: #c7b8fa;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #e3d8ff;
  font-weight: 700;
}

.featured {
  width: min(46rem, 100%);
  margin: 1rem auto 4rem;
  text-align: center;
}

.featured p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 650;
}

.featured img {
  width: min(35rem, 100%);
  margin: 0 auto;
  opacity: 0.82;
}

.content-card,
.legal-card {
  width: min(52rem, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  padding: clamp(1.4rem, 5vw, 3.6rem);
  background: rgba(12, 19, 46, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.content-card h2,
.legal-card h1,
.legal-card h2 {
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.content-card h2 {
  margin: 2.75rem 0 0.9rem;
  font-size: clamp(1.55rem, 4vw, 2.05rem);
}

.content-card h2:first-of-type {
  margin-top: 2rem;
}

.content-card h3 {
  margin: 1.8rem 0 0.6rem;
  color: #d8ceff;
  font-size: 1.18rem;
  line-height: 1.35;
}

.content-card p,
.legal-card p {
  margin: 0 0 1.15rem;
  color: #c8d0e9;
  white-space: pre-line;
}

.content-card ul {
  padding-left: 1.2rem;
  color: #b7c1df;
}

.content-card li + li {
  margin-top: 0.45rem;
}

.legal-card h1 {
  margin: 0 0 2.2rem;
  font-size: clamp(2rem, 6vw, 3.15rem);
}

.legal-card h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
}

.legal-card > :last-child {
  margin-bottom: 0;
}

.feedback {
  margin: 2rem auto 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  width: min(52rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3.5rem;
  color: var(--muted);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.7rem 1.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.site-footer p {
  margin: 0.35rem 0;
}

.dmca-badge img {
  margin: 1rem auto 0;
}

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

@media (max-width: 40rem) {
  .site-header,
  .page-shell {
    width: min(100% - 1rem, 72rem);
  }

  .site-header {
    padding: 0.85rem 0;
  }

  .brand img {
    height: 2.2rem;
  }

  .page-shell {
    padding-top: 0.35rem;
  }

  .calculator-stage {
    min-height: 0;
    padding: 1.5rem 0 3rem;
  }

  .calculator-card,
  .results-card,
  .content-card,
  .legal-card {
    border-radius: 1.25rem;
  }

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

  .time-fields select:last-child {
    grid-column: 1 / -1;
  }

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

  .choice button,
  .choice .button {
    width: 100%;
  }

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

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
