/* Minimal clean baseline */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@10..48,500;10..48,700&family=Newsreader:opsz,wght@6..72,400;6..72,500&display=swap");

* {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 24px;
  font-family: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  color: #1f2933;
  background: #faf7f2;
}

header,
main,
footer {
  width: min(1000px, 100%);
  margin: 0 auto;
}

header,
footer {
  padding: 12px 0;
  text-align: center;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

header nav a {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

footer {
  text-align: center;
}

main {
  padding: 8px 0 24px;
}

h1,
h2,
h3,
h5 {
  margin: 0 0 12px;
  line-height: 1.2;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

h4 {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  line-height: 1.1;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
}

p,
ul,
ol,
blockquote,
pre,
figure {
  margin: 0 0 12px;
}

figure,
blockquote {
  text-align: center;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #0b5cab;
}

a:hover,
a:focus-visible {
  color: #083f77;
}

pre {
  overflow-x: auto;
  padding: 12px;
  border: 1px solid #d6d0c4;
  background: #fff;
}

hr {
  border: 0;
  border-top: 1px solid #d6d0c4;
  margin: 16px 0;
}

.mirrored {
  display: inline-block;
  transform: scaleX(-1);
}

h6 {
  font-size: 1.1em;
  margin: 12px 0 4px;
  line-height: 1.2;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

li > ul,
li > ol {
  margin-top: 4px;
  margin-bottom: 0;
}

.callout {
  display: inline-block;
  background: #eef3ee;
  color: #3c6e47;
  border: 1px solid #3c6e47;
  border-radius: 10px;
  padding: 1px 10px;
  font-size: 0.75em;
  margin: 0 0 12px;
}

/* "con" wordplay: italic with a dotted underline signal; click (focus)
   or hover pops the explanation tooltip */
.con-note {
  font-style: italic;
  border-bottom: 2px dotted currentColor;
  cursor: help;
  position: relative;
}

.con-note:hover::after,
.con-note:focus::after {
  content: "\201Cwith\201D in Spanish, as in con queso\2026";
  position: absolute;
  left: 0;
  top: 110%;
  z-index: 10;
  background: #2f3e33;
  color: #f5f2e9;
  font-style: normal;
  font-size: 0.45em;
  letter-spacing: normal;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* centered-links: sample intro link rows are centered per the intro
   format; a class beats repeating an inline style on every sample */
.centered-links {
  text-align: center;
}

/* home-logo: clickable vicuña sits inline-left of the site name; header
   spacing tightened to keep the top of every page compact */
.home-logo img {
  vertical-align: -8px;
  margin-right: 6px;
  transform: scaleX(-1); /* face the site name, not the margin */
}

header {
  padding: 6px 0;
}

hgroup p {
  margin: 0 0 6px;
}

/* badge-demo: static copies of the Vicunadator's pass/fail states so the
   validation page can show students what to look for */
.badge-demo-row {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin: 12px 0 20px;
}

.badge-demo {
  display: inline-block;
  font-size: 34px;
  line-height: 1;
  padding: 4px;
  border-radius: 50%;
}

.badge-demo-pass {
  background: rgba(225, 245, 225, 0.9);
  box-shadow: 0 0 12px 6px rgba(40, 170, 60, 0.55);
}

.badge-demo-fail {
  transform: rotate(180deg);
  background: rgba(255, 220, 220, 0.9);
  animation: badge-demo-pulse 1.6s ease-in-out infinite,
    badge-demo-spin 2.2s linear infinite;
}

@keyframes badge-demo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes badge-demo-pulse {
  0%, 100% { box-shadow: 0 0 6px 3px rgba(220, 30, 30, 0.35); }
  50% { box-shadow: 0 0 16px 9px rgba(220, 30, 30, 0.75); }
}
