:root {
  --sky-a: #cfd8e3; --sky-b: #8ea3ba; --ink: #0f1c2b; --soft: #4b5d72;
  --glass: rgba(255, 255, 255, .72); --line: rgba(15, 28, 43, .12);
  --accent: #2a5db0; --bar: rgba(42, 93, 176, .28);
}
body[data-verdict="yes"] { --sky-a: #2b3d57; --sky-b: #0f1b2c; --ink: #eaf1fb; --soft: #a9bad0; --glass: rgba(20, 32, 50, .72); --line: rgba(255,255,255,.14); --accent: #6cb4ff; --bar: rgba(108, 180, 255, .3); }
body[data-verdict="maybe"] { --sky-a: #e7dcc6; --sky-b: #9fb1c6; --accent: #b4670e; --bar: rgba(180, 103, 14, .3); }
body[data-verdict="no"] { --sky-a: #ffe9a8; --sky-b: #7fc3ee; --accent: #d46a00; --bar: rgba(212, 106, 0, .3); }

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: grid; grid-template-rows: 1fr auto; place-items: center;
  color: var(--ink); background: linear-gradient(170deg, var(--sky-a), var(--sky-b)) fixed;
  font: 1rem/1.5 "Avenir Next", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  transition: background .8s, color .4s; position: relative; overflow-x: hidden;
}
body[data-verdict="yes"]::before {
  content: ""; position: fixed; inset: -20% 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(180, 215, 255, .5) 22px 23px);
  background-size: 120px 120px; animation: rain .7s linear infinite;
}
@keyframes rain { to { background-position: -40px 120px; } }

.card {
  width: min(480px, 100% - 2rem); margin: 2rem 0; padding: 1.5rem; border-radius: 28px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .35); position: relative; z-index: 1;
}
form { display: flex; gap: .5rem; }
.field { position: relative; flex: 1; }
input, button { font: inherit; color: inherit; }
input {
  width: 100%; padding: .75rem 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .12);
}
input::placeholder { color: var(--soft); }
form > button {
  padding: .75rem 1.3rem; border: 0; border-radius: 999px; cursor: pointer; font-weight: 700;
  background: var(--accent); color: #fff;
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.hero { text-align: center; padding: 2rem 0 1.5rem; }
.icon { width: 112px; height: 112px; color: var(--accent); }
.icon g { display: none; }
body[data-verdict="yes"] .i-yes, body[data-verdict="maybe"] .i-maybe, body[data-verdict="no"] .i-no { display: block; }
body[data-verdict="none"] .i-maybe { display: block; opacity: .4; }
.question { margin: .5rem 0 0; color: var(--soft); font-weight: 500; }
h1 { margin: 0; font-size: clamp(4.5rem, 22vw, 7.5rem); line-height: 1; font-weight: 800; letter-spacing: -.045em; }
#detail { margin: .5rem auto 0; max-width: 32ch; color: var(--soft); }

.forecast { border-top: 1px solid var(--line); padding-top: 1.25rem; }
#chart { display: flex; align-items: flex-end; gap: 5px; height: 96px; margin: 0 0 1.6rem; padding: 0; list-style: none; }
#chart li { flex: 1; height: var(--p); min-height: 4px; border-radius: 6px; background: var(--bar); position: relative; }
#chart li.peak { background: var(--accent); }
#chart li span {
  position: absolute; top: calc(100% + 6px); left: 50%; translate: -50% 0;
  font-size: .62rem; color: var(--soft); white-space: nowrap;
}
#chart li:not(:nth-child(3n+1)) span { display: none; }
#chart li b {
  position: absolute; bottom: calc(100% + 4px); left: 50%; translate: -50% 0; font-size: .7rem; color: var(--accent);
}
.meta { display: flex; justify-content: space-between; margin: 0; color: var(--soft); font-weight: 500; }
button.link { margin: 1rem 0 0; padding: 0; border: 0; background: none; color: var(--soft); text-decoration: underline; cursor: pointer; font-size: .9rem; }

#suggestions {
  position: absolute; inset: calc(100% + 6px) 0 auto; z-index: 5; margin: 0; padding: .3rem; list-style: none;
  background: #fff; color: #0f1c2b; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
}
#suggestions li { padding: .55rem .8rem; border-radius: 10px; cursor: pointer; }
#suggestions li[aria-selected="true"], #suggestions li:hover { background: #e8eef7; }
body.loading h1 { opacity: .35; }
footer { padding: 1rem; font-size: .85rem; color: var(--soft); position: relative; z-index: 1; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (prefers-reduced-motion: reduce) { body::before { animation: none !important; } * { transition: none !important; } }
