/* AdvancedSecurity Integrity Monitor — design tokens
   Ink-navy + bone paper, verdigris for verified state, brick for alerts,
   brass "seal line" as the one signature motif — echoing the product's
   actual mechanic: things get sealed on-chain. */

:root {
  --ink: #12161c;
  --ink-raised: #1a2029;
  --paper: #edeee9;
  --paper-dim: #b9bcb4;
  --signal: #3fa796;
  --signal-dim: #2a7266;
  --alert: #d65f5f;
  --alert-dim: #8f3f3f;
  --slate: #5b6472;
  --gold: #c9a227;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em 0;
}

p { margin: 0 0 1em 0; color: var(--paper-dim); }

code, .mono, .hash {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

a { color: var(--signal); }

/* --- signature element: the seal line --- */
.seal-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem 0;
  color: var(--gold);
}
.seal-line::before,
.seal-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.55;
}
.seal-line span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.seal-mark { font-size: 0.9rem; }

/* --- login page --- */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--ink-raised);
  border: 1px solid rgba(201, 162, 39, 0.18);
  border-radius: 10px;
  padding: 2.5rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.login-card h1 { font-size: 1.6rem; }

.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.5rem 0;
}

.wallet-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(237, 238, 233, 0.04);
  border: 1px solid rgba(237, 238, 233, 0.12);
  border-radius: 8px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: left;
}
.wallet-btn:hover, .wallet-btn:focus-visible {
  border-color: var(--signal);
  background: rgba(63, 167, 150, 0.08);
  outline: none;
}
.wallet-btn img { width: 22px; height: 22px; border-radius: 4px; }

.empty-state {
  padding: 1rem;
  border: 1px dashed rgba(237, 238, 233, 0.2);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--paper-dim);
}

#status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
  white-space: pre-wrap;
  min-height: 1.2em;
  margin-top: 1rem;
}
#status[data-state="error"] { color: var(--alert); }
#status[data-state="ok"] { color: var(--signal); }

/* --- dashboard --- */
.dash-shell { max-width: 880px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.dash-header .brand { margin: 0; white-space: nowrap; }
.dash-header .address {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--paper-dim);
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.dash-header .address:hover { background: rgba(237, 238, 233, 0.06); }
.logout-btn {
  background: none;
  border: 1px solid var(--slate);
  color: var(--paper-dim);
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
}
.logout-btn:hover { border-color: var(--alert); color: var(--alert); }

.panel {
  background: var(--ink-raised);
  border: 1px solid rgba(237, 238, 233, 0.08);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.plan-banner.is-free { border-color: rgba(201, 162, 39, 0.35); }
.plan-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold);
}
.plan-pill.is-active { background: rgba(63, 167, 150, 0.15); color: var(--signal); }

.upgrade-btn {
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.target-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(237, 238, 233, 0.06);
  gap: 1rem;
}
.target-row:last-child { border-bottom: none; }
.target-name { font-weight: 500; }
.target-path { font-family: var(--font-mono); font-size: 0.8rem; color: var(--paper-dim); }

.target-details {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.file-diff { margin: 0.15rem 0; word-break: break-all; }
.file-diff.added { color: var(--signal); }
.file-diff.removed { color: var(--alert); }
.file-diff.modified { color: var(--gold); }

.anchor-note {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--paper-dim);
  font-style: italic;
}
.anchor-note.anchored {
  color: var(--gold);
  font-style: normal;
}
.anchor-note .hash { font-family: var(--font-mono); }

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
}
.status-pill.clean { background: rgba(63, 167, 150, 0.15); color: var(--signal); }
.status-pill.changed { background: rgba(214, 95, 95, 0.15); color: var(--alert); }
.status-pill.pending { background: rgba(91, 100, 114, 0.25); color: var(--paper-dim); }

.add-target-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}
.add-target-form input {
  flex: 1;
  background: rgba(237, 238, 233, 0.04);
  border: 1px solid rgba(237, 238, 233, 0.15);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.add-target-form button {
  background: var(--signal);
  color: var(--ink);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.add-target-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.6rem;
  width: 100%;
}
.add-target-form[data-locked="true"] fieldset { opacity: 0.4; pointer-events: none; }

.agent-block {
  margin-top: 1rem;
}
.agent-block h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.agent-block pre {
  background: var(--ink);
  border: 1px solid rgba(237, 238, 233, 0.1);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--signal);
}
.agent-block .coming-soon {
  color: var(--paper-dim);
  font-size: 0.85rem;
  font-style: italic;
}

/* --- metrics / charts --- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--ink-raised);
  border: 1px solid rgba(237, 238, 233, 0.08);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 500;
}
.stat-value.signal { color: var(--signal); }
.stat-value.alert { color: var(--alert); }
.stat-label {
  font-size: 0.78rem;
  color: var(--paper-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) {
  .chart-grid { grid-template-columns: 1fr; }
}
.chart-box { min-width: 0; position: relative; height: 240px; }
.chart-label {
  font-size: 0.78rem;
  color: var(--paper-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.chart-box canvas { max-height: 100%; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* --- site header/footer (landing + legal pages) --- */
.site-header {
  border-bottom: 1px solid rgba(237, 238, 233, 0.08);
}
.site-header-inner, .site-footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-cta {
  border: 1px solid var(--signal);
  color: var(--signal);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: rgba(63, 167, 150, 0.1); }

.site-footer {
  border-top: 1px solid rgba(237, 238, 233, 0.08);
  margin-top: 4rem;
}
.site-footer-inner { font-size: 0.85rem; color: var(--paper-dim); flex-wrap: wrap; gap: 1rem; }
.site-footer-inner nav { display: flex; gap: 1.25rem; }
.site-footer-inner a { color: var(--paper-dim); text-decoration: none; }
.site-footer-inner a:hover { color: var(--signal); }

/* --- landing page --- */
.hero {
  max-width: 720px;
  margin: 4.5rem auto 3rem;
  padding: 0 1.5rem;
  text-align: center;
}
.hero h1 { font-size: 2.4rem; line-height: 1.15; margin-bottom: 1.1rem; }
.hero-sub { font-size: 1.05rem; max-width: 560px; margin: 0 auto 2rem; }

.btn-primary {
  display: inline-block;
  background: var(--signal);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
.btn-primary:hover { background: #4bbaa7; }

.features {
  max-width: 980px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--ink-raised);
  border: 1px solid rgba(237, 238, 233, 0.08);
  border-radius: 10px;
  padding: 1.5rem;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { margin: 0; font-size: 0.92rem; }

.how-it-works {
  max-width: 640px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}
.how-it-works h2 { text-align: center; margin-bottom: 1.8rem; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.4rem;
  color: var(--paper-dim);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li strong { color: var(--paper); font-weight: 600; }

.cta-band {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
}
.cta-band h2 { margin-bottom: 1.5rem; }

/* --- pricing --- */
.pricing {
  max-width: 1080px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.price-card {
  position: relative;
  background: var(--ink-raised);
  border: 1px solid rgba(237, 238, 233, 0.08);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
}
.price-card.is-featured {
  border-color: var(--signal);
  box-shadow: 0 0 0 1px var(--signal);
}
.price-badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--signal);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}
.price-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.price-amount {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.price-amount span { font-size: 0.9rem; color: var(--paper-dim); font-weight: 400; }
.price-desc { font-size: 0.85rem; min-height: 2.6em; }
.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--paper-dim);
  flex: 1;
}
.price-features li { padding: 0.35rem 0; border-top: 1px solid rgba(237, 238, 233, 0.06); }
.price-features li:first-child { border-top: none; }
.btn-secondary {
  display: block;
  text-align: center;
  border: 1px solid rgba(237, 238, 233, 0.2);
  color: var(--paper);
  text-decoration: none;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}
.btn-secondary:hover { border-color: var(--signal); color: var(--signal); }
.price-card .btn-primary { text-align: center; }

/* --- legal documents (terms, refund policy) --- */
.legal-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.legal-doc h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.legal-doc .updated { color: var(--paper-dim); font-size: 0.85rem; margin-bottom: 2rem; }
.legal-doc h2 { font-size: 1.15rem; margin-top: 2.2rem; margin-bottom: 0.6rem; }
.legal-doc p, .legal-doc li { color: var(--paper-dim); font-size: 0.95rem; line-height: 1.65; }
.legal-doc ul, .legal-doc ol { padding-left: 1.3rem; margin-bottom: 1rem; }
.legal-doc a { color: var(--signal); }
