/* MondragonTech ops hub — practical internal tool */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e2e0da;
  --accent: #0b5f4b;
  --accent-soft: #e8f3ef;
  --warn-bg: #faf6ee;
  --warn-ink: #6b4e16;
  --radius: 8px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1.15rem 3rem;
}

header {
  margin-bottom: 1.5rem;
}

header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.how-to {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid #eadfbf;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}

.how-to strong {
  font-weight: 650;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: #c9c6bd;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
}

.section-label {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}

.lead.has-artifacts {
  border-color: #b7d4c8;
  box-shadow: inset 3px 0 0 var(--accent);
}

.lead-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.65rem;
}

.lead-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #eeebe4;
  color: var(--muted);
  font-weight: 550;
}

.tag.ready {
  background: var(--accent-soft);
  color: var(--accent);
}

.tag.high {
  background: #f3ebe0;
  color: #7a4e12;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.action {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 550;
  text-decoration: none;
}

.action:hover {
  border-color: #bbb8ae;
  background: #fff;
}

.action.demo {
  background: var(--accent-soft);
  border-color: #b7d4c8;
  color: var(--accent);
}

.action.outreach {
  background: #eef2f7;
  border-color: #c8d3e0;
  color: #1e3a5f;
}

.action.audit {
  background: #f3efe8;
  border-color: #d5cdc0;
  color: #3d3428;
}

.action.site {
  background: #fff;
}

.action.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.muted-note {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

footer code {
  font-size: 0.8em;
  background: #eeebe4;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* --- Pipeline page --- */

.wrap-wide {
  max-width: 1100px;
}

.ops-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  font-weight: 550;
}

.ops-nav a {
  color: var(--accent);
  text-decoration: none;
}

.ops-nav a:hover {
  text-decoration: underline;
}

.ops-nav-sep {
  color: #b0ada4;
}

.ops-nav-current {
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.stat-grid-dense {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
}

.stat-info {
  border-color: #b7d4c8;
  background: var(--accent-soft);
}

.stat-warn {
  border-color: #eadfbf;
  background: var(--warn-bg);
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--muted);
}

.callout {
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
}

.callout strong {
  display: block;
  font-weight: 650;
  margin-bottom: 0.25rem;
}

.callout p {
  margin: 0;
  color: inherit;
}

.callout-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid #eadfbf;
}

.callout-info {
  background: #eef2f7;
  color: #1e3a5f;
  border: 1px solid #c8d3e0;
}

.checklist {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checklist li {
  position: relative;
  padding: 0.7rem 0.9rem 0.7rem 2.15rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 1.5px solid #b0ada4;
  border-radius: 3px;
  background: #fff;
}

.checklist li.done {
  color: var(--muted);
}

.checklist li.done::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 2px #fff;
}

.checklist code {
  font-size: 0.85em;
  background: #eeebe4;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 720px;
}

.data-table-compact {
  min-width: 0;
  margin-bottom: 0.5rem;
}

.data-table th,
.data-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #faf9f6;
  position: sticky;
  top: 0;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:nth-child(even) {
  background: #faf9f6;
}

.data-table .row-info {
  background: #f3faf7 !important;
}

.data-table .row-warn {
  background: #fbf8f1 !important;
}

.cell-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

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

.ref-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.ref-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.ref-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.ref-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0.75rem 0;
}

/* --- Pricing page --- */

.internal-banner {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  background: #eeebe4;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.pitch-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.88rem;
  color: var(--ink);
}

.pitch-list li {
  margin-bottom: 0.55rem;
}

.pitch-list li:last-child {
  margin-bottom: 0;
}

.script-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.05rem;
  margin-bottom: 0.65rem;
  user-select: text;
}

.script-block .script-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.script-block p {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}

.script-block p:last-child {
  margin-bottom: 0;
}

header code,
footer code {
  font-size: 0.85em;
  background: #eeebe4;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid-dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ref-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding: 1.1rem 0.85rem 2.5rem;
  }

  .action {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
    text-align: center;
  }

  .stat-grid,
  .stat-grid-dense {
    grid-template-columns: 1fr 1fr;
  }
}
