:root {
  --bg: #f7f4ee;
  --ink: #1f2b2e;
  --ink-soft: #42545a;
  --line: #d8d0c3;
  --surface: #fffdf8;
  --brand: #d36f2f;
  --brand-dark: #aa5120;
  --accent: #7f9aa7;
  --shadow: 0 10px 28px rgba(49, 37, 25, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top, #fbfaf6, var(--bg) 60%);
  color: var(--ink);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.hero {
  border-bottom: 1px solid var(--line);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.top-nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 120ms ease, border-color 120ms ease;
}

.top-nav-link:hover {
  color: var(--ink);
  border-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  color: var(--ink);
}

.brand span {
  letter-spacing: 0.2px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 2.8rem;
}

.eyebrow {
  color: var(--brand-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin: 0 0 0.7rem;
}

h1 {
  margin: 0;
  line-height: 1.1;
  font-size: clamp(1.8rem, 4.8vw, 3rem);
  max-width: 16ch;
}

.page-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  max-width: none;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.6;
  max-width: 54ch;
  margin: 1rem 0 0;
}

.hero-art img {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.button {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: #c5b9a6;
  background: #fffaf2;
}

.button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.button.primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.button.subtle {
  background: transparent;
}

.button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

main {
  padding: 1.6rem 0 2.6rem;
}

.panel {
  padding: 1.15rem 0;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin: 0 0 0.8rem;
}

.section-lead {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.grid {
  display: grid;
  gap: 0.9rem;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.cli-card {
  position: relative;
}

.cli-seal {
  --seal-fill: #eadfed;

  position: absolute;
  top: -0.625rem;
  right: 1.25rem;
  width: 5.25rem;
  height: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.0625rem;
  color: #47284d;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-6deg);
  filter: drop-shadow(0 2px 2px rgba(45, 31, 42, 0.14));
}

.cli-seal strong {
  font-size: 1.125rem;
}

.cli-seal::before,
.cli-seal::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
}

.cli-seal::before {
  inset: 0;
  background: #94749d;
}

.cli-seal::after {
  inset: 1px;
  background: radial-gradient(ellipse closest-side, var(--seal-fill) 84%, #9e81a6 86% 89%, var(--seal-fill) 91%);
}

@supports (clip-path: shape(from 0 0, line to 100% 0, close)) {
  .cli-seal {
    --seal-edge: shape(
      from 95.1% 41.2%,
      curve to 95.1% 58.8% with 103% 50%,
      curve to 88.2% 75% with 99% 70.7%,
      curve to 75.6% 87.4% with 87.5% 88.2%,
      curve to 59% 94.1% with 70.3% 99.9%,
      curve to 41% 94.1% with 50% 104%,
      curve to 24.4% 87.4% with 29.7% 99.9%,
      curve to 11.8% 75% with 12.5% 88.2%,
      curve to 4.9% 58.8% with 1% 70.7%,
      curve to 4.9% 41.2% with -3% 50%,
      curve to 11.8% 25% with 1% 29.3%,
      curve to 24.4% 12.6% with 12.5% 11.8%,
      curve to 41% 5.9% with 29.7% 0.1%,
      curve to 59% 5.9% with 50% -4%,
      curve to 75.6% 12.6% with 70.3% 0.1%,
      curve to 88.2% 25% with 87.5% 11.8%,
      curve to 95.1% 41.2% with 99% 29.3%,
      close
    );
  }

  .cli-seal::before,
  .cli-seal::after {
    border-radius: 0;
    clip-path: var(--seal-edge);
  }
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

pre {
  margin: 0.8rem 0 0;
  background: #1e2429;
  color: #f4f6f7;
  border-radius: 10px;
  padding: 0.8rem;
  overflow: auto;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.87rem;
}

.install-command {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.install-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

.install-actions .button {
  padding: 0.45rem 0.75rem;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: center;
}

.logo-large {
  max-width: 380px;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cta {
  text-align: left;
  padding: 1.8rem 0 0.8rem;
}

.cta p {
  margin: 0.3rem 0 0;
  max-width: 54ch;
  color: var(--ink-soft);
}

.cta .actions {
  justify-content: flex-start;
}

.verifier-card {
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--ink);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
  line-height: 1.4;
}

#signer-details,
#signer-details ul,
#signer-details li {
  max-width: 100%;
}

#signer-details li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Verifier page: keeping these in styles.css instead of inline `style="…"`
   attributes lets the strict CSP on `verify.html` use `style-src 'self'`
   without `'unsafe-inline'`. */
.verifier-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  max-width: none;
}

.input-help {
  color: var(--ink-soft);
  font-weight: 400;
}

.is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .top-nav {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .top-nav-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .hero-content,
  .split,
  .grid.three,
  .grid.two-by-two {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  h1 {
    max-width: 20ch;
  }
}
