/* The dashboard's own styles: no framework, a few tokens, light and dark.
   A component's own look is in its scoped <style>; what is shared is here. */

:root {
  color-scheme: light dark;
  --paper: #f6f5f1;
  --panel: #ffffff;
  --ink: #1d2320;
  --ink-soft: #5b6560;
  --line: #d9dcd6;
  --line-soft: #ecede8;
  --hover: #f1f3ee;
  --green: #2f8f6f;
  --green-ink: #1f6b52;
  --green-soft: #e3f2ea;
  --amber: #d29a2c;
  --amber-ink: #8a5d10;
  --amber-soft: #fbf0d9;
  --red-ink: #a3322a;
  --token: #e7e3f6;
  --token-ink: #4b3f8a;
  --focus: #3b6fd8;
  --radius: 12px;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111513;
    --panel: #181d1b;
    --ink: #e7ebe8;
    --ink-soft: #9aa5a0;
    --line: #2c3431;
    --line-soft: #222927;
    --hover: #1f2523;
    --green: #47b48d;
    --green-ink: #7fd3b1;
    --green-soft: #183027;
    --amber: #e0ad48;
    --amber-ink: #f0c776;
    --amber-soft: #33291a;
    --red-ink: #f08d84;
    --token: #2b2647;
    --token-ink: #c8bff5;
    --focus: #7aa2f7;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

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

h1,
h2 {
  line-height: 1.2;
}

p {
  margin: 0 0 0.75rem;
}

.shell {
  min-height: 100vh;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding: 0.6rem 1rem;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.mark {
  width: 1.6rem;
  height: 1.6rem;
}

.mark-shield {
  fill: var(--green);
}

.mark-tick {
  fill: none;
  stroke: var(--panel);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabs {
  display: flex;
  gap: 0.25rem;
}

.tab {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.tab:hover {
  background: var(--hover);
  color: var(--ink);
}

.tab[aria-current='page'] {
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 600;
}

.bar-end {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-width: 0;
  max-width: 100%;
}

.site-pick,
.site-one {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  max-width: 100%;
}

.site-one {
  font-family: var(--mono);
  color: var(--ink-soft);
}

.label {
  color: var(--ink-soft);
}

.who {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  min-width: 0;
}

.who-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-button {
  border: 0;
  background: none;
  padding: 0.35rem 0.2rem;
  color: var(--focus);
  text-decoration: underline;
  cursor: pointer;
}

.main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1rem;
}

.notice h1 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.quiet {
  color: var(--ink-soft);
}

.error {
  color: var(--red-ink);
}

/* Something said about what was just done: a refusal in red ink. */
.note {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: var(--hover);
  border: 1px solid var(--line);
}

.note.bad {
  color: var(--red-ink);
  border-color: currentColor;
  background: var(--panel);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

input,
select,
button {
  font: inherit;
  color: inherit;
}

input[type='search'],
input[type='password'],
input:not([type]),
select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  min-height: 2.6rem;
}

select {
  max-width: 100%;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.button.quiet-button {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

input[readonly] {
  background: var(--hover);
  color: var(--ink-soft);
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}

.segmented button {
  padding: 0.45rem 0.8rem;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink-soft);
  min-height: 2.6rem;
}

.segmented button + button {
  border-left: 1px solid var(--line);
}

.segmented button[aria-pressed='true'] {
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 600;
}

.noscript {
  padding: 2rem;
}

/* A phone keeps the whole screen for the page: the bar scrolls away, and
   the site picker takes a line of its own. */
@media (max-width: 40rem) {
  .bar {
    position: static;
    gap: 0.5rem 0.75rem;
  }
  .bar-end {
    margin-left: 0;
    width: 100%;
  }
  .site-pick {
    width: 100%;
  }
  .site-pick select {
    flex: 1;
  }
  .main {
    padding-top: 1rem;
  }
}
