/* Pack Mule — base design system. Blocky, high-contrast, light/dark. */
:root {
  --pm-primary: #C2410C;
  --pm-primary-dark: #9A3412;
  --pm-primary-ink: #FFFFFF;
  --pm-ink: #15191F;
  --pm-muted: #5B6472;
  --pm-line: #15191F;
  --pm-bg: #FBF8F4;
  --pm-surface: #FFFFFF;
  --pm-surface-2: #F3EFE9;
  --pm-ok: #15803D;
  --pm-warn: #B45309;
  --pm-bad: #B91C1C;
  --pm-info: #1D4ED8;
  --pm-radius: 3px;
  --pm-border: 2px;
  --pm-shadow: 4px 4px 0 var(--pm-line);
  --pm-shadow-sm: 2px 2px 0 var(--pm-line);
  --pm-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pm-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --pm-max: 1200px;
}
:root[data-theme="dark"], :root:not([data-theme="light"]) {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pm-ink: #F2EFE9;
    --pm-muted: #A2AAB8;
    --pm-line: #4A5260;
    --pm-bg: #101317;
    --pm-surface: #181C22;
    --pm-surface-2: #21262E;
    --pm-shadow: 4px 4px 0 #000;
    --pm-shadow-sm: 2px 2px 0 #000;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --pm-ink: #F2EFE9;
  --pm-muted: #A2AAB8;
  --pm-line: #4A5260;
  --pm-bg: #101317;
  --pm-surface: #181C22;
  --pm-surface-2: #21262E;
  --pm-shadow: 4px 4px 0 #000;
  --pm-shadow-sm: 2px 2px 0 #000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--pm-font);
  background: var(--pm-bg);
  color: var(--pm-ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--pm-primary); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--pm-mono); font-size: .9em; }
.wrap { max-width: var(--pm-max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--pm-muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hide { display: none !important; }

/* Blocky primitives */
.card {
  background: var(--pm-surface);
  border: var(--pm-border) solid var(--pm-line);
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
  padding: 20px;
}
.card-flat { box-shadow: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 11px 18px;
  background: var(--pm-surface); color: var(--pm-ink);
  border: var(--pm-border) solid var(--pm-line);
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow-sm);
  text-decoration: none; white-space: nowrap;
  transition: transform .06s ease, box-shadow .06s ease;
}
.btn:hover { text-decoration: none; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--pm-line); }
.btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--pm-line); }
.btn-primary { background: var(--pm-primary); color: var(--pm-primary-ink); border-color: var(--pm-line); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-sm { padding: 6px 11px; font-size: .84rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-danger { background: var(--pm-bad); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

label { display: block; font-weight: 700; font-size: .82rem; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }
input, select, textarea {
  font: inherit; width: 100%;
  padding: 10px 12px;
  background: var(--pm-surface);
  color: var(--pm-ink);
  border: var(--pm-border) solid var(--pm-line);
  border-radius: var(--pm-radius);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--pm-primary); outline-offset: 1px; }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

.tag {
  display: inline-block; padding: 3px 9px; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
  border: 2px solid var(--pm-line); border-radius: 2px; background: var(--pm-surface-2);
}
.tag-ok { background: var(--pm-ok); color: #fff; border-color: var(--pm-ok); }
.tag-warn { background: var(--pm-warn); color: #fff; border-color: var(--pm-warn); }
.tag-bad { background: var(--pm-bad); color: #fff; border-color: var(--pm-bad); }
.tag-info { background: var(--pm-info); color: #fff; border-color: var(--pm-info); }
.tag-primary { background: var(--pm-primary); color: var(--pm-primary-ink); border-color: var(--pm-primary); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--pm-line); }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; background: var(--pm-surface-2); }
tbody tr:hover { background: var(--pm-surface-2); }
.table-wrap { border: var(--pm-border) solid var(--pm-line); border-radius: var(--pm-radius); overflow-x: auto; background: var(--pm-surface); box-shadow: var(--pm-shadow); }
.table-wrap table tr:last-child td { border-bottom: none; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.03em; font-size: 1.22rem; color: var(--pm-ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--pm-primary); color: var(--pm-primary-ink);
  border: var(--pm-border) solid var(--pm-line); border-radius: var(--pm-radius);
  font-size: 1.05rem; font-weight: 900;
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
/* An uploaded logo: fit it, never crop it. */
.logo-mark.logo-mark-img { display: flex; align-items: center; justify-content: center; width: auto; height: auto;
  max-width: 100%; padding: 6px 10px; background: #fff; overflow: hidden; }
.logo-mark.logo-mark-img.on-dark { background: transparent; box-shadow: none; padding: 0; }
.logo-mark.logo-mark-img img { display: block; width: auto; height: auto; max-height: 64px; max-width: 168px; object-fit: contain; }
/* In the sidebar, a real logo sits above the company name. */
.side-brand:has(.logo-mark-img) { flex-direction: column; align-items: flex-start; gap: 8px; }

.notice { border: var(--pm-border) solid var(--pm-line); border-left-width: 8px; border-radius: var(--pm-radius); padding: 12px 14px; background: var(--pm-surface); }
.notice-info { border-left-color: var(--pm-info); }
.notice-warn { border-left-color: var(--pm-warn); }
.notice-bad { border-left-color: var(--pm-bad); }
.notice-ok { border-left-color: var(--pm-ok); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
