:root {
  --mm-blue: #2563eb;
  --mm-blue-dark: #1d4ed8;
  --mm-blue-soft: #dbeafe;
  --mm-ink: #0f172a;
  --mm-muted: #64748b;
  --bg: #f8fafc;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Avenir Next", "Segoe UI", Candara, Calibri, sans-serif;
  color: var(--mm-ink);
  background: var(--bg);
  line-height: 1.5;
}
h1, h2, .display {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
a { color: var(--mm-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.hero {
  min-height: 100vh;
  color: #fff;
  background:
    radial-gradient(ellipse at top, #1e3a8a 0%, #020617 55%, #020617 100%);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero-inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4rem;
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  color: inherit; text-decoration: none;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.35rem; font-weight: 600;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 1.15rem; border-radius: 10px;
  border: 0; font-weight: 600; font-size: .95rem; cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: #fff; color: var(--mm-blue); }
.btn-primary:hover { background: #f1f5f9; text-decoration: none; }
.btn-outline {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3);
}
.btn-outline:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.btn-solid { background: var(--mm-blue); color: #fff; }
.btn-solid:hover { background: var(--mm-blue-dark); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--mm-ink); border: 1px solid #cbd5e1; }

.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; margin: .6rem 0 1rem; max-width: 16ch; }
.hero p.lead { max-width: 36rem; color: #cbd5e1; font-size: 1.1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.section { max-width: 960px; margin: 0 auto; padding: 3rem 1.25rem; }
.section h2 { margin-top: 0; }
.muted { color: var(--mm-muted); }
.card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 1.25rem 1.35rem; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.grid-3 { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.shell { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }
.dash {
  display: grid; gap: 1rem;
}
@media (min-width: 900px) {
  .dash { grid-template-columns: 220px 1fr; min-height: 100vh; }
}
.side {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 1rem;
}
.side a {
  display: block; padding: .55rem .7rem; border-radius: 8px;
  color: #334155; font-weight: 500; text-decoration: none; margin-bottom: .2rem;
}
.side a.active, .side a:hover { background: var(--mm-blue-soft); color: var(--mm-blue-dark); text-decoration: none; }
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem; }
.stat .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mm-muted); }
.stat .value { font-size: 1.4rem; font-weight: 700; margin-top: .35rem; }

label { display: block; font-size: .9rem; font-weight: 500; margin: 0 0 .35rem; }
input, textarea, select {
  width: 100%; min-height: 44px; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: .55rem .75rem; font: inherit; background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
.field { margin-bottom: .9rem; }
.alert { padding: .75rem 1rem; border-radius: 10px; font-size: .92rem; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; color: #b91c1c; }
.alert-ok { background: #ecfdf5; color: #047857; }
.alert-warn { background: #fffbeb; color: #92400e; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .7rem .6rem; border-top: 1px solid #e2e8f0; vertical-align: top; }
th { color: var(--mm-muted); font-weight: 500; }
.narrow { max-width: 440px; margin: 3rem auto; }
.center { text-align: center; }
.tiny { font-size: .8rem; color: var(--mm-muted); }

.topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.topbar .brand { color: var(--mm-ink); }
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .9rem;
  align-items: center;
}
.topnav a {
  color: #334155;
  font-weight: 500;
  text-decoration: none;
  font-size: .92rem;
}
.topnav a:hover { color: var(--mm-blue); text-decoration: none; }
.panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 1.1rem 1.2rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
}
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-err { background: #fee2e2; color: #991b1b; }
.form-grid { display: grid; gap: .9rem; }
@media (min-width: 720px) {
  .form-grid.two { grid-template-columns: 1fr 1fr; }
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
