/* The online edition's own small pages: landing, host sign-in, admin. */
:root {
  --bg: #0b0e13;
  --card: #151a22;
  --line: #2a3240;
  --text: #eef1f5;
  --muted: #9aa5b4;
  --accent: #fa2993;
  --ok: #9fd402;
  --bad: #ff6b6b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 24px 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin: 0 auto 16px;
  max-width: 960px;
}
.narrow { max-width: 420px; text-align: center; margin-top: 8vh; }
.logo { max-width: 160px; max-height: 120px; display: block; margin: 0 auto 8px; }
h1 { margin: 4px 0 4px; font-size: 24px; }
h2 { margin: 0 0 12px; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); min-height: 1.2em; }
.okmsg { color: var(--ok); }
a { color: var(--accent); }
label { display: block; text-align: left; margin: 14px 0; font-size: 14px; color: var(--muted); }
input, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: #0f131a;
  border: 1px solid var(--line);
  border-radius: 10px;
}
button {
  font: inherit;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1e2530;
  color: var(--text);
  cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; width: 100%; }
button:disabled { opacity: .6; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.club { border-top: 1px solid var(--line); padding: 16px 0; }
.club:first-of-type { border-top: 0; }
.club h3 { margin: 0 0 4px; font-size: 17px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 6px 0 10px; font-size: 14px; word-break: break-all; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }

/* ---- site pages: top bar, homepage, dashboard ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 960px; margin: 0 auto 20px; padding: 0 4px;
}
.topbar nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar a { text-decoration: none; }
.brand { font-weight: 800; font-size: 20px; color: var(--text) !important; letter-spacing: -.01em; }
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font: inherit; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #1e2530; color: var(--text) !important;
}
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #fff !important; font-weight: 600; }
.btn.small, button.small { padding: 6px 12px; font-size: 14px; }
button.auto, .btn.auto { width: auto; }
.wide { max-width: 960px; margin: 0 auto; }
.home { max-width: 960px; margin: 0 auto; }
.hero { padding: 32px 4px 28px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.02em; max-width: 14em; }
.lead { font-size: 18px; color: var(--muted); max-width: 34em; margin: 0 0 22px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.find { max-width: 560px; margin: 8px 0 24px; }
form.inline { display: flex; gap: 8px; }
form.inline input { margin-top: 0; flex: 1; min-width: 0; }
form.inline button { flex: none; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.foot { max-width: 960px; margin: 24px auto 0; text-align: center; }
fieldset.choice { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 14px 0; text-align: left; }
fieldset.choice legend { color: var(--muted); font-size: 14px; padding: 0 4px; }
fieldset.choice label { display: flex; gap: 8px; align-items: baseline; margin: 6px 0; color: var(--text); font-size: 15px; }
fieldset.choice input { width: auto; display: inline; margin: 0; }
.narrow form, .narrow fieldset { text-align: left; }
.club-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #232b37; color: var(--muted); vertical-align: middle; }
.tag.bad { color: var(--bad); }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.hosts { margin: 8px 0; }
.host-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
[data-msg] input { margin-top: 6px; }

/* ---- password boxes: Show / Hide, and the checklist ---- */
.pw-wrap { position: relative; display: block; margin-top: 6px; }
.pw-wrap input { margin-top: 0; padding-right: 72px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 5px 10px; font-size: 13px; border-radius: 8px; width: auto;
}
.pw-rules { list-style: none; margin: -6px 0 14px; padding: 0; font-size: 13px; color: var(--muted); text-align: left; }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "✓ "; }
.grid .pw-rules { grid-column: 1 / -1; margin-top: -6px; }
h2.sub { margin-top: 26px; font-size: 16px; }

/* ---- deleting a club */
button.danger { background: transparent; border-color: rgba(255, 107, 107, .55); color: var(--bad); font-weight: 600; }
button.danger:hover:not(:disabled) { background: rgba(255, 107, 107, .12); }
form button.danger[type="submit"] { background: #d93a3a; border-color: #d93a3a; color: #fff; }
.del-zone { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
dialog#del-dialog {
  width: min(460px, calc(100vw - 32px)); padding: 24px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
}
dialog#del-dialog::backdrop { background: rgba(4, 7, 12, .7); }
.del-list { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.del-live { color: #ffb020; font-weight: 600; }
.del-actions { justify-content: flex-end; margin-top: 4px; }

/* ---- the dashboard inside the host screen's Dashboard window */
html.embedded body { background: transparent; padding: 6px 2px 24px; min-height: 0; }
html.embedded .topbar { justify-content: flex-end; max-width: none; margin-bottom: 12px; }
html.embedded .topbar .brand { display: none; }
html.embedded .wide, html.embedded .card { max-width: none; }
html.embedded { --card: #1c232f; }
html.embedded[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --card: #f5f7fa; --line: #dfe3ea;
  --text: #121821; --muted: #586274;
  --accent: #c90569; --ok: #4b6800; --bad: #c4242b;
}
html.embedded[data-theme="light"] input,
html.embedded[data-theme="light"] select { background: #fff; }
html.embedded[data-theme="light"] button,
html.embedded[data-theme="light"] .btn { background: #fff; }
html.embedded[data-theme="light"] button.primary,
html.embedded[data-theme="light"] .btn.primary { background: var(--accent); }
html.embedded[data-theme="light"] button.danger { background: transparent; border-color: rgba(196, 36, 43, .5); }
html.embedded[data-theme="light"] form button.danger[type="submit"] { background: #c4242b; border-color: #c4242b; }
html.embedded[data-theme="light"] .tag { background: #e6eaf0; }
html.embedded[data-theme="light"] .del-live { color: #854a00; }
html.embedded[data-theme="light"] dialog#del-dialog { background: #fff; }
html.embedded[data-theme="light"] dialog#del-dialog::backdrop { background: rgba(20, 26, 38, .42); }
