/* Shared by the sign-in pages and the guide. */
body.page { background: var(--bg); }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar .logo { width: 170px; margin: 0; }
.topbar nav { display: flex; gap: 18px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.topbar nav a, .linkbtn { color: var(--ink); text-decoration: none; }
.topbar nav a:hover, .linkbtn:hover { color: var(--brand); }
.who { color: var(--muted); }
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.content { display: block; padding: 40px 24px 80px; min-height: auto; background: none; }
.card {
  max-width: 420px; margin: 0 auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 28px;
}
.card h1 { font-size: 22px; margin: 0 0 6px; font-weight: 600; }
.card p.sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.card .helptext, .card ul.errorlist + .helptext { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; }
.card ul { padding-left: 18px; font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.card ul.errorlist { color: var(--danger); list-style: none; padding: 0; }
.card a { color: var(--brand); }
.card input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.card .field { margin-bottom: 16px; }
.alt { text-align: center; font-size: 14px; margin-top: 18px; color: var(--muted); }

/* Guide */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 32px; font-weight: 600; margin: 0 0 8px; }
.prose h2 { font-size: 20px; font-weight: 600; margin: 40px 0 10px; }
.prose p, .prose li { color: var(--ink); }
.prose .lead { font-size: 17px; color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 10px 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.prose .glyph { font-size: 20px; width: 36px; font-family: "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", sans-serif; }
.prose .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.prose .toc a { display: inline-block; font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }
.prose .callout { background: var(--brand-soft); border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cols > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.cols b { display: block; margin-bottom: 4px; }
.reading-chart { display: block; width: min(100%, 520px); margin: 24px auto; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.reading-page p b { font-weight: 600; }
.card.wide { max-width: 680px; }
.card code { font-size: 12px; background: var(--brand-soft); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.card .note { background: var(--brand-soft); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.card .clist, .mcard .clist { list-style: none; padding: 0; color: var(--ink); font-size: 14px; }
.card .clist li, .mcard .clist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.card .clist .t, .mcard .clist .t { flex: 1; }
.card .clist small, .mcard .clist small { color: var(--muted); margin-left: 8px; }
.card .mini { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; text-decoration: none; color: var(--ink); background: var(--card); cursor: pointer; }
pre.log { font-size: 11px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 320px; overflow: auto; white-space: pre-wrap; }
.topbar .edition-badge { margin: 0 auto 0 10px; }

/* ===================================================== owner dashboard (/manage/) */
.manage { max-width: 1040px; width: 100%; min-width: 0; margin: 0 auto; }
.manage > * { min-width: 0; max-width: 100%; }
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mhead h1 { font-size: 26px; font-weight: 600; margin: 0; }
.manage .mini { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; text-decoration: none; color: var(--ink); background: var(--card); cursor: pointer; font-family: inherit; white-space: nowrap; }
.manage .mini:hover { border-color: var(--brand); color: var(--brand); }
.mtabs { display: flex; gap: 4px; margin: 18px 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.mtabs a { padding: 10px 14px; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.mtabs a:hover { color: var(--ink); }
.mtabs a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
.mmsg { padding: 10px 14px; border-radius: 8px; font-size: 14px; background: var(--brand-soft); margin: 0 0 16px; }
.mmsg.error { background: #fde8e8; color: #8a1c1c; }
.mmsg.warning { background: #fff5dc; color: #6b4f00; }
.mcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 18px; }
.mcard h2 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.manage .hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; max-width: 70ch; }
.mstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.mstats > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.mstats span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mstats b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mstats small { font-size: 12px; color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checks li > span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex: none; }
.checks li.ok > span { background: #e6f4ea; color: #1e6b35; }
.checks li.todo > span { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.checks small { display: block; color: var(--muted); font-size: 12px; }
.mtable-wrap { overflow-x: auto; }
.mtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.mtable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mtable td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mtable td small { display: block; color: var(--muted); font-size: 11px; }
.mtable tr.off td { opacity: .5; }
.mtable code { font-size: 12px; background: var(--brand-soft); padding: 2px 6px; border-radius: 4px; cursor: copy; }
.mtable code[data-copied]::after { content: " ✓ copied"; color: var(--brand); }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.pill.paid { background: #e6f4ea; color: #1e6b35; border-color: #b9e0c4; }
.mform .mfield { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.mform .mfield label { font-size: 13px; font-weight: 500; }
.mform .mfield .opt { color: var(--muted); font-weight: 400; }
.mform .mfield small { font-size: 12px; color: var(--muted); }
.mform .mfield small.err, .mform small.err { color: var(--danger); }
.mform .mfield.bad input, .mform .mfield.bad textarea { border-color: var(--danger); }
.mform input[type=search], .mform input[type=text], .mform input[type=email], .mform input[type=url], .mform input[type=number], .mform input[type=date],
.mform input:not([type]), .mform textarea, .mform select {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.mform textarea { resize: vertical; }
.mform input:focus, .mform textarea:focus, .mform select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.mform .mfield.check { justify-content: flex-end; }
.mform .mfield.check label { display: flex; gap: 8px; align-items: center; font-weight: 400; padding: 9px 0; }
.mgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.mgrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.mgrid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 14px; align-items: end; }
.mrow { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 4px; margin: 0 0 12px; }
.mrow.new { border-style: dashed; }
.mrow legend { font-size: 13px; font-weight: 600; padding: 0 6px; color: var(--brand); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.del { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--danger); margin: 0 0 10px; cursor: pointer; }
.mbar { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 2; }
.mbar .btn { width: auto; padding: 11px 26px; }
.serp { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0 14px; display: flex; flex-direction: column; gap: 2px; font-family: Arial, sans-serif; max-width: 600px; background: #fff; }
.serp .u { font-size: 12px; color: #4d5156; }
.serp .t { font-size: 19px; color: #1a0dab; line-height: 1.3; }
.serp .d { font-size: 13px; color: #4d5156; line-height: 1.5; }
.count { font-size: 12px; color: var(--muted); }
.inline-add label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 6px; }
.inline-add .row, .gitem .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-add .row > select, .inline-add .row > input[type=text] { flex: 1; min-width: 140px; }
.inline-add input[type=file] { font-size: 13px; max-width: 100%; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gitem { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 0; min-width: 0; }
.gitem img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--bg); margin-bottom: 10px; display: block; }
.gitem .row .mfield { flex: 1; margin: 0; }
.clist.plain { list-style: none; padding: 0; font-size: 14px; }
.clist.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .mgrid2, .mgrid3 { grid-template-columns: 1fr; }
  .mgrid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mcard { padding: 16px; }
}
.ofilter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.ofilter input[type=search] { flex: 1; min-width: 180px; width: auto; }
.ofilter select { width: auto; }
.olist { list-style: none; padding: 0; margin: 0; }
.olist > li { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.ohead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ohead small, .oright small, .obody > small { display: block; color: var(--muted); font-size: 12px; }
.oright { text-align: right; }
.obody { margin-top: 8px; }
.obtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.oacts { margin-top: 10px; font-size: 13px; }
.oacts summary { cursor: pointer; color: var(--brand); }
.oacts form { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.oacts input[type=email] { flex: 1; min-width: 200px; width: auto; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; font-size: 13px; }
.seo-table td small.note { color: #8a6100; background: #fff5dc; padding: 2px 6px; border-radius: 4px; margin-top: 4px; display: block; }
.kw { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.kw li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.kw small { color: var(--muted); }
.del-form { margin: 8px 0 24px; }
.mini.danger { color: var(--danger); border-color: var(--danger); }
.mmsg.warn { background: #fff4d6; color: #6b4a00; }
.mform textarea#id_terms_text, .mform textarea#id_refunds_text, .mform textarea#id_privacy_text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; }
