html {
  min-height: 100%;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--color-bg);
}

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

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: var(--color-brand);
  text-decoration-color: var(--color-brand-soft);
  text-underline-offset: 3px;
  transition: color var(--motion-duration-fast) var(--motion-ease-out),
    text-decoration-color var(--motion-duration-fast) var(--motion-ease-out);
}

a:hover {
  color: var(--color-brand-deep);
  text-decoration-color: var(--color-brand-deep);
}

:focus-visible {
  outline: 0;
  box-shadow: var(--shadow-focus-ring);
}

::selection {
  background: var(--color-brand-soft);
  color: var(--color-text-primary);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px minmax(0, 1fr);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-subtle) 100%);
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: var(--space-lg);
}

.auth-page .auth-card {
  width: min(520px, 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  align-self: start;
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--color-border);
  background: color-mix(in oklch, var(--color-bg-subtle) 86%, var(--color-surface));
  padding: var(--space-md);
}

.main-content {
  min-width: 0;
  padding: var(--space-lg);
}

.console-layout {
  max-width: 1480px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.display-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-display);
  line-height: var(--line-height-display);
  text-wrap: pretty;
}

.headline-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-headline);
  font-weight: var(--font-weight-headline);
  line-height: var(--line-height-headline);
  text-wrap: pretty;
}

.title-text {
  margin: 0;
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height-title);
  text-wrap: pretty;
}

.supporting-text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-supporting);
  line-height: var(--line-height-supporting);
  text-wrap: pretty;
}

.mono-text {
  font-family: var(--font-mono);
  font-size: var(--font-size-mono);
  font-weight: var(--font-weight-mono);
  line-height: var(--line-height-mono);
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .main-content {
    padding: var(--space-md);
  }
}
