/* ============================================================
   NOC Design System
   Institutional. Typographic. No gradients. No shadows.
   ============================================================ */

:root {
  --bg:     #F7F4EF;
  --ink:    #1C1C1A;
  --rule:   #D4CFC8;
  --accent: #2D5016;
  --muted:  #6B6B6B;
  --ai:     #0032BF;
  --unknown:#E8E8E8;
  --unknown-text: #888888;
  --warn:   #B45309;

  --serif:  Georgia, 'Times New Roman', serif;
  --sans:   system-ui, -apple-system, sans-serif;
  --mono:   'Courier New', monospace;

  --max-w:  700px;
  --pad-h:  24px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: normal;
  line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--mono); }

/* ── Layout ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-h);
}

main { flex: 1; padding: 48px 0 64px; }

/* ── Header ── */
.site-header {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}

.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: bold;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-name:hover { text-decoration: none; }

.site-tagline {
  font-style: italic;
  font-weight: normal;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}

.header-auth {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-auth .user-name {
  color: var(--ink);
  font-weight: 500;
}

.header-auth a {
  color: var(--muted);
  text-decoration: none;
}
.header-auth a:hover { color: var(--ink); text-decoration: underline; }

/* ── Tab nav (Notarize / My Content / Verify) ── */
.tab-nav {
  border-bottom: 1px solid var(--rule);
}

.tab-nav .wrap {
  display: flex;
  gap: 0;
}

.tab-nav a {
  display: inline-block;
  padding: 12px 0;
  margin-right: 32px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-nav a:hover { color: var(--ink); text-decoration: none; }

.tab-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ── Page hero ── */
.page-hero { margin-bottom: 40px; }

.page-hero h1 {
  font-size: 32px;
  color: var(--ink);
  margin-bottom: 8px;
}

.page-hero .lede {
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
}

.hero-stat {
  margin-top: 20px;
}

.hero-stat-number {
  font-family: var(--serif);
  font-size: 36px;
  color: var(--ink);
  line-height: 1;
}

.hero-stat-label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Horizontal rule ── */
.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* ── Form fields ── */
.field { margin-bottom: 28px; }

.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 8px 0;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  font-family: var(--sans);
}

.field input:focus { border-bottom-color: var(--ink); }

.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 8px 0;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  font-family: var(--sans);
  resize: vertical;
  line-height: 1.5;
}

.field textarea:focus { border-bottom-color: var(--ink); }

.field-required {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-left: 4px;
  font-weight: normal;
}

.field .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.field-info {
  margin-top: 6px;
}

.field-info summary {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.field-info summary::-webkit-details-marker { display: none; }

.field-info summary::before {
  content: '\25B6';
  font-size: 9px;
  transition: transform 0.15s;
  display: inline-block;
}

.field-info[open] summary::before {
  transform: rotate(90deg);
}

.field-info summary:hover { color: var(--ink); }

.field-info p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 0;
}

/* ── Collapsible field group (Name & Description) ── */
.field-group-details {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 12px 0 20px;
  padding: 0;
}

.field-group-summary {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
}

.field-group-summary::-webkit-details-marker { display: none; }

.field-group-summary::before {
  content: '\25B6';
  font-size: 9px;
  transition: transform 0.15s;
  display: inline-block;
}

.field-group-details[open] .field-group-summary::before {
  transform: rotate(90deg);
}

.field-group-details[open] {
  padding-bottom: 4px;
}

/* ── Drop zone ── */
.drop-zone {
  border: 1px dashed var(--rule);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.1s;
  position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over { border-color: var(--ink); border-style: solid; }

.drop-zone.has-file { border-style: solid; border-color: var(--accent); }

.drop-zone-label {
  font-size: 15px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.drop-zone.has-file .drop-zone-label { color: var(--ink); }

.drop-zone-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.drop-zone input[type="file"] { display: none; }

/* ── Provenance radio buttons ── */
.provenance-group {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.prov-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 0;
  cursor: pointer;
  margin-right: 8px;
}

.prov-option input[type="radio"] { display: none; }

.prov-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  flex-shrink: 0;
  transition: border-color 0.1s;
}

.prov-option.human   .prov-dot { background: transparent; border-color: var(--rule); }
.prov-option.ai      .prov-dot { background: transparent; border-color: var(--rule); }
.prov-option.unknown .prov-dot { background: transparent; border-color: var(--rule); }

.prov-option input[type="radio"]:checked + .prov-dot {
  border-width: 3px;
}

.prov-option.human   input[type="radio"]:checked + .prov-dot { border-color: var(--accent); background: var(--accent); }
.prov-option.ai      input[type="radio"]:checked + .prov-dot { border-color: var(--ai);     background: var(--ai); }
.prov-option.unknown input[type="radio"]:checked + .prov-dot { border-color: var(--muted);  background: var(--muted); }

.prov-label {
  font-size: 14px;
  color: var(--ink);
  user-select: none;
}

.prov-option input[type="radio"]:checked ~ .prov-label { font-weight: 500; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.04em;
  font-family: var(--sans);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { background: #243e12; color: #fff; text-decoration: none; }
.btn:disabled { background: var(--muted); cursor: not-allowed; }

.btn-full { width: 100%; margin-top: 32px; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-secondary:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

.btn-danger {
  background: transparent;
  color: #999;
  border: 1px solid var(--rule);
  font-size: 12px;
}
.btn-danger:hover { color: #c00; border-color: #c00; background: transparent; }
.btn-danger:disabled { color: #ccc; border-color: var(--rule); cursor: not-allowed; }

.btn-oauth {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--rule);
  gap: 10px;
  width: 100%;
  margin-top: 12px;
}
.btn-oauth:hover { border-color: var(--ink); background: #fff; color: var(--ink); }

.btn-oauth-apple {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-oauth-apple:hover { background: #000; border-color: #000; }

/* ── Progress display ── */
.progress-steps {
  display: none;
  margin-top: 24px;
  border-left: 2px solid var(--rule);
  padding-left: 16px;
}

.progress-step {
  font-size: 13px;
  color: var(--muted);
  padding: 3px 0;
}

.progress-step.done { color: var(--ink); }
.progress-step.done::before { content: '✓ '; color: var(--accent); }
.progress-step.active { color: var(--ink); font-style: italic; }

/* ── Result / success card ── */
.result-card {
  display: none;
  margin-top: 32px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 24px;
}

.result-card.ai-result    { border-left-color: var(--ai); }
.result-card.unknown-result { border-left-color: var(--muted); }

.result-heading {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 12px;
}

.result-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin-bottom: 16px;
}

.result-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.result-lbl {
  color: var(--muted);
  width: 88px;
  flex-shrink: 0;
  padding-top: 1px;
}

.result-val { color: var(--ink); word-break: break-all; }
.result-val a { color: var(--accent); }

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ── Error message ── */
.error-msg {
  display: none;
  margin-top: 16px;
  color: var(--warn);
  font-size: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.error-msg a {
  color: var(--warn);
  text-decoration: underline;
}

/* ── Provenance badge ── */
.prov-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 24px;
}

.prov-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.prov-badge-label {
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Verify page section divider ── */
.verify-section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 36px 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.verify-section-divider::before,
.verify-section-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--rule);
}

/* ── API pitch box ── */
.verify-thumb {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  margin-bottom: 12px;
  border: 1px solid var(--rule);
}

.verify-phash-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  font-style: italic;
}

.verify-match-card + .verify-match-card {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}

.api-pitch {
  margin-top: 56px;
  border: 1px solid var(--rule);
  padding: 32px;
  text-align: center;
}

.api-pitch + .api-pitch {
  margin-top: 16px;
}

.api-pitch h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: normal;
  color: var(--ink);
  margin-bottom: 10px;
}

.api-pitch p {
  font-size: 14px;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

/* ── Certificate card ── */
.cert-card {
  max-width: 560px;
  border: 1px solid var(--rule);
  padding: 32px;
}

.cert-card h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: normal;
  color: var(--ink);
  margin-bottom: 16px;
}

.cert-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin-bottom: 24px;
}

.field-row { margin-bottom: 22px; }

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.field-value { font-size: 15px; color: var(--ink); word-break: break-all; }

.cert-link-row { margin-top: 24px; font-size: 14px; }

.cert-downloads {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.cert-downloads-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.cert-downloads-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cert-download-expired {
  margin-top: 24px;
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: #7A5C00;
  background: #FFFBEB;
  border-left: 3px solid #D97706;
}

.download-hint-banner {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: #FFFBEB;
  border-left: 3px solid #D97706;
  color: #7A5C00;
  font-size: 13px;
  line-height: 1.5;
}

/* Cryptographic Proof Only uses .pre-ai-url-row for its description row (same style). */

.proof-only-banner {
  margin: 12px 0 0;
  padding: 12px 16px;
  background: #FFF3CD;
  border-left: 3px solid #D97706;
  color: #7A5C00;
  font-size: 13px;
  line-height: 1.5;
}

.proof-only-notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: #F3F4F6;
  border-left: 3px solid var(--muted);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.proof-only-creator {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.cert-disclaimer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* Trust level badges on certificate page */
.trust-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
  margin: 8px 0 0;
}
.trust-badge-verified {
  background: #eaf3e0;
  color: #2D5016;
  border: 1px solid #2D5016;
}
.trust-badge-notarized {
  background: #f2f2f2;
  color: #6B6B6B;
  border: 1px solid #aaa;
}
.trust-badge-icon {
  margin-right: 4px;
}
.trust-badge-detail {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 12px;
  line-height: 1.5;
}

/* Trust badge on My Content cards */
.content-trust-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 2px;
  margin-top: 4px;
  font-weight: 600;
}
.content-trust-verified {
  background: #eaf3e0;
  color: #2D5016;
  border: 1px solid #2D5016;
}
.content-trust-notarized {
  background: #f2f2f2;
  color: #888;
  border: 1px solid #ccc;
}

.cert-deleted {
  border-color: var(--rule);
  opacity: 0.85;
}

.cert-dot-warning {
  background: #fffbf0;
  border: 1px solid #c8a000;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}


.cert-removed-notice {
  background: #f8f4f0;
  border: 1px solid var(--rule);
  padding: 16px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.cert-removed-status {
  color: #888;
  font-style: italic;
}

.coming-soon {
  margin-top: 40px;
  opacity: 0.35;
  pointer-events: none;
}

.coming-soon h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: normal;
  margin-bottom: 6px;
}

.coming-soon p { font-size: 14px; color: var(--muted); }

/* ── Anonymous notarize warning modal ── */
#anon-modal,
#proof-only-modal,
#batch-proof-only-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

.anon-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.anon-modal-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 32px;
  width: min(440px, calc(100vw - 32px));
}

.anon-modal-box h3 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 0 0 12px;
}

.anon-modal-box p {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 24px;
}

/* ── Delete confirmation modal ── */
#delete-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
}

.delete-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.delete-modal-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 32px;
  max-width: 480px;
  width: calc(100% - 32px);
}

.delete-modal-box h3 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 0 0 12px;
  font-weight: normal;
}

.delete-modal-box p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 12px;
}

.delete-modal-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

/* ── My Content tab bar ── */
.content-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}
.content-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 20px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.content-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.content-tab:hover:not(.active) { color: var(--ink); }

/* ── My Content list ── */
.content-list { margin-top: 8px; }

.content-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.content-item:first-child { border-top: 1px solid var(--rule); }

.content-item-main { flex: 1; min-width: 0; }

.content-item-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-item-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}


/* Thumbnail — shown inside .content-item before the main text */
.content-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.content-thumb-placeholder {
  width: 64px;
  height: 64px;
  background: var(--rule);
  flex-shrink: 0;
}

.content-thumb-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #f5f0e8;
  border: 1px solid var(--rule);
}

/* Search + sort toolbar */
.content-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 0 8px;
  flex-wrap: wrap;
}

.content-search-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 0 6px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.content-search-input::placeholder { color: var(--muted); }

.content-sort-select {
  padding: 6px 8px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

/* Description line in content items */
.content-item-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40ch;
}

/* Download buttons in content items */
.content-dl-btn {
  height: 34px;
  font-size: 12px;
  white-space: nowrap;
}

.content-item-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

/* Pagination controls below the content list */
.content-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.content-pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Unauthenticated state */
.content-unauthenticated {
  padding: 64px 0;
  text-align: center;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.content-unauthenticated p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
}

.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.content-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.content-empty p { margin-bottom: 20px; }

.content-loading {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
}

/* ── Auth pages ── */
.auth-card { max-width: 400px; }

.auth-card h1 {
  font-size: 28px;
  margin-bottom: 32px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--rule);
}

.alt-link { margin-top: 24px; font-size: 14px; color: var(--muted); }
.alt-link a { color: var(--accent); }

/* ── About section ── */
.about h3 {
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 16px;
}

.about p {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 20px var(--pad-h);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { text-decoration: underline; }
.site-footer .sep { margin: 0 8px; }

/* ── Linked Platforms tab ── */
.platforms-panel {
  max-width: 560px;
}

.platforms-intro {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.platforms-learn-more {
  font-size: 13px;
  margin-bottom: 28px;
}

.platforms-learn-more a { color: var(--muted); }
.platforms-learn-more a:hover { color: var(--ink); }

.platforms-empty {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* Linked platform rows */
.linked-platforms-list {
  border-top: 1px solid var(--rule);
  margin-bottom: 32px;
}

.linked-platform-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.linked-platform-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.linked-platform-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.linked-platform-user {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
}

.linked-platform-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.linked-platform-count {
  font-size: 12px;
  color: var(--muted);
}

.btn-unlink {
  background: none;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
}

.btn-unlink:hover {
  border-color: #b00;
  color: #b00;
}

/* "Link a platform" section */
.platform-link-section {
  margin-bottom: 32px;
}

.platform-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}

.platform-link-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.platform-link-card {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--rule);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.platform-link-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.platform-link-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.platform-link-card .btn {
  margin-top: 10px;
  font-size: 13px;
}

/* DNS verification section */
.platform-dns-section {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.platform-dns-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.platform-dns-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.platform-dns-inputs input {
  flex: 1;
  min-width: 140px;
}

.platform-dns-result {
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}

.platform-dns-hint {
  font-size: 12px;
  color: var(--muted);
}

.platform-dns-hint code {
  font-family: var(--mono);
  background: #eee;
  padding: 1px 4px;
}

/* Success banner after OAuth return */
.platform-success-banner {
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: #f3f8ee;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Error banner when OAuth credentials are not configured */
.platform-error-banner {
  padding: 12px 16px;
  border-left: 3px solid #b00;
  background: #fff5f5;
  color: #b00;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ============================================================
   Responsive — 768px tablet, 375px mobile
   ============================================================ */

@media (max-width: 768px) {
  :root { --pad-h: 20px; }
  main { padding: 36px 0 48px; }
  .page-hero h1 { font-size: 26px; }
}

@media (max-width: 480px) {
  :root { --pad-h: 16px; }

  .tab-nav a { margin-right: 20px; font-size: 13px; }

  .drop-zone { padding: 32px 16px; }

  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }

  .cert-card { padding: 24px 16px; }

  .content-item { flex-direction: column; gap: 8px; }

  .provenance-group { gap: 4px; }
  .prov-option { padding: 8px 16px 8px 0; }
}

/* ── Mode toggle (Single / Batch) ── */
.mode-toggle {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 36px;
}

.mode-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 0;
  margin-right: 28px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
}

.mode-btn:hover { color: var(--ink); }
.mode-btn.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ── Batch file list ── */
.batch-file-list {
  margin-bottom: 24px;
}

.batch-count-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
}

.batch-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}

.batch-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.batch-file-size { color: var(--muted); font-size: 12px; white-space: nowrap; }

.batch-file-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  flex-shrink: 0;
}
.batch-file-remove:hover { color: var(--ink); }

/* ── Batch status dots ── */
.bfs-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bfs-waiting    { background: var(--rule); }
.bfs-processing { background: var(--accent); animation: pulse 1s infinite; }
.bfs-done       { background: var(--accent); }
.bfs-error      { background: #B45309; }
.bfs-dup        { background: var(--muted); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Batch progress rows ── */
.batch-progress-header {
  margin: 28px 0 12px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}

.batch-progress-title {
  font-family: var(--serif);
  font-size: 18px;
}

.batch-rows { margin-bottom: 24px; }

.batch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}

.br-status { flex-shrink: 0; width: 16px; }

.br-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.br-step  { color: var(--muted); font-size: 12px; white-space: nowrap; width: 180px; flex-shrink: 0; }
.br-result { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.br-result a { color: var(--accent); }

/* ── Batch auth gate ── */
.batch-auth-msg {
  padding: 20px 0;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}

/* ── Widget / API docs ── */
.docs-section {
  margin-bottom: 40px;
}

.docs-section h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: normal;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.docs-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 8px;
}

.docs-section h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-section p, .docs-section li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.docs-section ul, .docs-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.code-block {
  background: #f6f6f4;
  border: 1px solid var(--rule);
  padding: 16px;
  margin: 10px 0 16px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-family: monospace;
}

.code-block code {
  font-family: monospace;
  font-size: 13px;
}

.docs-section code {
  font-family: monospace;
  font-size: 12.5px;
  background: #f0f0ee;
  padding: 1px 4px;
  border-radius: 2px;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}

.docs-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--rule);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.docs-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.5;
}

.docs-table tr:last-child td { border-bottom: none; }

.method-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  padding: 2px 6px;
  border-radius: 2px;
  vertical-align: middle;
  color: #fff;
}

.method-badge--get    { background: #2d5016; }
.method-badge--post   { background: #1e3a5f; }
.method-badge--delete { background: #8b0000; }

/* ── Ecosystem page ── */
.eco-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
}

.eco-section {
  margin-bottom: 3rem;
}

.eco-section h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.4rem;
}

.eco-noc-heading {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.eco-section-noc {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.eco-intro {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.eco-sub {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.6rem;
  color: var(--accent);
}

.eco-sub-strip {
  color: #8b0000;
}

.eco-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 1rem;
}

.eco-table th {
  text-align: left;
  padding: 0.4rem 0.75rem;
  border-bottom: 2px solid var(--rule);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
}

.eco-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.5;
}

.eco-table tr:last-child td { border-bottom: none; }

.eco-row-announced td { opacity: 0.6; }

.eco-name {
  font-weight: 600;
  white-space: nowrap;
  padding-right: 1rem;
}

.eco-level {
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}

.eco-badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 2px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.eco-badge-on {
  background: #e8f0e2;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.eco-badge-announced {
  background: #f5f0e8;
  color: var(--warn);
  border: 1px solid var(--warn);
}

.eco-strip-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.eco-strip-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 0;
  font-size: 14px;
}

.eco-strip-list li::before {
  content: '\2715\a0';
  color: #8b0000;
  font-size: 11px;
}

/* FAQ */
.eco-faq .faq-item {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0;
}

.eco-faq .faq-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.eco-faq h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.eco-faq p {
  font-size: 14px;
  line-height: 1.65;
  color: #333;
  margin-bottom: 0.6rem;
}

.eco-faq p:last-child { margin-bottom: 0; }

.eco-chain {
  font-family: var(--mono);
  font-size: 12px;
  background: #f0ede8;
  padding: 1px 6px;
  border-radius: 2px;
}

/* ── Temporal evidence section (certificate page) ── */
.temporal-section {
  margin-top: 24px;
}

.temporal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.temporal-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.temporal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 2px;
  border: 1px solid currentColor;
}

.temporal-badge-strong    { color: #109E32; border-color: #109E32; background: #f0f5eb; }
.temporal-badge-moderate  { color: #7A5C00; border-color: #7A5C00; background: #fdf8ec; }
.temporal-badge-limited,
.temporal-badge-insufficient { color: var(--muted); border-color: var(--rule); background: #f7f4ef; }


.temporal-summary {
  font-size: 14px;
  color: #333;
  line-height: 1.55;
  margin-bottom: 14px;
}

.temporal-evidence-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.temporal-ev-item {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule);
  border-radius: 2px;
  padding: 10px 12px;
  background: #fff;
}

.temporal-ev-item.temporal-ev-wayback { border-left-color: #109E32; }
.temporal-ev-item.temporal-ev-exif    { border-left-color: #0032BF; }
.temporal-ev-item.temporal-ev-cdn_timestamp { border-left-color: #7A5C00; }

.temporal-ev-header {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  gap: 8px;
}

.temporal-ev-mark {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

.temporal-ev-present { color: #109E32; }
.temporal-ev-absent  { color: #B00020; }

.temporal-ev-source {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.temporal-ev-detail {
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  margin: 0;
}

.temporal-disclaimer {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  margin: 0;
}

/* ── Pre-AI section (notarize form) ── */
.pre-ai-toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
}

.pre-ai-toggle-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.pre-ai-url-row {
  margin-top: 12px;
  flex-direction: column;
  gap: 6px;
}
/* display is controlled exclusively by JS (flex when open, none when hidden).
   Do not set display here — it would fight the inline style="display:none". */

.pre-ai-url-row label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.temporal-ev-item.temporal-ev-audio_metadata         { border-left-color: #5B3A8C; }
.temporal-ev-item.temporal-ev-video_frame_exif       { border-left-color: #109E32; }
.temporal-ev-item.temporal-ev-video_container_metadata { border-left-color: #7A5C00; }

/* ═══════════════════════════════════════════════════
   Parchment Certificate Page
   ═══════════════════════════════════════════════════ */

.cert-dark-card {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid #1C1C1A;
  overflow: hidden;
}

/* Header area — slightly warmer parchment to suggest the seal impression */
.cert-dark-header {
  background: #E8E2D4;
  padding: 36px 32px 28px;
  text-align: center;
  border-bottom: 1px solid #C8C0B0;
}

.cert-seal-wrap {
  margin-bottom: 18px;
}
.cert-seal-wrap svg {
  display: block;
  margin: 0 auto;
}

.cert-serial-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6B6B6B;
  margin-bottom: 6px;
  font-family: 'Courier New', monospace;
}

.cert-serial-id {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  color: #1C1C1A;
  letter-spacing: 0.08em;
  word-break: break-all;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Large provenance badges */
.cert-prov-badge {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 22px;
  border-radius: 2px;
  margin-bottom: 10px;
}
.cert-prov-human  { background: #2D5016; color: #fff; border: 1.5px solid #2D5016; }
.cert-prov-ai     { background: #1E3A5F; color: #fff; border: 1.5px solid #1E3A5F; }
.cert-prov-unknown{ background: #4A4A4A; color: #fff; border: 1.5px solid #4A4A4A; }

.cert-prov-sub {
  font-size: 12px;
  color: #6B6B6B;
  margin: 6px 0 0;
  line-height: 1.5;
}

/* Body area — main parchment */
.cert-dark-body {
  background: #F0EAE0;
  padding: 28px 32px 36px;
}

.cert-thumb-wrap {
  margin-bottom: 24px;
  text-align: center;
}
.cert-thumb-img {
  max-width: 100%;
  max-height: 240px;
  display: block;
  margin: 0 auto 8px;
  border: 1px solid #D4CFC8;
}
.cert-thumb-caption {
  font-size: 11px;
  color: #6B6B6B;
  letter-spacing: 0.04em;
}
.cert-thumb-caption a { color: #2D5016; }

/* Fields */
.cert-field-row {
  margin-bottom: 18px;
}
.cert-field-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6B6B6B;
  margin-bottom: 4px;
  font-family: system-ui, sans-serif;
}
.cert-field-value {
  font-size: 14px;
  color: #1C1C1A;
  word-break: break-all;
  line-height: 1.5;
}
.cert-mono { font-family: 'Courier New', monospace; font-size: 13px; }

.cert-noc-link { color: #2D5016; }
.cert-noc-link:hover { text-decoration: underline; }

.cert-chain-link { color: #2D5016; }
.cert-chain-link:hover { text-decoration: underline; }

/* Section headers with rule */
.cert-section-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #2D5016;
  border-bottom: 1px solid #D4CFC8;
  padding-bottom: 6px;
  margin: 24px 0 14px;
  font-weight: 600;
}

/* Trust level indicators */
.cert-trust-hw       { color: #2D5016; font-size: 13px; }
.cert-trust-sw       { color: #B45309; font-size: 13px; }
.cert-trust-verified { color: #2D5016; font-size: 13px; }
.cert-trust-std      { color: #6B6B6B; font-size: 13px; }

/* Crypto proof indicators */
.cert-indicators {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.cert-indicator {
  font-size: 13px;
  color: #1C1C1A;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cert-indicator-active .cert-indicator-icon { color: #2D5016; }
.cert-indicator-icon { font-size: 16px; line-height: 1; }

/* Verify link */
.cert-verify-link {
  font-size: 13px;
  margin-top: 6px;
  margin-bottom: 8px;
}
.cert-verify-link a { color: #2D5016; }
.cert-verify-link a:hover { text-decoration: underline; }

/* Proof-only notice */
.cert-proof-only-notice {
  margin: 16px 0;
  padding: 14px 16px;
  background: #EDE7DC;
  border-left: 3px solid #6B6B6B;
  font-size: 13px;
  line-height: 1.6;
  color: #1C1C1A;
}

/* Warnings */
.cert-warning {
  background: #FEF9E7;
  border: 1px solid #E8D5A0;
  border-left: 3px solid #B45309;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #7A4A00;
}

/* Removed notice */
.cert-removed-notice {
  background: #EDE7DC;
  border-left: 3px solid #888;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #4A4A4A;
}

/* Disclaimer */
.cert-disclaimer-dark {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #D4CFC8;
  font-size: 12px;
  color: #6B6B6B;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .cert-dark-header { padding: 24px 16px 20px; }
  .cert-dark-body { padding: 20px 16px 28px; }
  .cert-serial-id { font-size: 12px; }
}
