/* pyle: plain, readable, accessible. */
:root {
  color-scheme: light dark;
  --fg: #1d1f21;
  --bg: #fdfdfc;
  --muted: #5c6166;
  --accent: #2456a6;
  --notice: #fff4d6;
  --line: #d6d8db;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e6e3;
    --bg: #17191b;
    --muted: #a3a7ab;
    --accent: #8fb3ff;
    --notice: #3a3220;
    --line: #3a3d41;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--fg);
  background: var(--bg);
}
main { max-width: 40rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 1.5rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 600; }
input {
  width: 100%;
  padding: 0.55rem 0.6rem;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
}
button {
  margin: 0.75rem 0.5rem 0 0;
  padding: 0.55rem 1rem;
  font: inherit;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 0.35rem;
  cursor: pointer;
}
button.secondary, li button {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 0.25rem 0.6rem;
  margin-top: 0.25rem;
}
/* A link that does what a button does. */
a.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0.35rem;
  text-decoration: none;
  font-weight: 600;
}
a.button.secondary { color: var(--accent); background: transparent; font-weight: 400; }
button.small, a.button.small {
  margin: 0;
  padding: 0.25rem 0.6rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
ul.items { list-style: none; padding: 0; margin: 0; }
ul.items li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.meta, .hint { color: var(--muted); font-size: 0.9rem; }
.notice { background: var(--notice); padding: 0.75rem 1rem; border-radius: 0.35rem; }
code, ol.codes { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; word-break: break-all; }
#status { min-height: 1.5rem; font-weight: 600; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* The account pages: wider, for the table of sign-in methods. */
body[data-page="account"] main, body[data-page^="add"] main { max-width: 46rem; }
a.back { display: inline-block; margin-bottom: 0.75rem; }
.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.page-head h1 { margin: 0; }
.page-head .signed-in { margin: 0; }
a.nudge-link { font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 1.5rem; }
.signed-in { color: var(--muted); }
.protection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
}
.protection.notice { border-color: transparent; }
.protection-text { flex: 1 1 22rem; }
.protection p { margin: 0 0 0.35rem; }
.protection p:last-child { margin-bottom: 0; }
.protection-title { font-weight: 600; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.section-head h2 { margin: 0; border: 0; padding: 0; }
/* On a narrow screen the table scrolls sideways in its box, not the page. */
.table-scroll { overflow-x: auto; margin-top: 1rem; }
table.methods { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.95rem; }
table.methods th, table.methods td { text-align: left; vertical-align: top; padding: 0.6rem 0.5rem; }
table.methods th:first-child, table.methods td:first-child { padding-left: 0; }
table.methods thead th { padding-top: 0.4rem; padding-bottom: 0.4rem; }
table.methods tbody tr { border-bottom: 1px solid var(--line); }
table.methods th[scope="colgroup"] { padding: 1.25rem 0 0.35rem; font-size: 1rem; }
table.methods th[scope="colgroup"] .meta { font-weight: 400; font-size: 0.85rem; }
table.methods td .meta { font-size: 0.85rem; }
table.methods td.actions { text-align: right; white-space: nowrap; padding-right: 0; }
/* The choices of what to add, each a card. */
.choices { display: flex; flex-direction: column; gap: 0.75rem; }
.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 1rem 1.1rem;
  font: inherit;
  text-align: left;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  cursor: pointer;
}
.choice.recommended { border: 2px solid var(--accent); }
.choice-text { flex: 1 1 22rem; }
.choice-title { display: block; font-weight: 600; font-size: 1.05rem; }
.choice-desc { display: block; color: var(--muted); font-size: 0.95rem; }
.choice-go { font-weight: 600; color: var(--accent); }
.badge {
  margin-left: 0.35rem;
  padding: 0.1rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: middle;
  color: var(--bg);
  background: var(--accent);
  border-radius: 1rem;
}
.enrol { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.enrol-key { flex: 1 1 16rem; }
.enrol-key p { margin: 0 0 0.5rem; }
.key-label { font-weight: 600; }
input.code { width: 10rem; letter-spacing: 0.15em; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.buttons button { margin: 0; }
/* White in either scheme: a phone camera reads dark modules on light. */
img.qr { display: block; width: 100%; max-width: 14rem; height: auto; background: #fff; padding: 0.5rem; border-radius: 0.35rem; }