/* RAIS brand: navy #0E356E, blues #0F6BAA / #227FDE, amber #FDB813
   (same tokens as autovalue's custom.css). Light only: the logo is navy on
   transparent and would vanish on a dark background. */
:root {
  --navy: #0E356E;
  --blue: #0F6BAA;
  --blue-2: #227FDE;
  --amber: #FDB813;
  --bg: #f3f6fa;
  --card: #ffffff;
  --ink: #1b2533;
  --muted: #5c6b7e;
  --line: #d9e1ea;
  --ok: #1d7a46;
  --ok-bg: #e5f4ea;
  --warn: #a4331f;
  --warn-bg: #fbeae6;
  --wait-bg: #fff4d6;
  --radius: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 620px; margin: 0 auto; padding: 32px 16px 48px; }
body.support .wrap { max-width: 760px; }
.brand { text-align: center; margin-bottom: 24px; }
.brand img { max-width: 240px; height: auto; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(14, 53, 110, .06);
  padding: 28px;
  margin-bottom: 20px;
}
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
h1 { color: var(--navy); font-size: 1.5rem; margin: 0 0 6px; }
h2 { color: var(--navy); font-size: 1.1rem; margin: 0 0 12px; }
.lede { color: var(--muted); margin: 0 0 20px; }
.hint { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }
.muted { color: var(--muted); font-size: .88rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.secret {
  display: block;
  width: 100%;
  font: 1.15rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  color: var(--ink);
  background: #fbfcfe;
}
.secret:focus, input[type=text]:focus, input[type=password]:focus {
  outline: 2px solid var(--blue-2);
  outline-offset: 1px;
  border-color: var(--blue-2);
}
.count { text-align: right; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.count.over { color: var(--warn); font-weight: 600; }

input[type=text], input[type=password] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
label { display: block; font-weight: 600; font-size: .95rem; }
.stack > * + * { margin-top: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--navy); border-color: var(--navy); }
.btn.big { padding: 13px 26px; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .link:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--warn); }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.status { font-size: .95rem; color: var(--ok); font-weight: 600; }
.status.warn { color: var(--warn); }
.msg { padding: 10px 14px; border-radius: 8px; margin: 16px 0 0; font-size: .95rem; }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.msg.note { background: var(--wait-bg); color: #6b4e00; }
.card .msg:first-child { margin-top: 0; margin-bottom: 16px; }

fieldset.ttl { border: 0; padding: 0; margin: 18px 0 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
fieldset.ttl legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 8px; width: 100%; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-weight: 500; cursor: pointer; background: #fff;
}
.pill:has(input:checked) { border-color: var(--blue); background: #eaf3fb; color: var(--navy); font-weight: 600; }
.pill input { accent-color: var(--blue); margin: 0; }
.note-label { margin-top: 18px; }
.note-label .muted { font-weight: 400; }

.linkrow { display: flex; gap: 8px; }
.linkrow input { margin-top: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.linkrow .btn { flex: none; min-width: 92px; }
#another { margin-top: 20px; }

.whoami { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); margin: -8px 0 10px; }
form.inline { display: inline; margin: 0; }

table.recent { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.recent th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: 6px 6px; border-bottom: 1px solid var(--line); }
table.recent td { padding: 9px 6px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
table.recent tr:last-child td { border-bottom: 0; }
table.recent .r { text-align: right; white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.wait { background: var(--wait-bg); color: #6b4e00; }
.tag.off { background: #eef1f4; color: var(--muted); }

.foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 8px; }

@media (max-width: 520px) {
  .card { padding: 20px 16px; }
  .linkrow { flex-direction: column; }
  table.recent thead { display: none; }
  table.recent td { display: block; padding: 2px 0; border: 0; }
  table.recent tr { display: block; padding: 10px 0; border-bottom: 1px solid #eef2f6; }
  table.recent .r { text-align: left; }
}
