/* Reset + typographic grid + shared layout. No rounded corners anywhere. */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "kern", "liga";
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-3);
}
h2 {
  font-size: var(--step-2);
}
h3 {
  font-size: var(--step-1);
}

p {
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color var(--ease);
}
a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

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

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

button {
  font: inherit;
  color: inherit;
}

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

/* Layout primitives ----------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

.stack > * + * {
  margin-top: var(--s-4);
}
.stack-lg > * + * {
  margin-top: var(--s-6);
}

/* Responsive auto-grid used for tool cards and asset galleries. */
.grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
}

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.5em 0.9em;
  font-size: var(--step--1);
  font-weight: 550;
  line-height: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    background var(--ease),
    border-color var(--ease),
    color var(--ease);
}
.btn:hover {
  border-color: var(--muted);
  background: var(--surface-2);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-fg);
}

.mono {
  font-family: var(--font-mono);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: var(--step--1);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
