/* The owner page wears the look he picked for Eve: one design in two modes, Night and Daylight.
   One column, rows and not cards, one accent. Colour means something or it is not there. */
:root {
  color-scheme: dark;
  --bg: #0a0b0f;
  --fg: #f2f4f8;
  --sec: #a3abba;
  --surf: #11131a;
  --hair: #232733;
  --ctl: #343a4a;
  --acc: #7fb2ff;
  --pbg: #f2f4f8;
  --pfg: #0a0b0f;
  --warn: #ff8f85;
  /* The type already on his devices, so the page loads nothing from anywhere. */
  --type: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
:root[data-theme="day"] {
  color-scheme: light;
  --bg: #f3f5f7;
  --fg: #0d1117;
  --sec: #4b5563;
  --surf: #ffffff;
  --hair: #d5dae1;
  --ctl: #b4bcc8;
  --acc: #1f4bff;
  --pbg: #0d1117;
  --pfg: #f3f5f7;
  --warn: #b3261e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/22px var(--type);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
header, main {
  max-width: 430px;
  margin: 0 auto;
  padding-left: max(28px, env(safe-area-inset-left));
  padding-right: max(28px, env(safe-area-inset-right));
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding-top: calc(16px + env(safe-area-inset-top));
  font-size: 13px;
  line-height: 18px;
  color: var(--sec);
}
main { padding-top: 12px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

.wordmark { min-height: 44px; display: inline-flex; align-items: center; color: var(--sec); text-decoration: none; }

h1, h2 { margin: 0; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 32px; line-height: 38px; }
h2 { font-size: 20px; line-height: 26px; margin-top: 40px; }
p { margin: 8px 0 0; max-width: 62ch; text-wrap: pretty; }
.quiet, .fine, .rows .d, .rows .is, label, dt { color: var(--sec); }
.fine { font-size: 13px; line-height: 18px; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--ctl); }

/* Rows: a name, a line about it, and how it stands. A hairline above each, as in Eve's rooms. */
.rows { list-style: none; margin: 24px 0 0; padding: 0; border-bottom: 1px solid var(--hair); }
.rows > li > a, .rows > li > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 11px 0;
  border-top: 1px solid var(--hair);
  text-decoration: none;
}
.rows .t { flex: 1; min-width: 0; font-size: 17px; line-height: 24px; font-weight: 500; }
.rows .d { display: block; font-size: 13px; line-height: 18px; font-weight: 400; }
.rows .is { flex: none; max-width: 50%; font-size: 15px; text-align: right; }
.rows .needs { color: var(--acc); }

/* The one mark the page has: a dot in the accent, only on what needs him. */
.lamp { display: none; }
.lamp.caution, .lamp.warning {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 3px 0;
  border-radius: 50%;
  background: var(--acc);
}
.lamp.warning { background: var(--warn); }

.needs-you { list-style: none; margin: 16px 0 0; padding: 0; }
.needs-you li { position: relative; padding: 4px 0 4px 16px; }
.needs-you li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
}
.needs-you li.warning::before { background: var(--warn); }
.needs-you a { text-decoration: none; }

button, .button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 20px;
  border: 1px solid var(--pbg);
  border-radius: 24px;
  background: var(--pbg);
  color: var(--pfg);
  font: 600 15px/20px var(--type);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button.second, .button.second { background: transparent; color: var(--fg); border-color: var(--ctl); font-weight: 500; }
button.danger { background: transparent; color: var(--warn); border-color: var(--warn); font-weight: 500; }
button.plain { min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--sec); font-weight: 400; font-size: 13px; }
.rows button.plain { font-size: 15px; }
button[disabled] { opacity: 0.5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.actions > * { flex: 1 1 10rem; }
form.wide { display: flex; flex-direction: column; }
form.inline { display: inline-flex; flex: none; }

label { display: block; font-size: 13px; line-height: 18px; margin: 20px 0 6px; }
input[type="text"], input[type="password"], textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ctl);
  border-radius: 24px;
  background: var(--surf);
  color: var(--fg);
  font: 16px/22px var(--type);
}
input::placeholder, textarea::placeholder { color: var(--sec); }
textarea { min-height: 9rem; padding: 12px 16px; border-radius: 16px; resize: vertical; }
input.key { font-family: var(--mono); font-size: 15px; }
.choice { display: flex; gap: 10px; margin-top: 8px; }
.choice label { flex: 1; margin: 0; position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--ctl);
  border-radius: 24px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
}
.choice input:checked + span { background: var(--pbg); color: var(--pfg); border-color: var(--pbg); font-weight: 600; }
.check { display: flex; gap: 12px; align-items: center; min-height: 44px; margin-top: 20px; color: var(--fg); font-size: 15px; line-height: 22px; }
.check input { flex: none; width: 22px; height: 22px; accent-color: var(--acc); }

:focus-visible, .choice input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 3px; }

/* What the page has to say back: a refusal, or what to do next. */
.says { margin-top: 20px; padding: 14px 16px; border: 1px solid var(--hair); border-radius: 16px; background: var(--surf); }
.says.warning { border-color: var(--warn); }

dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 20px 0 0; }
dl.facts dt { font-size: 13px; line-height: 22px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.hash { font: 13px/18px var(--mono); overflow-wrap: anywhere; }

/* Shown once: the recovery key. */
.shown-once {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--acc);
  border-radius: 20px;
  background: var(--surf);
  font: 500 18px/30px var(--mono);
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}
.shown-once span { display: inline-block; white-space: nowrap; }
.actions + .fine { margin-top: 16px; }

pre.text {
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid var(--hair);
  border-radius: 20px;
  background: var(--surf);
  font: 15px/22px var(--type);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

details { margin-top: 32px; border-top: 1px solid var(--hair); }
summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; color: var(--sec); }

table.log { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13px; line-height: 18px; }
table.log th { text-align: left; font-weight: 400; color: var(--sec); padding: 8px 12px 8px 0; }
table.log td { padding: 10px 12px 10px 0; border-top: 1px solid var(--hair); vertical-align: top; overflow-wrap: anywhere; }

[hidden] { display: none !important; }
