:root {
  --paper: #ffffff;
  --ink: #111111;
  --muted: #676767;
  --quiet: #9a9a9a;
  --line: #e4e4e4;
  --line-dark: #cfcfcf;
  --focus: rgba(17, 17, 17, 0.1);
  --link: #3f66a0;
  --status-dot: #e5482e;
  font-family:
    "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

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

.shell {
  width: min(720px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(32px, 7vh, 72px) 0 64px;
}

.search-panel {
  display: grid;
  align-content: start;
  min-height: auto;
  padding: 0 0 clamp(28px, 6vh, 48px);
}

.brand-row {
  display: flex;
  align-items: center;
  margin-bottom: clamp(26px, 5vh, 42px);
}

.brand-mark {
  display: block;
  width: clamp(104px, 22vw, 150px);
  height: auto;
  flex: none;
}

.search-card {
  position: relative;
  width: 100%;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  overflow: hidden;
}

.input-wrap {
  position: relative;
  min-width: 0;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  display: inline-block;
  width: 16px;
  aspect-ratio: 1;
  border: 1.4px solid currentColor;
  border-radius: 50%;
  color: var(--quiet);
  transform: translateY(-50%);
}

.search-icon::after {
  position: absolute;
  width: 7px;
  height: 1.4px;
  background: currentColor;
  content: "";
  transform: translate(11px, 11px) rotate(45deg);
}

.search-form input {
  width: 100%;
  min-width: 0;
  height: 58px;
  padding: 0 18px 0 48px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  outline: none;
  font-size: 1rem;
  font-weight: 350;
  letter-spacing: 0.01em;
}

.search-form input::placeholder {
  color: var(--quiet);
}

.search-form input:focus {
  box-shadow: inset 0 -3px 0 var(--focus);
}

.search-form button {
  --button-text: #ffffff;
  --btn-a: #111111;
  --btn-b: #ffffff;
  --btn-c: #d9d9d9;
  --btn-d: #777777;
  --btn-e: #222222;
  --btn-x1: 18%;
  --btn-y1: 24%;
  --btn-x2: 82%;
  --btn-y2: 64%;
  --btn-x3: 48%;
  --btn-y3: 38%;
  --btn-rot: 0deg;
  --btn-rot-inv: 0deg;
  --btn-rot-soft: 0deg;
  --btn-rot-mid: 0deg;
  --btn-rot-end: 0deg;
  --btn-scale: 1.1;
  --btn-scale-mid: 1.28;
  --btn-scale-end: 1.18;
  --btn-blur: 12px;
  --btn-duration: 900ms;
  --btn-blend: normal;
  --btn-slice-duration: 660ms;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  height: 58px;
  padding: 0 18px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  transition: none;
}

.search-form button span {
  position: relative;
  z-index: 3;
  color: currentColor;
}

.search-form button[data-three-active="true"] span {
  text-shadow: none;
}

.button-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: #050505;
  filter: blur(3.5px) saturate(2.7) contrast(1.28) brightness(1.65);
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0) scale(1.28);
  transform-origin: 50% 50%;
  will-change: filter, opacity, transform;
}

.search-form button[data-three-active="true"] .button-scene {
  opacity: 1;
}

.search-form button::before,
.search-form button::after {
  position: absolute;
  inset: -42%;
  z-index: 0;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0) rotate(var(--btn-rot)) scale(var(--btn-scale));
  will-change: transform, background-position, filter;
}

.search-form button::before {
  background:
    radial-gradient(circle at var(--btn-x1) var(--btn-y1), var(--btn-a) 0 9%, transparent 22%),
    radial-gradient(ellipse at var(--btn-x2) var(--btn-y2), var(--btn-b) 0 12%, transparent 30%),
    conic-gradient(from var(--btn-rot) at var(--btn-x3) var(--btn-y3), var(--btn-c), var(--btn-a), var(--btn-d), var(--btn-b), var(--btn-c));
  background-size: 135% 135%, 150% 150%, 100% 100%;
  filter: blur(var(--btn-blur)) saturate(1.45) contrast(1.18);
  mix-blend-mode: var(--btn-blend);
}

.search-form button::after {
  background:
    linear-gradient(112deg, transparent 0 18%, var(--btn-e) 18% 24%, transparent 24% 42%, var(--btn-b) 42% 47%, transparent 47% 100%),
    repeating-conic-gradient(from var(--btn-rot-inv), var(--btn-a) 0 9deg, var(--btn-c) 9deg 14deg, transparent 14deg 31deg);
  background-size: 180% 180%, 120% 120%;
  filter: contrast(1.3) saturate(1.25);
  mix-blend-mode: hard-light;
}

.search-form button:hover,
.search-form button:focus-visible,
.search-form button[data-three-active="true"],
.search-form button[data-scene-active="true"] {
  color: var(--button-text);
  background: var(--ink);
  outline: 0;
}

.search-form button:hover::before,
.search-form button:hover::after,
.search-form button:focus-visible::before,
.search-form button:focus-visible::after,
.search-form button[data-scene-active="true"]::before,
.search-form button[data-scene-active="true"]::after {
  opacity: 1;
}

.search-form button[data-three-active="true"]::before,
.search-form button[data-three-active="true"]::after {
  opacity: 0;
  animation: none;
}

.search-form button:hover::before,
.search-form button:focus-visible::before,
.search-form button[data-scene-active="true"]::before {
  animation: button-morph var(--btn-duration) cubic-bezier(0.2, 0.8, 0.2, 1) infinite alternate;
}

.search-form button:hover::after,
.search-form button:focus-visible::after,
.search-form button[data-scene-active="true"]::after {
  animation: button-slice var(--btn-slice-duration) steps(9, end) infinite;
}

@keyframes button-morph {
  0% {
    background-position: 0% 30%, 100% 70%, 50% 50%;
    transform: rotate(var(--btn-rot)) scale(var(--btn-scale)) skewX(0deg);
  }

  45% {
    background-position: 80% 20%, 20% 90%, 60% 35%;
    transform: rotate(var(--btn-rot-mid)) scale(var(--btn-scale-mid)) skewX(-12deg);
  }

  100% {
    background-position: 15% 90%, 70% 10%, 42% 78%;
    transform: rotate(var(--btn-rot-end)) scale(var(--btn-scale-end)) skewX(9deg);
  }
}

@keyframes button-slice {
  0% {
    background-position: 0% 0%, 0% 0%;
    transform: translate(-3%, 1%) rotate(var(--btn-rot-soft)) scale(1.08);
  }

  50% {
    background-position: 72% 35%, 46% 80%;
    transform: translate(4%, -2%) rotate(var(--btn-rot-mid)) scale(1.2);
  }

  100% {
    background-position: 100% 100%, 100% 20%;
    transform: translate(-1%, 3%) rotate(var(--btn-rot-end)) scale(1.12);
  }
}

.meta-row {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 350;
  letter-spacing: 0;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.meta-row span::before {
  width: 4px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--status-dot);
  content: "";
}

.results-shell {
  padding: clamp(8px, 2vw, 18px) 0 0;
}

.results {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 0 12px;
  list-style: none;
  border-top: 0;
}

.result {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.result a {
  display: inline-block;
  max-width: 100%;
  color: var(--ink);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.result a:visited {
  color: var(--ink);
}

.result a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.result-url {
  color: var(--link);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.result-description {
  max-width: 66ch;
  margin: 0;
  color: #333333;
  font-size: 0.95rem;
  font-weight: 350;
  line-height: 1.55;
}

.result-time {
  color: var(--quiet);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0;
}

.empty-state {
  min-height: 124px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 350;
  letter-spacing: 0;
}

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

@media (max-width: 760px) {
  .shell {
    width: min(100% - 28px, 780px);
    padding-top: 28px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .search-form button {
    width: 100%;
    min-width: 0;
    height: 54px;
    padding: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-form button::before,
  .search-form button::after {
    animation: none !important;
    transform: rotate(var(--btn-rot)) scale(1.02);
  }
}

@media (max-width: 420px) {
  .shell {
    width: min(100% - 22px, 780px);
  }

  .brand-mark {
    width: 104px;
  }

  .search-form input {
    height: 56px;
  }
}
