/* SiteWarden brand tokens — see branding/BRAND.md */
:root {
  --obsidian: #0b0b0d;
  --ink2: #141418;
  --wasabi: #c5e84d;
  --wasabi-deep: #8db22d;
  --bone: #f4f4f0;
  --smoke: #9a9aa3;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1a1d21;
  background: var(--bone);
  line-height: 1.45;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--obsidian);
  color: #fff;
  padding: 0.6rem 1rem;
}
nav a { color: var(--smoke); text-decoration: none; margin-left: 1rem; }
nav .navout { display: inline; margin-left: 1rem; }
nav .navout button { background: none; border: 0; padding: 0; color: var(--smoke); font-size: 1rem; cursor: pointer; text-decoration: underline; }
nav a.brand { margin: 0; font-weight: 700; color: var(--bone); font-size: 1.05rem; display: flex; align-items: center; gap: 0.45rem; }
nav a.on { color: var(--wasabi); font-weight: 600; }
main { max-width: 640px; margin: 0 auto; padding: 1rem; }
main.wide { max-width: 960px; }
h1 { font-size: 1.4rem; margin: 0.7rem 0; }
h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: 0.03em; }
.muted { color: #667085; font-size: 0.9em; }

.card {
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  padding: 1rem;
  margin: 0.8rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
label { font-weight: 600; font-size: 0.95rem; display: flex; flex-direction: column; gap: 0.3rem; }
input, select {
  font-size: 1.05rem;
  padding: 0.65rem;
  border: 1px solid #c6ccd4;
  border-radius: 8px;
  width: 100%;
  background: #fff;
}
button {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--wasabi);
  color: var(--obsidian);
  cursor: pointer;
}
button:hover { background: var(--wasabi-deep); }
button.secondary { background: var(--obsidian); color: var(--bone); }
button.secondary:hover { background: var(--ink2); }
button.link {
  background: none;
  color: var(--obsidian);
  text-decoration: underline;
  padding: 0.2rem;
  font-size: 0.9rem;
  font-weight: 500;
}
button.link.danger { color: #b42318; }
form.inline { display: inline; }

.hero { text-align: center; padding: 1.6rem 0 0.8rem; }
.hero h1 { font-size: 1.8rem; line-height: 1.25; }
.lead { font-size: 1.1rem; color: #475467; max-width: 34rem; margin: 0.8rem auto; }

/* Dark Obsidian-style treatment — marketing surfaces only (body.dark) */
body.dark { background: var(--obsidian); color: var(--bone); }
body.dark .heroshield { display: block; margin: 1.2rem auto 0.4rem; filter: drop-shadow(0 18px 36px rgba(197, 232, 77, 0.16)); }
body.dark .hero h1 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; }
body.dark .hero .accent { color: var(--wasabi); }
body.dark .lead, body.dark .muted, body.dark .feature p { color: var(--smoke); }
body.dark .card, body.dark .feature { background: var(--ink2); border-color: #26262c; }
body.dark main a:not(.btn) { color: var(--wasabi); }
body.dark details { border-bottom: 1px solid #26262c; padding: 0.55rem 0; }
body.dark details:last-of-type { border-bottom: 0; }
body.dark summary { cursor: pointer; }
body.dark summary:hover { color: var(--wasabi); }
body.dark details p { color: var(--smoke); margin: 0.5rem 0 0.3rem; }
.pagefoot { text-align: center; padding: 1.2rem 0 0.6rem; }
a.btn {
  display: inline-block;
  background: var(--wasabi);
  color: var(--obsidian);
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  margin: 0.4rem 0.4rem 0.4rem 0;
}
a.btn:hover { background: var(--wasabi-deep); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.feature { background: #fff; border: 1px solid #e3e6ea; border-radius: 10px; padding: 0.9rem 1rem; }
.feature h2 { font-size: 1rem; }
.feature p { font-size: 0.92rem; color: #475467; margin: 0.4rem 0 0; }

.banner { padding: 0.7rem 0.9rem; border-radius: 8px; margin: 0.6rem 0; font-weight: 500; }
.banner.good { background: #e6f4ea; color: #1e7d3c; border: 1px solid #b7e0c3; }
.banner.warn { background: #fdf1dc; color: #92600a; border: 1px solid #f2d9a7; }
.banner.bad { background: #fdebea; color: #b42318; border: 1px solid #f4c6c1; }

.toolphoto {
  display: block;
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
  border: 1px solid #e3e6ea;
  margin: 0.5rem 0;
}
.radios { display: flex; gap: 1rem; }
.radio { flex-direction: row; align-items: center; gap: 0.4rem; font-weight: 500; }
.radio input { width: auto; }
textarea {
  font-size: 1rem;
  padding: 0.65rem;
  border: 1px solid #c6ccd4;
  border-radius: 8px;
  width: 100%;
  font-family: inherit;
  resize: vertical;
}

.matches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.matches li { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.6rem 0.7rem; border: 1px solid #e3e6ea; border-radius: 8px; }
.matches li a { text-decoration: none; color: var(--obsidian); font-size: 1.05rem; }
.matches li a:hover { text-decoration: underline; }
.matches li a .code { margin-right: 0.4rem; }

.status { font-size: 1.15rem; margin: 0.4rem 0 0.8rem; }
.status.in strong { color: #1e7d3c; }
.status.out strong { color: #92600a; }

.stats { color: #475467; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; align-items: center; }
.tabs a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #e8ebef;
  color: #344054;
  text-decoration: none;
  font-size: 0.9rem;
}
.tabs a.on { background: var(--obsidian); color: var(--wasabi); }
.searchbar { display: flex; gap: 0.5rem; }
.searchbar input { flex: 1; }
.searchbar button { padding: 0.65rem 1rem; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
th { background: #f0f2f5; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: #475467; }
tr.oos td { background: #fffaf2; }
tr.inactive td { color: #98a2b3; }

.badge { padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.badge.ok { background: #e6f4ea; color: #1e7d3c; }
.badge.warn { background: #fdf1dc; color: #92600a; }
.badge.bad { background: #fdebea; color: #b42318; }

.rowform { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.rowform input[name="name"] { flex: 1 1 220px; }
.rowform label { flex-direction: row; align-items: center; gap: 0.4rem; font-weight: 500; }
.rowform input[type="date"] { width: auto; }
.rowform button { padding: 0.45rem 0.8rem; font-size: 0.9rem; }

.tagsheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1rem 0; }
.tagcell {
  border: 1px dashed #98a2b3;
  border-radius: 8px;
  padding: 0.7rem;
  text-align: center;
  background: #fff;
}
.tagcell img { width: 100%; max-width: 160px; }
.tagcell .code { font-size: 1.3rem; }
.tagcell .tagname { font-size: 0.85rem; color: #475467; }

@media (max-width: 560px) {
  .tagsheet { grid-template-columns: repeat(2, 1fr); }
}
@media print {
  nav, .noprint { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .tagsheet { grid-template-columns: repeat(3, 1fr); }
}
