/* ==========================================================================
   KuduDoc — base reset & element defaults
   ========================================================================== */

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

html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* No `scroll-behavior: smooth` here on purpose. Over the long distances
     these pages have (the terms TOC jumps ~7 800px) the smooth scroll gets
     cut short or cancelled outright, so anchors silently land in the wrong
     place — measured landing at 0 or one viewport instead of the target.
     Instant jumps land exactly on the target's scroll-margin every time.
     A link that works beats a link that glides. */
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Horizontal overflow is clipped on <html>, not <body>. Setting overflow-x
   on the body makes it an independent scroll container, which silently
   breaks every in-page anchor: #compare-rivals, the terms/privacy TOCs,
   #scan-seal and so on all stop scrolling. `clip` (rather than `hidden`)
   contains stray width without creating a scroll container at all. */
html{ overflow-x: clip; }

body{
  margin: 0;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-h);
  line-height: var(--leading-tight);
  color: var(--ink-900);
}

p{ margin: 0; }

a{ color: inherit; text-decoration: none; }

ul, ol{ margin: 0; padding: 0; list-style: none; }

button, input, select, textarea{
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
}

button{ cursor: pointer; }
button:disabled{ cursor: not-allowed; }

/* Accessible, visible focus ring sitewide */
:focus-visible{
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}
.on-dark :focus-visible,
[data-surface="dark"] :focus-visible,
[data-surface="gradient"] :focus-visible{
  outline-color: var(--white);
}

::selection{ background: var(--blue-200); color: var(--ink-900); }

.container{
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

.skip-link{
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--blue-900);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  z-index: 200;
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus{ top: var(--space-4); }

/* The hidden attribute must actually hide.

   The user-agent rule is only `[hidden]{display:none}` at the lowest priority,
   so ANY class rule that sets display — `display:flex` on a card, `display:grid`
   on a row — silently outranks it. The element stays on screen with its hidden
   attribute set, and nothing errors. Code that sets `el.hidden = true` looks
   correct, tests as correct in JS, and is wrong on screen.

   This was being patched one class at a time: 41 separate `.thing[hidden]{display:none}`
   rules across ten stylesheets, every one of them the same bug. Each was written
   after someone found it in the wild.

   The instance that prompted the general fix: on app/verify.html the
   "Certification signature broken" panel is `.av2-fact{display:flex}`. Hiding it
   did nothing, so a document that merely had no seal record was told its
   signature was broken — a fabricated tampering finding, on the one screen whose
   entire purpose is not overstating what we know.

   Every existing patch sets display:none, so this generalises them without
   changing any current behaviour. It is deliberately `!important`: the whole
   point is to outrank a later class rule. */
[hidden]{ display: none !important; }
