/* GuiltFree — a serious-looking stylesheet for an unserious proposition. */

:root {
  --ink:        #0e1f17;
  --ink-soft:   #40584c;
  --ink-faint:  #7c9084;
  --paper:      #f8f6f0;
  --card:       #ffffff;
  --line:       #e2ded2;
  --green:      #1d6b47;
  --green-deep: #12452e;
  --green-lit:  #34a36c;
  --mint:       #dcefe3;
  --sand:       #efe9db;
  --clay:       #b8623a;

  --radius:     14px;
  --radius-lg:  22px;
  --shadow:     0 1px 2px rgba(14,31,23,.05), 0 12px 32px -12px rgba(14,31,23,.16);
  --wrap:       1120px;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: var(--green); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--tint { background: var(--sand); }
.section--deep { background: var(--green-deep); color: #eaf3ed; }
.section--deep h2 { color: #fff; }
.section--deep a { color: var(--mint); }

.eyebrow {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 14px;
}
.section--deep .eyebrow { color: var(--green-lit); }

.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }
.section--deep .lede { color: #b9cfc3; }

/* ---- Buttons ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-faint); }
.btn--revoke {
  background: var(--clay);
  color: #fff;
  font-size: 1.05rem;
  padding: 17px 34px;
}
.btn--revoke:hover { background: #9d5230; }
.btn--revoke:disabled { opacity: .65; cursor: wait; }
.btn--sm { padding: 9px 16px; font-size: .85rem; }

/* ---- Header -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248,246,240,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.02em;
}
.brand svg { display: block; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
}
.nav a:hover { color: var(--ink); }

/* ---- Hero ---------------------------------------------------------- */

.hero { padding: 84px 0 64px; }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 1.28rem; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: .84rem;
  color: var(--ink-faint);
}
.trust strong { color: var(--ink); font-weight: 600; }

/* ---- Cards --------------------------------------------------------- */

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-soft); margin: 0; font-size: .97rem; }

/* ---- Steps --------------------------------------------------------- */

.steps { counter-reset: step; display: grid; gap: 0; margin-top: 40px; }
.step {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 22px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--green);
  line-height: 1;
}
.step h3 { margin-bottom: .25em; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---- The instrument ------------------------------------------------ */

.instrument {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 36px;
}

.progress {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: #fbfaf6;
}
.progress-step {
  flex: 1;
  padding: 13px 10px;
  text-align: center;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-right: 1px solid var(--line);
}
.progress-step:last-child { border-right: 0; }
.progress-step.is-active { color: var(--green); background: var(--mint); }
.progress-step.is-done { color: var(--ink-soft); }

.stage { padding: 34px; }
.stage h3 { font-size: 1.5rem; }
.stage-hint { color: var(--ink-soft); font-size: .95rem; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  color: var(--ink);
  background: #fbfaf6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field input:focus {
  outline: none;
  border-color: var(--green-lit);
  box-shadow: 0 0 0 3px rgba(52,163,108,.16);
}
.field-row { display: grid; grid-template-columns: 1fr 130px; gap: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  padding: 7px 14px;
  font: inherit;
  font-size: .85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip.is-on { background: var(--mint); border-color: var(--green-lit); color: var(--green-deep); }

/* Amplify */
.amp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 34px 0;
  flex-wrap: wrap;
}
.amp-box { text-align: center; min-width: 130px; }
.amp-figure {
  font-family: var(--display);
  font-size: 3.4rem;
  line-height: 1;
  color: var(--ink);
}
.amp-box--new .amp-figure { color: var(--green); opacity: .25; transform: scale(.92); transition: opacity .45s ease, transform .45s ease; }
.amp-box--new .amp-figure.is-revealed { opacity: 1; transform: scale(1); }
.amp-label { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }
.amp-kg { font-size: .9rem; color: var(--ink-soft); margin-top: 2px; }
.amp-arrow { font-size: 1.8rem; color: var(--ink-faint); }

/* Revoke */
.revoke-box { text-align: center; padding: 20px 0 8px; }
.revoke-gain {
  margin-top: 18px;
  font-size: .9rem;
  color: var(--ink-soft);
}
.revoke-gain strong { color: var(--green); }

/* ---- Certificate --------------------------------------------------- */

.certificate {
  border: 2px solid var(--green-deep);
  border-radius: var(--radius);
  padding: 30px;
  background:
    repeating-linear-gradient(45deg, rgba(29,107,71,.025) 0 12px, transparent 12px 24px),
    var(--card);
  position: relative;
}
.cert-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.cert-title {
  font-family: var(--display);
  font-size: 1.32rem;
  line-height: 1.2;
  margin: 0;
}
.cert-meta { font-size: .78rem; color: var(--ink-faint); text-align: right; line-height: 1.7; }
.cert-meta strong { color: var(--ink); font-weight: 600; display: block; letter-spacing: .05em; }

.cert-body { padding: 20px 0; }
.cert-line { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.cert-value { font-family: var(--display); font-size: 1.5rem; margin: 2px 0 18px; }

.cert-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: .93rem; }
.cert-table td { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.cert-table td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.cert-table tr:last-child td { border-bottom: 0; }

.cert-net {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--mint);
  border-radius: var(--radius);
}
.cert-net-label { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green-deep); font-weight: 600; }
.cert-net-value { font-family: var(--display); font-size: 2rem; color: var(--green-deep); }

.cert-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--ink-faint);
  line-height: 1.6;
}
.cert-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---- Registry ------------------------------------------------------ */

.registry-stats { display: flex; gap: 48px; flex-wrap: wrap; margin: 26px 0 20px; }
.registry-stat-value { font-family: var(--display); font-size: 2.4rem; line-height: 1; }
.registry-stat-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }

.registry-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.registry-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.registry-serial { font-variant-numeric: tabular-nums; color: var(--ink-faint); font-size: .84rem; }
.registry-kg { color: var(--green); font-weight: 600; white-space: nowrap; }
.registry-empty { color: var(--ink-faint); padding: 18px 0; font-size: .95rem; }

/* ---- Quotes -------------------------------------------------------- */

.quote { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.quote blockquote { margin: 0 0 16px; font-family: var(--display); font-size: 1.12rem; line-height: 1.45; }
.quote cite { font-style: normal; font-size: .86rem; color: var(--ink-faint); }
.quote cite strong { display: block; color: var(--ink); font-weight: 600; }

/* ---- FAQ ----------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); margin-top: 34px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--green); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 12px 0 0; color: var(--ink-soft); max-width: 68ch; }

/* ---- Formula ------------------------------------------------------- */

.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95rem;
  line-height: 1.9;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 22px 26px;
  white-space: pre;
  overflow-x: auto;
  color: #dcefe3;
}

/* ---- Extension teaser ---------------------------------------------- */

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-deep);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.section--deep .badge { background: rgba(255,255,255,.14); color: var(--mint); }

.browser-mock {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: #f1eee6;
  border-bottom: 1px solid var(--line);
}
.browser-dot { width: 10px; height: 10px; border-radius: 50%; background: #d6d1c4; }
.browser-body { padding: 22px; }
.browser-toast {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--green-lit);
  border-radius: var(--radius);
  background: var(--mint);
}
.browser-toast p { margin: 0; font-size: .9rem; color: var(--green-deep); }
.browser-toast strong { display: block; margin-bottom: 3px; }
.browser-receipt { font-size: .88rem; color: var(--ink-faint); margin-bottom: 16px; }

/* ---- Footer -------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 46px 0;
  font-size: .88rem;
  color: var(--ink-faint);
}
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 26px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.disclaimer {
  padding: 16px 18px;
  background: var(--sand);
  border-radius: var(--radius);
  line-height: 1.6;
  max-width: 78ch;
}
.disclaimer strong { color: var(--ink); }

/* ---- Methodology page ---------------------------------------------- */

.paper { max-width: 74ch; margin: 0 auto; }
.paper h2 { margin-top: 1.8em; }
.paper h3 { margin-top: 1.6em; }
.paper ol, .paper ul { color: var(--ink-soft); padding-left: 1.3em; }
.paper li { margin-bottom: .5em; }
.paper .footnote { font-size: .86rem; color: var(--ink-faint); border-left: 2px solid var(--line); padding-left: 16px; }
.paper-meta {
  font-size: .85rem;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 30px;
}

/* ---- Responsive ---------------------------------------------------- */

@media (max-width: 720px) {
  .nav { gap: 16px; }
  .nav a.nav-hide { display: none; }
  .section { padding: 60px 0; }
  .stage { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .registry-row { grid-template-columns: 1fr auto; }
  .registry-serial { display: none; }
  .step { grid-template-columns: 40px 1fr; gap: 14px; }
}

/* ---- Print: the certificate, alone --------------------------------- */

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .section:not(#offset), .progress,
  .cert-actions, .hero, .stage-hint { display: none !important; }
  .instrument { border: 0; box-shadow: none; margin: 0; }
  .stage { padding: 0; }
  .certificate { border-color: #000; }
  #offset { padding: 0; }
  #offset > .wrap > *:not(.instrument) { display: none; }
}

/* ---- Embedded panels: wallet, verifier, results --------------------- */

.panel {
  margin-top: 22px;
  padding: 20px;
  background: #fbfaf6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h4 { margin: 0; font-size: 1.05rem; }
.panel-close {
  border: 0; background: transparent; cursor: pointer; font-size: 1.3rem;
  line-height: 1; color: var(--ink-faint); padding: 2px 6px; border-radius: 6px;
}
.panel-close:hover { background: var(--sand); color: var(--ink); }
.panel-hint { font-size: .85rem; color: var(--ink-soft); margin: 10px 0 0; line-height: 1.55; }
.panel-status { font-size: .8rem; color: var(--ink-faint); margin: 10px 0 0; min-height: 1.2em; }
.panel-status.is-ok { color: var(--green); }
.panel-status.is-bad { color: var(--clay); }

.qr-box {
  display: flex; justify-content: center; padding: 18px; margin: 16px 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.qr-box svg { width: 100%; max-width: 300px; height: auto; display: block; }
.qr-box--wide svg { max-width: 380px; }

.btn--wide { width: 100%; }

/* Tabs, shared by the verifier and the results */
.tabs {
  display: flex; gap: 6px; padding: 4px; margin-bottom: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
}
.tab {
  flex: 1; padding: 9px 12px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  background: transparent;
}
.tab:hover { color: var(--ink); }
.tab.is-on { background: var(--green); color: #fff; }

.verifier, .results {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; margin-top: 32px;
}
.results { margin-top: 18px; }

#verify-input {
  width: 100%; min-height: 116px; padding: 12px; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
}
#verify-input:focus {
  outline: none; border-color: var(--green-lit);
  box-shadow: 0 0 0 3px rgba(52,163,108,.16);
}
.verifier-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.headline { text-align: center; padding: 20px 0 12px; }
.headline-value {
  font-family: var(--display); font-size: 3.4rem; line-height: 1;
  letter-spacing: -.03em; color: var(--green);
}
.headline-unit { font-size: 1.4rem; color: var(--ink-soft); }
.headline-label {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 10px;
}
.headline-sub { font-size: .86rem; color: var(--ink-soft); margin-top: 12px; }

table.totals { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.totals th {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; text-align: left;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
table.totals td { padding: 10px 0; border-bottom: 1px solid #eeeade; color: var(--ink-soft); }
table.totals td.num, table.totals th.num {
  text-align: right; font-variant-numeric: tabular-nums; color: var(--ink);
}
table.totals tr.total td {
  border-top: 2px solid var(--green-deep); border-bottom: 0;
  font-weight: 600; font-size: 1.05rem; padding-top: 14px;
}
table.totals tr.total td.num { color: var(--green-deep); }

.creds { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.cred {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px;
  align-items: baseline; padding: 12px 0; border-bottom: 1px solid #eeeade;
  font-size: .9rem;
}
.cred:last-child { border-bottom: 0; }
.cred-main { min-width: 0; }
.cred-activity { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred-meta { font-size: .76rem; color: var(--ink-faint); }
.cred-err { font-size: .78rem; color: var(--clay); }
.cred-kg { font-variant-numeric: tabular-nums; color: var(--green); font-weight: 600; white-space: nowrap; }
.pill {
  font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.pill--ok { background: var(--mint); color: var(--green-deep); }
.pill--bad { background: #f6e3da; color: #8f4324; }
.pill--warn { background: #f6efda; color: #7a5a1e; }

@media (max-width: 560px) {
  .cred { grid-template-columns: auto 1fr; }
  .cred-kg { grid-column: 2; }
}

/* ---- Colophon: the protocol applied to the project itself ----------- */

.colophon {
  max-width: 78ch;
  margin: 0 0 22px;
  padding: 20px 22px;
  background: var(--card);
  border: 1.5px solid var(--green-deep);
  border-radius: var(--radius);
  background-image:
    repeating-linear-gradient(45deg, rgba(29,107,71,.025) 0 12px, transparent 12px 24px);
}
.colophon-kicker {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  margin: 0 0 8px;
}
.colophon-body {
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}
.colophon-serial {
  margin: 12px 0 0;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
