/* ironkeel pilot site. One file, system fonts, no external resources. */
:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --line: #d9d9d9;
  --accent: #0b5d8a;
  --ok: #176b3a;
  --bad: #9b1c1c;
  --warn-bg: #fff6d6;
  --error-bg: #fde8e8;
  --notice-bg: #e6f4ea;
  --code-bg: #f3f3f3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #e8e8e8;
    --muted: #a8a8a8;
    --line: #333333;
    --accent: #7cc0e8;
    --ok: #6fcf97;
    --bad: #f28b82;
    --warn-bg: #3a3214;
    --error-bg: #3d1f1f;
    --notice-bg: #1d3324;
    --code-bg: #1f1f1f;
  }
}
* { box-sizing: border-box; }
html { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--fg); }
body { margin: 0 auto; max-width: 52rem; padding: 0 1rem 3rem; }
a { color: var(--accent); }
h1 { font-size: 1.8rem; margin: 1.5rem 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
p.lead { font-size: 1.1rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--code-bg); padding: 0 0.2em; border-radius: 3px; word-break: break-all; }
pre { background: var(--code-bg); padding: 0.75rem; overflow-x: auto; }
pre code { background: none; padding: 0; }

header.site, footer.site { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--line); }
footer.site { border-bottom: 0; border-top: 1px solid var(--line); margin-top: 3rem; flex-direction: column; align-items: flex-start; }
.brand { font-weight: 700; text-decoration: none; color: var(--fg); font-size: 1.2rem; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; }
nav a { text-decoration: none; }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: none; }

table { border-collapse: collapse; width: 100%; margin: 0.5rem 0 1rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }
td.no { color: var(--ok); }
td.yes { color: var(--muted); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.small, footer .small { font-size: 0.9rem; color: var(--muted); }
.dev { color: var(--bad); font-weight: 600; }

form.stack { display: flex; flex-direction: column; gap: 0.6rem; max-width: 32rem; margin: 1rem 0; }
form.stack label { display: block; }
form.stack label .small { display: block; margin-left: 1.5rem; }
input[type=text], textarea, select { font: inherit; padding: 0.5rem; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--fg); width: 100%; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.6rem; }
legend { padding: 0 0.3rem; }
button, a.button { font: inherit; padding: 0.5rem 1rem; border-radius: 4px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; align-self: flex-start; }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button.secondary { background: transparent; color: var(--accent); }
button.small { padding: 0.2rem 0.6rem; font-size: 0.9rem; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.flash { padding: 0.75rem 1rem; border-radius: 4px; margin: 1rem 0; }
.flash.error { background: var(--error-bg); }
.flash.notice { background: var(--notice-bg); }
.warning { background: var(--warn-bg); padding: 0.75rem 1rem; border-radius: 4px; }
.account-number { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 2rem; letter-spacing: 0.1em; margin: 1rem 0; user-select: all; }
/* Support tickets and status notices. Message text is escaped by the template; pre-wrap keeps its line breaks. */
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.4rem; letter-spacing: 0.05em; margin: 0.5rem 0 1rem; user-select: all; overflow-wrap: anywhere; }
.message { border: 1px solid var(--line); border-radius: 4px; padding: 0.75rem 1rem; margin: 1rem 0; }
.message.from-support { border-left: 4px solid var(--accent); }
.message h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.message p.small { margin: 0 0 0.5rem; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-body.kept { border: 1px dashed var(--line); border-radius: 4px; padding: 0.75rem 1rem; user-select: all; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; }
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0; }
/* A wide table fits a 360 px phone with narrower cells, and on anything narrower scrolls inside
   itself, never the page. */
.prose table { display: block; overflow-x: auto; }
@media (max-width: 25rem) { .prose th, .prose td { padding-left: 0.25rem; padding-right: 0.25rem; } }

/* Add-device result (filled in by adddevice.js when keys are made in the browser) */
.device-result .config { border: 1px solid var(--line); border-radius: 4px; padding: 0.75rem; margin: 0.75rem 0; }
.device-result h4 { margin: 0 0 0.5rem; }
.device-result canvas { display: block; margin-top: 0.75rem; max-width: 100%; height: auto; image-rendering: pixelated; background: #fff; padding: 0; }
#paste-key[hidden], #keygen-mode[hidden], #keygen-status[hidden], #device-result[hidden] { display: none; }

/* Text for screen readers only, such as the leak check's live results. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
