/* The sign-in pages, by hand until the web UI brings Tailwind (DESIGN.md
   5, 6.4, 7). Values only from design/tokens.css. */

/* Geist: @fontsource-variable/geist 5.3.0, as in ext/.
   Files in app/assets/fonts/. A version bump in ext/package.json
   means new copies here. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/geist-latin-wght-normal-90ac0fe7.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/geist-latin-ext-wght-normal-4f909eff.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ps-canvas);
  color: var(--ps-ink);
  font-family: var(--ps-font-sans);
  font-size: var(--ps-text-base);
  line-height: var(--ps-text-base-leading);
  text-wrap: pretty;
}

.top-bar {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

/* The wordmark's two colours, as its Tailwind classes in the extension. */
.wordmark {
  display: block;
  flex-shrink: 0;
}

.wordmark-red {
  color: color-mix(in oklab, var(--ps-stop) 90%, currentColor);
}

.wordmark-text {
  color: color-mix(in oklab, currentColor 27%, transparent);
}

@media (forced-colors: active) {
  .wordmark-red,
  .wordmark-text {
    color: inherit;
  }
}

.page {
  max-width: 30rem;
  padding: 24px 16px 32px;
}

@media (min-width: 768px) {
  .top-bar,
  .page {
    padding-left: 24px;
    padding-right: 24px;
  }
}

h1 {
  margin: 0 0 16px;
  font-size: var(--ps-text-xl);
  line-height: var(--ps-text-xl-leading);
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

.muted {
  color: var(--ps-ink-muted);
}

.inbox {
  font-weight: 500;
}

.field {
  margin: 0 0 16px;
}

.field label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--ps-text-sm);
  line-height: var(--ps-text-sm-leading);
  font-weight: 500;
}

.field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ps-line-strong);
  border-radius: var(--ps-radius-md);
  background: var(--ps-surface);
  color: var(--ps-ink);
  font: inherit;
}

.field .help,
.field .error {
  margin: 4px 0 0;
  font-size: var(--ps-text-sm);
  line-height: var(--ps-text-sm-leading);
}

.field .help {
  color: var(--ps-ink-muted);
}

.field .error {
  color: var(--ps-stop);
}

.code input {
  max-width: 10rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--ps-radius-md);
  background: transparent;
  color: var(--ps-ink-muted);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--ps-wash-strong);
}

.button:active:not([aria-disabled="true"]) {
  transform: translateY(1px);
}

.button.primary {
  background: var(--ps-accent);
  color: var(--ps-on-accent);
}

.button.primary:hover {
  background: var(--ps-accent-hover);
}

.button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}

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

.button:not(.primary):focus-visible {
  outline-offset: -2px;
}

@media (pointer: coarse) {
  .button,
  .field input {
    min-height: 44px;
  }
}

/* The operator's pages: wider than the sign-in column, one plain table. */
.page:has(.records) {
  max-width: 60rem;
}

h2 {
  margin: 24px 0 8px;
  font-size: var(--ps-text-base);
  font-weight: 600;
}

.records {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.records th,
.records td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--ps-line-strong);
  text-align: left;
}

.notice {
  color: var(--ps-ink);
  font-weight: 500;
}
