:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #dcdcdc;
  --paper: #fafaf8;
  --field: #f1f1ee;
  --link: #1d4ed8;
}
* { box-sizing: border-box; }
html { font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--paper); }
body { max-width: 40rem; margin: 0 auto; padding: 3.5rem 1.25rem 4rem; }
header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2.5rem; }
header a { color: inherit; text-decoration: none; }
.brand { font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; }
header nav a { color: var(--muted); font-size: .9rem; margin-left: 1.2rem; }
h1 { font-size: 1.75rem; line-height: 1.25; font-weight: 600; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 2.75rem 0 .6rem; }
p { margin: .7rem 0; }
.lede { font-size: 1.1rem; }
.quiet { color: var(--muted); font-size: .92rem; }
a { color: var(--link); }
code { font-size: .92em; background: var(--field); padding: .05em .3em; border-radius: 3px; }
input, button { font: inherit; }
.drop { display: block; border: 1.5px dashed #b5b5b0; background: #fff; padding: 1.4rem 1rem; text-align: center; cursor: pointer; color: var(--muted); margin: .9rem 0; }
.drop.over { border-color: var(--ink); color: var(--ink); }
.drop input { display: none; }
.drop strong { color: var(--ink); font-weight: 500; }
.picked { color: var(--ink); }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .9rem 0; }
input[type=email] { flex: 1 1 14rem; padding: .55rem .7rem; border: 1px solid #b5b5b0; background: #fff; border-radius: 4px; }
input[type=email]:focus, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button { padding: .55rem 1.1rem; border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 4px; cursor: pointer; }
button:hover { background: #333; }
button:disabled { background: #bbb; border-color: #bbb; cursor: default; }
.status { padding: .7rem .9rem; background: var(--field); border-radius: 4px; margin: 1rem 0; }
.status.bad { background: #fbeaea; color: #7a1414; }
model-viewer { width: 100%; height: 24rem; background: #fff; border: 1px solid var(--line); border-radius: 4px; display: block; margin: 1rem 0 .5rem; }
ul.tips { padding-left: 1.2rem; margin: .5rem 0; }
ul.tips li { margin: .25rem 0; }
footer { margin-top: 4rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer a { color: inherit; }
.legal h2 { margin-top: 2rem; }
.legal li { margin: .3rem 0; }
@media (max-width: 480px) { html { font-size: 16px; } body { padding-top: 2rem; } header { flex-direction: column; gap: .4rem; } header nav a { margin: 0 1rem 0 0; } }
@media (prefers-reduced-motion: reduce) { model-viewer { --poster-color: transparent; } }

.ex { margin: 1.4rem 0; }
.ex figcaption { font-size: .92rem; color: var(--muted); margin-bottom: .5rem; }
.ex .tag { display: inline-block; font-weight: 600; font-size: .8rem; padding: .1rem .5rem; border-radius: 3px; margin-right: .3rem; }
.ex-good .tag { background: #e3f3e6; color: #1d6a33; }
.ex-mixed .tag { background: #fbf1d6; color: #765400; }
.ex-bad .tag { background: #fbeaea; color: #7a1414; }
.ex .pair { display: grid; grid-template-columns: 1fr 2fr; gap: .8rem; align-items: center; }
.ex .pair img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.ex .pair model-viewer { margin: 0; height: 18rem; }
@media (max-width: 600px) { .ex .pair { grid-template-columns: 1fr; } }

/* examples: three side by side, wider than the text column */
.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 0;
  width: min(62rem, calc(100vw - 2.5rem)); position: relative; left: 50%; transform: translateX(-50%); }
.exc { margin: 0; }
.exc .viz { position: relative; }
.exc model-viewer { height: 15rem; margin: 0; }
.exc .thumb { position: absolute; left: .5rem; bottom: .5rem; width: 28%; height: auto; border: 1px solid var(--line); border-radius: 3px; background: #fff; pointer-events: none; }
.exc figcaption { font-size: .85rem; line-height: 1.45; color: var(--muted); margin-top: .5rem; }
.exc .tag { display: inline-block; font-weight: 600; font-size: .78rem; padding: .05rem .45rem; border-radius: 3px; margin-right: .2rem; }
.exc-good .tag { background: #e3f3e6; color: #1d6a33; }
.exc-mixed .tag { background: #fbf1d6; color: #765400; }
.exc-bad .tag { background: #fbeaea; color: #7a1414; }
.exc .credit { display: block; font-size: .78rem; margin-top: .15rem; }
.exc .credit a { color: inherit; }
@media (max-width: 760px) {
  .examples { width: auto; left: 0; transform: none; grid-template-columns: none; grid-auto-flow: column;
    grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
  .exc { scroll-snap-align: start; }
}

/* caption above each example, more room between examples */
.examples { column-gap: 3rem; row-gap: 1rem; }
.exc { display: flex; flex-direction: column; }
.exc figcaption { flex: 1; margin: 0 0 .6rem; }
@media (max-width: 760px) { .examples { column-gap: 1.5rem; } }
