/* Page frame, the app card, typography and the shared button. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--colour-page);
  color: var(--colour-text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* The mockups draw the whole tool as one card on a warmer page. At the widths
   the card was drawn at it fills the window, so the frame only shows on very
   large displays — which is where it stops the two editors from becoming
   unreadably wide lines. */
.app {
  max-width: 84rem;
  /* dvh so the editors do not sit under a phone's collapsing address bar. The
     vh line is the fallback for anything that does not know dvh. */
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--colour-shell);
  border-inline: 1px solid var(--colour-border-soft);
  box-shadow: var(--shadow-card);
}

/* Section labels: uppercase mono, the mockups' one piece of typographic
   signalling for "this is a region of the tool". */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--colour-text-muted);
}

.eyebrow--accent {
  color: var(--colour-accent-quiet);
}

/* Kept in the accessibility tree, out of the layout. Used where the mockups
   drop a label the markup still owes a screen reader. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--colour-border-strong);
  border-radius: 9px;
  background: var(--colour-surface);
  color: var(--colour-text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

/* An author `display` beats the user-agent rule for [hidden], and this button is
   shown and hidden by that attribute (F14's offer). Without this it would stay
   on screen as an empty box. */
.button[hidden] {
  display: none;
}

.button:hover {
  border-color: var(--colour-accent);
  color: var(--colour-accent-ink);
}

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

.button--primary {
  background: var(--colour-accent);
  border-color: var(--colour-accent);
  color: var(--colour-accent-text);
  font-weight: 600;
}

.button--primary:hover {
  background: var(--colour-accent-hover);
  border-color: var(--colour-accent-hover);
  color: var(--colour-accent-text);
}

.button--small {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
}

.button--quiet {
  background: transparent;
  border-color: var(--colour-border);
  color: var(--colour-text-muted);
}

/* The mockups' "+ Add term" affordance: dashed, so it reads as a slot to fill
   rather than as another populated chip. */
.button--dashed {
  background: transparent;
  border-style: dashed;
  border-color: var(--colour-border-strong);
  color: var(--colour-text-muted);
}

.button--dashed:hover {
  border-style: dashed;
}

input[type="text"],
input[type="search"],
textarea {
  font: inherit;
  color: inherit;
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-small);
  padding: 0.35rem 0.5rem;
}

input[type="text"]:focus-visible,
input[type="search"]:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--colour-accent);
  outline-offset: 1px;
}
