/*
 * RRYM / 002 — SULSYS
 * Global reset and base typography. Everything else lives in CSS Modules.
 */

@import "./tokens.css";

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ol,
ul {
  margin: 0;
}

ol[role="list"],
ul[role="list"] {
  list-style: none;
  padding: 0;
}

html {
  background: var(--paper);
  /* The site is light only in v1; declaring the scheme stops UA dark styling. */
  color-scheme: light;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-display);
  line-height: var(--lh-display);
}

h2 {
  font-size: var(--step-h2);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--step-h3);
  line-height: 1.25;
}

p {
  text-wrap: pretty;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

svg {
  height: auto;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

a {
  color: inherit;
}

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

/* On ink surfaces the ring must be visible against near-black. */
[data-surface="ink"] :focus-visible {
  outline-color: var(--paper);
}

::selection {
  background: var(--green);
  color: #fff;
}

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

/* Skip link — first focusable element on every page. */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  transform: translateY(-120%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  padding: var(--s3) var(--s4);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

@media print {
  /* Accounting firms print. Paper white, ink text, no furniture. */
  body {
    background: #fff;
    color: #000;
  }

  [data-print="hide"] {
    display: none !important;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--font-mono);
    font-size: 10px;
  }
}
