/* =========================================================
   git show: disruptive, terminal-native design system
   No conventional CSS. Mono everywhere. Diff as language.
   ========================================================= */

:root {
  /* pure black with elevated tiers so cards pop */
  --bg: #000000;
  --bg-1: #0b0f17;
  --bg-2: #121826;
  --bg-3: #1c2438;
  --line: #1f2838;
  --line-strong: #2e3a52;

  /* neutral grayscale foreground (only --fg keeps a microdose of warmth) */
  --fg: #e9e7e1;
  --fg-1: #b6b4ae;
  --fg-2: #76746e;
  --fg-3: #4d4c48;

  /* diff colors: the alphabet of this language */
  --add: #4ec264;
  --add-bg: rgba(78, 194, 100, 0.08);
  --add-bg-strong: rgba(78, 194, 100, 0.16);
  --rem: #ff5d5d;
  --rem-bg: rgba(255, 93, 93, 0.08);
  --rem-bg-strong: rgba(255, 93, 93, 0.16);

  /* hash now blue (replaces amber) */
  --hash: #6fa8ff;
  --hash-dim: rgba(111, 168, 255, 0.16);
  --hash-glow: rgba(111, 168, 255, 0.35);

  /* HEAD: the single highlight color of the whole site */
  --head: #79f2c5;
  --head-dim: rgba(121, 242, 197, 0.12);
  --head-glow: rgba(121, 242, 197, 0.35);

  /* link unified with hash blue */
  --link: #6fa8ff;

  /* spacing scale */
  --gut: clamp(1rem, 2.5vw, 2rem);
  --col-max: 78ch;

  /* type */
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "calt" 1, "liga" 1, "zero" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 18% 0%, rgba(121, 242, 197, 0.06), transparent 60%),
    radial-gradient(ellipse 50% 35% at 92% 22%, rgba(111, 168, 255, 0.05), transparent 60%),
    radial-gradient(ellipse 70% 30% at 50% 100%, rgba(121, 242, 197, 0.03), transparent 60%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* subtle CRT scanlines + grain, barely perceptible */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: overlay;
  opacity: 0.6;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.9  0 0 0 0 0.85  0 0 0 0.03 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.35;
}

::selection { background: var(--head); color: var(--bg); }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  transition: color .15s ease, background .15s ease;
}
a:hover { color: var(--head); background: var(--head-dim); }

/* ============= INLINE SVG ICONS ============= */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.14em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
  flex-shrink: 0;
}
.icon.lead { margin-right: 0.5em; }
.icon.trail { margin-left: 0.4em; }

/* ============= TOP STATUS BAR (tmux-style) ============= */
.bar-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .55rem clamp(.75rem, 2vw, 1.5rem);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}

.bar-top .prompt-host { color: var(--head); }
.bar-top .prompt-host::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--head); box-shadow: 0 0 8px var(--head-glow); margin-right: .5rem; vertical-align: 0; }
.bar-top .prompt-path { color: var(--hash); }
.bar-top .prompt-cmd { color: var(--fg-1); }
.bar-top .prompt-cmd .blink { color: var(--head); animation: blink 1.05s steps(2) infinite; }
.bar-top .center { color: var(--fg-2); text-align: center; }
.bar-top .right { color: var(--fg-2); display: flex; gap: 1rem; align-items: center; }
.bar-top .right .pill {
  border: 1px solid var(--line-strong);
  padding: .15rem .55rem;
  border-radius: 999px;
  color: var(--fg-1);
}
.bar-top .right .pill .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--add); margin-right: .35rem; vertical-align: 1px; box-shadow: 0 0 6px var(--add); }

@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ============= LAYOUT ============= */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) 8rem;
  position: relative;
}

/* ============= HERO ============= */
.hero {
  position: relative;
  padding: clamp(2rem, 8vw, 6rem) 0 clamp(3rem, 10vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.hero-prompt {
  color: var(--fg-2);
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}
.hero-prompt .glyph { color: var(--head); }
.hero-prompt .path { color: var(--hash); }

.hero-title {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(3.5rem, 16vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  margin: 0;
  color: var(--fg);
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.hero-title .gt {
  color: var(--head);
  text-shadow: 0 0 24px var(--head-glow);
}
.hero-title .cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  background: var(--head);
  vertical-align: -0.05em;
  margin-left: 0.12em;
  animation: blink 1.05s steps(2) infinite;
  box-shadow: 0 0 18px var(--head-glow);
}

.hero-sub {
  margin-top: clamp(1rem, 3vw, 2rem);
  font-size: clamp(1.05rem, 2.2vw, 1.6rem);
  line-height: 1.35;
  color: var(--fg-1);
  max-width: 38ch;
}
.hero-sub .commit-emph {
  color: var(--add);
  background: var(--add-bg);
  padding: 0 0.25em;
}

.hero-meta {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-size: 12.5px;
  color: var(--fg-2);
  letter-spacing: 0.03em;
}
.hero-meta .kv .label {
  color: var(--fg-3);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-right: 0.5rem;
}
.hero-meta .kv strong {
  color: var(--fg);
  font-weight: 700;
  margin-left: 0.5rem;
  letter-spacing: 0.04em;
}
.hero-meta .kv .var {
  color: var(--hash);
  background: var(--hash-dim);
  padding: 0.05rem 0.4rem;
  font-weight: 700;
}

.hero-cta {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  border-radius: 0;
}
.btn:hover {
  background: var(--head-dim);
  border-color: var(--head);
  color: var(--head);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--line-strong);
}
.btn.primary {
  background: var(--head);
  color: var(--bg);
  border-color: var(--head);
  font-weight: 700;
}
.btn.primary:hover {
  background: var(--head);
  color: var(--bg);
  box-shadow: 4px 4px 0 var(--bg-3);
}
.btn .arrow { font-weight: 700; }

/* ============= GIT LOG NAV ============= */
.nav-log {
  margin: clamp(3rem, 6vw, 5rem) 0;
  padding: 1.25rem 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  color: var(--fg-2);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}
.nav-log .label {
  color: var(--fg-3);
  letter-spacing: 0.05em;
  padding-top: 0.2em;
  white-space: nowrap;
}
.nav-log ol {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.nav-log li a {
  color: var(--fg-1);
  border: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}
.nav-log li a .sha {
  color: var(--hash);
  font-size: 11px;
}
.nav-log li a:hover {
  background: transparent;
  color: var(--head);
}
.nav-log li a:hover .sha { color: var(--head); }

/* ============= SECTION SHELL ============= */
section.scene {
  position: relative;
  margin: clamp(4rem, 8vw, 7rem) 0;
  scroll-margin-top: 80px;
}

.commit-header {
  border-left: 3px solid var(--hash);
  padding: 0.4rem 0 0.4rem 1rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 12px;
  color: var(--fg-2);
}
.commit-header .commit-sha { color: var(--hash); font-weight: 700; }
.commit-header .commit-author { color: var(--fg-1); }
.commit-header .commit-date { color: var(--fg-3); }
.commit-header .commit-msg {
  grid-column: 1 / -1;
  margin-top: 0.4rem;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.commit-header .commit-msg .arrow {
  color: var(--head);
  margin-right: 0.4rem;
}

.diff-file {
  font-size: 11.5px;
  color: var(--fg-3);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}
.diff-file .a { color: var(--rem); }
.diff-file .b { color: var(--add); }
.hunk {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.6rem 0.75rem 0.6rem 0;
  font-size: 14px;
  margin-bottom: 1.25rem;
}
.hunk-header {
  color: var(--link);
  font-size: 12px;
  padding: 0 0 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}
.hunk .line {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-items: baseline;
  padding: 0.1rem 0;
}
.hunk .line .mark {
  text-align: center;
  color: var(--fg-3);
  user-select: none;
}
.hunk .line.add { background: var(--add-bg); }
.hunk .line.add .mark { color: var(--add); }
.hunk .line.rem { background: var(--rem-bg); }
.hunk .line.rem .mark { color: var(--rem); }
.hunk .line .code { padding-right: 0.5rem; }
.hunk .line.para { padding-top: 0.7rem; }
.hunk .line.rem del,
.list-rem li del {
  color: var(--fg-2);
  text-decoration: line-through;
  text-decoration-color: var(--rem);
  text-decoration-thickness: 1.5px;
}

/* ============= DATI ENTERPRISE PARTNERS ============= */
.partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
}
.partner {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  min-height: 140px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.partner::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 8px; height: 8px;
  border-top: 1px solid var(--hash);
  border-left: 1px solid var(--hash);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.partner::after {
  content: "";
  position: absolute;
  bottom: 0; right: 0;
  width: 8px; height: 8px;
  border-bottom: 1px solid var(--hash);
  border-right: 1px solid var(--hash);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.partner:hover {
  border-color: var(--head);
  background: var(--bg-2);
  transform: translateY(-3px);
}
.partner:hover::before, .partner:hover::after {
  border-color: var(--head);
  opacity: 1;
}
.partner img {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
  filter: brightness(0.95);
  transition: filter 0.2s ease;
}
.partner:hover img { filter: brightness(1.05); }

/* ============= DATI BRAND MARK ============= */
.dati-mark {
  display: block;
  max-width: 110px;
  height: auto;
  margin: 0 0 1.25rem;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.dati-mark:hover { opacity: 1; }
.hero-meta .dati-inline {
  display: inline-block;
  height: 1.6em;
  vertical-align: -0.4em;
  margin-left: 0.5rem;
}

/* prose inside scenes */
.prose {
  max-width: var(--col-max);
  color: var(--fg-1);
}
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--fg); font-weight: 700; }
.prose em { color: var(--fg); font-style: italic; }
.prose code {
  font-family: var(--mono);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0.05rem 0.35rem;
  font-size: 0.92em;
  color: var(--hash);
}

.callout {
  border-left: 3px solid var(--head);
  background: linear-gradient(90deg, var(--head-dim), transparent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  color: var(--fg);
}
.callout strong { color: var(--head); }
.callout .lead { display: block; color: var(--head); font-size: 11px; letter-spacing: 0.08em; margin-bottom: 0.4rem; font-style: italic; }

/* lists styled as add/remove */
.list-add, .list-rem {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}
/* normal block li with absolute-positioned bullet: avoids the grid
   auto-placement bug where a loose text node after <strong> got placed
   into the narrow first column and wrapped one word per line. */
.list-add li, .list-rem li {
  position: relative;
  padding: 0.45rem 0.6rem 0.45rem 2rem;
  border-left: 2px solid transparent;
  color: var(--fg-1);
  font-size: 0.97rem;
  line-height: 1.55;
  margin: 0.2rem 0;
}
.list-add li {
  background: var(--add-bg);
  border-left-color: var(--add);
}
.list-add li::before {
  content: "+";
  position: absolute;
  left: 0.6rem;
  top: 0.45rem;
  color: var(--add);
  font-weight: 700;
}
.list-rem li {
  background: var(--rem-bg);
  border-left-color: var(--rem);
}
.list-rem li::before {
  content: "−";
  position: absolute;
  left: 0.6rem;
  top: 0.45rem;
  color: var(--rem);
  font-weight: 700;
}
.list-add li strong, .list-rem li strong { color: var(--fg); }

/* numbered workflow */
.workflow {
  display: grid;
  gap: 0.8rem;
  margin: 1.5rem 0;
}
.workflow .step {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--hash);
  transition: border-left-color 0.2s ease, transform 0.2s ease;
}
.workflow .step:hover {
  border-left-color: var(--head);
  transform: translateX(4px);
}
.workflow .step .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--hash);
  letter-spacing: -0.05em;
  line-height: 1;
  padding-top: 0.15rem;
}
.workflow .step .body strong {
  display: block;
  color: var(--fg);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.workflow .step .body span {
  color: var(--fg-2);
  font-size: 0.92rem;
}

/* ============= CRITERIA CARDS ============= */
.crits {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.crit-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--hash);
  padding: 1.25rem 1.5rem;
  transition: border-left-color 0.2s ease, transform 0.2s ease;
}
.crit-card:hover {
  border-left-color: var(--head);
  transform: translateX(2px);
}
.crit-head {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.crit-pct {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--head);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.crit-head h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.crit-q {
  color: var(--fg-1);
  margin: 0 0 1rem;
  font-style: italic;
  font-size: 0.95rem;
}
.crit-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.75rem;
}
.examples-good, .examples-bad {
  background: var(--bg);
  padding: 0.75rem 0.85rem;
  border-left: 2px solid;
}
.examples-good { border-left-color: var(--add); }
.examples-bad { border-left-color: var(--rem); }
.examples-good .ex-label, .examples-bad .ex-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.examples-good .ex-label { color: var(--add); }
.examples-bad .ex-label { color: var(--rem); }
.examples-good ul, .examples-bad ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.examples-good li, .examples-bad li {
  position: relative;
  padding: 0.22rem 0 0.22rem 1.1rem;
  font-size: 0.88rem;
  color: var(--fg-1);
  line-height: 1.5;
}
.examples-good li::before, .examples-bad li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}
.examples-good li::before { content: "+"; color: var(--add); }
.examples-bad li::before { content: "−"; color: var(--rem); }

/* ============= README CTA ============= */
.readme-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--head);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  flex-wrap: wrap;
}
.readme-cta-text {
  flex: 1 1 280px;
}
.readme-cta-text h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--head);
  font-weight: 700;
}
.readme-cta-text p {
  margin: 0;
  color: var(--fg-1);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* prizes */
.prizes {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.prize {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  overflow: hidden;
}
.prize.head-prize {
  border: 1px solid var(--head);
  background:
    radial-gradient(circle at 20% 0%, var(--head-dim), transparent 60%),
    var(--bg-1);
  box-shadow: 0 0 0 0 var(--head-glow);
  animation: head-pulse 4s ease-in-out infinite;
}
@keyframes head-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--head-glow); }
  50% { box-shadow: 0 0 40px -10px var(--head-glow); }
}
.prize-tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--hash);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line-strong);
  margin-bottom: 0.75rem;
}
.head-prize .prize-tag { color: var(--head); border-color: var(--head); }
.prize h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.prize h3 .ref { color: var(--head); font-weight: 800; }
.prize h3 .prize-sub {
  display: block;
  font-size: 0.55em;
  color: var(--fg-2);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
  font-style: italic;
}
.prize .gloss {
  font-style: italic;
  color: var(--fg-2);
  font-size: 0.92rem;
  margin: 0 0 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--line);
}
.prize ul { padding-left: 1.1rem; margin: 0; color: var(--fg-1); }
.prize ul li { margin: 0.35rem 0; }
.prize ul li strong { color: var(--fg); }
.head-prize::after {
  content: "* HEAD -> main";
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 10.5px;
  color: var(--head);
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* schedule timeline */
.timeline {
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.timeline .row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.timeline .row .glyph {
  color: var(--hash);
  font-weight: 700;
}
.timeline .row.major { background: var(--head-dim); padding-left: 0.75rem; padding-right: 0.75rem; border-bottom-color: var(--head); }
.timeline .row.major .glyph { color: var(--head); }
.timeline .row.major .stage { color: var(--head); font-weight: 700; }
.timeline .row .stage { color: var(--fg); }
.timeline .row .date {
  font-variant-numeric: tabular-nums;
  color: var(--hash);
  background: var(--hash-dim);
  padding: 0.1rem 0.5rem;
  font-size: 0.85rem;
}
.timeline .row.major .date { color: var(--head); background: transparent; border: 1px dashed var(--head); }

/* contributors / banca grid */
.contrib {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.contrib .card {
  padding: 1.2rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-top: 3px solid var(--hash);
  transition: border-top-color 0.2s ease;
}
.contrib .card:hover { border-top-color: var(--head); }
.contrib .card .role {
  color: var(--hash);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}
.contrib .card h4 {
  margin: 0 0 0.4rem;
  color: var(--fg);
  font-size: 1.05rem;
}
.contrib .card p { margin: 0; color: var(--fg-2); font-size: 0.88rem; }

/* contact / footer */
.signature {
  margin-top: clamp(4rem, 8vw, 6rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--fg-2);
}
.signature .sig-line {
  font-size: 13px;
  color: var(--fg-3);
  margin: 0.3rem 0;
}
.signature .sig-line.cob { color: var(--fg-2); }
.signature .sig-line .label { color: var(--fg-3); }
.signature .sig-line .who { color: var(--fg); font-weight: 500; }
.signature .sig-line .email { color: var(--link); }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}
.contact-links a {
  border: 1px solid var(--line-strong);
  padding: 0.5rem 0.85rem;
  font-size: 12.5px;
}

/* ============= BOTTOM STATUS BAR (vim modeline) ============= */
.bar-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  padding: 0.45rem clamp(0.75rem, 2vw, 1.5rem);
  background: var(--bg);
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  backdrop-filter: blur(8px);
}
.bar-bottom .mode {
  color: var(--bg);
  background: var(--head);
  padding: 0.05rem 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.bar-bottom .where { color: var(--fg-1); }
.bar-bottom .where .sha { color: var(--hash); }
.bar-bottom .info { text-align: right; color: var(--fg-2); }
.bar-bottom .info .key {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0 0.4rem;
  margin: 0 0.15rem;
  color: var(--fg-1);
}

/* ============= SUBMISSIONS PAGE ============= */
.submissions-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1rem 0 2rem;
  font-size: 13px;
  color: var(--fg-2);
}
.submissions-meta .stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}
.submissions-meta .stat .num {
  color: var(--head);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.submissions-meta .stat .lbl {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-3);
}

.submissions {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}
.sub-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--hash);
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: border-left-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.sub-card:hover {
  border-left-color: var(--head);
  background: var(--bg-2);
  transform: translateX(3px);
}
.sub-card .sub-sha {
  color: var(--hash);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.sub-card .sub-body strong {
  display: block;
  color: var(--fg);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.sub-card .sub-body .sub-meta {
  font-size: 11.5px;
  color: var(--fg-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.sub-card .sub-body .sub-meta .author { color: var(--link); }
.sub-card .sub-body .sub-meta .when { color: var(--fg-3); font-variant-numeric: tabular-nums; }

.sub-card .sub-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line-strong);
}
.sub-card .sub-status .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-2);
}
.sub-card[data-status="open"] .sub-status { color: var(--add); border-color: var(--add); }
.sub-card[data-status="open"] .sub-status .dot { background: var(--add); box-shadow: 0 0 6px var(--add); }
.sub-card[data-status="closed"] .sub-status { color: var(--fg-2); border-color: var(--line-strong); }
.sub-card[data-status="aprovada"] .sub-status { color: var(--head); border-color: var(--head); }
.sub-card[data-status="aprovada"] .sub-status .dot { background: var(--head); box-shadow: 0 0 6px var(--head); }
.sub-card[data-status="finalista"] .sub-status { color: var(--head); border-color: var(--head); background: var(--head-dim); }
.sub-card[data-status="finalista"] .sub-status .dot { background: var(--head); box-shadow: 0 0 8px var(--head); }
.sub-card[data-status="descartada"] .sub-status { color: var(--rem); border-color: var(--rem); }
.sub-card[data-status="descartada"] .sub-status .dot { background: var(--rem); }

.sub-empty, .sub-error, .sub-loading {
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--line);
  color: var(--fg-2);
  font-size: 0.95rem;
}
.sub-empty .glyph, .sub-error .glyph, .sub-loading .glyph {
  display: block;
  font-size: 2.5rem;
  color: var(--hash);
  margin-bottom: 0.75rem;
  font-weight: 700;
}
.sub-loading .glyph { color: var(--head); animation: pulse 1.4s ease-in-out infinite; }
.sub-error .glyph { color: var(--rem); }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ============= TRIAGEM DASHBOARD ============= */
.triage-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
}
.triage-stats .stat {
  padding: 0.85rem 1rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--hash);
  cursor: pointer;
  transition: border-left-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  text-align: left;
  font-family: var(--mono);
  color: inherit;
}
.triage-stats .stat:hover {
  border-left-color: var(--head);
  background: var(--bg-2);
  transform: translateY(-2px);
}
.triage-stats .stat.active {
  border-left-color: var(--head);
  background: var(--head-dim);
}
.triage-stats .stat .num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--head);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.triage-stats .stat .lbl {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-top: 0.35rem;
}

.triage-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.6rem;
  margin: 1rem 0;
  align-items: center;
}
.triage-controls input[type="search"],
.triage-controls select {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  padding: 0.55rem 0.75rem;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s ease;
}
.triage-controls input[type="search"]:focus,
.triage-controls select:focus { border-color: var(--head); }
.triage-controls input[type="search"]::placeholder { color: var(--fg-3); }

.triage-bulkbar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--head-dim);
  border: 1px solid var(--head);
  margin-bottom: 1rem;
  font-size: 13px;
  color: var(--fg);
}
.triage-bulkbar.visible { display: flex; }
.triage-bulkbar .count {
  font-weight: 700;
  color: var(--head);
  font-variant-numeric: tabular-nums;
}
.triage-bulkbar button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.15s ease;
}
.triage-bulkbar button:hover {
  border-color: var(--head);
  color: var(--head);
  background: var(--bg);
}
.triage-bulkbar .spacer { flex: 1; }

.triage-table-wrap {
  border: 1px solid var(--line);
  background: var(--bg-1);
  overflow-x: auto;
  margin-bottom: 1rem;
}
.triage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 880px;
}
.triage-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-2);
  color: var(--head);
  font-weight: 700;
  text-align: left;
  padding: 0.7rem 0.85rem;
  font-size: 11px;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}
.triage-table thead th.sortable { cursor: pointer; }
.triage-table thead th.sortable:hover { color: var(--fg); }
.triage-table thead th .arrow { color: var(--fg-3); margin-left: 0.3rem; }
.triage-table thead th.sorted .arrow { color: var(--head); }
.triage-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.triage-table tbody tr:hover { background: var(--bg-2); }
.triage-table tbody tr.selected { background: var(--head-dim); }
.triage-table td {
  padding: 0.65rem 0.85rem;
  vertical-align: top;
  color: var(--fg-1);
}
.triage-table td.col-check { width: 2.5rem; text-align: center; }
.triage-table td.col-num { color: var(--hash); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.triage-table td.col-title strong { color: var(--fg); font-weight: 700; }
.triage-table td.col-title .sub { display: block; color: var(--fg-3); font-size: 11px; margin-top: 0.2rem; }
.triage-table td.col-author { color: var(--link); white-space: nowrap; }
.triage-table td.col-repo a { font-size: 12px; }
.triage-table td.col-val { white-space: nowrap; }
.triage-table td.col-val .v-ok { color: var(--add); }
.triage-table td.col-val .v-fail { color: var(--rem); }
.triage-table td.col-val .v-pending { color: var(--fg-3); }
.triage-table td.col-age { color: var(--fg-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.triage-table td.col-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.triage-table .lbl-chip {
  font-size: 10px;
  padding: 0.1rem 0.4rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--line-strong);
  color: var(--fg-2);
  white-space: nowrap;
}
.triage-table .lbl-chip[data-label="finalista"] { color: var(--head); border-color: var(--head); }
.triage-table .lbl-chip[data-label="aprovada"] { color: var(--add); border-color: var(--add); }
.triage-table .lbl-chip[data-label="descartada"] { color: var(--rem); border-color: var(--rem); }
.triage-table .lbl-chip[data-label="validacao-passou"] { color: var(--add); border-color: var(--add); }
.triage-table .lbl-chip[data-label="validacao-falhou"] { color: var(--rem); border-color: var(--rem); }
.triage-table .lbl-chip[data-label="aguardando-triagem"] { color: var(--hash); border-color: var(--hash); }
.triage-table .lbl-chip[data-label="janela-encerrada"] { color: var(--fg-2); border-color: var(--fg-3); }
.triage-table td.col-coms { color: var(--fg-2); font-variant-numeric: tabular-nums; text-align: center; }
.triage-table td.col-open a {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line-strong);
  font-size: 11px;
  color: var(--fg-1);
}
.triage-table td.col-open a:hover { border-color: var(--head); color: var(--head); background: transparent; }

.triage-table input[type="checkbox"] {
  accent-color: var(--head);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.triage-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--fg-2);
}
.triage-empty .glyph {
  display: block;
  font-size: 2.2rem;
  color: var(--hash);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.triage-toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--head);
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--head);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  letter-spacing: 0.03em;
}
.triage-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 720px) {
  html { font-size: 14px; }
  .bar-top { font-size: 11px; gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .bar-top .center { display: none; }
  .bar-top .right .pill .label { display: none; }
  .hero-title { font-size: clamp(3rem, 22vw, 6rem); }
  .hero-sub { font-size: 1rem; }
  .commit-header { grid-template-columns: 1fr; }
  .commit-header .commit-msg { font-size: 1.5rem; }
  .workflow .step { grid-template-columns: 2.5rem 1fr; gap: 0.6rem; padding: 0.85rem; }
  .workflow .step .num { font-size: 1.4rem; }
  .crit-examples { grid-template-columns: 1fr; }
  .crit-card { padding: 1rem 1.1rem; }
  .crit-pct { font-size: 1.8rem; }
  .readme-cta { padding: 1rem 1.1rem; gap: 1rem; }
  .readme-cta .btn { width: 100%; justify-content: center; }
  .timeline .row { grid-template-columns: 1.5rem 1fr; }
  .timeline .row .date { grid-column: 2; justify-self: start; }
  .bar-bottom { font-size: 10.5px; grid-template-columns: auto 1fr; }
  .bar-bottom .info { display: none; }
  main { padding-bottom: 6rem; }
  .sub-card { grid-template-columns: auto 1fr; gap: 0.6rem 0.9rem; padding: 0.85rem 1rem; }
  .sub-card .sub-status { grid-column: 1 / -1; justify-self: start; }
  .triage-controls { grid-template-columns: 1fr; }
  .triage-stats .stat .num { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .blink, .cursor { animation: none !important; }
}

/* keyboard focus */
:focus-visible {
  outline: 2px solid var(--head);
  outline-offset: 2px;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
