/* THE Tixible theme (one dark theme on every page). This file is loaded LAST on every page, so its colours win.
   Pages and scripts must take colours from these names; the older names below point at them. */
:root {
  color-scheme: dark;

  /* surfaces, from the page upwards */
  --bg: #15130e;
  --bg-2: #1c1912;
  --surface: #201d15;
  --surface-2: #26221a;
  --surface-3: #312c20;
  --line: #3a3524;
  --line-strong: #5a5236;
  --field-line: #7a704c; /* the edge of a box you can type in: 3:1 against its surroundings */

  /* words */
  --ink: #f3eee0;        /* 15.9:1 on --bg */
  --ink-soft: #d6d0bd;   /* 12.0:1 */
  --ink-faint: #aca593;  /*  7.5:1 */
  --prose: #ddd7c6;      /* long reading text */

  /* gold: one primary colour, always with dark words on it */
  --gold: #e8b84b;
  --on-gold: #1a1305;
  --link: #e8b84b;

  /* states */
  --ok: #8fd6a5;  --ok-bg: #16301f;
  --warn: #f0c877; --warn-bg: #3a2c12;
  --err: #ff9b92;  --err-bg: #3b1d1a;
  --focus: #9db7ff;
  --tint: rgba(243, 238, 224, .08);

  --radius: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* the older names, so every stylesheet follows this theme */
  --cream: var(--bg);
  --tan: var(--bg-2);
  --card-border: var(--line);
  --amber: var(--gold);
  --amber-dark: var(--gold);
  --surface-line: var(--line);
  --app-bg: var(--bg); --app-card: var(--surface); --app-line: var(--line); --app-ink: var(--ink); --app-soft: var(--ink-soft); --app-faint: var(--ink-faint);
  --app-amber: var(--gold); --app-amber-ink: var(--on-gold); --app-focus: var(--focus);
  --app-ok-bg: var(--ok-bg); --app-ok-ink: var(--ok); --app-warn-bg: var(--warn-bg); --app-warn-ink: var(--warn); --app-err: var(--err);
  --app-tint: var(--tint); --app-amber-soft: #3b3114; --app-amber-strong: #5a4818;
}
html { background: var(--bg); scrollbar-color: var(--line-strong) var(--bg); }
body { background: var(--bg); color: var(--ink); font-family: var(--font); }
::selection { background: var(--gold); color: var(--on-gold); }
:where(a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* form fields */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-strong); }
::placeholder { color: var(--ink-faint); opacity: 1; }
:where(option, optgroup) { background: var(--surface); color: var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); }
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset; caret-color: var(--ink); }

/* buttons */
html .btn-dark, html .btn-primary { background: var(--gold); color: var(--on-gold); border-color: transparent; }
html .btn-outline-dark { background: transparent; color: var(--ink); border-color: var(--line-strong); }

/* header, menu and footer */
html .site-header { background: rgba(21, 19, 14, .94); border-bottom-color: var(--line); }
html .site-header .nav-toggle { border-color: var(--line); }
@media (max-width: 900px) {
  html .site-header { background: var(--bg); }
  html .site-header .nav { background: var(--bg); border-left-color: var(--line); }
  html .site-header .nav a, html .site-header .nav a:hover, html .site-header .nav .nav-account button, html .site-header .nav .nav-hello { color: var(--ink); border-bottom-color: var(--line); }
  html .site-header .nav .nav-account { border-bottom-color: var(--line); }
/* a signed-in device: "Log in" is not shown while "My account" is on its way (see site-flags.js) */
html.acct-wait .site-header .nav-signin:not(.is-account) { visibility: hidden; }
}
html .site-footer { background: var(--bg-2); color: var(--ink-soft); border-top: 1px solid var(--line); }

/* long reading pages: Terms, Privacy and the other policies */
html .legal-content { max-width: 68ch; margin-left: auto; margin-right: auto; color: var(--prose); font-size: 16.5px; line-height: 1.8; }
html .legal-content p, html .legal-content li, html .legal-content td, html .legal-content dd { color: var(--prose); line-height: 1.8; }
html .legal-content h2, html .legal-content h3, html .legal-content h4, html .legal-content strong, html .legal-content th, html .legal-content dt { color: var(--ink); line-height: 1.35; }
html .legal-content h2 { margin-top: 2em; }
html .legal-content p, html .legal-content ul, html .legal-content ol { margin-bottom: 1.1em; }
html .legal-content li { margin-bottom: .45em; }
html .legal-content a, html .auth-links a, html .auth-note a, html .auth-linkbtn, html .about-facts a, html .empty a, html main dd > a, html .inline-link, html .contact-path .learn-more, html .contact-card .learn-more { color: var(--link); }
html .legal-content a { text-decoration: underline; text-underline-offset: 3px; }

/* boxes you type in have an edge that can be seen */
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]), select, textarea) { border-color: var(--field-line); }
html body :is(input, select, textarea):focus { border-color: var(--gold); }
/* a gold button that can't be pressed yet is grey, never a dull brown */
html body :is(.btn-dark, .btn-primary):disabled, html body button[type=submit]:disabled { opacity: 1; background: var(--surface-3); color: var(--ink-faint); border-color: var(--line); }
/* the initial on gold circles is dark */
html body .app-avatar, html body .me-who .app-avatar { background: var(--gold); color: var(--on-gold); }
/* policy pages: the text starts soon after the title */
html .section:has(.legal-content) { padding-top: 8px; }
