/* =========================================================================
   IntegralLab — page identity on top of kit.css.

   Teal, the fifth stop on the Mathematics track. Mint is TransformLab's and
   two labs on one track must not share an accent — the colour is how a
   reader knows which lab they are in before they have read a word.
   ========================================================================= */
:root {
  --bp-cyan: #38d9d3;
  --bp-blue: #9beae7;
  --bp-mark: #38d9d3;
  --note-accent: #38d9d3;
  --calc-col: 370px;
  --page-max: 1440px;
}

body {
  background-image:
    linear-gradient(rgba(56, 217, 211, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 217, 211, 0.024) 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px;
}

.hint { font-size: 0.76rem; color: var(--bp-ink-dim); line-height: 1.55; margin-top: 0.5rem; }
.hint b { color: var(--bp-cyan); }
.results-col { min-width: 0; }
.results-col svg { max-width: 100%; }

/* ------------------------------ result cards ----------------------------- */
.vres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem; margin-bottom: 0.9rem;
}
.vres .card {
  border: 1px solid var(--bp-line); border-radius: 9px;
  background: var(--bp-panel); padding: 0.55rem 0.7rem;
}
.vres .card .k {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--bp-ink-dim);
}
.vres .card .v {
  font-family: var(--mono); font-size: 1.1rem; font-weight: 700;
  color: var(--bp-cyan); margin-top: 0.15rem; overflow-wrap: anywhere;
}
.vres .card .x {
  font-family: var(--mono); font-size: 0.68rem; color: var(--bp-ink-dim);
  margin-top: 0.15rem; overflow-wrap: anywhere;
}

.vnote {
  border: 1px solid var(--bp-line); border-left-width: 4px;
  border-left-color: #ffd43b; border-radius: 9px;
  background: var(--bp-panel); padding: 0.5rem 0.8rem; margin-bottom: 0.8rem;
  font-size: 0.8rem; line-height: 1.55; color: var(--bp-ink-dim);
}
.vnote b { color: #ffd43b; }
.vnote.ok { border-left-color: #5fe3a1; }
.vnote.ok b { color: #5fe3a1; }

/* --------------------------- the rules table ----------------------------- */
/* The cost column is the point of the table, so it gets its own emphasis:
   comparing quadrature rules by panel count flatters Gauss, and the reader
   should see evaluations rather than n whenever the two disagree. */
.res-table td.num { text-align: right; font-family: var(--mono); }
.res-table td.cost { text-align: right; font-family: var(--mono); color: #ffc94d; }
.res-table tr.best td { background: rgba(95, 227, 161, 0.07); }
.res-table td.err-good { color: #51cf66; }
.res-table td.err-bad { color: #ff6b6b; }

.seg { display: inline-flex; border: 1px solid var(--bp-line); border-radius: 7px; overflow: hidden; }
.seg button {
  font-family: var(--mono); font-size: 0.72rem; cursor: pointer;
  background: transparent; color: var(--bp-ink-dim);
  border: none; padding: 0.3rem 0.65rem; transition: 0.16s;
}
.seg button.active { background: var(--bp-cyan); color: var(--bp-bg); font-weight: 700; }
.seg button:not(.active):hover { color: var(--bp-ink); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }

@media (max-width: 720px) {
  .vres { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
}
