/* Shared chrome: reset, body, header. Page-specific styles live with their app. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }
a { color: var(--link); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

.header { height: 72px; padding: 0 64px; display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--border); }
.left, .right { display: flex; align-items: center; }
.left { gap: 48px; } .right { gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px; }
.header nav { display: flex; gap: 28px; font-size: 15px; }
.header nav a { color: var(--muted); text-decoration: none; padding: 24px 0; border-bottom: 2px solid transparent; }
.header nav a[aria-current] { color: var(--text); font-weight: 500; border-bottom-color: var(--accent); }

.site-footer { max-width: 1440px; margin: 0 auto; padding: 32px 64px 48px; display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); text-decoration: underline; }

/* Long-form prose (privacy/terms/cookies pages): narrower than the merge
   layout, comfortable line length and spacing for reading, not scanning. */
.legal-page { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.legal-page h1 { font-size: 34px; margin: 0 0 8px; }
.legal-page .legal-updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.legal-page .draft-notice { background: var(--well); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; font-size: 14px; color: var(--text); margin: 0 0 32px; }
.legal-page h2 { font-size: 20px; margin: 36px 0 12px; }
.legal-page h3 { font-size: 16px; margin: 24px 0 8px; }
.legal-page p, .legal-page li { font-size: 15px; line-height: 1.7; color: var(--text); }
.legal-page ul, .legal-page ol { padding-left: 22px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--link); }
.legal-page table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.legal-page th, .legal-page td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.legal-page th { background: var(--well); font-weight: 600; }
.legal-page .placeholder { background: color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 4px; padding: 0 4px; }
.legal-page code { background: var(--well); border-radius: 4px; padding: 1px 5px; font-size: 0.9em; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-md); background: transparent; color: var(--muted); }
.link-btn { height: 44px; display: flex; align-items: center; padding: 0 16px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
.soft-btn { height: 44px; display: flex; align-items: center; padding: 0 18px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent-soft-text); text-decoration: none; font-weight: 600; font-size: 15px; }

.messages { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.message { padding: 12px 16px; border-radius: var(--radius-md); background: var(--well); color: var(--text); font-size: 14px; border: 1px solid var(--border); }
.message-error { border-color: color-mix(in srgb, var(--accent) 40%, red); }

/* Simple auth forms (accounts app) reuse .field/.primary from merge.css but
   need their own container width since they're not part of the merge layout. */
.auth-form { max-width: 420px; margin: 64px auto; display: flex; flex-direction: column; gap: 24px; }
/* <form> itself isn't a flex child's concern - without this its own children
   (each .field, the submit button) have zero gap and sit flush against
   each other, regardless of .auth-form's own gap above. */
.auth-form form { display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 720px) {
  .header { padding-left: 20px; padding-right: 20px; }
  .header nav { display: none; }
  .site-footer { padding-left: 20px; padding-right: 20px; flex-direction: column; align-items: flex-start; }
}
