/* Acme Supply — deliberately ordinary trade-supplier styling. The lab should
   look like a real shop, not like a course exercise. */

:root {
  --ink: #1c2430;
  --ink-2: #2b3644;
  --muted: #5f6b7a;
  --line: #e0e3e8;
  --line-2: #eef0f3;
  --bg: #f6f6f4;
  --accent: #b8460e;
  --accent-dk: #953909;
  --green: #196b46;
  --red: #b32d1f;
  --radius: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 27px; margin: 0 0 16px; letter-spacing: -.015em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0; }
.mono { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 13.5px; }
.muted { color: var(--muted); font-size: 13.5px; }
.lead { color: var(--ink-2); }
.r { text-align: right; }
.back { display: inline-block; margin-bottom: 12px; font-size: 13.5px; text-decoration: none; }
.section-h { margin: 26px 0 14px; }

.warnbar { background: #38290a; color: #ffd479; text-align: center; padding: 7px 14px; font-size: 12.5px; }

/* --- chrome ------------------------------------------------------------- */
.top { background: var(--ink); color: #fff; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 22px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-size: 17px; font-weight: 600; white-space: nowrap; }
.brand-mark { width: 27px; height: 27px; border-radius: 5px; background: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.brand-sub { font-weight: 300; opacity: .72; }
.search { flex: 1; display: flex; gap: 7px; max-width: 440px; }
.search input { flex: 1; }
.search button { background: var(--accent); }
.top-nav { margin-left: auto; display: flex; gap: 18px; align-items: center; font-size: 14px; }
.top-nav a { color: #d6dae0; text-decoration: none; white-space: nowrap; }
.top-nav a:hover { color: #fff; }
.badge { background: var(--accent); border-radius: 999px; padding: 1px 7px; font-size: 12px; color: #fff; }
.foot { border-top: 1px solid var(--line); margin-top: 48px; background: #fff; font-size: 13px; color: var(--muted); }
.foot .top-in { min-height: 60px; justify-content: space-between; }
.foot a { color: var(--muted); }

.main { max-width: 900px; margin: 0 auto; padding: 30px 24px 40px; }
.main.wide { max-width: 1120px; }
.narrow { max-width: 430px; margin: 20px auto; }

/* --- blocks ------------------------------------------------------------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; margin-bottom: 26px; }
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero p { margin: 0; color: var(--muted); max-width: 60ch; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; display: flex; flex-direction: column; overflow: hidden; }
.pcard:hover { border-color: #c9ced6; }
.pcard-art, .pdetail-art { background: #e9ebee; color: #8b95a1; display: grid; place-items: center; font-size: 30px; font-weight: 700; letter-spacing: .02em; }
.pcard-art { height: 120px; }
.pdetail-art { width: 190px; height: 190px; border-radius: var(--radius); flex: 0 0 190px; font-size: 42px; }
.pcard-body { padding: 13px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.pcard-body h3 { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.price { font-size: 19px; font-weight: 700; margin-top: 3px; }
.price.big { display: block; font-size: 30px; margin: 14px 0 4px; }
.stock { font-size: 12.5px; color: var(--green); }
.pdetail { display: flex; gap: 28px; margin-bottom: 22px; }
.pdetail h1 { margin: 4px 0 8px; }
.buy { display: flex; align-items: flex-end; gap: 12px; margin-top: 18px; }
.buy input { width: 80px; }

.review { border-top: 1px solid var(--line-2); padding: 13px 0; }
.review:first-of-type { border-top: 0; padding-top: 0; }
.review p { margin: 5px 0 0; }
.review-head { display: flex; gap: 10px; align-items: baseline; }

/* --- forms -------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form.row { flex-direction: row; align-items: center; }
.form.row input { flex: 1; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
input, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
button { font: inherit; font-weight: 600; padding: 9px 17px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; cursor: pointer; align-self: flex-start; }
button:hover { background: var(--ink-2); }
.linkish { background: none; color: var(--muted); font-weight: 400; font-size: 13px; padding: 0; }
.linkish:hover { background: none; color: var(--red); text-decoration: underline; }
.link { color: var(--accent); font-size: 13.5px; text-decoration: none; }
.link:hover { text-decoration: underline; }
.alert { background: #fdeceb; border: 1px solid #f3c7c2; color: #8a2318; padding: 10px 13px; border-radius: 6px; font-size: 14px; }
.ok { background: #e9f4ee; border: 1px solid #bcdfc9; color: #14583a; padding: 10px 13px; border-radius: 6px; font-size: 14px; }
.admin-brand { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }

/* --- tables ------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; }
.plain { list-style: none; margin: 0 0 10px; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 7px; }
.trow { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line-2); }
.trow.grand { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 10px; font-size: 17px; font-weight: 700; }
.totals button { width: 100%; margin-top: 14px; text-align: center; display: block; }
.totals-inline { margin-top: 18px; margin-left: auto; max-width: 300px; }
.invoice .inv-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.inv-to { display: flex; flex-direction: column; text-align: right; font-size: 14px; gap: 2px; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .pdetail { flex-direction: column; }
  .pdetail-art { width: 100%; flex: none; height: 150px; }
  .top-in { flex-wrap: wrap; padding: 12px 18px; gap: 12px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
}

/* --- findings panel ----------------------------------------------------- */
.fp-toggle { position: fixed; right: 22px; bottom: 22px; z-index: 30; background: var(--ink); color: #fff; border-radius: 999px; padding: 11px 19px; box-shadow: 0 6px 20px rgba(28, 36, 48, .3); }
.pill { background: var(--accent); border-radius: 999px; padding: 1px 8px; margin-left: 6px; font-size: 12.5px; }
.fp { position: fixed; right: 0; top: 0; bottom: 0; width: 420px; max-width: 94vw; z-index: 31; background: #fff; border-left: 1px solid var(--line); box-shadow: -8px 0 30px rgba(28, 36, 48, .16); padding: 20px 22px 30px; overflow-y: auto; }
.has-panel .top-in, .has-panel .main { margin-right: 420px; }
@media (max-width: 1180px) { .has-panel .top-in, .has-panel .main { margin-right: 0; } }
.fp-head { display: flex; justify-content: space-between; align-items: flex-start; }
.fp-head h2 { margin: 0; font-size: 19px; }
.fp-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.x { background: none; color: var(--muted); font-size: 24px; line-height: 1; padding: 0 4px; }
.x:hover { background: none; color: var(--ink); }
.fp-intro { color: var(--muted); font-size: 13.5px; }
.fp-cat { margin-top: 22px; }
.fp-cat h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.fp-count { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.fp-blurb { font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
.fp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fp-item { border: 1px solid var(--line); border-radius: 7px; padding: 11px 12px; }
.fp-item.is-done { border-color: #bcdfc9; background: #f4faf6; }
.fp-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.fp-title { font-weight: 600; font-size: 14px; flex: 1; }
.tick { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 11px; color: #fff; }
.is-done .tick { background: var(--green); border-color: var(--green); }
.sev { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.sev-crit { background: #fbe3e0; color: #8a2318; }
.sev-high { background: #fdeedb; color: #8a4a10; }
.sev-med { background: #fdf6da; color: #77620f; }
.sev-low { background: #e9edf2; color: #4b5765; }
.fp-goal { margin: 0 0 7px; font-size: 13px; color: var(--ink-2); }
.fp-hint summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.fp-hint p { font-size: 12.5px; color: var(--ink-2); margin: 7px 0 0; }
.fp-teaches { border-top: 1px dashed var(--line); padding-top: 7px; }
.fp-reset { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.fp-reset button { background: #eceef1; color: var(--ink); }
.fp-reset button:hover { background: #e0e3e8; }
