:root {
  --ink: #151515;
  --paper: #f4f0e6;
  --orange: #ff5c35;
  --green: #b8ed6a;
  --line: rgba(21, 21, 21, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.site-header {
  width: min(1400px, calc(100% - 56px));
  margin: 0 auto;
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  color: inherit;
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.ambiguous-letter {
  font-family: Helvetica, Arial, sans-serif;
}

.edition,
.eyebrow,
.input-meta,
.result-topline,
footer {
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  font-weight: 700;
}

.edition {
  margin: 0;
}

main {
  width: min(1400px, calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.75fr);
  gap: clamp(48px, 8vw, 140px);
  padding: clamp(72px, 9vw, 138px) 0 90px;
}

.hero {
  align-self: start;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
}

.eyebrow span {
  width: 9px;
  height: 9px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(4.7rem, 8.4vw, 9.2rem);
  line-height: 0.83;
  letter-spacing: -0.09em;
  font-weight: 800;
}

.swap-word {
  display: inline-block;
  color: var(--orange);
  cursor: help;
  position: relative;
}

.swap-word::after {
  content: "AI";
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  color: var(--ink);
  transition: opacity 120ms ease;
}

.swap-word > span {
  transition: opacity 120ms ease;
}

.swap-word:hover::after,
.swap-word:focus::after {
  opacity: 1;
}

.swap-word:hover > span,
.swap-word:focus > span {
  opacity: 0;
}

.intro {
  max-width: 530px;
  margin: 38px 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.45;
  letter-spacing: -0.025em;
}

.detector {
  align-self: center;
}

.input-meta,
.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.paper {
  position: relative;
}

textarea {
  display: block;
  width: 100%;
  min-height: 330px;
  resize: vertical;
  border: 1px solid var(--ink);
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.44);
  color: var(--ink);
  padding: 24px 24px 54px;
  font-size: 1rem;
  line-height: 1.65;
  transition: box-shadow 160ms ease, background 160ms ease;
}

textarea::placeholder {
  color: rgba(21, 21, 21, 0.43);
}

textarea:focus {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 7px 7px 0 var(--ink);
}

.clear-button {
  position: absolute;
  right: 17px;
  bottom: 15px;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.analyze-button,
.again-button {
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.analyze-button {
  width: 100%;
  min-height: 72px;
  margin-top: 14px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--orange);
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
}

.analyze-button svg {
  width: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.analyze-button:hover,
.again-button:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--ink);
}

.analyze-button:active,
.again-button:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.result {
  min-height: 424px;
  border: 1px solid var(--ink);
  background: var(--green);
  padding: 24px;
  animation: reveal 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.result[data-answer="no"] {
  background: var(--orange);
}

.result-topline {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}

.verdict-wrap {
  padding: 44px 0 54px;
}

.verdict-prefix {
  margin: 0 0 2px;
  font-size: 1rem;
}

.verdict {
  margin: 0;
  font-size: clamp(6.4rem, 11vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.09em;
  font-weight: 800;
}

.explanation {
  margin: 16px 0 0;
  font-size: 1.25rem;
}

.again-button {
  padding: 13px 16px;
  background: transparent;
  color: inherit;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

footer {
  width: min(1400px, calc(100% - 56px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: Arial, Helvetica, sans-serif;
  text-transform: none;
  letter-spacing: -0.015em;
  font-size: 0.78rem;
}

footer p {
  margin: 0;
}

@keyframes pulse {
  50% { transform: scale(1.45); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
    gap: 72px;
    padding-top: 68px;
  }

  .hero {
    max-width: 720px;
  }

  .detector {
    max-width: 720px;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: calc(100% - 32px);
  }

  .edition {
    display: none;
  }

  main {
    padding: 52px 0 56px;
    gap: 54px;
  }

  h1 {
    font-size: clamp(4.1rem, 22vw, 6.2rem);
  }

  .intro {
    margin-top: 28px;
  }

  textarea {
    min-height: 280px;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
