/* Lawyer's ground: what the deployed site took from the old kit's base and components, carried as Lawyer's own and
   scoped to its shell, since a lobe's sheet names a class and never an element alone. `.la-shell` is the room every
   component queries, the page's or a place's. */

.la-shell {
  container: la-page / inline-size;
  box-sizing: border-box;
  min-height: 100%;
  color: var(--la-color-fg-body);
  background: var(--la-color-bg);
  font-family: var(--la-font-sans);
  font-size: var(--la-text-base);
  line-height: var(--la-leading-normal);
  font-feature-settings: 'ss01', 'cv01', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--la-color-scroll-thumb) transparent;
}

/* A section of a place is drawn in a room of its own in the site's app, under no shell, so it sizes its boxes alike. */
.la-shell *,
.la-shell *::before,
.la-shell *::after,
.la-section,
.la-section *,
.la-section *::before,
.la-section *::after {
  box-sizing: border-box;
}

.la-shell :where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
  margin: 0;
}

.la-shell :where(ul, ol)[role='list'] {
  padding: 0;
  margin: 0;
  list-style: none;
}

.la-shell :where(img, svg) {
  display: block;
  max-width: 100%;
}

.la-shell :where(input, button, textarea, select) {
  font: inherit;
  color: inherit;
}

.la-shell :where(p, h1, h2, h3, h4, h5, h6) {
  overflow-wrap: break-word;
}

.la-shell :where(h1, h2, h3, h4, h5, h6) {
  color: var(--la-color-fg);
  font-family: var(--la-font-display);
  font-weight: var(--la-weight-semi);
  line-height: var(--la-leading-tight);
  text-wrap: balance;
}

.la-shell :where(h1) {
  font-size: var(--la-text-4xl);
  letter-spacing: -0.02em;
}

.la-shell :where(h2) {
  font-size: var(--la-text-3xl);
  letter-spacing: -0.015em;
}

.la-shell :where(h3) {
  font-size: var(--la-text-2xl);
}

.la-shell :where(h4) {
  font-size: var(--la-text-xl);
}

.la-shell :where(a) {
  color: var(--la-color-link);
  text-underline-offset: 0.15em;
}

.la-shell :where(a:hover) {
  color: var(--la-color-link-hover);
}

.la-shell :where(code, pre) {
  font-family: var(--la-font-mono);
  font-size: 0.9em;
}

.la-shell :where(hr) {
  height: 1px;
  border: 0;
  background: var(--la-color-border);
}

.la-shell ::selection {
  background: var(--la-color-accent-subtle);
  color: var(--la-color-fg);
}

.la-shell :focus-visible {
  outline: 2px solid var(--la-color-border-focus);
  outline-offset: 2px;
}

.la-viewport {
  container: la-page / inline-size;
}

.la-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The one button, the kit's carried: saffron, navy ink on it in both themes. A press on its way, `aria-busy`, dims it
   as the screen marks it. */
.la-button {
  display: inline-flex;
  gap: var(--la-space-2);
  align-items: center;
  justify-content: center;
  min-height: max(var(--la-control-md), var(--la-tap-target));
  padding-inline: var(--la-space-4);
  font-size: var(--la-text-sm);
  font-weight: var(--la-weight-medium);
  color: var(--la-color-fg-on-accent);
  text-decoration: none;
  cursor: pointer;
  background: var(--la-color-accent);
  border: 1px solid transparent;
  border-radius: var(--la-radius-md);
  transition: background var(--la-duration-fast) var(--la-ease-out);
}

.la-button:hover {
  color: var(--la-color-fg-on-accent);
  background: var(--la-color-accent-hover);
}

.la-button:active {
  background: var(--la-color-accent-active);
}

.la-button[disabled],
.la-button[aria-busy='true'] {
  cursor: not-allowed;
  opacity: 0.55;
}

.la-button.is-variant-quiet {
  color: var(--la-color-fg);
  background: transparent;
  border-color: var(--la-color-border-strong);
}

.la-button.is-variant-quiet:hover {
  background: var(--la-color-bg-raised-hover);
}

.la-button.is-variant-danger {
  color: var(--la-color-fg-on-accent);
  background: var(--la-color-danger);
}

.la-notice {
  display: flex;
  flex-direction: column;
  gap: var(--la-space-1);
  padding: var(--la-space-3) var(--la-space-4);
  color: var(--la-color-fg);
  background: var(--la-color-info-subtle);
  border-inline-start: 3px solid var(--la-color-info);
  border-radius: var(--la-radius-sm);
}

.la-notice.is-tone-warning {
  background: var(--la-color-warning-subtle);
  border-inline-start-color: var(--la-color-warning);
}

.la-notice.is-tone-danger {
  background: var(--la-color-danger-subtle);
  border-inline-start-color: var(--la-color-danger);
}

/* A field, the kit's carried: never under 16px, so a phone does not zoom into it. */
.la-input {
  width: 100%;
  min-height: max(var(--la-control-md), var(--la-tap-target));
  padding: var(--la-space-2) var(--la-space-3);
  font-size: var(--la-text-input);
  color: var(--la-color-fg);
  background: var(--la-color-bg-raised);
  border: 1px solid var(--la-color-border-strong);
  border-radius: var(--la-radius-md);
}

.la-input.is-lines {
  min-height: calc(var(--la-control-md) * 3);
  resize: vertical;
}

.la-input[aria-invalid='true'] {
  border-color: var(--la-color-danger);
}

@media (pointer: coarse) {
  .la-shell {
    --la-tap-target: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .la-shell {
    --la-motion: 0;
  }
}
