/* The plaintext.guru look: colours, type, the top bar, the dialog and the footer.
   tilde, backtick and plaintext each keep an identical copy of this file. */
:root {
  --bg: #fbfbf8;
  --surface: #ffffff;
  --border: #e3e3dc;
  --text: #1a1a1b;
  --muted: #6e6e73;
  --brand: #4f8a49;
  --match: #6aaa64;
  --partial: #c9b458;
  --miss: #787c7e;
  --empty: #ececea;
  --star: #d4a72c;
  --accent: #1a1a1b;
  --accent-text: #ffffff;
  --code-bg: #f0f0eb;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121213;
    --surface: #1a1a1c;
    --border: #2f2f33;
    --text: #e8e8ea;
    --muted: #9a9aa0;
    --brand: #7dbb77;
    --match: #538d4e;
    --partial: #b59f3b;
    --miss: #3a3a3c;
    --empty: #26262a;
    --star: #e3b341;
    --accent: #e8e8ea;
    --accent-text: #121213;
    --code-bg: #26262a;
  }
}

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}
.top nav { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.wordmark { display: flex; align-items: baseline; gap: 8px; font: 600 16px var(--mono); white-space: nowrap; }
.wordmark a { color: inherit; text-decoration: none; }
.wordmark a:hover { text-decoration: underline; }
.wordmark .site { color: var(--brand); }
.wordmark .sep { color: var(--muted); font-weight: 400; }
.wordmark h1 { font: inherit; margin: 0; }
.meta { color: var(--muted); font-size: 14px; }

.stars { color: var(--star); letter-spacing: 1px; white-space: nowrap; }

.legal { width: 100%; margin: 0; color: var(--muted); font-size: 13px; }
.legal + .legal { margin-top: -24px; }
.legal a { color: inherit; }

dialog {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  max-width: min(560px, calc(100vw - 32px));
  width: 100%;
  padding: 24px 26px;
}
#modal-body:focus { outline: none; }
dialog::backdrop { background: rgb(0 0 0 / 0.45); }
dialog .close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  padding: 2px 8px;
}
dialog h2 { margin: 0 0 4px; }
dialog h3 { margin: 20px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 860px) {
  .meta { display: none; }
}
@media (max-width: 620px) {
  .top { padding: 12px 16px; }
  .wordmark .collapse { display: none; }
}
