/* Shared look of the policy pages (terms, privacy, refunds, contact). */
/* Light, or dark when chosen in the app (My account -> Appearance; legal.js sets data-theme). */
:root { --bg: #eef1f5; --panel: #ffffff; --line: #d6dce5; --text: #16202c; --muted: #5d6b7e; --accent: #1a8fa3; color-scheme: light; }
:root[data-theme='dark'] { --bg: #0b0e13; --panel: #12161d; --line: #242b37; --text: #e6e9ef; --muted: #8a94a6; --accent: #3fb6c9; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
header a { color: var(--text); text-decoration: none; font-weight: 650; }
header nav a { color: var(--muted); font-weight: 400; margin-left: 14px; font-size: 13px; }
main { max-width: 820px; margin: 0 auto; padding: 28px 20px 64px; }
h1 { font-size: 28px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 28px 0 6px; }
.updated { color: var(--muted); margin: 0 0 20px; }
a { color: var(--accent); }
ul { padding-left: 22px; }
li { margin: 4px 0; }
.box { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
mark.todo { background: #f5b83d; color: #1a1300; padding: 0 4px; border-radius: 3px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; border-top: 1px solid var(--line); }
footer a { color: var(--muted); margin: 0 6px; }
@media (max-width: 600px) {
  header nav a { margin-left: 8px; } h1 { font-size: 23px; }
  /* Phones: the policy links stay in the footer, so the header fits. */
  header nav a[href='/terms'], header nav a[href='/privacy'], header nav a[href='/refunds'] { display: none; }
}

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 8px; }
.contact-form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); }
.contact-form .opt { font-size: 12px; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.contact-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .hint { margin: 0; color: var(--muted); font-size: 13px; }
.contact-form .actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.contact-form .send { font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 8px; padding: 10px 18px; cursor: pointer; }
.contact-form .send:disabled { opacity: 0.6; cursor: default; }
.contact-form .status { font-size: 13.5px; color: var(--muted); }
.contact-form .status.error { color: #c93c31; }
:root[data-theme='dark'] .contact-form .send { color: #04151a; }
:root[data-theme='dark'] .contact-form .status.error { color: #ff8a80; }
.done { margin: 18px 0 8px; }
.done h2 { margin-top: 0; }
@media (max-width: 600px) { .contact-form .grid { grid-template-columns: 1fr; } }
header .home { display: inline-flex; align-items: center; gap: 9px; }
header .home img { border-radius: 6px; }

/* Help page */
.help section { scroll-margin-top: 16px; }
.help h2 { padding-top: 10px; border-top: 1px solid var(--line); }
.help h3 { font-size: 15.5px; margin: 18px 0 4px; }
.help .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.help .toc a { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); text-decoration: none; font-size: 13.5px; }
.help .toc a.key { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
:root[data-theme='dark'] .help .toc a.key { color: #04151a; }
.help .toc a:not(.key):hover { border-color: var(--accent); color: var(--accent); }
.help .steps { padding-left: 0; list-style: none; counter-reset: step; }
.help .steps li { position: relative; padding-left: 34px; margin: 8px 0; counter-increment: step; }
.help .steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 23px; height: 23px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
:root[data-theme='dark'] .help .steps li::before { color: #04151a; }
.help .tip { padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 8px 8px 0; }
.help kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
.help .keys { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; align-items: baseline; }
.help .keys dt { white-space: nowrap; }
.help .keys dd { margin: 0; }
.help > .box { margin-top: 32px; }
.help code { padding: 1px 5px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.guide .crumbs { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.guide .crumbs a { color: var(--muted); }
.guide .faq dt { font-weight: 650; margin-top: 12px; }
.guide .faq dd { margin: 4px 0 0; }
.guide-list { padding: 0; list-style: none; }
.guide-list li { margin: 10px 0; }
.guide-list a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; }
.guide-list a:hover { border-color: var(--accent); }
.guide-list a b { display: block; margin-bottom: 3px; }
.guide-list a span { color: var(--muted); font-size: 14px; }
@media (max-width: 600px) { .help .keys { grid-template-columns: 1fr; gap: 2px; } .help .keys dd { margin-bottom: 8px; } }
