/* pages.css — secondary pages: sign-in, sign-up, password, account, and the legal pages
   (security, privacy, terms, cookies). */

/* ---- Sign-in and account pages ---- */
/* Vertical space only: side padding stays the one of .container */
.page { padding-top: 48px; padding-bottom: 80px; min-height: 60vh; }
.page h1 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 20px; }
.page .lead { margin: -8px 0 28px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row.center { align-items: center; }
.grow { flex: 1 1 160px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; max-width: 480px; box-shadow: var(--shadow); }
.panel h2 { font-size: 20px; }
.panel input { padding: 12px 14px; }
.panel.wide { margin-top: 20px; max-width: none; }
.panel .links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font: inherit; font-weight: 650; cursor: pointer; justify-content: flex-start; }
.panel .links a { display: inline-flex; align-items: center; min-height: 44px; }
.grid2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.grid2 .panel { max-width: none; }
.meter { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter > div { height: 100%; background: var(--grad); }
table.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
table.keys td { padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
code, pre.code { font-family: Consolas, Menlo, monospace; font-size: 13px; }
pre.code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* Sign-in forms: labels above fields, inline "I agree" checkbox */
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 650; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
/* Optional news consent: set apart from the Terms checkbox */
.check.news { padding-top: 14px; border-top: 1px solid var(--line); }
.panel .check input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; flex: none; accent-color: var(--primary); cursor: pointer; }
.stack { display: grid; gap: 12px; max-width: 480px; }
#msg:empty, #pwMsg:empty { display: none; }

/* ---- Legal pages (security, privacy, terms, cookies): long, readable text ---- */
.legal { font-size: 16px; line-height: 1.65; }
.legal .updated { font-size: 14px; color: var(--muted); margin: -8px 0 16px; }
.legal .lead { margin: 0 0 28px; }
.legal section { margin-top: 40px; }
.legal h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 14px; scroll-margin-top: 84px; }
.legal section h2 { scroll-margin-top: 84px; }
.legal h3 { margin: 22px 0 8px; }
.legal p + p, .legal p + ul, .legal ul + p, .legal p + .table-wrap, .legal .table-wrap + p, .legal ol + p { margin-top: 12px; }
.legal ul, .legal ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.legal code { overflow-wrap: anywhere; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm); }
.toc h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.toc ol { gap: 2px; }
.toc a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.legal ol.steps { list-style: none; padding: 0; counter-reset: step; gap: 14px; }
.legal ol.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.legal ol.steps li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--btn-grad); background-color: var(--primary); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--line); }
.table-wrap thead th { border-top: 0; background: var(--surface-2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap tbody th { font-weight: 650; }
@media (max-width: 560px) {
  .legal { font-size: 15px; }
  .table-wrap table { min-width: 520px; }
}
