/* OblivionScape account pages: the whole stylesheet.

   The design tokens below are the public site's (website/static), named by role as
   SkyrimScape's copy spec (WEBSITE-COPY-SPEC.md A.3) names them, with OblivionScape's
   values: the navy ground, the parchment ink and the gold. A colour change for the site
   is made here in the same role so the account pages and the public pages read as one site.

   No @import, no web font, no remote anything: the pages are served under
   `default-src 'none'; style-src 'self'` and must work with it. */

:root {
  color-scheme: dark;

  /* grounds */
  --bg: #0a1628;            /* page */
  --bg-header: #071020;     /* the header bar */
  --bg-raised: #0d2137;     /* cards, notes, the alert ground */
  --bg-sunken: #071020;     /* inputs, code, the captcha box */
  --bg-panel: #12293f;      /* table heads */

  /* ink */
  --ink: #c8d4dd;           /* body text */
  --ink-bright: #f2ece0;    /* headings, strong text, input text */
  --ink-dim: #8fa3b5;       /* ledes, nav links, labels */
  --ink-faint: #7d93a8;     /* hints, small print */

  /* the brand */
  --gold: #c9a24e;          /* wordmark, buttons, note rule, bars */
  --gold-bright: #e0b658;   /* links, hover */
  --on-gold: #1a1206;       /* text on a gold button */

  /* lines */
  --line: #1d3853;          /* hairlines, borders */
  --line-soft: #152c45;     /* table rows */

  /* states */
  --bad: #e06c5a;
  --bad-bg: #2a1310;
  --bad-ink: #f0c9c2;
  --good: #59b37a;
  --good-bg: #0f2a1c;
  --good-ink: #c6e8d3;
  --warn: #d8a33c;
  --warn-bg: #26200f;

  --radius: 6px;
  --font: 16px/1.55 system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
[hidden] { display: none !important }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--font);
}

a { color: var(--gold-bright) }
a:hover { color: var(--gold) }
b, strong { color: var(--ink-bright) }

/* ---------------------------------------------------------------- skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--on-gold);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 700;
  z-index: 10;
}
.skip:focus { left: 0 }

/* ------------------------------------------------------------------ chrome */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-header);
}
.site-header .inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
}
.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  margin-right: auto;
}
.wordmark:hover { color: var(--gold-bright) }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline }
.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 15px;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink-bright) }
.site-nav a[aria-current="page"] { color: var(--ink-bright); border-bottom-color: var(--gold) }
.site-nav form { display: inline; margin: 0 }
.site-nav button.linklike {
  background: none; border: 0; padding: 2px 0; margin: 0;
  color: var(--ink-dim); font: inherit; font-size: 15px; cursor: pointer;
}
.site-nav button.linklike:hover { color: var(--ink-bright) }

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 34px 20px 72px;
}
main.narrow { max-width: 520px }

.site-footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--ink-faint);
  font-size: 13px;
}
.site-footer a { color: var(--ink-dim) }

/* --------------------------------------------------------------- typography */
h1 { font-size: 30px; letter-spacing: .03em; margin: 0 0 6px; font-weight: 700; color: var(--ink-bright) }
h2 { font-size: 20px; margin: 34px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; color: var(--ink-bright) }
.lede { color: var(--ink-dim); margin: 0 0 26px }
p { margin: 0 0 14px }
code, .mono { background: var(--bg-sunken); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: .95em }
small { color: var(--ink-faint) }
.sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ------------------------------------------------------------------- cards */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin: 0 0 20px;
}
.card > :last-child { margin-bottom: 0 }
.card-title { margin: 0 0 4px; font-size: 17px; border: 0; padding: 0 }
.card-note { color: var(--ink-dim); font-size: 14px; margin: 0 0 16px }

.note {
  background: var(--bg-raised);
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  margin: 16px 0;
}

/* ------------------------------------------------------------- alerts/flash */
.alert {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 18px;
}
.alert p { margin: 0 0 6px }
.alert p:last-child { margin: 0 }
.alert ul { margin: 0; padding-left: 20px }
.alert-error   { border-left-color: var(--bad);  background: var(--bad-bg); color: var(--bad-ink) }
.alert-success { border-left-color: var(--good); background: var(--good-bg); color: var(--good-ink) }
.alert-info    { border-left-color: var(--gold); background: var(--bg-raised) }
.alert-warn    { border-left-color: var(--warn); background: var(--warn-bg) }

/* ------------------------------------------------------------------- forms */
.field { margin: 0 0 18px }
.field label, .label {
  display: block;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 6px;
}
.field .hint { display: block; color: var(--ink-faint); font-size: 13px; margin: 6px 0 0 }
.field .err { display: block; color: var(--bad); font-size: 14px; margin: 6px 0 0 }

input[type=text], input[type=email], input[type=password] {
  width: 100%;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-bright);
  font: inherit;
  padding: 11px 13px;
}
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}
input[aria-invalid="true"] { border-color: var(--bad) }

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--on-gold);
  font: inherit;
  font-weight: 700;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--gold-bright); color: var(--on-gold) }
.btn[disabled], .btn[aria-disabled="true"] {
  background: #3a4656;
  color: #8a96a3;
  cursor: not-allowed;
}
.btn-block { display: block; width: 100% }
.btn-danger { background: transparent; color: var(--bad); border: 1px solid #5a2a24; font-weight: 600; padding: 8px 14px }
.btn-danger:hover { background: var(--bad-bg); color: #ff8c7a }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center }

.linkbtn {
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--gold-bright); font: inherit; font-size: 14px;
  text-decoration: underline; cursor: pointer;
}
.linkbtn:hover { color: var(--gold) }

.form-foot { margin: 22px 0 0; color: var(--ink-dim); font-size: 15px }

/* honeypot: off screen, NOT display:none (a bot that respects display:none would
   skip it, and skipping it is exactly what a person does). */
.hp {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ captcha */
.captcha {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-sunken);
  padding: 16px;
  margin: 0 0 18px;
}
.captcha-head {
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 10px;
}
.captcha-status { margin: 0 0 8px; font-size: 14px; color: var(--ink-dim) }
.captcha-status.is-done { color: var(--good) }
.captcha-status.is-error { color: var(--bad) }
.progress {
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.progress > .bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width .18s linear;
}
.captcha-visual { margin: 16px 0 0 }
.captcha-image {
  display: block;
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: 100%;
  height: auto;
  margin: 0 0 10px;
}
.captcha-question {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 17px;
  color: var(--ink-bright);
}
.captcha-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0 }
.captcha-nojs { color: var(--warn); margin: 0 }

/* ------------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; margin: 0 0 8px }
table { border-collapse: collapse; width: 100%; font-size: 15px }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top }
th {
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; white-space: nowrap;
}
td.actions { text-align: right; padding-right: 0; white-space: nowrap }
td.actions form { margin: 0 }
tr.is-current td { color: var(--ink-bright) }
.badge {
  display: inline-block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-dim);
}
.badge-current { border-color: var(--gold); color: var(--gold) }
.empty { color: var(--ink-faint); font-style: italic; margin: 0 }

/* a character id: 36 characters, so it sets small and wraps rather than pushing the card sideways */
.char-id {
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
  color: var(--gold);
}

/* -------------------------------------------------------------- definitions */
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 10px 18px; margin: 0 }
.kv dt { color: var(--ink-faint); font-size: 14px }
.kv dd { margin: 0; overflow-wrap: anywhere }

/* the register page's round counter, and the sign-in page's resend fold */
.budget { margin: 0 0 20px }
.budget p { margin: 0 }
details.resend { margin-top: 24px; color: var(--ink-dim); font-size: 14px }
details.resend summary { cursor: pointer }
details.resend form { margin-top: 12px }

/* the terms prompt (terms.js), in the pages' own colours */
#tosp { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--bg-raised); border-top: 2px solid var(--gold); box-shadow: 0 -6px 24px rgba(0,0,0,.5) }
#tosp .in { max-width: 860px; margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; color: var(--ink); font-size: 15px; line-height: 1.5 }
#tosp p { margin: 0; flex: 1 1 420px }
#tosp button { background: var(--gold); color: var(--on-gold); font-weight: 700; border: 0; padding: 12px 22px; border-radius: var(--radius); font-size: 16px; cursor: pointer }
#tosp button:hover { background: var(--gold-bright) }

/* -------------------------------------------------------------- responsive */
@media (max-width: 640px) {
  h1 { font-size: 25px }
  main { padding: 24px 16px 56px }
  .card { padding: 18px 16px }
  .kv { grid-template-columns: 1fr; gap: 2px 0 }
  .kv dd { margin: 0 0 12px }
  .btn-row .btn { width: 100% }
  td.actions { text-align: left }
  #tosp .in { padding: 12px 16px }
  #tosp button { width: 100% }
}

@media (prefers-reduced-motion: reduce) {
  .progress > .bar { transition: none }
}
