/* Makion portal. Plain CSS, no framework, no JS — the CSP says script-src 'none'. */
:root {
  --bg: #f7f7fb;
  --surface: #fff;
  --text: #14141c;
  --muted: #6b6b7d;
  --border: #e4e4ee;
  --primary: #4f46e5;
  --good: #067647;
  --good-bg: #ecfdf3;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101018; --surface: #191922; --text: #ececf2; --muted: #9a9aad; --border: #2c2c3a;
    --primary: #7c74f0; --good: #75e0a7; --good-bg: #05301f; --bad: #fda29b; --bad-bg: #3a1210;
    --warn: #fec84b; --warn-bg: #3a2708;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.brand { font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.signout { display: flex; align-items: center; gap: 10px; margin: 0; }
.who { color: var(--muted); font-size: 13px; }
main { max-width: 880px; margin: 0 auto; padding: 28px 20px 40px; }
h1 { font-size: 22px; margin: 0 0 14px; letter-spacing: -0.01em; }
footer {
  max-width: 880px; margin: 0 auto; padding: 20px; color: var(--muted);
  font-size: 12px; border-top: 1px solid var(--border);
}
footer a, .muted a { color: var(--muted); }
a { color: var(--primary); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; max-width: 420px;
}
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
form.card { display: flex; flex-direction: column; }
label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
label + input { margin-bottom: 14px; }
.hint { font-weight: 400; color: var(--muted); }
input[type="email"], input[type="password"] {
  font: inherit; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text); width: 100%;
}
input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
button {
  font: inherit; font-weight: 600; cursor: pointer; padding: 9px 16px;
  border: none; border-radius: 8px; background: var(--primary); color: #fff;
}
button:hover { filter: brightness(1.08); }
button.link {
  background: none; color: var(--muted); padding: 0; font-weight: 500;
  font-size: 13px; text-decoration: underline; text-underline-offset: 2px;
}
button.link:hover { color: var(--text); filter: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.notice { padding: 10px 12px; border-radius: 8px; margin: 0 0 14px; max-width: 420px; font-size: 14px; }
.notice.err { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--good-bg); color: var(--good); }
.notice.info { background: var(--warn-bg); color: var(--warn); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.good { background: var(--good-bg); color: var(--good); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }

/* ---- Document pages (privacy) ---- */
/* These exist because the CSP says style-src 'self': an inline style="" attribute is
   BLOCKED OUTRIGHT, not merely discouraged. Every rule that would have been inline lives
   here instead. Keeping the CSP strict is the point — the portal ships no inline anything. */
.card.doc { max-width: 640px; margin-top: 14px; }
.card.doc + .card.doc { margin-top: 14px; }
.card h2 { font-size: 15px; margin: 0 0 8px; }
.card ul { margin: 0; padding-left: 18px; }
.card li + li { margin-top: 5px; }
.card code {
  font-family: var(--mono, ui-monospace, "Cascadia Code", Consolas, monospace);
  font-size: 12.5px; background: var(--bg); padding: 1px 5px; border-radius: 4px;
}
.tight { margin: 0; }
.tight-t { margin-top: 0; }
.tight-b { margin-bottom: 0; }
.spaced-t { margin-top: 16px; }
/* The unverified notice holds a paragraph + a resend form, so it needs block layout. */
.notice.info p { margin: 0 0 8px; }
.notice.info form { margin: 0; }

/* ---- Licence key ---- */
.btn-link {
  display: inline-block; font-size: 12.5px; font-weight: 600; text-decoration: none;
  color: var(--primary); white-space: nowrap;
}
.btn-link:hover { text-decoration: underline; }
/* The key is long and must be copied whole. user-select:all means one click takes it —
   the portal ships no JavaScript, so there is no clipboard button to offer. */
.keybox {
  display: block; user-select: all; word-break: break-all; line-height: 1.5;
  font-family: var(--mono, ui-monospace, "Cascadia Code", Consolas, monospace);
  font-size: 12.5px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin: 0 0 10px;
}
h2.section { font-size: 16px; margin: 26px 0 10px; }

/* ---- Support history ---- */
/* The customer's own words, quoted back so they can see exactly what we received. */
.quote {
  border-left: 3px solid var(--border); padding: 2px 0 2px 12px; margin: 8px 0;
  white-space: pre-wrap; word-break: break-word; font-size: 14px;
}
.quote.reply { border-left-color: var(--primary); }
