/* ============================================================
   reset.css — Canada HiTech reset / reboot
   LOADS FIRST in the cascade, before tokens and everything else.
   Contains every EtqanShop hard-won fix. Reset only — no project styles.
   ============================================================ */

/* Box-sizing inheritance — prevents width/padding calc bugs */
*, *::before, *::after { box-sizing: border-box; }

/* Remove default margin and padding */
* { margin: 0; padding: 0; }

/* Body baseline */
body {
  min-block-size: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Media — responsive by default */
img, picture, video, canvas, svg {
  display: block;
  max-inline-size: 100%;
}

/* Lists with classes — keep semantics, drop bullets */
ul[class], ol[class] { list-style: none; }

/* Links — project controls underline */
a { text-decoration: none; color: inherit; }

/* Headings — reset weight/size, project sets explicitly */
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  font-size: inherit;
}

/* Paragraphs — wrap long words */
p { overflow-wrap: break-word; }

/* Buttons — most commonly missed reset */
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;       /* browser does NOT inherit font on buttons */
  color: inherit;
}

/* ============================================================
   ETQANSHOP LESSON — Wave A
   Form elements do NOT inherit font-family. Without this they
   render in the browser's UI font (system-ui / Times).
   ============================================================ */
input, select, textarea, optgroup {
  font: inherit;
  color: inherit;
}

/* ETQANSHOP LESSON — Wave A
   <input type="search"> shows un-styleable WebKit/Blink decorations
   (magnifier + cancel) and extra padding without this. */
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

/* ETQANSHOP LESSON — Wave A
   <address> renders italic by default in all browsers. */
address { font-style: normal; }

/* ETQANSHOP LESSON — Wave B
   [hidden] is overridden by display:flex/grid without !important.
   This rule is an HTML contract; nothing should override it. */
[hidden] { display: none !important; }

/* ETQANSHOP LESSON — Wave D
   <legend> ignores normal box model. display:table makes it
   behave predictably across browsers. */
legend {
  display: table;
  max-inline-size: 100%;
  padding: 0;
  white-space: normal;
}

/* Fieldset — kill default border and padding */
fieldset { border: none; padding: 0; }

/* Tables — collapse borders */
table { border-collapse: collapse; border-spacing: 0; }

/* Textarea — vertical resize only */
textarea { resize: vertical; }

/* Remove outline on non-keyboard focus — replaced by :focus-visible in base.css */
:focus:not(:focus-visible) { outline: none; }

/* HR — consistent across browsers */
hr {
  border: none;
  border-block-start: 1px solid var(--color-border);
  margin-block: var(--space-lg);
}

/* Details/Summary — pointer + remove default marker */
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* Reduced motion — kill animations for users who opt out */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
