/* Element defaults, after design/app-reference.html. Colours come from tokens.css only. */

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  font-size: 14px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 15px;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-soft);
}

::selection {
  background: var(--selected);
}

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

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

button {
  cursor: pointer;
}

input,
select,
textarea {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13.5px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

input[type="file"] {
  padding: 6px;
  border-style: dashed;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-soft);
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

progress {
  accent-color: var(--accent);
}

/* Line icons (dom.js icon()), drawn in the text colour. */
.icon {
  flex: none;
  width: 16px;
  height: 16px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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