/* OF BASE — the page before any component: ground, ink, Lato, focus.
   Needs of-tokens.css. Element rules only; classes live in of-components.css. */

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

html { background: var(--of-ground); color: var(--of-ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--of-ground);
  color: var(--of-ink);
  font-family: var(--of-text);
  font-weight: var(--of-w-light);
  font-size: var(--of-fs-body);
  line-height: var(--of-lh-ui);
  -webkit-font-smoothing: antialiased;
}
/* a subtree that carries its own theme or field paints its own ground */
[data-field], [data-theme] { background-color: var(--of-ground); color: var(--of-ink); }

img, svg, canvas { display: block; max-width: 100%; }
button, select, input, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: var(--of-w-light); text-wrap: balance; }
h1 { font-weight: var(--of-w-thin); font-size: var(--of-fs-h1); line-height: var(--of-lh-tight); }
h2 { font-size: var(--of-fs-h2); line-height: 1.15; }
h3 { font-weight: var(--of-w-regular); font-size: var(--of-fs-h3); line-height: 1.25; }
p  { margin: 0; text-wrap: pretty; }
b, strong { font-weight: var(--of-w-bold); }

a { color: inherit; text-decoration: none; border-bottom: var(--of-hair) solid var(--of-edge); transition: border-color var(--of-dur) var(--of-ease); }
a:hover { border-color: var(--of-ink); }

output, time, td { font-variant-numeric: tabular-nums; }
code, kbd, samp { font: inherit; font-weight: var(--of-w-regular); }

/* a divider is short: it never crosses the page */
hr { width: var(--of-short); border: 0; border-top: var(--of-hair) solid var(--of-edge); margin: var(--of-s5) auto; }

/* Focus: four corners around the thing, the way Grotta marks SPREAD.
   Controls that can hold a pseudo-element draw it themselves (.of-focus in of-components.css);
   everything else gets a hair. */
:focus-visible { outline: var(--of-edge-w) solid var(--of-ink); outline-offset: 4px; }

::selection { background: var(--of-ink); color: var(--of-ground); }

[hidden] { display: none !important; }
.of-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
