:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #0b1220;
  color: #edf2f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #a5b2c4;
  --line: #26354a;
  --accent: #7ae0cc;
  --warm: #f2b47d;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% -15%, rgba(39, 90, 111, .36), transparent 55%),
    linear-gradient(120deg, transparent 0 68%, rgba(122, 224, 204, .025) 68% 68.2%, transparent 68.2%),
    #0b1220;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 5;
  top: -80px;
  left: 16px;
  padding: 10px 16px;
  background: var(--accent);
  color: #0b1220;
}
.skip-link:focus { top: 12px; }

.shell { width: min(100% - 40px, 1120px); margin: 0 auto; }
.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 27px; font-weight: 800; letter-spacing: -2px; }
.brand span { color: var(--accent); }
.topbar p { color: var(--muted); font: 10px/1.4 Consolas, monospace; letter-spacing: .14em; }
.topbar p span { color: var(--accent); padding: 0 6px; }

.intro { max-width: 1000px; padding: clamp(55px, 10vw, 104px) 0 42px; }
.eyebrow { margin: 0 0 20px; color: var(--accent); font: 700 10px/1.5 Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; }
.intro .eyebrow { display: flex; align-items: center; gap: 10px; }
.intro .eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 14px #f2b47d80; }
h1 { margin: 0; font-size: clamp(42px, 8vw, 74px); font-weight: 620; line-height: 1.04; letter-spacing: -.06em; }
h1 em { color: var(--accent); font-style: normal; }
.lede { max-width: 570px; margin: 25px 0 0; color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); line-height: 1.65; }

.search-panel {
  border: 1px solid #34465a;
  background: linear-gradient(135deg, rgba(23, 39, 58, .96), rgba(15, 27, 43, .96));
  box-shadow: 0 28px 75px rgba(0, 0, 0, .2);
}
.panel-heading { display: flex; align-items: baseline; gap: 18px; padding: 23px 27px 0; }
.step { color: var(--accent); font: 11px Consolas, monospace; }
.panel-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
#search-form { padding: 25px 27px 27px; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 8px; min-width: 0; }
label > span { color: #bdc8d6; font-size: 12px; }
label b { margin-right: 5px; color: var(--accent); font: 11px Consolas, monospace; }
input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 1px solid #3b4b60;
  border-radius: 2px;
  padding: 0 13px;
  background: #0c1727;
  color: #f5f8fc;
  font-size: 15px;
}
input::placeholder { color: #8493a8; opacity: 1; }
input:hover { border-color: #667990; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-top: 22px; }
.form-footer p { max-width: 370px; margin: 0; color: #9eacbf; font-size: 12px; line-height: 1.55; }
button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 48px;
  border: 1px solid var(--accent);
  padding: 0 17px;
  background: var(--accent);
  color: #10202c;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background-color .16s ease, transform .16s ease;
}
button:disabled { cursor: wait; opacity: .65; }
button:not(:disabled):hover { transform: translateY(-2px); background: #a1f0df; }
button span { font-size: 17px; }

.results { margin-top: 64px; scroll-margin-top: 24px; }
.results[hidden] { display: none; }
.results-heading { margin-bottom: 20px; }
.results-heading .eyebrow { margin-bottom: 9px; }
.results-heading h2 { margin: 0; font-size: clamp(24px, 5vw, 36px); letter-spacing: -.04em; }
.results-heading > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.results-list { display: grid; gap: 11px; }
.result-card {
  display: grid;
  grid-template-columns: 57px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 19px;
  border: 1px solid #33465a;
  background: rgba(19, 33, 50, .88);
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.result-card:hover { transform: translateY(-2px); border-color: var(--accent); background: #17283a; }
.result-number { color: var(--accent); font: 13px Consolas, monospace; }
.result-copy h3 { margin: 0; font-size: 16px; }
.result-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.result-score { align-self: start; color: #aebdd0; font: 10px Consolas, monospace; text-align: right; white-space: nowrap; }
.result-score strong { color: var(--warm); }
.result-link { color: var(--accent); font-size: 19px; }
.fallback-card { border-color: #705b42; }
.fallback-card .result-number { color: var(--warm); }
.notice { margin: 24px 0; padding: 14px; border: 1px solid #705b42; color: #ffddb7; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 76px;
  padding: 19px 0 26px;
  border-top: 1px solid var(--line);
  color: #95a4b8;
  font-size: 11px;
}
footer a { color: var(--accent); }
footer a:hover { text-decoration: underline; }

@media (max-width: 650px) {
  .shell { width: min(100% - 32px, 520px); }
  .topbar { min-height: 65px; }
  .topbar p { font-size: 9px; }
  .intro { padding-top: 58px; }
  .fields { grid-template-columns: 1fr; gap: 15px; }
  .panel-heading { padding: 20px 19px 0; }
  #search-form { padding: 21px 19px 20px; }
  .form-footer { align-items: stretch; flex-direction: column; gap: 16px; }
  .form-footer p { max-width: none; }
  .form-footer button { justify-content: center; width: 100%; }
  .result-card { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 11px; padding: 15px 12px; }
  .result-score { grid-column: 2; grid-row: 2; text-align: left; }
  .result-link { grid-column: 3; grid-row: 1 / span 2; }
  footer { flex-direction: column; gap: 9px; margin-top: 55px; }
}

@media (min-width: 651px) and (max-height: 850px) {
  .topbar { min-height: 64px; }
  .intro { padding: clamp(24px, 3vh, 34px) 0 20px; }
  .eyebrow { margin-bottom: 14px; }
  h1 { font-size: clamp(38px, 5.5vw, 58px); }
  .lede { margin-top: 16px; font-size: 16px; line-height: 1.5; }
  .panel-heading { padding: 17px 23px 0; }
  #search-form { padding: 18px 23px 20px; }
  .fields { gap: 12px; }
  label { gap: 6px; }
  input { height: 46px; }
  .form-footer { margin-top: 15px; }
  button { min-height: 44px; }
  footer { margin-top: 32px; padding: 14px 0 18px; }
}

@media (min-width: 651px) and (max-height: 700px) {
  .topbar { min-height: 56px; }
  .intro { padding: 18px 0 14px; }
  .eyebrow { margin-bottom: 10px; }
  h1 { font-size: clamp(36px, 5vw, 52px); }
  .lede { margin-top: 12px; font-size: 15px; line-height: 1.4; }
  .panel-heading { padding: 14px 20px 0; }
  #search-form { padding: 14px 20px 16px; }
  .fields { gap: 10px; }
  input { height: 42px; }
  .form-footer { margin-top: 12px; }
  button { min-height: 40px; }
  footer { margin-top: 22px; padding: 10px 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
