:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #111111;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #ffffff;
  color: #111111;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.hero {
  display: grid;
  min-height: 78vh;
  align-items: center;
  border-bottom: 1px solid #e8e8e8;
}

.hero-inner {
  padding: 96px 0;
}

.eyebrow,
.micro-label {
  display: block;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 930px;
  margin-bottom: 28px;
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.93;
  letter-spacing: -0.065em;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 30px;
  color: #505050;
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  line-height: 1.65;
}

.jump-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #111111;
  font-weight: 750;
  text-decoration: none;
  border-bottom: 1px solid #111111;
  padding-bottom: 3px;
}

.explorer-section,
.how-section,
.fold-section,
.origin-section {
  padding: 110px 0;
}

.explorer-section {
  background: #fafafa;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 44px;
}

.section-heading.compact {
  margin-bottom: 36px;
}

.section-heading h2,
.fold-copy h2,
.origin-card h2 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.section-heading p,
.fold-copy > p,
.origin-card > p {
  color: #5b5b5b;
  font-size: 1.05rem;
  line-height: 1.7;
}

.explorer-card {
  overflow: hidden;
  border: 1px solid #dcdcdc;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.07);
}

.name-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 32px 34px 26px;
  border-bottom: 1px solid #ececec;
}

.scale-name {
  max-width: 850px;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: clamp(2.5rem, 7vw, 6.5rem);
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.step-badge {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 10px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  text-align: center;
}

.step-badge span {
  display: block;
  color: #777777;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.step-badge strong {
  display: block;
  margin-top: 2px;
  font-size: 1.4rem;
}

.value-panel {
  padding: 34px;
}

.symbolic-value {
  margin: 10px 0 24px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.9rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.plain-language {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: baseline;
  margin-bottom: 32px;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.plain-prefix {
  color: #707070;
}

.digit-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.digit-row > div {
  padding: 18px;
  border: 1px solid #e4e4e4;
  border-radius: 14px;
  background: #fafafa;
}

.digit-row strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.number-preview {
  position: relative;
  display: flex;
  min-height: 104px;
  align-items: center;
  padding: 0 34px;
  overflow: hidden;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 70%, #ffffff 96%),
    repeating-linear-gradient(
      90deg,
      #f5f5f5 0,
      #f5f5f5 1px,
      transparent 1px,
      transparent 15px
    );
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 2.1rem;
  font-weight: 750;
}

.zero-stream {
  width: min(760px, 78vw);
  height: 42px;
  margin-left: 8px;
  background-image: repeating-linear-gradient(
    90deg,
    #111111 0 2px,
    transparent 2px 13px
  );
  opacity: 0.18;
  mask-image: linear-gradient(90deg, #000 0%, #000 68%, transparent 100%);
}

.preview-caption {
  position: absolute;
  right: 28px;
  bottom: 12px;
  color: #777777;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.slider-wrap {
  padding: 30px 34px 34px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #777777;
  font-size: 0.76rem;
}

#scale-slider {
  width: 100%;
  accent-color: #111111;
  cursor: pointer;
}

.slider-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.slider-actions button,
.fold-button {
  min-height: 44px;
  border: 1px solid #d0d0d0;
  border-radius: 999px;
  padding: 0 18px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 750;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.slider-actions button:hover,
.fold-button:hover {
  border-color: #111111;
}

.slider-actions button:focus-visible,
.fold-button:focus-visible,
#scale-slider:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.15);
  outline-offset: 3px;
}

.slider-actions button:disabled {
  cursor: default;
  opacity: 0.35;
}

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

.context-grid article {
  min-height: 190px;
  border: 1px solid #e0e0e0;
  border-radius: 18px;
  padding: 24px;
  background: #ffffff;
}

.context-grid .context-highlight {
  border-color: #111111;
}

.context-number {
  display: block;
  margin-bottom: 36px;
  color: #666666;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.context-grid h3 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.context-grid p {
  margin-bottom: 0;
  color: #696969;
  line-height: 1.5;
}

.how-section {
  border-bottom: 1px solid #ededed;
}

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

.how-card {
  min-height: 300px;
  border-top: 1px solid #111111;
  padding: 22px 4px 0;
}

.how-index {
  display: block;
  margin-bottom: 70px;
  color: #888888;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
}

.how-card h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.how-card p {
  color: #626262;
  line-height: 1.65;
}

.fold-section {
  background: #111111;
  color: #ffffff;
}

.fold-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 64px;
  align-items: center;
}

.fold-copy > p {
  color: #bcbcbc;
}

.fold-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.fold-button {
  border-color: #444444;
  background: transparent;
  color: #ffffff;
}

.fold-button:hover {
  border-color: #ffffff;
}

.fold-button.active {
  background: #ffffff;
  color: #111111;
  border-color: #ffffff;
}

.fold-result {
  min-width: 0;
  border: 1px solid #3a3a3a;
  border-radius: 22px;
  padding: 28px;
  background: #171717;
}

.folded-name {
  min-height: 150px;
  margin-top: 10px;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.15rem, 3vw, 2rem);
  line-height: 1.45;
}

.fold-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #333333;
  padding-top: 18px;
  color: #aaaaaa;
}

.fold-meta strong {
  color: #ffffff;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.origin-section {
  padding-top: 90px;
  padding-bottom: 90px;
}

.origin-card {
  max-width: 900px;
  margin-left: max(20px, calc((100vw - min(1120px, calc(100vw - 40px))) / 2));
  margin-right: auto;
}

.origin-card > p {
  max-width: 720px;
}

footer {
  border-top: 1px solid #ededed;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #777777;
  font-size: 0.84rem;
}

.footer-inner strong {
  color: #111111;
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 76px 0;
  }

  .explorer-section,
  .how-section,
  .fold-section,
  .origin-section {
    padding: 78px 0;
  }

  .context-grid,
  .how-grid,
  .fold-layout {
    grid-template-columns: 1fr;
  }

  .how-card {
    min-height: auto;
    padding-bottom: 30px;
  }

  .how-index {
    margin-bottom: 34px;
  }

  .fold-layout {
    gap: 34px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.5rem);
  }

  .name-row,
  .value-panel,
  .slider-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .name-row {
    flex-direction: column;
  }

  .step-badge {
    display: none;
  }

  .digit-row,
  .context-grid {
    grid-template-columns: 1fr;
  }

  .number-preview {
    padding-left: 20px;
    padding-right: 20px;
  }

  .slider-labels {
    display: none;
  }

  .slider-actions {
    justify-content: stretch;
  }

  .slider-actions button {
    flex: 1;
    padding: 0 10px;
  }

  .context-number {
    margin-bottom: 20px;
  }

  .context-grid article {
    min-height: auto;
  }

  .fold-result {
    padding: 20px;
  }

  .folded-name {
    min-height: 120px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .origin-card {
    margin-left: 12px;
    margin-right: 12px;
  }
}

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