/* Shared rules.  Colors and fonts only through the brand variables.  Nothing under 16 px. */
@import url('/css/brand-sea.css');

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 18px/1.45 var(--font);
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); line-height: 1.1; margin: 0 0 .4em; }
p { margin: 0 0 .8em; }
a { color: var(--brand-deep); }
@media (prefers-color-scheme: dark) { a { color: var(--brand); } }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.soft { color: var(--ink-soft); }

/* Buttons: 56 px, pill for SEA, squarer for Gecko.  One filled button per region. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; min-width: 48px; padding: 0 26px;
  font: 700 18px/1 var(--font); text-decoration: none; cursor: pointer;
  border-radius: var(--pill); border: 2px solid var(--brand);
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-fill { background: var(--brand); color: var(--on-brand); }
.btn-fill:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-line:hover { border-color: var(--brand); }
.btn-words { background: none; border: 0; color: var(--brand-deep); padding: 0 8px; text-decoration: underline; text-underline-offset: 4px; min-height: 48px; }
@media (prefers-color-scheme: dark) { .btn-words { color: var(--brand); } }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .6; }
.btn-small { min-height: 48px; padding: 0 18px; font-size: 16px; }
.btn-stop { border-color: var(--stop); color: var(--stop); background: transparent; }

/* The top bar: SEA tile 34 px tall, 6 px corners, then "Connect" in the display font. */
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.lockup { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lockup img { height: 34px; width: auto; border-radius: 6px; display: block; }
.lockup .word { font: var(--display-weight) 26px/1 var(--font-display); letter-spacing: var(--display-track); }
.topbar .spacer { flex: 1; }

/* Status: a dot is never the only signal; the word is always beside it. */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--idle); flex: none; }
.dot.on { background: var(--good); }
.dot.warn { background: var(--warn); }
.dot.stop { background: var(--stop); }
.dot.pulse { animation: pulse 1.2s ease-in-out infinite; background: var(--brand); }
@keyframes pulse { 50% { opacity: .3; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .dot.pulse { animation: none; } * { transition: none !important; } }

.amber { color: var(--warn); font-weight: 700; }
.simnote { color: var(--warn); font-weight: 700; font-size: 18px; }

/* The adopter's own pages (failure, move-on) and the Local Dev Sign-In. */
.seakey-page, .dev-main { max-width: 640px; margin: 64px auto; padding: 0 16px; }
.dev-banner { background: var(--stop); color: var(--on-brand); font: 700 20px/1.3 var(--font); text-align: center; padding: 14px 16px; }
.dev-list { display: grid; gap: 14px; margin: 24px 0; }
.dev-list form { margin: 0; }
.dev-list .btn { width: 100%; }

/* A small dialog for "are you sure". */
dialog { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); padding: 24px; max-width: 480px; box-shadow: 0 20px 60px var(--shadow); }
dialog::backdrop { background: var(--shadow); }
dialog .row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

input[type="text"], input[type="search"], select, textarea {
  font: 400 18px/1.3 var(--font); color: var(--ink); background: var(--paper);
  border: 2px solid var(--rule); border-radius: calc(var(--radius) / 2); min-height: 48px; padding: 8px 12px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; }
label { font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: var(--radius); font-size: 18px; z-index: 50; }
