/* Pundit's Postbox: LazyFPL design system (navy header band, Merriweather headings, Inter body, green buttons) */
:root {
  --navy: #0E132B;
  --navy-2: #1B2242;
  --green: #3ECC6D;
  --green-hover: #35B85F;
  --yellow: #F2CC4D;
  --grey: #F5F7FA;
  --border: #E5E7EB;
  --text: #374151;
  --text-2: #4B5563;
  --muted: #6B7280;
  --red: #D93A4C;
  --red-soft: #FDECEE;
  --white: #FFFFFF;
  --display: "Merriweather", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--white); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.wrap { width: 100%; max-width: 720px; margin: 0 auto; }

/* ---------- Navbar (matches lazyfpl.com) ---------- */
.nav { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.nav-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.nav-logo { display: block; padding: 4px; line-height: 0; }
.nav-logo img { height: 32px; width: auto; display: block; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-link { color: rgba(255,255,255,.8); font-size: 15px; font-weight: 500; text-decoration: none; padding: 8px 4px; }
.nav-link:hover { color: #fff; }
.nav-btn { display: inline-block; font-size: 16px; font-weight: 400; text-decoration: none; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.nav-btn.outline { color: #fff; border: 1px solid rgba(255,255,255,.3); }
.nav-btn.outline:hover { border-color: rgba(255,255,255,.6); }
.nav-btn.yellow { background: var(--yellow); color: var(--navy); }
.nav-btn.yellow:hover { filter: brightness(1.05); }

/* Admin/Fan preview switch (admins only) */
.viewas { display: inline-flex; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; padding: 3px; }
.viewas button { border: 0; background: transparent; color: rgba(255,255,255,.8); padding: 5px 10px; border-radius: 7px; font-size: 14px; font-weight: 600; }
.viewas button[aria-pressed="true"] { background: #fff; color: var(--navy); }

/* ---------- Page header ---------- */
.header { background: var(--navy); color: #fff; padding: 56px max(40px, env(safe-area-inset-right, 0px)) 48px max(40px, env(safe-area-inset-left, 0px)); }
.header .wrap { display: flex; flex-direction: column; gap: 12px; }
.header h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.12; color: #fff; text-wrap: balance; }
.header p { margin: 0; font-size: 18px; line-height: 1.5; color: rgba(255,255,255,.75); max-width: 36em; }

/* ---------- Body ---------- */
.body { padding: 48px max(40px, env(safe-area-inset-right, 0px)) 80px max(40px, env(safe-area-inset-left, 0px)); }
.body .wrap { display: flex; flex-direction: column; gap: 40px; }
.block { display: flex; flex-direction: column; gap: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; padding: 14px 24px; font-weight: 600; font-size: 16px; background: var(--green); color: var(--navy); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--green-hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.btn.navy { background: var(--navy); color: #fff; }
.btn.navy:hover { background: var(--navy-2); }
.btn.line { background: var(--white); color: var(--navy); border: 1px solid var(--border); }
.btn.line:hover { background: var(--grey); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--grey); color: var(--navy); }
.btn.danger { background: var(--white); color: var(--red); border: 1px solid #F3C3CA; }
.btn.danger:hover { background: var(--red-soft); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }

/* Ask card */
.card-grey { background: var(--grey); border-radius: 12px; padding: 24px 28px; }
.ask-row { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.ask-row h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.3; color: var(--navy); }
.ask-row p { margin: 4px 0 0; font-size: 15px; color: var(--text-2); }
form { display: grid; gap: 16px; }
.form-head { margin: 0; font-family: var(--display); font-weight: 700; font-size: 21px; color: var(--navy); }
.field label { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field .hint { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.field input, .field textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--white); font-size: 16px; color: var(--navy); outline: none; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(14,19,43,.08); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.msg { font-size: 14px; color: var(--red); }
.msg:empty { display: none; }
.msg.ok { color: #1F8A47; }
.note { color: var(--text-2); font-size: 15px; margin: 0; }

/* Admin panel */
.admin { border: 1px solid var(--border); border-top: 2px solid var(--navy); border-radius: 12px; padding: 24px 28px; display: grid; gap: 14px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-head h2 { margin: 0; font-family: var(--display); font-size: 21px; color: var(--navy); }
.admin-links { display: flex; gap: 16px; font-size: 14px; }
.admin-links a, .admin-links button { color: var(--navy); font-weight: 600; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.admin input[type=text] { flex: 1 1 200px; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 15px; color: var(--navy); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--navy); }
.switch input { width: 18px; height: 18px; accent-color: var(--green); }
.spacer { flex: 1; }
.confirm { background: var(--red-soft); border-radius: 8px; padding: 14px; display: grid; gap: 10px; font-size: 15px; }

/* Question list */
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.list-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.3; color: var(--navy); }
.count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.list { display: flex; flex-direction: column; gap: 12px; }
.q { display: flex; gap: 14px; padding: 18px 20px 18px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); align-items: flex-start; }
.vote { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.vote button { border: 0; background: transparent; width: 38px; height: 32px; border-radius: 8px; color: #A1A7B3; display: grid; place-items: center; }
.vote button:hover { background: var(--grey); color: var(--navy); }
.vote .up.on { color: #1F8A47; background: #E3F7EA; }
.vote .down.on { color: var(--red); background: var(--red-soft); }
.vote .score { font-weight: 700; font-size: 17px; color: var(--navy); font-variant-numeric: tabular-nums; }
.qbody { flex: 1; min-width: 0; padding-top: 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.qtext { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.4; color: var(--navy); overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 14px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--yellow); color: var(--navy); }
.details-toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--white); border-radius: 8px; padding: 6px 11px; color: var(--navy); font-weight: 600; font-size: 14px; }
.details-toggle:hover { background: var(--grey); }
.chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.chev.up { transform: translateY(1px) rotate(-135deg); }
.thoughts { align-self: stretch; padding: 12px 14px; background: var(--grey); border-radius: 8px; font-size: 16px; line-height: 1.65; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.adminrow { align-self: stretch; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--border); align-items: center; }
.adminrow > .btn.danger:last-child { margin-left: auto; }
.adminrow .label { font-size: 14px; color: var(--text-2); }
.chips-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.chip { border: 1px solid var(--border); background: var(--white); color: var(--navy); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.chip:hover { border-color: var(--navy); }
.chip.on { background: var(--yellow); border-color: var(--yellow); }
.pick-actions { display: flex; gap: 8px; flex-basis: 100%; }
.empty { text-align: center; padding: 36px 20px; color: var(--text-2); background: var(--grey); border-radius: 12px; }
.empty strong { display: block; font-family: var(--display); color: var(--navy); font-size: 19px; margin-bottom: 4px; }
.flash { animation: flash 1.8s ease; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--green); } to { box-shadow: 0 0 0 3px transparent; } }

/* Login page */
.login { max-width: 420px; }
.login .field { margin: 0; }

/* ---------- Footer (matches lazyfpl.com) ---------- */
.footer { background: var(--navy); padding: 56px max(40px, env(safe-area-inset-right, 0px)) 32px max(40px, env(safe-area-inset-left, 0px)); }
.lz-ft { max-width: 1200px; width: 100%; margin: 0 auto; color: rgba(255,255,255,.65); text-align: left; }
.lz-ft .top { display: flex; flex-wrap: wrap; gap: 40px 56px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.lz-ft .brand { flex: 1.4 1 260px; }
.lz-ft .brand img { height: 40px; width: auto; display: block; }
.lz-ft .brand p { margin: 14px 0 0; max-width: 300px; font-size: 14px; line-height: 155%; }
.lz-ft .col { flex: 1 1 140px; }
.lz-ft .h { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.lz-ft a { display: block; color: rgba(255,255,255,.65); text-decoration: none; font-size: 14px; line-height: 160%; padding: 3px 0; }
.lz-ft a:hover { color: var(--green); }
.lz-ft .bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; font-size: 13px; }
.lz-ft .bot span:last-child { font-family: var(--display); font-weight: 700; color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .nav-link, .nav-btn.outline { display: none; }
  .header { padding: 40px max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); }
  .header h1 { font-size: 30px; }
  .header p { font-size: 16px; }
  .body { padding: 32px max(20px, env(safe-area-inset-right, 0px)) 56px max(20px, env(safe-area-inset-left, 0px)); }
  .body .wrap { gap: 32px; }
  .card-grey, .admin { padding: 20px; }
  .ask-row .btn { width: 100%; }
  .list-head h2 { font-size: 22px; }
  .q { gap: 8px; padding: 16px 16px 16px 8px; }
  .qtext { font-size: 17px; }
  .footer { padding: 40px max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); }
  .lz-ft .top { gap: 28px 24px; padding-bottom: 28px; }
  .lz-ft .brand { flex-basis: 100%; }
  .lz-ft .brand img { height: 34px; }
  .lz-ft .col { flex: 1 1 40%; }
}
@media (max-width: 400px) {
  .nav-logo img { height: 26px; }
  .nav-btn.yellow { font-size: 14px; padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } .chev { transition: none; } }
