/* Public site layout (M9). Tokens, resets and form element styles come from
   public/app.css; this file only adds the marketing-site structure so the
   logged-in app styles stay untouched. */

.site-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  z-index: 10;
}

.site-skip:focus {
  left: var(--space-4);
  top: var(--space-4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header-inner,
.site-footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.site-brand,
.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-mark {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fffefa;
  font-weight: 800;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-sm);
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav .site-nav-cta {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fffefa;
  font-weight: 650;
}

.site-nav .site-nav-cta:hover {
  background: var(--accent-strong);
  color: #fffefa;
}

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-5) var(--space-8);
}

.hero {
  padding: var(--space-8) 0 var(--space-7);
  max-width: 52rem;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--accent-strong);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.2vw, 3.5rem);
  margin-bottom: var(--space-4);
}

.hero-lede {
  font-size: var(--text-lg);
  color: var(--ink);
  max-width: 44rem;
}

.hero-sub {
  color: var(--muted);
  max-width: 42rem;
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin: var(--space-6) 0 var(--space-3);
}

.hero-note {
  color: var(--muted);
  font-size: var(--text-sm);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.button.primary {
  background: var(--accent);
  color: #fffefa;
}

.button.primary:hover {
  background: var(--accent-strong);
  color: #fffefa;
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.section {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: var(--space-5);
}

.page-head {
  padding: var(--space-7) 0 var(--space-5);
  max-width: 48rem;
}

.page-lede {
  font-size: var(--text-lg);
  color: var(--muted);
}

.beta-note {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--warning, var(--line-strong));
  border-radius: var(--radius-md);
  background: var(--warning-soft, var(--surface-soft));
  color: var(--warning, var(--ink));
  font-size: var(--text-sm);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.steps.compact {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.step {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.step-index {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: var(--space-3);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: var(--text-sm);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-4);
}

.card {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.card p,
.step p,
.principles p {
  color: var(--muted);
  margin-bottom: 0;
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-4);
}

.principles > div {
  padding: var(--space-4);
  border-left: 3px solid var(--accent);
  background: var(--surface-soft);
  border-radius: var(--radius-md);
}

.pricing-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding: var(--space-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin: var(--space-7) 0;
}

.pricing-teaser h2 {
  margin-bottom: var(--space-2);
}

.pricing-teaser p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: var(--space-4) 0;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 650;
}

.faq-list details p {
  margin: var(--space-3) 0 0;
  color: var(--muted);
}

.closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding: var(--space-6);
  margin-top: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}

.closing h2 {
  margin-bottom: var(--space-1);
}

.closing p {
  margin: 0;
  color: var(--muted);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-5);
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.plan-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.plan-price {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 0;
}

.plan-limits {
  margin: 0 0 var(--space-4);
  padding-left: 1.1rem;
  color: var(--muted);
}

.plan-card .button {
  margin-top: auto;
}

.plan-note {
  color: var(--muted);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
}

.form-section {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

.form-card {
  max-width: 34rem;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.form-card label {
  margin-top: var(--space-3);
}

.form-card .button {
  margin-top: var(--space-4);
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.form-note {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
}

.form-error {
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
}

.notice {
  max-width: 40rem;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.notice.success {
  border-color: var(--success);
  background: var(--success-soft);
}

.notice.error {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: var(--space-2);
  padding: 0.1rem var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--text-xs);
  font-weight: 700;
}

.toc {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}

.doc-section h3 {
  margin-top: var(--space-5);
}

.doc-list {
  padding-left: 1.1rem;
  color: var(--muted);
}

.doc-list li {
  margin-bottom: var(--space-2);
}

pre {
  margin: var(--space-3) 0;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  overflow-x: auto;
}

code {
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: var(--surface-soft);
}

pre code {
  padding: 0;
  background: none;
}

.limits-table,
.status-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
}

.limits-table caption,
.status-table caption {
  text-align: left;
  color: var(--muted);
  font-size: var(--text-sm);
  padding-bottom: var(--space-2);
}

.limits-table th,
.limits-table td,
.status-table th,
.status-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.limits-table thead th {
  background: var(--surface-soft);
}

.limits-table tbody th,
.status-table tbody th {
  font-weight: 600;
}

.status-ok {
  color: var(--success);
  font-weight: 700;
}

.status-fail {
  color: var(--danger);
  font-weight: 700;
}

.status-note {
  color: var(--muted);
  font-size: var(--text-sm);
}

.legal h2 {
  margin-top: var(--space-6);
}

.error-page {
  padding-top: var(--space-8);
}

.error-links {
  margin-top: var(--space-5);
}

.site-footer {
  margin-top: var(--space-8);
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.site-footer-brand p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.site-footer-nav {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-sm);
}

.site-footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer-nav a:hover {
  color: var(--ink);
}

.site-copyright {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

@media (max-width: 640px) {
  .pricing-teaser,
  .closing {
    flex-direction: column;
    align-items: flex-start;
  }
}
