/* Public legal documents — readable prose layout on top of theme.css. */

/* Flat EAS-style top bar: hairline border, no gradient banner. */
.legal-top {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.legal-top .bar {
  max-width: 860px; margin: 0 auto; padding: .8rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.legal-top .brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.legal-top .brand:hover { text-decoration: none; }
.legal-top .brand img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; }
.legal-top .brand b { font-size: .95rem; font-weight: 700; line-height: 1.1; }
.legal-top .brand span { display: block; font-size: .74rem; color: var(--text-muted); font-weight: 400; }
.legal-top .acts { display: flex; align-items: center; gap: .5rem; }
.legal-top .acts a, .legal-top .acts button {
  color: var(--text); border: 1px solid var(--border); background: transparent;
  border-radius: var(--radius-sm); padding: .35rem .7rem; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
}
.legal-top .acts a:hover, .legal-top .acts button:hover { background: var(--input-bg); text-decoration: none; }

.legal-wrap { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.legal-wrap h1 { font-size: 1.8rem; font-weight: 700; }
.legal-meta { color: var(--text-secondary); font-size: .9rem; margin-top: .4rem; }
.legal-meta b { color: var(--text); font-weight: 600; }

.legal-toc {
  margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.legal-toc h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .6rem; }
.legal-toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.legal-toc li { margin: .15rem 0; font-size: .9rem; }

.legal-section { margin-top: 1.8rem; scroll-margin-top: 1rem; }
.legal-section h2 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.legal-section p, .legal-section li { color: var(--text-secondary); font-size: .98rem; line-height: 1.7; }
.legal-section ul { margin: .5rem 0 .5rem 1.2rem; }
.legal-section li { margin: .3rem 0; }

.callout {
  border: 1px solid var(--border); border-left: 4px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, var(--card));
  border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.callout.danger { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--card)); }
.callout h3 { font-size: 1rem; margin-bottom: .4rem; color: var(--text); }

.steps { counter-reset: step; list-style: none; margin: 1rem 0; padding: 0; }
.steps li { position: relative; padding: .25rem 0 1rem 2.6rem; color: var(--text-secondary); line-height: 1.6; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.steps li:not(:last-child)::after {
  content: ''; position: absolute; left: .9rem; top: 1.8rem; bottom: 0; width: 2px; background: var(--border);
}

.legal-foot { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .88rem; line-height: 1.6; }

.doc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.doc-card { display: block; padding: 1.25rem; }
.doc-card { transition: border-color .15s ease, background .15s ease; }
.doc-card:hover { text-decoration: none; border-color: var(--divider); background: var(--surface); }
.doc-card .ico { width: 42px; height: 42px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: .8rem; }
.doc-card h3 { color: var(--text); font-size: 1.05rem; margin-bottom: .3rem; }
.doc-card p { color: var(--text-secondary); font-size: .88rem; }

@media (max-width: 640px) { .legal-toc ol { columns: 1; } .legal-top .brand span { display: none; } }
