/* The sign-in screens' styles, on the design system's tokens (src/tokens.css, bundled into
   assets/ui.css with Inter): the base elements, buttons, the frame the screens draw in, notices and
   the empty state. The page links this file before sign-in, so it is public, comments included:
   the app's own styles are src/app.css, which reaches signed-in users only (FAC-323). */
:root {
  font-size: 16px;
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: var(--font-weight-regular) var(--text-sm);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* The focus ring, for keyboard focus only. */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

a {
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-xs);
}

/* Buttons: white, with shadow-xs as their edge. A link that looks like one is a.button. */
button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-bg-primary);
  box-shadow: var(--shadow-xs);
  padding: var(--spacing-sm) var(--spacing-lg);
  font: var(--font-weight-semibold) var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition:
    background var(--duration-hover) var(--ease-hover),
    color var(--duration-hover) var(--ease-hover);
}

button:hover,
a.button:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary-hover);
}

button:focus-visible,
a.button:focus-visible {
  box-shadow: var(--focus-ring), var(--shadow-xs);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Buttons use 14px icons. */
button .icon {
  width: 14px;
  height: 14px;
}

/* The frame: the page in an inset panel, and the column beside it, which the sign-in screens
   leave empty (its sizes are the app's). */
.shell {
  display: grid;
  min-height: 100vh;
  padding: var(--layout-panel-inset) var(--layout-panel-inset) var(--layout-panel-inset) 0;
}

/* Text for assistive technology only. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.shell:has(> .sidebar[hidden]) {
  padding: 0;
}

.shell:has(> .sidebar[hidden]) .main {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shell:has(> .sidebar[hidden]) .content {
  padding: 0;
}

.main {
  background: var(--color-bg-primary);
  border-radius: var(--layout-panel-radius);
  box-shadow: var(--shadow-xs);
  min-width: 0;
  overflow: hidden;
}

.content {
  padding: var(--layout-padding) var(--layout-padding) var(--spacing-5xl);
  max-width: 1660px;
  margin: auto;
}

h1 {
  font: var(--font-weight-semibold) var(--text-lg);
  margin: 0;
}

h2 {
  font: var(--font-weight-semibold) var(--text-md);
  letter-spacing: var(--letter-spacing-text-md);
  margin: 0;
}

.notice {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-lg) var(--spacing-xl);
  border: 1px solid var(--color-domain-blue-border);
  background: var(--color-domain-blue-bg);
  border-radius: var(--radius-lg);
  margin: 0 0 var(--spacing-3xl);
  color: var(--color-text-secondary);
}

/* The notice's own icon, not one inside its action. */
.notice > .icon {
  margin-top: var(--spacing-xxs);
  color: var(--color-fg-brand-primary);
}

.notice p {
  margin: 0;
}

.notice strong {
  font-weight: var(--font-weight-semibold);
}

/* An empty state: its icon, title and text, and an action. */
.empty {
  text-align: center;
  padding: var(--spacing-6xl) var(--spacing-2xl);
}

.empty > .icon {
  width: 24px;
  height: 24px;
  color: var(--color-fg-quaternary);
  margin-bottom: var(--spacing-lg);
}

.empty h2 {
  margin-bottom: var(--spacing-xs);
}

.empty p {
  color: var(--color-text-tertiary);
  margin: var(--spacing-xs) 0 var(--spacing-xl);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

[hidden] {
  display: none !important;
}

.notice button {
  margin-left: auto;
  flex-shrink: 0;
}

/* A notice's action sits on its message's first line: its label, not its top, level with the
   text, however many lines follow, at its own height. */
.notice > button {
  align-self: flex-start;
  margin-block: calc(-1 * var(--spacing-sm));
}

.shell:has(> .sidebar[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
