/* dealBot: calm, warm, fast. System fonts, no web fonts, no third parties. */
:root {
  --bg: #fbf8f3;
  --card: #ffffff;
  --ink: #1d1f24;
  --soft: #5d6370;
  --line: #ebe6dd;
  --accent: #1f7a5a;        /* good news */
  --accent-ink: #ffffff;
  --wait: #a86a12;          /* a site asked us to slow down */
  --problem: #b3392f;
  --paused: #8a8f99;
  --chip: #f2efe8;
  --focus: #2f6fdd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 31, 36, .05), 0 6px 20px rgba(29, 31, 36, .05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181d; --card: #1e2128; --ink: #eceef2; --soft: #a4aab5; --line: #2c3039;
    --accent: #4cc497; --accent-ink: #0d1f18; --wait: #e3a54a; --problem: #ff7b6e;
    --paused: #7d838e; --chip: #262a32; --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
main { max-width: 760px; margin: 0 auto; padding: 8px 20px 64px; }
body.narrow main, body.narrow .top { max-width: 460px; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 760px; margin: 0 auto; padding: 18px 20px;
}
.brand { font-weight: 700; letter-spacing: -.01em; text-decoration: none; font-size: 18px; }
.brand-mark { color: var(--accent); }

h1 { font-size: clamp(28px, 6vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 24px 0 10px; }
h2.section { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); margin: 36px 0 12px; }
.lede { color: var(--soft); font-size: 19px; margin: 0 0 24px; }
.fine { color: var(--soft); font-size: 14px; }
.center { text-align: center; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}

/* Forms */
label { display: block; font-weight: 600; margin-bottom: 8px; }
input[type=email], input[type=text], input.code, input[type=url] {
  width: 100%; font: inherit; font-size: 18px; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
}
input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 20%, transparent); }
input.code { font-size: 30px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; border-radius: 12px; padding: 14px 20px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none;
  min-height: 48px;
}
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); width: 100%; margin-top: 14px; }
button.primary:active { transform: translateY(1px); }
button.link { background: none; border: 0; padding: 8px; min-height: 0; color: var(--soft); font-weight: 500; }
.signin .fine { margin: 14px 0 0; }
.error { color: var(--problem); font-weight: 600; margin: 10px 0 0; }

/* Home */
.greeting h1 { margin-top: 8px; }
.spotted { font-size: 19px; margin: 0 0 8px; }
.spotted strong { color: var(--accent); }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.watch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.watch-name { font-size: 18px; margin: 0; line-height: 1.3; }
.price { font-size: 26px; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chips { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--chip); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.chips li.chip-good { background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--accent); font-weight: 600; }
.chips li.chip-warn { background: color-mix(in srgb, var(--wait) 14%, var(--card)); color: var(--wait); font-weight: 600; }
.status { margin: 14px 0 0; color: var(--soft); font-size: 15px; display: flex; gap: 10px; align-items: baseline; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-1px); }
.tone-wait .dot { background: var(--wait); }
.tone-problem .dot { background: var(--problem); }
.tone-paused .dot { background: var(--paused); }
.tone-new .dot { background: var(--focus); animation: pulse 1.6s ease-in-out infinite; }
.tone-good .dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.tone-paused { opacity: .75; }
.meta { margin: 6px 0 0; font-size: 14px; color: var(--soft); }
.empty { text-align: center; padding: 36px 24px; }
.empty h2 { margin-top: 0; }

.toast[hidden] { display: none; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow);
  display: flex; gap: 16px; align-items: center; max-width: calc(100vw - 32px);
}

@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
