/* SNELL theme — palette from logo: teal #067B7D + gray #6F6F6E; black only for emphasis */
:root {
  --surface: #f3f6f6;
  --surface-2: #ffffff;
  --ink: #6f6f6e;
  --ink-strong: #000000;
  --void: #121616;
  --muted: #9a9a9a;
  --accent: #067b7d;
  --accent-2: #045456;
  --accent-soft: #e0f2f2;
  --pitch: #067b7d;
  --line: #e1e8e8;
  --win: #067b7d;
  --warn: #c9852a;
  --danger: #c44a3a;

  /* Display = same family as body: straight, no decorative display face */
  --display: "Manrope", sans-serif;
  --body: "Manrope", sans-serif;
  --numeral: "Space Grotesk", sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18, 22, 22, 0.04), 0 8px 24px rgba(18, 22, 22, 0.05);
  --shadow-hover: 0 2px 4px rgba(18, 22, 22, 0.06), 0 12px 32px rgba(18, 22, 22, 0.08);

  /* compat aliases for older classnames */
  --hard-shadow: var(--shadow);
  --hard-shadow-ink: var(--shadow);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--body);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3,
.display {
  font-family: var(--display);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

strong,
b {
  color: var(--ink-strong);
  font-weight: 700;
}

.num {
  font-family: var(--numeral);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em;
  text-transform: none;
  line-height: 1.05;
  font-weight: 800;
}

.brand span {
  color: var(--accent);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    filter 0.18s ease;
  text-decoration: none;
  min-height: 44px;
}

a.btn,
a.btn:hover,
a.btn:focus,
a.btn:visited,
a.btn:active {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary,
a.btn-primary,
a.btn-primary:link,
a.btn-primary:visited {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}

.btn-primary:hover,
a.btn-primary:hover,
.btn-primary:focus-visible,
a.btn-primary:focus-visible {
  background: var(--accent-2);
  color: #fff;
  box-shadow: var(--shadow-hover);
  filter: none;
}

.btn-primary:active,
a.btn-primary:active {
  background: var(--accent-2);
  color: #fff;
}

.btn-secondary,
a.btn-secondary,
a.btn-secondary:link,
a.btn-secondary:visited {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn-secondary:hover,
a.btn-secondary:hover,
.btn-secondary:focus-visible,
a.btn-secondary:focus-visible {
  background: var(--surface);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 22%, var(--line));
}

.btn-secondary:active,
a.btn-secondary:active {
  background: var(--surface);
  color: var(--ink);
}

.btn-ghost,
a.btn-ghost,
a.btn-ghost:hover,
a.btn-ghost:visited {
  background: transparent;
  color: var(--muted);
  font-family: var(--body);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  border: none;
  padding: 8px 10px;
}

.btn-ghost:hover,
a.btn-ghost:hover {
  color: var(--ink);
}

.grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

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

.card h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.card .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.section-label {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin: 0 0 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.badge-ok {
  background: var(--accent-soft);
  color: var(--accent-2);
}

.badge-warn {
  background: color-mix(in srgb, var(--warn) 16%, #fff);
  color: #8a5a12;
}

.badge-off {
  background: color-mix(in srgb, var(--muted) 14%, #fff);
  color: var(--muted);
}

.form-row {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

@media (min-width: 700px) {
  .form-row.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .form-row.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.toast {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  left: auto;
  background: var(--void);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.45;
  max-width: min(420px, calc(100vw - 32px));
  word-break: break-word;
  z-index: 50;
  display: none;
}

.toast.toast--error {
  background: var(--danger);
  color: #fff;
}

.toast.toast--ok {
  background: var(--void);
  color: #fff;
}

.toast.show {
  display: block;
  animation: snellRise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.muted {
  color: var(--muted);
}

.hero-card {
  padding: 28px 22px;
  margin-bottom: 22px;
}

.hero-card h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin: 8px 0 12px;
}

.hero-card p {
  max-width: 46ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.empty {
  padding: 18px 0;
  color: var(--muted);
  font-weight: 600;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button.linkish {
  background: none;
  border: none;
  color: var(--accent-2);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-family: var(--body);
}

.module-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.module-row:last-child {
  border-bottom: none;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 700px) {
  .stat-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.stat .num {
  font-size: 28px;
  line-height: 1;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

@keyframes snellRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.snell-enter {
  animation: snellRise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
