/* restockme.
   Dark on purpose. The other apps in this portfolio all sit on warm off-white
   (#f0efe9 / #f2efec / #f3f2f2) with a hero and a row of three explainer cards,
   and four sites built to the same recipe read as one hand even when the fonts
   and accents differ. This one is a monitor: something that sits in the dark
   watching a list and pokes you when a number moves. So it looks like one --
   dark ground, mono for anything that is data, no hero, the tool first.

   The app sends script-src 'none' and style-src 'self': no inline <style>, no
   style="" attribute, no client-side JavaScript at all. */

:root {
  --bg: #14171a;
  --panel: #1b1f23;
  --panel-2: #21262b;
  --line: #2c3239;
  --ink: #e6e9ec;
  --soft: #9aa4ae;
  --faint: #6b757f;

  --wait: #7f8a94;
  --live: #4ade80;
  --live-dim: #16301f;
  --alarm: #f87171;
  --alarm-dim: #331b1b;
  --link: #7dd3fc;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { margin: 0; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--link); }

main { max-width: 660px; margin: 0 auto; padding: 22px 18px 56px; }

/* --------------------------------------------------------------- chrome */

.top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--panel);
}
/* No emoji-in-a-data-URI wordmark here either -- that trick is on every other
   app in the portfolio. Plain type, and a real /icon.svg for the tab. */
.brand {
  font-family: var(--mono); font-size: 15px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none; margin-right: auto;
}
.brand::after { content: "_"; color: var(--live); }
.who { font-family: var(--mono); font-size: 12px; color: var(--faint); }

.banner {
  margin: 0; padding: 9px 18px; font-size: 13px; font-family: var(--mono);
  background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--soft);
}
.banner.good { background: var(--live-dim); color: var(--live); border-color: #1f4a2f; }
.banner.bad { background: var(--alarm-dim); color: var(--alarm); border-color: #4a2626; }

/* ------------------------------------------------------------- controls */

.btn {
  display: inline-block; font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 16px; cursor: pointer; text-decoration: none;
  color: #08120c; background: var(--live); border: 0; border-radius: 3px;
}
.btn:hover { background: #6ee79b; }

.link {
  font: inherit; font-family: var(--mono); font-size: 12px; background: none;
  border: 0; padding: 0; color: var(--soft); cursor: pointer; text-decoration: underline;
}
.link:hover { color: var(--ink); }
.link.danger { color: var(--alarm); }
.inline { display: inline; margin: 0; }

input[type="text"] {
  font: inherit; font-family: var(--mono); font-size: 13px; padding: 10px 12px; width: 100%;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 3px;
}
input[type="text"]::placeholder { color: var(--faint); }
input[type="text"]:focus-visible { outline: none; border-color: var(--live); }
:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }

/* -------------------------------------------------------------- landing */

/* Deliberately not a hero with three cards underneath. One statement, the
   sign-in, done -- the explaining lives on /about where someone who wants it
   will go looking. */
.gate { padding: 40px 0 8px; max-width: 46ch; }
.gate h1 { font-size: 25px; }
.gate .lede { margin: 14px 0 26px; color: var(--soft); }
.fine { font-size: 12px; color: var(--faint); margin-top: 14px; font-family: var(--mono); }

/* A sample of the thing itself instead of feature cards. */
.sample { margin-top: 34px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.sample-head {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.sample-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 12px; font-family: var(--mono); font-size: 12px;
  border-bottom: 1px solid var(--line); color: var(--soft);
}
.sample-row:last-child { border-bottom: 0; }
.sample-row .s-live { color: var(--live); }
.sample-row .s-wait { color: var(--wait); }

/* ------------------------------------------------------------ watchlist */

.add { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.add label {
  grid-column: 1 / -1; font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px;
}

.count {
  margin: 20px 0 8px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}

.watches { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 4px; }
.watch {
  display: grid; grid-template-columns: 40px 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.watch:last-child { border-bottom: 0; }
.thumb { width: 40px; height: 40px; border-radius: 3px; object-fit: cover; display: block; background: var(--panel-2); }
.thumb.ph { background: var(--panel-2); }
.body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.body a { color: var(--ink); text-decoration: none; font-size: 14px; }
.body a:hover { text-decoration: underline; }
.meta { display: flex; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
/* The price is the number you actually weigh when an alert lands, so it gets to
   be brighter than the shop name sitting next to it. */
.meta .price { color: var(--soft); }
.meta .shop { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.waiting .status { color: var(--wait); }
.waiting .status::before { content: "\00B7 "; }
.back { background: var(--live-dim); }
.back .status { color: var(--live); font-weight: 600; }
.back .status::before { content: "\25CF "; }
.gone .status { color: var(--faint); }
.gone .body a { color: var(--faint); text-decoration: line-through; }

.empty {
  padding: 20px; border: 1px dashed var(--line); border-radius: 4px;
  color: var(--soft); font-size: 14px;
}

.settings {
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline;
}
.settings h2 {
  width: 100%; font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); font-weight: 500;
}
.settings .fine { width: 100%; margin-top: 2px; }

/* ------------------------------------------------------------ documents */

.doc h1 { font-size: 24px; margin-bottom: 14px; }
.doc h2 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin: 28px 0 10px; font-weight: 500;
}
.doc p, .doc li { color: var(--soft); margin-bottom: 11px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 18px; }
.doc code { font-family: var(--mono); font-size: .9em; background: var(--panel-2); padding: 1px 5px; border-radius: 3px; color: var(--ink); }
.doc .updated { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: -6px; }

/* --------------------------------------------------------------- footer */

/* Order and labels differ from the rest of the portfolio on purpose; the four
   sites had an identical about/privacy/terms/support row in the same sequence. */
.foot { border-top: 1px solid var(--line); background: var(--panel); padding: 16px 18px; }
.foot nav {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
}
.foot nav a { color: var(--faint); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot p { font-size: 11px; color: var(--faint); max-width: 66ch; }

@media (max-width: 560px) {
  .watch { grid-template-columns: 32px 1fr; row-gap: 4px; }
  .thumb { width: 32px; height: 32px; }
  .status, .watch .inline { grid-column: 2; }
  .add { grid-template-columns: 1fr; }
  .gate h1 { font-size: 21px; }
}
