/* ==========================================================================
   KPS Warranty — Base: reset, typography, focus, form baseline
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-14);
  line-height: var(--lh-body);
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "cv05" 1;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--t-24); }
h2 { font-size: var(--t-20); }
h3 { font-size: var(--t-18); }
h4 { font-size: var(--t-16); }
h5, h6 { font-size: var(--t-14); }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--s-4); padding-left: var(--s-5); }
ul:last-child, ol:last-child { margin-bottom: 0; }
li { margin-bottom: var(--s-1); }

a {
  color: var(--stamp);
  text-decoration-color: color-mix(in oklab, var(--stamp) 35%, transparent);
  text-underline-offset: 0.2em;
  transition: color var(--d-state) var(--ease-out),
              text-decoration-color var(--d-state) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--stamp-hover); text-decoration-color: currentColor; }
}

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: var(--s-6) 0;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

code, kbd, samp, pre { font-family: var(--font-data); font-size: 0.92em; }

/* ---- data type: refs, date codes, voltages, SKUs, currency -------------- */
.mono {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero" 1;
  letter-spacing: -0.01em;
}
.num { font-variant-numeric: tabular-nums; }

/* Claim / shipment / settlement references read as one token, never wrap. */
.ref {
  font-family: var(--font-data);
  font-size: var(--t-13);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink);
}

.muted   { color: var(--ink-2); }
.subtle  { color: var(--ink-3); }
.prose   { max-width: 68ch; line-height: var(--lh-prose); color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---- focus: one visible treatment everywhere ---------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-2);
}
/* Inputs already have a border; ring sits tight against it. */
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline-offset: 0;
  border-color: var(--stamp);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus-ring) 24%, transparent);
}

::selection {
  background: color-mix(in oklab, var(--stamp) 22%, transparent);
  color: var(--ink);
}

::placeholder { color: var(--ink-3); opacity: 1; }

/* ---- form baseline ------------------------------------------------------ */
button, input, select, textarea {
  font: inherit;
  font-family: inherit;
  color: inherit;
  margin: 0;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }

/* iOS zooms any input under 16px on focus. */
@media (max-width: 767px) {
  input, select, textarea { font-size: var(--t-16); }
}

/* ---- scrollbars: restrained, not reinvented ---------------------------- */
@supports selector(::-webkit-scrollbar) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--hairline-2);
    border: 3px solid var(--surface);
    border-radius: var(--r-full);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--hairline-3); }
}

/* ---- utilities ---------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; top: var(--s-2); left: var(--s-2);
  z-index: var(--z-tooltip);
  transform: translateY(-200%);
  background: var(--stamp); color: var(--ink-invert);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-2);
  font-weight: 600; text-decoration: none;
  transition: transform var(--d-pop) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; }
.row-b   { display: flex; align-items: baseline; }
.wrap    { flex-wrap: wrap; }
.grow    { flex: 1 1 auto; min-width: 0; }
.push    { margin-left: auto; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); } .gap-6 { gap: var(--s-6); }
.gap-8 { gap: var(--s-8); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.tar { text-align: right; }
.tac { text-align: center; }
.hidden { display: none !important; }

/* Wide content scrolls inside its own container. The page body never
   scrolls horizontally. */
.scroll-x { overflow-x: auto; overscroll-behavior-x: contain; }
