/* Rheem look: brand red #E4002B, navy #101C28, light grey #EAEDF0
   (colours from rheem.com and developers.rheem.com). */
:root {
  --red: #E4002B; --red-dark: #B80023; --navy: #101C28; --grey-bg: #EAEDF0;
  --grey-line: #DBDFE9; --text: #071437; --muted: #63666A; --ok: #17C653; --warn: #F6C000;
  --radius: 10px;
  --font: "Rheem Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.55 var(--font); color: var(--text); background: var(--grey-bg); }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1 { font-size: 1.6rem; font-weight: 700; margin: .25rem 0 1rem; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 1.75rem 0 .6rem; }
code { background: #F1F1F4; padding: .05rem .35rem; border-radius: 4px; font-size: .92em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- sign-in pages (like developers.rheem.com) ---------- */
body.auth { background: var(--red); min-height: 100vh; }
.auth-split { display: flex; min-height: 100vh; }
.auth-brand { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 3rem 4rem; color: #fff; }
.auth-logo { width: 150px; height: auto; margin-bottom: 1.75rem; background: #fff; border-radius: 1rem; padding: 1rem 1.1rem; box-sizing: content-box; box-shadow: 0 6px 24px rgba(0,0,0,.15); }
.auth-brand h2 { font-size: 2rem; font-weight: 400; margin: 0; }
.auth-brand p { margin: .4rem 0 0; opacity: .85; font-size: 1.05rem; }
.auth-panel { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; padding: 3rem 5rem; }
.auth-card { background: #fff; border-radius: 1rem; width: 600px; max-width: 100%; padding: 4rem 4.5rem; box-shadow: 0 10px 40px rgba(16, 28, 40, .18); }
.auth-card h1 { text-align: center; font-size: 1.65rem; margin-bottom: 2.25rem; }
.auth-form input { display: block; width: 100%; margin: 0 0 1.25rem; padding: .85rem 1rem; font: inherit;
  border: 1px solid var(--grey-line); border-radius: .5rem; background: transparent; color: var(--text); }
.auth-form input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(228, 0, 43, .12); }
.auth-form label { display: block; font-weight: 500; }
.auth-form label input { margin-top: .35rem; }
.auth-form input.code { text-align: center; font-size: 1.4rem; letter-spacing: .4em; }
.auth-aside { text-align: right; font-size: .9rem; color: var(--muted); margin: -.25rem 0 1.75rem; }
.auth-foot { text-align: center; color: #99A1B7; font-size: .9rem; margin: 2rem 0 0; }
.lead { color: var(--muted); }
.steps { padding-left: 1.2rem; } .steps li { margin-bottom: .6rem; }
details { margin: 0 0 1.5rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 991.98px) {
  .auth-split { flex-direction: column; }
  .auth-brand { padding: 2.5rem 2rem 1rem; align-items: center; text-align: center; }
  .auth-panel { justify-content: center; padding: 1.5rem; }
  .auth-card { padding: 2.5rem 1.75rem; }
}

/* ---------- buttons ---------- */
button, .btn-primary { display: inline-block; padding: .6rem 1.1rem; border: 0; border-radius: .5rem;
  background: var(--red); color: #fff; font: 600 .95rem var(--font); cursor: pointer; }
button:hover, .btn-primary:hover { background: var(--red-dark); }
button:focus-visible { outline: 3px solid rgba(228, 0, 43, .35); outline-offset: 2px; }
button.block { display: block; width: 100%; padding: .85rem; font-size: 1rem; }
button.danger { background: #fff; color: var(--red); border: 1px solid var(--red); }
button.danger:hover { background: #FFF0F2; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .45); padding: .35rem .8rem; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* ---------- app pages: collapsible side menu ---------- */
body.app { display: flex; min-height: 100vh; }
.nav-open { display: none; }
.sidebar { position: sticky; top: 0; height: 100vh; width: 248px; flex: 0 0 248px; display: flex; flex-direction: column;
  background: var(--navy); color: #C4CADA; border-right: 4px solid var(--red); transition: width .18s ease, flex-basis .18s ease; z-index: 20; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem .9rem 1rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.05rem; min-width: 0; }
.brand:hover { color: #fff; }
.brand img { flex: 0 0 auto; }
.collapse-btn { background: transparent; color: #C4CADA; padding: .35rem; border-radius: .4rem; line-height: 0; }
.collapse-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.collapse-btn .ico { transition: transform .18s ease; }
.ico { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-nav { display: flex; flex-direction: column; gap: .15rem; padding: .9rem .6rem; flex: 1; overflow-y: auto; }
.side-nav a, .side-link { display: flex; align-items: center; gap: .85rem; padding: .7rem .8rem; border-radius: .5rem;
  color: #C4CADA; text-decoration: none; white-space: nowrap; font: 500 .95rem var(--font); background: transparent; width: 100%; text-align: left; }
.side-nav a:hover, .side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.active { background: var(--red); color: #fff; }
.side-foot { padding: .75rem .6rem 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.who { display: flex; align-items: center; gap: .75rem; padding: .5rem .5rem .75rem; color: #fff; text-decoration: none; min-width: 0; }
.who:hover { color: #fff; }
.who .label { display: flex; flex-direction: column; min-width: 0; }
.who strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: #99A1B7; text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; }
.avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; }
.label { overflow: hidden; text-overflow: ellipsis; }
body.nav-collapsed .sidebar { width: 76px; flex-basis: 76px; }
body.nav-collapsed .sidebar .label { display: none; }
body.nav-collapsed .side-head { flex-direction: column; gap: .6rem; padding: 1rem .5rem; }
body.nav-collapsed .collapse-btn .ico { transform: rotate(180deg); }
body.nav-collapsed .side-nav a, body.nav-collapsed .side-link { justify-content: center; padding: .75rem 0; }
body.nav-collapsed .who { justify-content: center; padding: .5rem 0 .75rem; }
.page { flex: 1; min-width: 0; }
.mobile-bar, .scrim { display: none; }
@media (max-width: 900px) {
  body.app { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; width: 260px; }
  .nav-open:checked ~ .sidebar { transform: none; }
  .nav-open:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(16,28,40,.45); z-index: 10; }
  body.nav-collapsed .sidebar { width: 260px; } body.nav-collapsed .sidebar .label { display: inline; }
  .collapse-btn { display: none; }
  .mobile-bar { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; background: var(--navy); color: #fff; font-weight: 600; border-bottom: 4px solid var(--red); }
  .menu-btn { line-height: 0; cursor: pointer; padding: .3rem; }
}

/* ---------- info (i) buttons ---------- */
.info { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: .3rem; vertical-align: middle;
  border-radius: 50%; border: 1.5px solid #99A1B7; color: #78829D; font: italic 700 11px/1 Georgia, serif; cursor: help;
  text-transform: none; letter-spacing: 0; user-select: none; }
.info:hover, .info:focus { border-color: var(--red); color: var(--red); outline: none; }
.info:hover::after, .info:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 280px; padding: .55rem .7rem; border-radius: .45rem; background: var(--navy); color: #fff;
  font: 400 .82rem/1.45 var(--font); text-align: left; white-space: normal; z-index: 50; box-shadow: 0 6px 20px rgba(16,28,40,.25); }
.info:hover::before, .info:focus::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--navy); z-index: 50; }
th .info:hover::after, th .info:focus::after { bottom: auto; top: calc(100% + 8px); }
th .info:hover::before, th .info:focus::before { bottom: auto; top: calc(100% + 2px); border-top-color: transparent; border-bottom-color: var(--navy); }
.field { position: relative; display: flex; align-items: center; gap: .4rem; }
.field input, .field button { flex: 1; }
.auth-form .field input { margin-bottom: 1.25rem; }
.auth-form .field .info { margin-bottom: 1.25rem; }

/* ---------- settings ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--grey-line); margin: 0 0 1.5rem; }
.tabs a { padding: .7rem 1.1rem; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--red); border-bottom-color: var(--red); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.grid2 .card { margin: 0; }
.qr { display: inline-block; background: #fff; padding: .5rem; border: 1px solid var(--grey-line); border-radius: .6rem; margin: .6rem 0; line-height: 0; }
.qr svg { width: 200px; height: 200px; }
.steps .qr { display: block; width: fit-content; margin: .6rem auto .2rem; }
.alert.ok { background: #DFFFEA; border: 1px solid #9BE7B6; color: #0B5E2A; }
.nowrap { white-space: nowrap; } .ua { font-size: .85rem; color: var(--muted); } .top-gap { margin-top: 1rem; }
.downloads li { margin: .4rem 0; }
input:disabled { background: #F9F9F9; color: var(--muted); }
main { max-width: 1180px; margin: 2rem auto; padding: 0 2rem; }
.card { background: #fff; border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 1.5rem 0; box-shadow: 0 1px 3px rgba(16, 28, 40, .08); }
.card.narrow { max-width: 520px; }
.card h2:first-child, .card h1:first-child { margin-top: 0; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(16, 28, 40, .08); }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid #F1F1F4; vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #FAFAFB; }
tr:last-child td { border-bottom: 0; }
form label { display: block; margin: .5rem 0; font-weight: 500; }
input, select { display: block; width: 100%; padding: .6rem .75rem; margin-top: .3rem; border: 1px solid var(--grey-line);
  border-radius: .5rem; font: inherit; color: var(--text); background: #fff; }
input:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(228, 0, 43, .12); }
.row { display: flex; gap: .9rem; align-items: flex-end; flex-wrap: wrap; }
.row label { margin: 0; } .row .grow { flex: 1; min-width: 220px; }
form.inline { display: inline-flex; gap: .45rem; align-items: center; margin: 0 .3rem .3rem 0; }
.actions { white-space: nowrap; }
.small { font-size: .85rem; font-weight: 400; display: inline-flex; gap: .35rem; align-items: center; color: var(--muted); }
input.tiny { width: 4.2rem; display: inline-block; margin: 0; padding: .35rem .5rem; }
.alert, .error { padding: .75rem 1rem; border-radius: .5rem; margin: 0 0 1.25rem; }
.alert.error, p.error { background: #FFF0F2; border: 1px solid #F8B4C0; color: #8A0019; }
.warn { background: #FFF8DD; border: 1px solid var(--warn); padding: .75rem 1rem; border-radius: .5rem; }
.hint { color: var(--muted); font-size: .9rem; }
pre.secret, code.secret { background: var(--navy); color: #fff; padding: .85rem 1rem; border-radius: .5rem; font-size: 1rem;
  user-select: all; overflow-wrap: anywhere; white-space: pre-wrap; }
code.secret { display: inline-block; padding: .35rem .6rem; margin-top: .35rem; letter-spacing: .05em; }
code.wrap { overflow-wrap: anywhere; }
.tag { padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.tag.green { background: #DFFFEA; color: #0B7A35; } .tag.red { background: #FFF0F2; color: var(--red-dark); }
.tag.grey { background: #F1F1F4; color: var(--muted); }

/* ---------- get started, data check, usage, status, help ---------- */
.btn-primary { text-decoration: none; }
.btn-primary:hover { color: #fff; }
.wizard-steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; flex-wrap: wrap; }
.wizard-steps li { padding: .4rem .9rem; border-radius: 999px; background: #fff; color: var(--muted); font-weight: 600; font-size: .88rem; border: 1px solid var(--grey-line); }
.wizard-steps li.current { background: var(--red); color: #fff; border-color: var(--red); }
.wizard-steps li.done { background: #DFFFEA; color: #0B7A35; border-color: #9BE7B6; }
.choice { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.choice a { padding: .7rem 1.1rem; border: 2px solid var(--grey-line); border-radius: .6rem; background: #fff; color: var(--text); text-decoration: none; font-weight: 600; }
.choice a:hover { border-color: var(--red); color: var(--text); }
.choice a.active { border-color: var(--red); background: #FFF0F2; color: var(--red-dark); }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; margin: 1rem 0; }
label.check input { width: auto; margin: 0; display: inline; }
pre.cmd { background: #F7F8FA; border: 1px solid var(--grey-line); border-radius: .5rem; padding: .8rem 1rem; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; user-select: all; }
form.card { margin-top: 0; }
.waiting { display: flex; align-items: center; gap: .7rem; background: #FFF8DD; border: 1px solid var(--warn); padding: .8rem 1rem; border-radius: .5rem; }
.spinner { width: 18px; height: 18px; flex: 0 0 18px; border: 3px solid #F3D98A; border-top-color: var(--red); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 28px; }
.bar { display: inline-block; width: 7px; background: var(--red); border-radius: 2px 2px 0 0; opacity: .85; }
.bar.h0 { height: 2px; background: var(--grey-line); }
.bar.h1 { height: 10%; } .bar.h2 { height: 20%; } .bar.h3 { height: 30%; } .bar.h4 { height: 40%; } .bar.h5 { height: 50%; }
.bar.h6 { height: 60%; } .bar.h7 { height: 70%; } .bar.h8 { height: 80%; } .bar.h9 { height: 90%; } .bar.h10 { height: 100%; }
.status-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: .6rem; font-weight: 600; font-size: 1.05rem; }
.status-banner.s-ok { background: #DFFFEA; color: #0B5E2A; border: 1px solid #9BE7B6; }
.status-banner.s-warn, .status-banner.s-unknown { background: #FFF8DD; color: #6B4E00; border: 1px solid var(--warn); }
.status-banner.s-down { background: #FFF0F2; color: #8A0019; border: 1px solid #F8B4C0; }
.status-banner .hint { font-weight: 400; font-size: .85rem; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; margin-right: .3rem; }
.dot.s-ok { background: var(--ok); } .dot.s-warn { background: var(--warn); } .dot.s-down { background: var(--red); } .dot.s-unknown { background: #99A1B7; }
.toc { margin: 0 0 1rem; }
section.card th { width: 180px; }
section.card thead th { width: auto; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 .5rem; }
