/* Gauge — design tokens. The single source of truth for every mockup.
   Style findings.md explains every choice. Flat, paper, two typefaces. */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* color */
  --wool: #F2EDE2;          /* page background */
  --paper: #FBF8F1;         /* panels — the pattern page */
  --ink: #2B2A26;
  --ink-soft: #6E6A5E;
  --grid: rgba(43, 42, 38, .09);
  --rule: #DDD4C0;
  --mustard: #9C6B1E;       /* the one accent */
  --mustard-deep: #7A5318;
  --pass: #27733B;          /* pipeline verdicts ONLY */
  --pass-bg: #E8F0E6;
  --fail: #B3261E;          /* pipeline verdicts ONLY */
  --fail-bg: #F7E9E5;

  /* type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", Consolas, monospace;

  /* rhythm */
  --cell: 24px;             /* the chart grid unit */
  --measure: 64ch;
}

* { box-sizing: border-box; }

html { background: var(--wool); }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  /* faint chart grid — graph paper, barely there */
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--wool);
  background-size: var(--cell) var(--cell);
  -webkit-font-smoothing: antialiased;
}

/* ---- surfaces ---------------------------------------------------- */

.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 24px;
}

/* a framed piece of real GitLab, always labeled */
.gitlab-frame {
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 2px;
}
.gitlab-frame > .frame-caption {
  font: 500 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

/* ---- type -------------------------------------------------------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

.label {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.num, .mono { font-family: var(--mono); }
.muted { color: var(--ink-soft); }

/* the error hero — the biggest type in the product is a row number */
.hero-row {
  font: 600 72px/1 var(--mono);
  letter-spacing: -.02em;
}

/* ---- verdicts (the ONLY red and green in the product) ------------- */

.verdict-pass { color: var(--pass); }
.verdict-fail { color: var(--fail); }
.verdict-band-pass { background: var(--pass-bg); border: 1px solid var(--pass); border-radius: 2px; }
.verdict-band-fail { background: var(--fail-bg); border: 1px solid var(--fail); border-radius: 2px; }

/* ---- controls ----------------------------------------------------- */

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

.btn {
  display: inline-block;
  font: 600 14px/1 var(--serif);
  color: var(--paper);
  background: var(--mustard);
  border: 1px solid var(--mustard-deep);
  border-radius: 2px;
  padding: 11px 20px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--mustard-deep); color: var(--paper); }

.btn-quiet {
  background: transparent;
  color: var(--mustard);
  border: 1px solid var(--rule);
}
.btn-quiet:hover { border-color: var(--mustard); background: transparent; color: var(--mustard-deep); }

/* merge is the human's — it gets weight, not color tricks */
.btn-merge { font-size: 15px; padding: 13px 26px; }

textarea, input[type=text], input[type=password], select {
  font: 400 14px/1.5 var(--mono);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 10px 12px;
  width: 100%;
}
textarea:focus, input:focus, select:focus, .btn:focus {
  outline: 2px solid var(--mustard);
  outline-offset: 1px;
}

/* ---- data --------------------------------------------------------- */

table.counts {
  border-collapse: collapse;
  font: 400 13px/1.5 var(--mono);
}
table.counts th {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: left;
  padding: 6px 14px 6px 0;
  border-bottom: 1px solid var(--ink);
}
table.counts td {
  padding: 6px 14px 6px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

/* pattern rows as the audience reads them */
.pattern-row {
  font: 400 14px/1.9 var(--mono);
  white-space: pre-wrap;
}
.pattern-row .rownum {
  display: inline-block;
  min-width: 4.5ch;
  color: var(--ink-soft);
  user-select: none;
}

/* knitting diff: old/new rows */
.diff-old { background: var(--fail-bg); text-decoration: line-through; text-decoration-color: rgba(179,38,30,.5); }
.diff-new { background: var(--pass-bg); }

/* ---- chart glyph cells (CYC standard symbols as iconography) ------ */

.cells { display: inline-flex; }
.cell {
  width: var(--cell); height: var(--cell);
  border: 1px solid var(--ink);
  margin-right: -1px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 13px/1 var(--mono);
  background: var(--paper);
}

/* ---- layout ------------------------------------------------------- */

.shell { max-width: 980px; margin: 0 auto; padding: 32px 24px 80px; }

.topbar {
  display: flex; align-items: baseline; gap: 16px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
}
.topbar .wordmark { font: 700 20px/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.topbar nav { margin-left: auto; display: flex; gap: 18px; }
.topbar nav a { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
