/* Public content pages (machine pages, A to Z, 404). Colors and shared pieces
   (.md, .btn, .playfield, .site-footer, .skip-link) come from app.css. */

/* Content pages share the chat's layout (sidebar + .main); the page scrolls
   inside .main, beside the sidebar. */
.page-scroll { flex: 1; min-height: 0; overflow-y: auto; }

.page-main { max-width: 860px; margin: 0 auto; padding: 1.5rem 1rem 2rem; }
.page-main:focus { outline: none; }
.page-main h1 { margin: 0.4rem 0 0.3rem; font-size: 2rem; line-height: 1.2; color: #fff; }
.page-main > h2 { margin: 2rem 0 0.6rem; font-size: 1.2rem; color: #fff; }
.page-main a:not(.btn) { color: #f3c063; }
.page-main a:not(.btn):hover { color: #ffd88a; }

.breadcrumbs { font-size: 0.85rem; color: var(--muted); }
.machine-meta { margin: 0 0 1rem; color: var(--muted); }
.machine-summary { font-size: 1.05rem; }
.ask-btn { display: inline-block; padding: 0.65rem 1.1rem; text-decoration: none; font-weight: 600; }
.machine-body { margin-top: 1.5rem; }
.page-note { color: var(--muted); font-size: 0.875rem; }
.plain-list { padding-left: 1.2rem; }
.muted { color: var(--muted); }

.letter-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 1rem 0; }
.letter-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; min-height: 2rem; border: 1px solid var(--border); border-radius: 6px;
  text-decoration: none;
}
.machine-list { list-style: none; padding: 0; columns: 2 18rem; column-gap: 2rem; }
.machine-list li { margin: 0.25rem 0; break-inside: avoid; }

.page-footer { max-width: 860px; margin: 0 auto; padding: 1.5rem 1rem 2rem; border-top: 1px solid var(--border); }

/* Membership page */
.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
.tiers { border-collapse: collapse; width: 100%; min-width: 30rem; }
.tiers th, .tiers td { padding: 0.55rem 0.75rem; border: 1px solid var(--border); text-align: left; }
.tiers thead th { background: var(--panel); color: #fff; }
.tiers tbody th { font-weight: 500; }
.tiers td:last-child, .tiers thead th:last-child { color: #fff; font-weight: 700; }
.join-options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.join-btn { padding: 0.65rem 1.1rem; font-size: 0.95rem; text-decoration: none; }
.join-btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 0.35rem; max-width: 36rem; margin-top: 1rem; }
.contact-form label { margin-top: 0.6rem; font-weight: 600; font-size: 0.9rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  padding: 0.6rem 0.75rem; background: var(--bg); color: var(--text);
  border: 1px solid var(--field-border); border-radius: 8px;
}
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form [aria-invalid="true"] { border-color: var(--danger); }
.contact-form button { align-self: flex-start; margin-top: 1rem; }
.field-error { margin: 0; font-size: 0.85rem; }
.error-summary { padding: 0.6rem 1rem; border: 1px solid var(--danger); border-radius: 8px; }
.error-summary p { margin: 0 0 0.3rem; }
.notice { padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }

/* Shared chat page (/share/<id>); the messages use the chat's own styles from app.css */
.shared-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.shared-thread { max-width: none; padding: 1rem 0; }
/* Links styled as secondary buttons keep the button's text color (not link purple) */
.page-main a.btn:not(.primary) { color: var(--text); text-decoration: none; }
.page-main a.btn:not(.primary):hover { color: #fff; }
