:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c2230;
  --muted: #5a6475;
  --border: #d9dde4;
  --accent: #2456c7;
  --accent-text: #ffffff;
  --danger: #b42318;
  --ok: #18794e;
  --focus: #f5b301;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b;
    --card: #1b2029;
    --text: #e8ebf1;
    --muted: #a3acbb;
    --border: #2f3746;
    --accent: #6b9bff;
    --accent-text: #0d1220;
    --danger: #ff8a7a;
    --ok: #5fd39a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

header .brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

main {
  max-width: 460px;
  margin: 32px auto;
  padding: 0 16px;
}

main.wide { max-width: 720px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}

h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 0 0 12px; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }

input[type=email], input[type=password], input[type=text] {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; }

button, .button {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: none;
}

button.secondary {
  background: transparent;
  color: var(--accent);
}

button:disabled { opacity: 0.6; cursor: default; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row button { margin-top: 8px; }

.message { margin: 12px 0 0; min-height: 1.5em; }
.message.error { color: var(--danger); }
.message.ok { color: var(--ok); }

.code {
  font: 600 28px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 2px;
}

dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }

a { color: var(--accent); }

[hidden] { display: none !important; }

/* Signed-in header (F-53): the brand on the left, the account menu under the e-mail on the right. */
header.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.menu { position: relative; }
details.menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: " \25BE"; color: var(--muted); }
details.menu .items {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 10;
  min-width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}
details.menu .items a { display: block; padding: 8px 14px; text-decoration: none; color: var(--text); }
details.menu .items a:hover, details.menu .items a:focus-visible { background: var(--bg); }
details.menu .items .muted { padding: 4px 14px 8px; color: var(--muted); font-size: 14px; }

main.wider { max-width: 960px; }
table.computers { width: 100%; border-collapse: collapse; }
table.computers th, table.computers td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.computers th { color: var(--muted); font-weight: 600; font-size: 14px; }
table.computers td .button { margin-top: 0; padding: 6px 12px; font-size: 15px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.status-dot.on { background: var(--ok); }
ol.ways { padding-left: 20px; }
ol.ways li { margin-bottom: 12px; }
pre.command { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; overflow-x: auto; font-size: 14px; }
@media (max-width: 640px) {
  table.computers th:nth-child(2), table.computers td:nth-child(2),
  table.computers th:nth-child(4), table.computers td:nth-child(4) { display: none; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* F-55: the account id under the bar, as the AWS console shows it in the account menu. */
.account-line { margin: 0 0 12px; color: #5b6472; font-size: 14px; }
.account-line b { font-variant-numeric: tabular-nums; color: inherit; }
