* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Source Code Pro", monospace;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #F5B201;
  color: #0f172a;
}

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 3px solid #6366f1;
  outline-offset: 3px;
  border-radius: var(--radius);
}

.hidden {
  display: none;
}

.surface {
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.surface-tint {
  background: color-mix(in srgb, var(--bg) 92%, var(--primary-color) 8%);
}

.interactive {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}

.interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  filter: brightness(1.02);
}

.interactive:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-active);
  filter: brightness(0.98);
}

.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.site-header {
  width: 100%;
  background: var(--bg);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  font-weight: 1000;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
  border-radius: var(--radius);
}

.nav-logo {
  display: block;
  height: 80px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .nav-logo {
    height: 60px;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 12px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.nav-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  filter: brightness(1.05);
}

.nav-link:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-active);
  filter: brightness(0.95);
}

.hero-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  text-align: center;
}

.hero-title-text {
  display: block;
  text-align: center;
}

.range-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.range-sep {
  font-size: 18px;
  font-weight: 900;
}

.mobile-only {
  display: inline;
}

@media (min-width: 768px) {
  .app-container {
    padding: 28px 20px 56px;
  }

  .hero-title {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 40px;
  }

  .range-row {
    width: auto;
  }

  .mobile-only {
    display: none;
  }
}

.input-huge {
  width: 88px;
  max-width: 40vw;
  padding: 8px 10px;
  margin: 0 8px;
  font-size: 32px;
  font-weight: 900;
  background: var(--bg);
  border: 3px solid var(--primary-color);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0px 0px var(--primary-color);
  color: var(--fg);
  text-align: center;
  vertical-align: baseline;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.input-huge.range-input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0;
  font-size: 24px;
}

@media (min-width: 768px) {
  .input-huge.range-input {
    font-size: 32px;
  }
}

.input-huge:focus {
  border-color: var(--primary-color);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px 0px var(--primary-color);
}

.btn-primary-huge {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 3px solid var(--cta-color);
  border-radius: var(--radius);
  background: var(--cta-color);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary-huge:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  filter: brightness(1.08);
}

.btn-primary-huge:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-active);
  filter: brightness(0.95);
}

.result-box+.btn-primary-huge {
  margin-top: 16px;
}

.result-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-color: var(--cta-color);
  box-shadow: 3px 3px 0px 0px var(--cta-color);
}

.result-flash {
  animation: resultFlash 520ms ease-out;
}

@keyframes resultFlash {
  0% {
    border-color: var(--cta-color);
    box-shadow: 3px 3px 0px 0px var(--cta-color);
  }

  20% {
    border-color: transparent;
    box-shadow: 3px 3px 0px 0px transparent;
  }

  40% {
    border-color: var(--cta-color);
    box-shadow: 3px 3px 0px 0px var(--cta-color);
  }

  60% {
    border-color: transparent;
    box-shadow: 3px 3px 0px 0px transparent;
  }

  80% {
    border-color: var(--cta-color);
    box-shadow: 3px 3px 0px 0px var(--cta-color);
  }

  100% {
    border-color: var(--cta-color);
    box-shadow: 3px 3px 0px 0px var(--cta-color);
  }
}

.result-sticky {
  position: sticky;
  top: 12px;
  z-index: 30;
  margin-top: 16px;
}

.result-number {
  font-size: 40px;
  font-weight: 1000;
  letter-spacing: -0.02em;
  text-align: center;
}

.pop-animation {
  animation: pop 140ms ease-out;
}

@keyframes pop {
  0% {
    transform: scale(0.96);
  }

  100% {
    transform: scale(1);
  }
}

.section-divider {
  border: 0;
  border-top: 3px solid var(--border);
  margin: 22px 0;
}

.section-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.presets-category {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.presets-category:not(:last-child) {
  margin-bottom: 16px;
}

.category-title {
  margin: 0;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}

.presets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

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

.preset-card {
  text-align: left;
  width: 100%;
  min-height: 56px;
  padding: 14px 14px;
  color: var(--fg);
  border-color: var(--primary-color);
  box-shadow: 3px 3px 0px 0px var(--primary-color);
}

.preset-card:hover {
  border-color: var(--cta-color);
  box-shadow: 6px 6px 0px 0px var(--cta-color);
}

.preset-card:active {
  border-color: var(--cta-color);
  box-shadow: 2px 2px 0px 0px var(--cta-color);
}

.preset-title {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.preset-desc {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.8;
}

.feature-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.feature-link {
  display: block;
  overflow: hidden;
  width: 100%;
}

.feature-picture {
  display: block;
}

.feature-image {
  display: block;
  width: 100%;
  height: auto;
}

.seo-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.seo-lead {
  margin: 0;
  opacity: 0.9;
}

.seo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

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

.seo-card {
  padding: 14px 14px;
}

.seo-faq {
  padding: 14px 14px;
}

.seo-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: -0.01em;
}

.seo-text {
  margin: 0;
  opacity: 0.9;
}

.seo-list {
  margin: 10px 0 0;
  padding-left: 18px;
  opacity: 0.9;
}

.seo-details {
  margin-top: 10px;
  border-top: 3px solid var(--border);
  padding-top: 10px;
}

.seo-summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 900;
}
