/* Damage Control: public site. Kraft paper on a workbench, after the mockups.
   The torn edges are generated clip-path polygons (percent along an edge, px into it), so they stretch to any panel. */
:root {
  --torn-a: polygon(0% 3.1px, 1.43% 6.4px, 2.86% 6.5px, 4.29% 4px, 5.71% 5px, 7.14% 1.9px, 8.57% 0px, 10% 6.9px, 11.43% 5.1px, 12.86% 6px, 14.29% 2.2px, 15.71% 0px, 17.14% 3.2px, 18.57% 0px, 20% 0.1px, 21.43% 0.1px, 22.86% 0px, 24.29% 3.8px, 25.71% 6.5px, 27.14% 5px, 28.57% 5.4px, 30% 2.6px, 31.43% 1.8px, 32.86% 1.5px, 34.29% 7px, 35.71% 7px, 37.14% 3.7px, 38.57% 5.9px, 40% 2.7px, 41.43% 6.3px, 42.86% 3.3px, 44.29% 5.6px, 45.71% 0px, 47.14% 0px, 48.57% 1.8px, 50% 2.9px, 51.43% 0.7px, 52.86% 4.3px, 54.29% 2.8px, 55.71% 0.6px, 57.14% 3.3px, 58.57% 0.2px, 60% 0px, 61.43% 2.1px, 62.86% 0.6px, 64.29% 1.2px, 65.71% 1.9px, 67.14% 1.6px, 68.57% 1.5px, 70% 4.3px, 71.43% 1.6px, 72.86% 4.1px, 74.29% 1.7px, 75.71% 5.1px, 77.14% 7px, 78.57% 7px, 80% 6.7px, 81.43% 1.9px, 82.86% 0.1px, 84.29% 0.8px, 85.71% 0px, 87.14% 0px, 88.57% 0.5px, 90% 1.3px, 91.43% 4.6px, 92.86% 0.8px, 94.29% 1.2px, 95.71% 0px, 97.14% 0px, 98.57% 3px, 100% 4.2px, calc(100% - 2.3px) 2.5%, calc(100% - 3.2px) 5%, calc(100% - 0.6px) 7.5%, calc(100% - 0px) 10%, calc(100% - 1px) 12.5%, calc(100% - 1.3px) 15%, calc(100% - 0px) 17.5%, calc(100% - 0px) 20%, calc(100% - 0px) 22.5%, calc(100% - 0px) 25%, calc(100% - 0px) 27.5%, calc(100% - 0.3px) 30%, calc(100% - 4.1px) 32.5%, calc(100% - 1.9px) 35%, calc(100% - 2.1px) 37.5%, calc(100% - 2.3px) 40%, calc(100% - 3px) 42.5%, calc(100% - 0.8px) 45%, calc(100% - 4.9px) 47.5%, calc(100% - 4.5px) 50%, calc(100% - 4.3px) 52.5%, calc(100% - 1.8px) 55%, calc(100% - 4.3px) 57.5%, calc(100% - 4.9px) 60%, calc(100% - 4.2px) 62.5%, calc(100% - 1.2px) 65%, calc(100% - 4.2px) 67.5%, calc(100% - 4.9px) 70%, calc(100% - 2.4px) 72.5%, calc(100% - 2px) 75%, calc(100% - 0.5px) 77.5%, calc(100% - 0px) 80%, calc(100% - 0px) 82.5%, calc(100% - 0px) 85%, calc(100% - 0px) 87.5%, calc(100% - 0px) 90%, calc(100% - 0px) 92.5%, calc(100% - 0px) 95%, calc(100% - 0px) 97.5%, 100% calc(100% - 0px), 98.57% calc(100% - 0.4px), 97.14% calc(100% - 0px), 95.71% calc(100% - 5.4px), 94.29% calc(100% - 0px), 92.86% calc(100% - 0px), 91.43% calc(100% - 0.4px), 90% calc(100% - 2.7px), 88.57% calc(100% - 4.7px), 87.14% calc(100% - 4px), 85.71% calc(100% - 1.3px), 84.29% calc(100% - 3.2px), 82.86% calc(100% - 0px), 81.43% calc(100% - 1.4px), 80% calc(100% - 0.1px), 78.57% calc(100% - 0px), 77.14% calc(100% - 0px), 75.71% calc(100% - 2px), 74.29% calc(100% - 3.3px), 72.86% calc(100% - 2.3px), 71.43% calc(100% - 3.8px), 70% calc(100% - 0px), 68.57% calc(100% - 0px), 67.14% calc(100% - 0.4px), 65.71% calc(100% - 0px), 64.29% calc(100% - 0px), 62.86% calc(100% - 0px), 61.43% calc(100% - 0px), 60% calc(100% - 0px), 58.57% calc(100% - 0.6px), 57.14% calc(100% - 0px), 55.71% calc(100% - 1.8px), 54.29% calc(100% - 1px), 52.86% calc(100% - 3.7px), 51.43% calc(100% - 4.7px), 50% calc(100% - 7px), 48.57% calc(100% - 4.9px), 47.14% calc(100% - 5.5px), 45.71% calc(100% - 4.5px), 44.29% calc(100% - 2.1px), 42.86% calc(100% - 5.6px), 41.43% calc(100% - 3.9px), 40% calc(100% - 4.6px), 38.57% calc(100% - 1.5px), 37.14% calc(100% - 3.5px), 35.71% calc(100% - 3.6px), 34.29% calc(100% - 4.4px), 32.86% calc(100% - 4.7px), 31.43% calc(100% - 4.5px), 30% calc(100% - 7px), 28.57% calc(100% - 7px), 27.14% calc(100% - 6.8px), 25.71% calc(100% - 5.3px), 24.29% calc(100% - 5.7px), 22.86% calc(100% - 4.5px), 21.43% calc(100% - 5.5px), 20% calc(100% - 5px), 18.57% calc(100% - 5.1px), 17.14% calc(100% - 7px), 15.71% calc(100% - 4.9px), 14.29% calc(100% - 2.4px), 12.86% calc(100% - 0px), 11.43% calc(100% - 0px), 10% calc(100% - 3.1px), 8.57% calc(100% - 0.5px), 7.14% calc(100% - 2px), 5.71% calc(100% - 1.8px), 4.29% calc(100% - 0px), 2.86% calc(100% - 0.6px), 1.43% calc(100% - 3.1px), 0% calc(100% - 1.6px), 4.8px 97.5%, 2.4px 95%, 3.3px 92.5%, 0.9px 90%, 3.5px 87.5%, 0.7px 85%, 0px 82.5%, 0px 80%, 0.4px 77.5%, 0.8px 75%, 1px 72.5%, 0px 70%, 0px 67.5%, 0px 65%, 0px 62.5%, 2px 60%, 4.1px 57.5%, 2.5px 55%, 2.8px 52.5%, 2.7px 50%, 4.9px 47.5%, 2.9px 45%, 4.9px 42.5%, 4.9px 40%, 2.6px 37.5%, 0px 35%, 0px 32.5%, 0.1px 30%, 1.9px 27.5%, 1.6px 25%, 0.9px 22.5%, 2.2px 20%, 0px 17.5%, 0px 15%, 0.2px 12.5%, 1.3px 10%, 0px 7.5%, 1.2px 5%, 0.3px 2.5%);
  --torn-b: polygon(0% 3.9px, 1.43% 6.5px, 2.86% 6.6px, 4.29% 6px, 5.71% 2.9px, 7.14% 0.8px, 8.57% 4.6px, 10% 5.5px, 11.43% 7px, 12.86% 4.5px, 14.29% 3.8px, 15.71% 4.2px, 17.14% 5.6px, 18.57% 5.7px, 20% 5px, 21.43% 5.1px, 22.86% 7px, 24.29% 7px, 25.71% 7px, 27.14% 3.9px, 28.57% 2.9px, 30% 0.2px, 31.43% 0px, 32.86% 0px, 34.29% 0px, 35.71% 1.2px, 37.14% 4.1px, 38.57% 7px, 40% 7px, 41.43% 5.3px, 42.86% 1.6px, 44.29% 4.8px, 45.71% 2.1px, 47.14% 5.6px, 48.57% 7px, 50% 4.4px, 51.43% 7px, 52.86% 1.2px, 54.29% 6.6px, 55.71% 3px, 57.14% 3px, 58.57% 0px, 60% 0px, 61.43% 2.8px, 62.86% 3.8px, 64.29% 1.9px, 65.71% 4.8px, 67.14% 5.7px, 68.57% 6.3px, 70% 7px, 71.43% 3.6px, 72.86% 2px, 74.29% 0.4px, 75.71% 0px, 77.14% 0px, 78.57% 1.2px, 80% 0px, 81.43% 0px, 82.86% 3.8px, 84.29% 7px, 85.71% 6.6px, 87.14% 4.5px, 88.57% 2px, 90% 3.2px, 91.43% 0px, 92.86% 0px, 94.29% 3.6px, 95.71% 2.1px, 97.14% 4.9px, 98.57% 1.6px, 100% 0px, calc(100% - 2.7px) 2.5%, calc(100% - 0.1px) 5%, calc(100% - 0px) 7.5%, calc(100% - 0px) 10%, calc(100% - 2.6px) 12.5%, calc(100% - 4.9px) 15%, calc(100% - 0.8px) 17.5%, calc(100% - 4.9px) 20%, calc(100% - 4.9px) 22.5%, calc(100% - 4.9px) 25%, calc(100% - 3.9px) 27.5%, calc(100% - 3.5px) 30%, calc(100% - 3.9px) 32.5%, calc(100% - 4.6px) 35%, calc(100% - 2.5px) 37.5%, calc(100% - 1.5px) 40%, calc(100% - 3.5px) 42.5%, calc(100% - 1.2px) 45%, calc(100% - 0.2px) 47.5%, calc(100% - 0px) 50%, calc(100% - 0px) 52.5%, calc(100% - 0px) 55%, calc(100% - 0.1px) 57.5%, calc(100% - 2.5px) 60%, calc(100% - 0.2px) 62.5%, calc(100% - 2.6px) 65%, calc(100% - 2.5px) 67.5%, calc(100% - 1.2px) 70%, calc(100% - 2.2px) 72.5%, calc(100% - 3.2px) 75%, calc(100% - 3.3px) 77.5%, calc(100% - 1.8px) 80%, calc(100% - 1.1px) 82.5%, calc(100% - 2.4px) 85%, calc(100% - 2.4px) 87.5%, calc(100% - 3.1px) 90%, calc(100% - 4.7px) 92.5%, calc(100% - 4.9px) 95%, calc(100% - 4.9px) 97.5%, 100% calc(100% - 3px), 98.57% calc(100% - 0px), 97.14% calc(100% - 1.8px), 95.71% calc(100% - 0px), 94.29% calc(100% - 1.6px), 92.86% calc(100% - 0px), 91.43% calc(100% - 0px), 90% calc(100% - 0px), 88.57% calc(100% - 2.4px), 87.14% calc(100% - 4.9px), 85.71% calc(100% - 3.5px), 84.29% calc(100% - 1.6px), 82.86% calc(100% - 4.5px), 81.43% calc(100% - 4.7px), 80% calc(100% - 5px), 78.57% calc(100% - 4.9px), 77.14% calc(100% - 2.1px), 75.71% calc(100% - 0.6px), 74.29% calc(100% - 3px), 72.86% calc(100% - 0.6px), 71.43% calc(100% - 4.3px), 70% calc(100% - 0px), 68.57% calc(100% - 1.6px), 67.14% calc(100% - 3.2px), 65.71% calc(100% - 7px), 64.29% calc(100% - 5.1px), 62.86% calc(100% - 7px), 61.43% calc(100% - 4.3px), 60% calc(100% - 1px), 58.57% calc(100% - 6.1px), 57.14% calc(100% - 5.3px), 55.71% calc(100% - 7px), 54.29% calc(100% - 7px), 52.86% calc(100% - 5.7px), 51.43% calc(100% - 1.4px), 50% calc(100% - 0.7px), 48.57% calc(100% - 6.2px), 47.14% calc(100% - 6.7px), 45.71% calc(100% - 7px), 44.29% calc(100% - 7px), 42.86% calc(100% - 2.8px), 41.43% calc(100% - 7px), 40% calc(100% - 1.3px), 38.57% calc(100% - 6.5px), 37.14% calc(100% - 5.5px), 35.71% calc(100% - 7px), 34.29% calc(100% - 6.8px), 32.86% calc(100% - 3.2px), 31.43% calc(100% - 2.1px), 30% calc(100% - 3.4px), 28.57% calc(100% - 6.9px), 27.14% calc(100% - 5.8px), 25.71% calc(100% - 4.1px), 24.29% calc(100% - 6.2px), 22.86% calc(100% - 3.4px), 21.43% calc(100% - 7px), 20% calc(100% - 4.4px), 18.57% calc(100% - 5.6px), 17.14% calc(100% - 2.1px), 15.71% calc(100% - 1.4px), 14.29% calc(100% - 3.6px), 12.86% calc(100% - 4.7px), 11.43% calc(100% - 7px), 10% calc(100% - 0.1px), 8.57% calc(100% - 0.6px), 7.14% calc(100% - 1px), 5.71% calc(100% - 3.8px), 4.29% calc(100% - 2px), 2.86% calc(100% - 0px), 1.43% calc(100% - 1.4px), 0% calc(100% - 2.7px), 4.9px 97.5%, 4.9px 95%, 0.1px 92.5%, 4.9px 90%, 4.9px 87.5%, 4.9px 85%, 3.6px 82.5%, 2.4px 80%, 3.9px 77.5%, 3.8px 75%, 1.8px 72.5%, 1.9px 70%, 4.7px 67.5%, 3.3px 65%, 1.5px 62.5%, 0.3px 60%, 2px 57.5%, 2.3px 55%, 0.7px 52.5%, 1.2px 50%, 2.2px 47.5%, 1.7px 45%, 1.3px 42.5%, 0px 40%, 0.5px 37.5%, 1.5px 35%, 0.2px 32.5%, 0.8px 30%, 2.6px 27.5%, 4.9px 25%, 3.4px 22.5%, 3.6px 20%, 3.7px 17.5%, 4.2px 15%, 1.8px 12.5%, 0px 10%, 0px 7.5%, 0px 5%, 0.2px 2.5%);
  --torn-c: polygon(0% 1.7px, 1.43% 1.4px, 2.86% 1.5px, 4.29% 0px, 5.71% 1.3px, 7.14% 2.6px, 8.57% 2.8px, 10% 5px, 11.43% 3.5px, 12.86% 2.7px, 14.29% 0.2px, 15.71% 1.2px, 17.14% 1.5px, 18.57% 0.1px, 20% 1.7px, 21.43% 1.6px, 22.86% 1.8px, 24.29% 2.7px, 25.71% 5px, 27.14% 3.5px, 28.57% 5px, 30% 5px, 31.43% 5px, 32.86% 5px, 34.29% 1.6px, 35.71% 5px, 37.14% 5px, 38.57% 5px, 40% 3.4px, 41.43% 5px, 42.86% 5px, 44.29% 5px, 45.71% 1.3px, 47.14% 5px, 48.57% 5px, 50% 1.3px, 51.43% 5px, 52.86% 5px, 54.29% 5px, 55.71% 1.2px, 57.14% 3.1px, 58.57% 5px, 60% 3.2px, 61.43% 1.2px, 62.86% 2.7px, 64.29% 2.2px, 65.71% 0px, 67.14% 0.2px, 68.57% 0px, 70% 0px, 71.43% 1.7px, 72.86% 0.4px, 74.29% 3.9px, 75.71% 3px, 77.14% 5px, 78.57% 2.6px, 80% 2.7px, 81.43% 0px, 82.86% 0.2px, 84.29% 1.6px, 85.71% 2.5px, 87.14% 4.6px, 88.57% 4.2px, 90% 3.1px, 91.43% 3px, 92.86% 2.3px, 94.29% 5px, 95.71% 4.6px, 97.14% 3.9px, 98.57% 5px, 100% 2.9px, calc(100% - 1.9px) 2.5%, calc(100% - 2.7px) 5%, calc(100% - 3.5px) 7.5%, calc(100% - 3.5px) 10%, calc(100% - 3.5px) 12.5%, calc(100% - 2px) 15%, calc(100% - 0.9px) 17.5%, calc(100% - 2.3px) 20%, calc(100% - 0.2px) 22.5%, calc(100% - 1.2px) 25%, calc(100% - 0px) 27.5%, calc(100% - 0px) 30%, calc(100% - 0px) 32.5%, calc(100% - 0px) 35%, calc(100% - 1.7px) 37.5%, calc(100% - 0.8px) 40%, calc(100% - 1.4px) 42.5%, calc(100% - 1.1px) 45%, calc(100% - 2.1px) 47.5%, calc(100% - 1.6px) 50%, calc(100% - 0.8px) 52.5%, calc(100% - 0.5px) 55%, calc(100% - 0px) 57.5%, calc(100% - 0px) 60%, calc(100% - 1.1px) 62.5%, calc(100% - 0.8px) 65%, calc(100% - 0px) 67.5%, calc(100% - 0.7px) 70%, calc(100% - 0.4px) 72.5%, calc(100% - 1.5px) 75%, calc(100% - 1.7px) 77.5%, calc(100% - 3px) 80%, calc(100% - 1.7px) 82.5%, calc(100% - 0.8px) 85%, calc(100% - 1.1px) 87.5%, calc(100% - 0.9px) 90%, calc(100% - 2.7px) 92.5%, calc(100% - 2.5px) 95%, calc(100% - 3.5px) 97.5%, 100% calc(100% - 0.4px), 98.57% calc(100% - 3.4px), 97.14% calc(100% - 0.8px), 95.71% calc(100% - 0px), 94.29% calc(100% - 0.4px), 92.86% calc(100% - 0.4px), 91.43% calc(100% - 0.3px), 90% calc(100% - 0.2px), 88.57% calc(100% - 4px), 87.14% calc(100% - 5px), 85.71% calc(100% - 4.9px), 84.29% calc(100% - 4.5px), 82.86% calc(100% - 5px), 81.43% calc(100% - 5px), 80% calc(100% - 1.1px), 78.57% calc(100% - 5px), 77.14% calc(100% - 5px), 75.71% calc(100% - 5px), 74.29% calc(100% - 2.7px), 72.86% calc(100% - 0.2px), 71.43% calc(100% - 5px), 70% calc(100% - 5px), 68.57% calc(100% - 5px), 67.14% calc(100% - 3.5px), 65.71% calc(100% - 2.6px), 64.29% calc(100% - 5px), 62.86% calc(100% - 5px), 61.43% calc(100% - 4.8px), 60% calc(100% - 5px), 58.57% calc(100% - 4.9px), 57.14% calc(100% - 2.3px), 55.71% calc(100% - 3.7px), 54.29% calc(100% - 3.1px), 52.86% calc(100% - 4.9px), 51.43% calc(100% - 4.3px), 50% calc(100% - 5px), 48.57% calc(100% - 4.5px), 47.14% calc(100% - 5px), 45.71% calc(100% - 5px), 44.29% calc(100% - 4.5px), 42.86% calc(100% - 2px), 41.43% calc(100% - 0px), 40% calc(100% - 0px), 38.57% calc(100% - 0px), 37.14% calc(100% - 1.6px), 35.71% calc(100% - 1.9px), 34.29% calc(100% - 3.5px), 32.86% calc(100% - 0.8px), 31.43% calc(100% - 3.1px), 30% calc(100% - 5px), 28.57% calc(100% - 5px), 27.14% calc(100% - 4.2px), 25.71% calc(100% - 4.2px), 24.29% calc(100% - 3.6px), 22.86% calc(100% - 4.9px), 21.43% calc(100% - 5px), 20% calc(100% - 1.3px), 18.57% calc(100% - 5px), 17.14% calc(100% - 3.3px), 15.71% calc(100% - 2.5px), 14.29% calc(100% - 0px), 12.86% calc(100% - 0px), 11.43% calc(100% - 0.7px), 10% calc(100% - 2.7px), 8.57% calc(100% - 3.2px), 7.14% calc(100% - 2.7px), 5.71% calc(100% - 2.6px), 4.29% calc(100% - 1.4px), 2.86% calc(100% - 0.2px), 1.43% calc(100% - 0px), 0% calc(100% - 0.1px), 3.5px 97.5%, 3.3px 95%, 3.4px 92.5%, 0.8px 90%, 0px 87.5%, 0.4px 85%, 0.9px 82.5%, 2.4px 80%, 3.5px 77.5%, 3.5px 75%, 2.3px 72.5%, 0px 70%, 1.9px 67.5%, 3.5px 65%, 3.5px 62.5%, 3.5px 60%, 3.5px 57.5%, 2.1px 55%, 0.8px 52.5%, 0px 50%, 0px 47.5%, 0.9px 45%, 1.1px 42.5%, 2px 40%, 3.5px 37.5%, 2.4px 35%, 3.5px 32.5%, 3.5px 30%, 3.5px 27.5%, 3.5px 25%, 3.5px 22.5%, 3.5px 20%, 1.8px 17.5%, 2.5px 15%, 0.5px 12.5%, 0.6px 10%, 2.2px 7.5%, 2.3px 5%, 1.7px 2.5%);
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --paper: #dbc9a5;
  --paper-light: #e5d5b4;
  --field: #ece1c6;
  --ink: #1d1714;
  --ink-soft: #4d4238;
  --red: #b30d2a;
  --red-text: #9e0b24;
  --wood: #3e2516;
  --cream: #f0e4c8;
  --green: #3f7d34;
  --blue: #2c5fa6;
  --red-tint: #efc4bb;
  --focus: #1f5fbf;
  --marker: "Permanent Marker", "Segoe Print", "Comic Sans MS", cursive;
  /* Headings: a bold hand-lettered face, upright and open, easier to read than the marker at length (owner, 2026-10-07:
     Mali, whose 5 can't be taken for an S in "PS5"). The marker stays for the logo, menu, buttons, stamps and labels. */
  --heading: "Mali", "Patrick Hand", "Segoe Print", cursive;
  --hand: "Patrick Hand", "Segoe Print", "Comic Sans MS", cursive;
  /* Small print on the dark wood (the footer): the device's own clear typeface, where the hand's @ and small letters blur */
  --plain: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --sketch-radius: 3px 7px 4px 8px / 8px 3px 7px 4px;
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 14' preserveAspectRatio='none'%3E%3Cpath d='M2 8.5C70 4 150 5.5 230 4.6S350 3.8 398 5.2L396 9.6C320 10.2 240 10.8 160 11.2S50 12.6 4 12z' fill='%23b30d2a'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--wood) url(/img/wood.webp) repeat;
  color: var(--ink);
  font: 19px/1.4 var(--hand);
}
img { max-width: 100%; height: auto; }
a { color: var(--red-text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
p { margin: 0 0 12px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--cream); color: var(--ink); }
.skip:focus { left: 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.caps { text-transform: uppercase; letter-spacing: .03em; font-size: 17px; line-height: 1.35; }
.fine { margin: 0; font-size: 16px; color: var(--ink-soft); }
code { font-family: Consolas, monospace; font-size: .85em; background: rgba(0, 0, 0, .07); padding: 1px 4px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 6px var(--gutter) 0;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5));
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 8px;
  background: var(--paper-light) url(/img/paper.webp);
  clip-path: var(--torn-c);
}
.brand { flex: none; display: block; line-height: 0; }
.brand img { height: 42px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 9px;
  color: var(--ink);
  font-family: var(--marker);
  font-size: 16px;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
}
.nav a:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
.nav a.hot { color: var(--red-text); }
.wide-only, .nav a.wide-only, .nav a.wider-only { display: none; }
@media (min-width: 980px) {
  .wide-only { display: inline; }
  .nav a.wide-only { display: inline-flex; }
  .narrow-only { display: none; }
  .topbar-inner { padding: 8px 18px 10px; }
  .nav a { font-size: 15px; padding: 4px 11px; }
}
/* The overview, how-it-works and blog links join the top bar where they all fit beside Repair · Sell · Buy (both languages). */
@media (min-width: 1000px) { .nav a.wider-only { display: inline-flex; } }

/* ---------- paper panels ---------- */
.panel { margin: 22px 0; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .55)); }
.sheet {
  position: relative;
  container-type: inline-size;
  padding: 30px 20px 34px;
  background: var(--paper) url(/img/paper.webp);
  clip-path: var(--torn-a);
  box-shadow: inset 0 0 0 1px rgba(90, 55, 20, .15), inset 0 0 42px rgba(105, 62, 20, .42);
}
.panel:nth-of-type(even) > .sheet, .form-panel + .form-panel > .sheet { clip-path: var(--torn-b); }
@media (min-width: 700px) { .sheet { padding: 40px 44px 44px; } }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- type ---------- */
.title {
  display: inline-block;
  margin: 0 0 16px;
  padding-bottom: 12px;
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(30px, 8.5vw, 48px);
  line-height: 1.08;
  letter-spacing: .01em;
  text-transform: uppercase;
  background: var(--brush) no-repeat left bottom / 100% 11px;
}
.title { overflow-wrap: break-word; max-width: 100%; }
.title-small { font-size: 28px; padding-bottom: 8px; background-size: 100% 8px; }
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 24px; }
.title-row .title { margin-bottom: 10px; }
.kicker { margin: 0 0 14px; padding-bottom: 6px; background: var(--brush) no-repeat left bottom / 100% 5px; }
.form-panel .title-row { flex-wrap: nowrap; }
.title-icon { flex: none; height: 58px; width: auto; margin: 0 0 10px auto; transform: rotate(8deg); }
@container (max-width: 530px) { .title-icon { display: none; } }
.lede { font-size: 21px; }

/* The home page's sections: every heading centred, with its kicker under it and its stamp under that (owner, 2026-10-12);
   body text stays left-aligned for reading. Each underline keeps its heading's width. */
.home .panel:not(.hero) .sheet > .title,
.home .panel:not(.hero) .title-row .title,
.home .panel:not(.hero) .sheet > .title-small,
.home .panel:not(.hero) .sheet > .stamp { display: block; width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; text-align: center; }
.home .panel:not(.hero) .title-row { flex-direction: column; align-items: center; gap: 0; text-align: center; }
.home .panel:not(.hero) .title-row .kicker { background-position: center bottom; }
/* Under a centred heading, a row of one or two blog cards sits centred too, not stranded on the left. */
.home .post-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 340px)); justify-content: center; }
/* A section's closing button ("Browse all 5 devices →") that has to wrap on a phone wraps evenly, arrow with the words. */
.home .center > .btn { display: inline-block; text-align: center; text-wrap: balance; line-height: 1.2; }
.underline { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 5px; }

.stamp {
  display: inline-block;
  margin: 8px 6px 20px;
  padding: 8px 16px 6px;
  font-family: var(--marker);
  font-size: 22px;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  border: 3px solid var(--red);
  outline: 2px solid var(--red);
  outline-offset: 4px;
  transform: rotate(-4deg);
}
.stamp em { font-style: normal; color: var(--red-text); }
.stamp-big { font-size: clamp(30px, 8vw, 46px); padding: 10px 20px 8px; }

.num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--red);
  color: #fff;
  font: 20px/1 var(--marker);
  border-radius: 47% 53% 45% 55% / 55% 45% 55% 45%;
}
.num.small { width: 26px; height: 26px; font-size: 14px; vertical-align: middle; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 30px;
  border: 0;
  background: var(--red);
  color: #fff;
  font-family: var(--marker);
  font-size: 22px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(1% 9%, 98% 0, 100% 88%, 3% 100%);
  transition: transform .1s;
}
.btn:hover { background: #c5122f; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: none; background: var(--ink); text-decoration: underline; }
.btn:disabled { background: #7e3a46; cursor: progress; }
.btn.small { min-height: 44px; padding: 8px 18px; font-size: 17px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 18px;
  border: 2px dashed var(--red);
  border-radius: 2px;
  background: transparent;
  color: var(--red-text);
  font-family: var(--marker);
  font-size: 18px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(179, 13, 42, .07); }
.btn-ghost.small { min-height: 42px; padding: 6px 12px; font-size: 15px; }
.link-btn {
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 17px;
  text-decoration: underline;
  cursor: pointer;
}
.link-btn.danger { color: var(--red-text); }
.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }

/* ---------- hero ---------- */
.hero .sheet { padding-top: 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "brand" "stamp" "art";
  gap: 6px;
  align-items: center;
}
.hero-brand { grid-area: brand; }
.hero-title { margin: 0; line-height: 0; }
.hero-logo { display: block; width: min(100%, 540px); margin-left: -6px; }
.tagline { max-width: 34ch; margin: 8px 0 0; }
.hero-art { grid-area: art; text-align: center; }
.hero-art img { width: min(100%, 480px); }
.kinds { margin: 2px 0 0; font-size: 15px; }
.hero-stamp { grid-area: stamp; display: flex; align-items: center; justify-content: center; gap: 4px 18px; text-align: center; }
.hero-stamp { flex-wrap: wrap; }
.hero-stamp .stamp { flex: 0 1 auto; max-width: 100%; text-wrap: balance; } /* longer in Spanish: may wrap */
.hero-stamp .family { flex: 1 1 100%; margin-top: 0; }
.hero-stamp .stamp { margin: 14px 4px 12px; font-size: 25px; }
.area { margin: 0; font-size: 15px; }
.family { margin: 4px 0 0; font: 16px/1.1 var(--marker); color: var(--red-text); text-transform: uppercase; transform: rotate(-2deg); }
.hero-stamp > div, .hero-stamp .area, .hero-stamp .family { text-align: center; }
/* Permanent Marker draws & like a +; the hand font's reads right. */
.amp { font-family: var(--hand); font-size: 1.15em; font-weight: 700; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 1fr .62fr; grid-template-areas: "brand art stamp"; gap: 22px; }
  .hero-art img { width: 100%; }
  .hero-stamp { flex-direction: column; }
  .hero-stamp .family { flex: none; margin-top: 4px; }
  .hero-stamp .stamp { white-space: normal; }
  .hero-stamp .stamp { font-size: 38px; }
}

/* ---------- services ---------- */
.services { display: grid; gap: 10px; }
@media (min-width: 860px) { .services { grid-template-columns: 1fr 1.3fr; gap: 40px; } }
.services .lede { font-style: italic; }
.kind-icons {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 6px;
  text-align: center;
}
.kind-icons li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; font-size: 14px; line-height: 1.1; text-transform: uppercase; }
.kind-icons img { height: 52px; width: auto; object-fit: contain; }
@media (min-width: 560px) { .kind-icons { grid-template-columns: repeat(6, 1fr); } .kind-icons img { height: 72px; } .kind-icons li { font-size: 16px; } }
.checks { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 18px; }
.checks li { position: relative; break-inside: avoid; padding: 3px 0 3px 30px; font-size: 17px; text-transform: uppercase; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 22px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M2 12.5l6 6.5L22 2.5' fill='none' stroke='%23b30d2a' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- how it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr); /* a long word (DIAGNÓSTICO) mustn't widen the card */
  gap: 0 14px;
  padding: 14px 14px 16px;
  border: 2.5px solid var(--ink);
  border-radius: var(--sketch-radius);
  background: rgba(255, 250, 235, .14);
  box-shadow: 2px 3px 0 rgba(40, 25, 10, .25);
}
.step-top { grid-row: span 2; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.step-top img { max-height: 70px; width: auto; }
.step-title {
  justify-self: start;
  margin: 0 0 8px;
  padding: 3px 8px 2px;
  border: 2px solid var(--red);
  font: 400 19px/1.08 var(--marker);
  text-transform: uppercase;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.step p { margin: 0; font-size: 18px; }
@media (min-width: 560px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step { grid-template-columns: 1fr; }
  .step-top { grid-row: auto; flex-direction: row; justify-content: space-between; align-items: flex-start; min-height: 92px; }
  .step-top img { max-height: 86px; }
}
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.good-title { margin-top: 26px; }
.good { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .good { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (min-width: 1100px) { .good { grid-template-columns: repeat(4, 1fr); } }
.good li { padding: 12px 14px 14px; border: 2px dashed var(--ink); border-radius: var(--sketch-radius); background: rgba(255, 250, 235, .14); }
.good h4 { margin: 0 0 6px; font: 700 19px/1.15 var(--heading); color: var(--red-text); text-transform: uppercase; }
.good p { margin: 0; font-size: 18px; }

/* ---------- forms ---------- */
.intro { margin: 0 0 18px; }
.row2, .row3 { display: grid; gap: 0 14px; }
@container (min-width: 440px) { .row2 { grid-template-columns: 1fr 1fr; } }
@container (min-width: 600px) { .row3 { grid-template-columns: 1fr 1fr 1fr; } }
.field { min-width: 0; margin: 0 0 12px; }
fieldset.field { margin: 0 0 14px; padding: 0; border: 0; }
.field > label, .field > legend, .label-like { display: block; margin: 0 0 4px; padding: 0; font-size: 17px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 3px 6px 4px 7px / 7px 3px 6px 4px;
  background-color: var(--field);
  box-shadow: inset 1px 2px 0 rgba(60, 40, 20, .12);
  color: var(--ink);
  font: inherit;
  font-size: 19px;
}
textarea { min-height: 88px; line-height: 1.3; resize: vertical; }
select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5l6.5 6.5 6.5-6.5' fill='none' stroke='%231d1714' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px;
}
::placeholder { color: #7a6c5e; font-style: italic; opacity: 1; }
[aria-invalid=true] { border-color: var(--red) !important; background-color: #f3d8cd !important; }
.err { margin: 4px 0 0; color: var(--red-text); font-size: 17px; line-height: 1.25; }
.hint { margin: 4px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 1.25; }
.consent-field { margin-top: 6px; }
.check.consent { align-items: flex-start; gap: 12px; margin: 0; font-size: 17px; line-height: 1.3; }
.check.consent input { flex: none; width: 26px; height: 26px; margin-top: 1px; }
.err:empty, .form-err:empty { display: none; }
.form-err { margin: 14px 0 0; padding: 8px 12px; border-left: 5px solid var(--red); background: rgba(255, 245, 230, .55); color: var(--red-text); font-size: 18px; }
.money { position: relative; }
.money > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 19px; }
.money input { padding-left: 28px !important; }
.hp { display: none; }

.device {
  position: relative;
  min-width: 0;
  margin: 6px 0 14px;
  padding: 6px 14px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 4px 8px 5px 9px / 9px 4px 8px 5px;
  background: rgba(255, 248, 230, .18);
}
.device legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font: 20px/1 var(--marker); text-transform: uppercase; }
.device legend .num { width: 34px; height: 34px; font-size: 17px; }
.device-remove { position: absolute; top: 2px; right: 8px; }

.photos { margin-top: 4px; }
.photo-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-btn {
  position: relative;
  flex: 1 1 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 14px;
  border: 2px dashed var(--ink);
  border-radius: 6px;
  background: rgba(255, 250, 235, .2);
  font-size: 16px;
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
}
.photo-btn:hover { background: rgba(255, 250, 235, .45); }
.photo-btn svg { flex: none; }
.photo-btn[data-camera] { order: -1; } /* on phones a fresh photo is the likelier pick */
.js .photo-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.thumbs li { position: relative; width: 80px; height: 80px; overflow: hidden; border: 2px solid var(--ink); border-radius: 4px; background: var(--field); }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumbs li.no-preview img { display: none; }
.thumbs li.no-preview::before { content: "Photo"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; }
.thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0 0 3px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font: 24px/1 var(--hand);
  cursor: pointer;
}
.submit-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin-top: 18px; text-align: center; }
.submit-row .btn { flex: 1 1 260px; max-width: 420px; }
.submit-row .fine { flex: 1 1 100%; }

/* ---------- the intake wizard (docs/design/website-intake-wizard.md §7) ----------
   One column, at most 640 px. With the script one step shows at a time (.is-wizard); without it the steps stack as one
   long form, and :has() hides the other branch's steps and the other kinds' answers. */
.request-panel .anchor { position: relative; top: -80px; display: block; height: 0; }
.request-panel .title, .request-panel > .sheet > .intro { text-align: center; }
.request-panel .title { margin-bottom: 4px; }
.wizard { max-width: 640px; margin: 0 auto; }
.wstep { min-width: 0; margin: 0 0 22px; padding: 0; border: 0; }
.wizard.is-wizard .wstep { display: none; margin: 0; }
.wizard.is-wizard .wstep.is-current { display: block; }
.wizard [data-off], html:not(.js) [data-script-only] { display: none !important; }
.wizard .step-in { animation: step-in .22s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.step-q { display: block; width: 100%; margin: 0 0 6px; padding: 0; font: 700 clamp(24px, 6vw, 30px)/1.15 var(--heading); color: var(--ink); }
.step-q:focus { outline: none; }
.kbd .step-q:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.step-q .optional, .sub-q .optional { font: 400 18px var(--hand); color: var(--ink-soft); }
.step-sub, .sub-q { margin: 0 0 14px; font-size: 18px; color: var(--ink-soft); }
.sub-q { margin-top: 16px; color: var(--ink); font: 700 20px/1.2 var(--heading); }
.device-tag { color: var(--red-text); }
.wizard-progress { height: 6px; margin: 0 0 18px; border-radius: 3px; background: rgba(60, 40, 20, .14); overflow: hidden; }
.wizard-progress span { display: block; width: 0; height: 100%; background: var(--red); transition: width .25s ease-out; }
.preset-line { margin: 0 0 14px; font-size: 18px; }
.preset-line .link-btn { padding: 0 6px; }

/* the fork: two big buttons */
.fork { display: grid; gap: 14px; margin: 8px 0 6px; }
@container (min-width: 560px) { .fork { grid-template-columns: 1fr 1fr; } }
.fork-btn {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 150px;
  padding: 16px 14px;
  border: 3px solid var(--ink);
  border-radius: var(--sketch-radius);
  background: rgba(255, 250, 235, .35);
  text-align: center;
  cursor: pointer;
  transition: transform .1s, background-color .1s;
}
.fork-btn:hover { background: rgba(255, 250, 235, .6); }
.fork-btn:active { transform: translateY(1px) scale(.99); }
.fork-btn img { height: 64px; width: auto; }
.fork-title { font: 26px/1.1 var(--marker); text-transform: uppercase; color: var(--red-text); }
.fork-line { font-size: 18px; color: var(--ink-soft); }

/* the launcher and the dialog (docs/design/website-wizard-dialog.md): with the script, the page shows the fork as two
   buttons and the wizard opens over it; early.js marks the page (wiz-early) before it paints, site.js keeps it
   (wiz-dialog) where <dialog> works, and without either the long form shows and the launcher doesn't */
.wizard-launch { display: none; }
html.wiz-early:not(.js) .wizard-launch, html.wiz-dialog .wizard-launch { display: block; } /* once site.js runs, only a working dialog shows it (DC-9) */
html.wiz-early:not(.js) form[data-wizard] { display: none; }
.wizard-launch .fork-btn { width: 100%; font: inherit; color: inherit; }
.wizard-launch .fork-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wizard-launch .preset-line { text-align: center; }
/* a fixed height, so it doesn't move between steps (WD-15), sized to what the keyboard leaves (an iPad's; DC-10) and
   pinned to the visible part of the page; 100vh first for browsers without dvh */
.wizard-dialog {
  width: min(720px, calc(100% - 32px));
  height: min(calc(100vh - 32px), 860px);
  height: min(calc(var(--vvh, 100dvh) - 32px), 860px);
  inset: auto 0;
  top: var(--vvt, 0px);
  margin: max(16px, calc((var(--vvh, 100dvh) - 860px) / 2)) auto 16px;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}
.wizard-dialog[open] { display: flex; flex-direction: column; }
.wizard-dialog::backdrop { background: rgba(20, 10, 4, .72); }
.wizard-head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 14px 20px;
  background: var(--paper) url(/img/paper.webp);
  box-shadow: inset 0 -1px 0 rgba(90, 55, 20, .25);
}
.wizard-title { flex: 1; min-width: 0; margin: 0; font: 700 20px/1.2 var(--heading); color: var(--ink); }
.wizard-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 250, 235, .5);
  color: var(--ink);
  font: 700 26px/1 var(--heading);
  cursor: pointer;
}
.wizard-close:hover { background: rgba(255, 250, 235, .9); }
.wizard-close:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wizard-close:disabled { opacity: .4; cursor: not-allowed; }
.wizard-head .wizard-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; margin: 0; border-radius: 0; }
.wizard-dialog .wizard-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; clip-path: none; padding: 22px 20px 28px; }
html:has(dialog.wizard-dialog[open]) { overscroll-behavior: none; }
/* phones, landscape ones too: the whole screen, sized to what the keyboard leaves (--vvh / --vvt from visualViewport) */
@media (max-width: 719px), (max-height: 600px) {
  .wizard-dialog { inset: auto; top: var(--vvt, 0px); left: 0; width: 100%; height: var(--vvh, 100dvh); margin: 0; }
  .wizard-head { padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); }
  .wizard-dialog .wizard-body { padding: 18px max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
}
@media (prefers-reduced-motion: no-preference) { .wizard-dialog[open] { animation: dialog-in .18s ease-out; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* tiles: one tap each (radio) or pick-all (checkbox); the native input is visually hidden but kept for keyboards and
   screen readers, and the tile shows its state with a border, a tick and a tint, never colour alone */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 4px; }
@container (min-width: 560px) { .tiles { grid-template-columns: repeat(3, 1fr); } .tiles-wide { grid-template-columns: 1fr 1fr; } }
.tile { position: relative; display: block; cursor: pointer; }
.tile input, .seg-btn input, .fork-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.tile > span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  height: 100%;
  padding: 10px 34px 10px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 4px 8px 5px 9px / 9px 4px 8px 5px;
  background: rgba(255, 250, 235, .3);
  font-size: 19px;
  line-height: 1.2;
  transition: background-color .1s;
}
.tile > span small { font-size: 16px; color: var(--ink-soft); }
.tile:hover > span { background: rgba(255, 250, 235, .6); }
.tile input:checked + span, .seg-btn input:checked + span { border-color: var(--red); background: var(--red-tint); box-shadow: inset 0 0 0 1.5px var(--red); }
.tile input:checked + span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 9px;
  height: 16px;
  margin-top: -10px;
  border: solid var(--red-text);
  border-width: 0 3.5px 3.5px 0;
  transform: rotate(45deg);
}
.tile input:focus-visible + span, .seg-btn input:focus-visible + span, .fork-btn:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.fork-btn:has(input:checked) { border-color: var(--red); background: var(--red-tint); }
.fork-btn:has(input:checked)::after, .seg-btn input:checked + span::before { content: "✓"; color: var(--red-text); font: 700 20px/1 var(--heading); }
.fork-btn:has(input:checked)::after { position: absolute; top: 10px; right: 14px; font-size: 26px; }
.seg-btn input:checked + span::before { margin-right: 6px; }
.free-diag { margin: 12px 0 0; padding: 8px 12px; border-left: 5px solid var(--green); background: rgba(203, 220, 174, .45); font-size: 18px; }

/* the checks: segmented answers, one question at a time with the script */
.check-q { margin: 0 0 18px; }
.check-ask { margin: 0 0 8px; font: 700 20px/1.25 var(--heading); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-btn { position: relative; flex: 1 1 auto; cursor: pointer; }
.seg-btn > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  height: 100%;
  padding: 8px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 3px 6px 4px 7px / 7px 3px 6px 4px;
  background: rgba(255, 250, 235, .3);
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
}
.seg-btn:hover > span { background: rgba(255, 250, 235, .6); }
/* A device not known to turn on: the grades say only how it looks, and Damaged's list is optional. */
.hint-shape, [data-in-doubt] .hint-works { display: none; }
[data-in-doubt] .hint-shape { display: revert; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.switch-notice:focus { outline: none; }
.kbd .switch-notice:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.notice-actions .btn-ghost.small { min-height: 44px; }
.switch-notice { margin: 0 0 14px; }
.switch-notice p { margin: 0 0 6px; font-size: 18px; }

/* the optional note, under its step's answers */
.wizard-note { margin-top: 14px; }

/* Back and Next: Back first in reading order; on a phone Next sits above it, full width */
.step-nav, .wizard .submit-row { display: flex; flex-wrap: wrap-reverse; align-items: center; gap: 10px 14px; margin-top: 20px; }
.step-nav .step-next, .wizard .submit-row .btn { flex: 1 1 220px; }
.step-nav .step-back, .wizard .submit-row .step-back { flex: 0 1 auto; }
@container (max-width: 459px) { .step-nav .step-back, .wizard .submit-row .step-back { flex: 1 1 100%; } }
.wizard .reassure { margin: 14px 0 0; text-align: center; }

/* the review */
.summary { margin: 6px 0 12px; border-top: 2px dashed rgba(29, 23, 20, .35); }
.sum-row { display: grid; grid-template-columns: minmax(84px, auto) 1fr auto; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-bottom: 2px dashed rgba(29, 23, 20, .35); }
.sum-label { font: 700 16px/1.2 var(--heading); text-transform: uppercase; color: var(--ink-soft); }
.sum-value { min-width: 0; font-size: 19px; overflow-wrap: anywhere; white-space: pre-line; }
.sum-row .link-btn { min-height: 44px; padding: 0 4px; }
.sum-remove { padding: 2px 0 6px; border-bottom: 2px dashed rgba(29, 23, 20, .35); text-align: right; }
.add-device { margin: 0 0 14px; }
.wizard .notice { margin: 0 0 10px; font-size: 18px; }
.wizard [data-send-bare] { margin-top: 10px; }

/* without the script: the other branch and the other kinds' answers hide once picked (browsers with :has()) */
html.js .wizard [data-no-branch], html:not(.js) .wizard:has([data-kind]:checked) [data-no-branch],
html:not(.js) .wizard-device:has([name$="Checks[carrier]"][value=wifi]:checked) [data-unless-carrier~=wifi],
html:not(.js) .wizard-device:has([name$="Checks[carrier]"][value=gps]:checked) [data-unless-carrier~=gps],
html:not(.js) .wizard:not(:has([data-kind]:checked)) [data-branch],
html:not(.js) .wizard:has([data-kind][value=Repair]:checked) [data-branch=sell],
html:not(.js) .wizard:has([data-kind][value=Sell]:checked) [data-branch=repair] { display: none; }
html:not(.js) .wizard-device:has([data-type-tile][value=phone]:checked) [data-types]:not([data-types~=phone]),
html:not(.js) .wizard-device:has([data-type-tile][value=tablet]:checked) [data-types]:not([data-types~=tablet]),
html:not(.js) .wizard-device:has([data-type-tile][value=laptop]:checked) [data-types]:not([data-types~=laptop]),
html:not(.js) .wizard-device:has([data-type-tile][value=desktop]:checked) [data-types]:not([data-types~=desktop]),
html:not(.js) .wizard-device:has([data-type-tile][value=console]:checked) [data-types]:not([data-types~=console]),
html:not(.js) .wizard-device:has([data-type-tile][value=controller]:checked) [data-types]:not([data-types~=controller]),
html:not(.js) .wizard-device:has([data-type-tile][value=drone]:checked) [data-types]:not([data-types~=drone]),
html:not(.js) .wizard-device:has([data-type-tile][value=watch]:checked) [data-types]:not([data-types~=watch]),
html:not(.js) .wizard-device:has([data-type-tile][value=other]:checked) [data-types]:not([data-types~=other]) { display: none; }
html:not(.js) .wizard-device:not(:has([name$="].Condition"][value=damaged]:checked)) [data-when-damaged] { display: none; }
@media (prefers-reduced-motion: reduce) { .wizard .step-in { animation: none; } .wizard-progress span { transition: none; } }
[data-add-device] { margin-top: 2px; }

/* ---------- listings ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 22px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 10px 12px;
  border: 2.5px solid var(--ink);
  border-radius: var(--sketch-radius);
  background: rgba(255, 250, 235, .14);
  box-shadow: 2px 3px 0 rgba(40, 25, 10, .25);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: transform .12s;
}
.card:hover { transform: rotate(-.8deg) translateY(-2px); }
.card-photo { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 6px; overflow: hidden; border-radius: 3px; background: rgba(0, 0, 0, .05); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo.sketch { background: none; }
.card-photo.sketch img { width: 70%; height: 82%; object-fit: contain; }
.card-title { font-size: 22px; line-height: 1.1; }
.card-specs { font-size: 14px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); }
.price { font: 26px/1.15 var(--marker); color: var(--red-text); }
.badge { position: absolute; top: 8px; left: 0; padding: 2px 10px; background: var(--ink); color: var(--cream); font-size: 14px; text-transform: uppercase; transform: rotate(-4deg); }
.badge-wear { top: auto; bottom: 8px; }
.empty { margin: 8px 0 20px; font-size: 20px; }
.fine-print { margin: 0; font-size: 17px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 15px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 250, 235, .15);
  color: var(--ink);
  font-size: 18px;
  text-decoration: none;
}
.chips a span { font-size: 15px; color: var(--ink-soft); }
.chips a[aria-current=page] { background: var(--ink); color: var(--cream); }
.chips a[aria-current=page] span { color: var(--cream); }

.crumbs { margin: 0 0 10px; }
.crumbs a { color: var(--ink-soft); }
.detail { display: grid; gap: 22px; }
@media (min-width: 860px) { .detail { grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: start; } }
.gallery-main { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border: 2.5px solid var(--ink); border-radius: 4px; background: rgba(0, 0, 0, .06); cursor: zoom-in; }
/* Every listing photo shows cropped to the same shape, centred; the pop-up shows it whole. */
.gallery-main img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.gallery-main.sketch { background: none; }
.gallery-main.sketch img { width: 45%; height: auto; }
.gallery-more { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery-more img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); border-radius: 3px; }
.gallery .fine { margin-top: 6px; }
.detail-info { container-type: inline-size; }
.detail-info .title { margin-bottom: 8px; }
.specs { margin: 0 0 4px; }
.price-big { margin: 0 0 10px; font-size: 42px; }
.notice { padding: 8px 12px; border-left: 5px solid var(--red); background: rgba(255, 245, 230, .55); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 0 0 10px; }
.facts div { display: flex; gap: 6px; }
.facts dt { color: var(--ink-soft); }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; }
.description { white-space: pre-line; }

.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 4px; }
.pill-fb { gap: 8px; background: #1b5fc9; }
.pill-light { background: transparent; color: var(--ink); border: 2px solid var(--ink); }

/* A reference is read out on the phone: a plain monospace, never the marker (its 1s, 0s and Ds blur) */
.ref strong, .ticket-head .ref, .spam-head .ref { font-family: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, "Roboto Mono", monospace; font-weight: 700; }
.ref strong { font-size: 28px; line-height: 1.1; letter-spacing: .08em; color: var(--red-text); white-space: nowrap; }

/* ---------- footer ---------- */
.footer {
  padding-top: 4px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  color: var(--cream);
}
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.footer-family { margin: 4px 0 0; font: 600 13px/1.3 var(--plain); letter-spacing: .08em; text-transform: uppercase; color: #e9c9a0; }
.footer-legal { margin: 14px 0 0; font: 14px/1.5 var(--plain); color: #d6c3a0; }
.footer-brand { color: var(--cream); font: 22px/1 var(--marker); text-transform: uppercase; text-decoration: none; }
.footer-line { margin: 0; display: flex; flex-wrap: wrap; font: 15px/1.5 var(--plain); }
.footer-line { gap: 2px 16px; }
@media (min-width: 700px) {
  .footer-line { gap: 0; }
  .footer-line > * + *::before { content: "·"; margin: 0 8px; color: #b9a582; }
}
.footer a { color: var(--cream); }

/* ---------- admin ---------- */
.inbox { display: grid; gap: 16px; }
.ticket {
  scroll-margin-top: 96px;
  padding: 12px 14px 14px;
  border: 2.5px solid var(--ink);
  border-left-width: 9px;
  border-radius: 4px;
  background: rgba(255, 250, 235, .22);
}
.ticket.kind-repair { border-left-color: var(--red); }
.ticket.kind-sell { border-left-color: var(--green); }
.ticket.kind-buy { border-left-color: var(--blue); }
.ticket:target { box-shadow: 0 0 0 4px var(--focus); }
.ticket-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 16px; }
.ticket-head .kind { font: 19px/1.1 var(--marker); text-transform: uppercase; }
.ticket-head .ref { letter-spacing: .05em; }
.ticket-head .when { color: var(--ink-soft); }
.ticket-head .status { margin-left: auto; padding: 0 10px; border: 2px solid var(--ink); border-radius: 999px; font-size: 14px; text-transform: uppercase; }
.ticket-head .status.unverified,
.status-new .ticket-head .status.unverified { border: 2px dashed var(--ink-soft); background: transparent; color: var(--ink-soft); }
.find-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.find-ref label { font-size: 16px; }
.find-ref input { width: 10em !important; min-height: 44px !important; text-transform: uppercase; }
.spam-list { list-style: none; margin: 0 0 18px; padding: 0; }
.spam-row { padding: 10px 0; border-bottom: 2px dashed rgba(29, 23, 20, .3); }
.spam-row p { margin: 0 0 4px; overflow-wrap: anywhere; }
.spam-head { font-size: 18px; }
.spam-why-line { color: var(--red-text); font-size: 16px; }
.spam-said { color: var(--ink-soft); font-size: 16px; }
.spam-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ticket-photos-wrap > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 16px; }
.spam-why p { margin: 0 0 8px; }
.status-new .ticket-head .status { border-color: var(--red); background: var(--red); color: #fff; }
.who { margin: 8px 0 0; font-size: 23px; }
.reach { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 8px; }
.contact { font-size: 20px; margin-right: 4px; }
.pill { display: inline-flex; align-items: center; min-height: 42px; padding: 4px 18px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 17px; text-decoration: none; }
.consent-tag { font-size: 15px; padding: 2px 10px; border-radius: 999px; border: 2px solid; }
.consent-tag.yes { color: var(--green); border-color: var(--green); }
.consent-tag.no { color: var(--red-text); border-color: var(--red); }
.meet { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; }
.meet .pill { min-height: 36px; padding: 2px 14px; }
.replies-block { margin-top: 12px; padding-top: 10px; border-top: 2.5px solid var(--ink); }
.replies { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.replies li { padding: 6px 10px; border-left: 4px solid var(--blue); background: rgba(255, 250, 235, .35); }
.replies li.reply-failed { border-left-color: var(--red); }
.replies p { margin: 0; }
.replies .label { font-size: 15px; }
.reply label { display: block; font: 18px/1.2 var(--marker); text-transform: uppercase; margin-bottom: 4px; }
.reply textarea { min-height: 110px; font-size: 18px; }
.reply-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.reply-actions .btn { flex: 1 1 160px; }
.ticket-device { margin-top: 8px; padding-top: 8px; border-top: 1.5px dashed rgba(29, 23, 20, .4); }
.ticket-device p, .wants { margin: 2px 0; }
.label { color: var(--ink-soft); }
.ticket-photos { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-photos a { display: block; width: 96px; height: 96px; overflow: hidden; border: 2px solid var(--ink); border-radius: 3px; }
.ticket-photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ticket-photos .file { display: grid; place-items: center; height: 100%; color: var(--ink); font-size: 14px; text-align: center; }
.ticket-notes { margin-top: 12px; }
.ticket-notes label { display: block; font-size: 16px; color: var(--ink-soft); }
.ticket-notes textarea { min-height: 60px; font-size: 17px; }
.ticket-notes button { margin-top: 6px; }
.ticket-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.push-right { margin-left: auto; }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

.admin-listings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.admin-listings a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  grid-template-areas: "thumb text price" "thumb text state";
  align-items: center;
  gap: 0 12px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: rgba(255, 250, 235, .18);
  color: var(--ink);
  text-decoration: none;
}
.admin-listings .thumb { grid-area: thumb; display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 3px; background: rgba(0, 0, 0, .05); }
.admin-listings .thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-listings .thumb.sketch img { width: 80%; height: 80%; object-fit: contain; }
.admin-listing-text { grid-area: text; display: flex; flex-direction: column; min-width: 0; }
.admin-listing-text strong { font-size: 20px; font-weight: 400; }
.admin-listing-text span { font-size: 15px; color: var(--ink-soft); }
.admin-listing-text .needs { color: var(--red-text); }
.admin-listings .price { grid-area: price; text-align: right; font-size: 22px; }
.admin-listings .state { grid-area: state; text-align: right; font-size: 14px; text-transform: uppercase; }
.admin-listings .status-sold a, .admin-listings .status-hidden a { opacity: .6; }
.radio, .check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-right: 16px; cursor: pointer; }
.radio input, .check input { width: 22px; height: 22px; accent-color: var(--red); }
.status-pick .radio { display: flex; margin: 0; }
.status-pick small { font-size: 15px; color: var(--ink-soft); }
.edit-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.edit-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); border-radius: 3px; }
.edit-photos label { display: flex; min-height: 38px; margin: 0; font-size: 16px; }
.danger-zone { margin-top: 26px; text-align: right; }

/* ---------- terms ---------- */
.terms-page h2 { margin: 26px 0 8px; font: 700 24px/1.15 var(--heading); text-transform: uppercase; scroll-margin-top: 90px; }
.terms-page ul { margin: 0; padding-left: 22px; }
.terms-page li { margin: 0 0 8px; }
.terms-toc { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 4px; font-size: 17px; }
.footer-legal a { color: #e9d7b6; }
.terms-dialog { width: min(620px, calc(100% - 24px)); max-height: 88vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.terms-dialog::backdrop { background: rgba(20, 10, 4, .72); }
.terms-dialog .sheet { max-height: 88vh; overflow: auto; padding: 28px 22px 22px; }
.terms-points { margin: 0 0 10px; padding: 0; list-style: none; }
.terms-points li { position: relative; margin: 0 0 9px; padding-left: 28px; font-size: 18px; line-height: 1.3; }
.terms-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M2 12.5l6 6.5L22 2.5' fill='none' stroke='%23b30d2a' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.dialog-actions {
  position: sticky;
  bottom: -22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
  padding: 10px 0 14px;
  background: var(--paper) url(/img/paper.webp);
  box-shadow: 0 -8px 10px -6px rgba(90, 55, 20, .35);
}
.dialog-actions .btn { flex: 1 1 160px; }

/* ---------- inbox additions ---------- */
.ticket-head .status.spam { border-color: var(--red); color: var(--red-text); }
.sent-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; padding: 8px 10px; border: 2px dashed var(--blue); }
.sent-check[hidden] { display: none !important; }
.sent-check p { margin: 0; flex: 1 1 100%; font-weight: 700; }
.notes-state { font-size: 15px; color: var(--ink-soft); margin-left: 6px; }
.reach a.contact { color: var(--ink); }

/* ---------- name / phone / texting / email ---------- */
.contact-grid { display: grid; gap: 0 14px; grid-template-areas: "name" "phone" "consent" "email"; }
.contact-grid > .f-name { grid-area: name; }
.contact-grid > .f-phone { grid-area: phone; }
.contact-grid > .sms-consent { grid-area: consent; margin-top: -4px; }
.contact-grid > .f-email { grid-area: email; }
@container (min-width: 440px) {
  .contact-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "name phone" "email consent"; align-items: start; }
}
.sms-consent .check.consent { font-size: 16px; }

/* ---------- device photos: pop-up viewer ---------- */
.zoom-badge { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(29, 23, 20, .72); color: #fff; }
.gallery-more a { display: block; cursor: zoom-in; }
.card-photo img { object-position: center; }
html:has(dialog[open]) { overflow: hidden; }
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 9, 6, .96);
  color: #f3e9d4;
}
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(14, 9, 6, .96); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: 18px; }
.lightbox-close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0 0 4px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font: 34px/1 var(--hand);
  cursor: pointer;
}
.lightbox-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 0 8px; }
.lightbox-stage img {
  max-width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
}
.lightbox.zoomed .lightbox-stage { place-items: start; overflow: auto; }
.lightbox.zoomed .lightbox-stage img { max-width: none; max-height: none; margin: auto; cursor: zoom-out; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0 0 6px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font: 40px/1 var(--hand);
  transform: translateY(-50%);
  cursor: pointer;
}
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox.zoomed .lightbox-nav, .lightbox.zoomed .lightbox-hint { display: none; }
.lightbox-hint { margin: 6px 0 14px; text-align: center; font-size: 16px; color: #cdbb98; }

/* ---------- "Want it?": Messenger beside the form's button ---------- */
.submit-row .or { flex: 1 1 100%; margin: -6px 0; text-align: center; color: var(--ink-soft); font-size: 17px; }
.btn-fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 260px;
  max-width: 420px;
  min-height: 56px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #1b5fc9;
  color: #fff;
  font-family: var(--marker);
  font-size: 19px;
  text-transform: uppercase;
  text-decoration: none;
}
.btn-fb:hover { background: #164fa8; }
.btn-fb:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.touch-only { display: none; }
@media (pointer: coarse) { .touch-only { display: inline; } .mouse-only { display: none; } }
.ticket-photos a[data-lightbox] { cursor: zoom-in; }

/* ---------- what a device needs to be to sell it ---------- */
.sell-reqs { margin: -6px 0 18px; padding: 10px 14px 12px; border: 2px dashed var(--green); border-radius: 4px; background: rgba(255, 250, 235, .2); }
.sell-reqs.left { text-align: left; margin: 10px 0 18px; }
.sell-reqs.after-form { margin: 20px 0 0; }
.sell-reqs-title { margin: 0 0 6px; font: 400 17px/1.2 var(--marker); text-transform: uppercase; color: var(--green); }
.checks-plain { list-style: none; margin: 0; padding: 0; }
.checks-plain li { position: relative; margin: 0 0 4px; padding-left: 26px; font-size: 17px; line-height: 1.3; }
.checks-plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M2 12.5l6 6.5L22 2.5' fill='none' stroke='%233f7d34' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- staff: devices for sale list, with select and delete ---------- */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.bulk-bar .check { margin: 0; padding-left: 10px; }
.danger-ghost { border-color: var(--red); color: var(--red-text); }
.danger-ghost:disabled { opacity: .45; cursor: not-allowed; }
.admin-listings li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px; }
.admin-listings li.selected a { border-color: var(--red); background: rgba(179, 13, 42, .07); }
.row-check { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.row-check input { width: 22px; height: 22px; accent-color: var(--red); }
.row-delete {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--red-text);
  cursor: pointer;
}
.row-delete:hover { border-color: var(--red); background: rgba(179, 13, 42, .07); }
@media (max-width: 480px) {
  .admin-listings li { gap: 0; }
  .admin-listings a { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 0 8px; padding: 6px 8px; }
  .admin-listings .thumb { width: 50px; height: 50px; }
  .admin-listings .price { font-size: 19px; }
  .admin-listing-text strong { font-size: 18px; }
  .row-check { width: 34px; }
  .row-delete { width: 40px; }
}

/* ---------- the site's own "are you sure?" ---------- */
.confirm-dialog { width: min(440px, calc(100% - 32px)); }
.confirm-dialog .sheet { padding: 26px 22px 6px; }
.confirm-text { margin: 0 0 4px; font-size: 20px; line-height: 1.35; }

/* ---------- search-friendly copy ---------- */
.hero-title { line-height: 1.1; }
.hero-h1 { display: block; margin: 6px 0 0; font: 400 clamp(19px, 4.6vw, 24px)/1.15 var(--marker); color: var(--red-text); text-transform: uppercase; letter-spacing: .01em; }
.areas { margin: 14px 0 0; font-size: 16px; color: var(--ink-soft); line-height: 1.4; }
.areas strong { color: var(--ink); }
.faq { display: grid; gap: 10px; }
.faq details { border: 2px solid var(--ink); border-radius: var(--sketch-radius); background: rgba(255, 250, 235, .16); }
.faq summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font: 26px/1 var(--marker); color: var(--red-text); }
.faq details[open] summary::after { content: "–"; }
.faq summary h3 { margin: 0; font: 400 19px/1.25 var(--hand); font-weight: 700; }
.faq details p { margin: 0; padding: 0 14px 14px; font-size: 18px; }
@media (min-width: 900px) { .faq { grid-template-columns: 1fr 1fr; align-items: start; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 0; font: 15px/1.6 var(--plain); }
.footer-links a { color: var(--cream); }

/* ---------- service pages (/phone-screen-repair, ...) ---------- */
/* A job's flat price, stamped beside its facts; the console page's list of jobs, by console. */
.price-stamp { flex: none; display: inline-flex; flex-direction: column; align-items: center; margin: 4px 6px 14px; padding: 6px 18px 8px; font-size: 40px; transform: rotate(-3deg); }
/* Wider screens: the heading and its icon or price stay on one row (the heading wraps instead). */
@media (min-width: 760px) {
  .service-title-row { flex-wrap: nowrap; align-items: center; }
  .service-title-row .title { flex: 0 1 auto; min-width: 0; }
  .service-title-row .price-stamp { margin-left: auto; }
}
.price-stamp span { font: 16px/1.1 var(--hand); letter-spacing: .04em; color: var(--ink-soft); }
.job-groups { display: grid; gap: 14px 28px; }
@media (min-width: 760px) { .job-groups { grid-template-columns: 1fr 1fr; } }
.job-group h3 { margin: 0 0 8px; font: 700 22px/1.15 var(--heading); text-transform: uppercase; }
.job-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.job-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  background: rgba(255, 250, 235, .3);
  color: var(--ink);
  font-size: 20px;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s;
}
.job-links a:hover { transform: translateY(-2px); box-shadow: 2px 3px 0 rgba(40, 25, 10, .25); }
.job-price { flex: none; font: 20px/1 var(--marker); color: var(--red-text); }
.crumbs span[aria-hidden] { margin: 0 4px; color: var(--ink-soft); }
.crumbs [aria-current] { color: var(--ink); }
.service-facts { margin: 14px 0 0; }
.service-list { columns: 1; }
.service-list li { text-transform: none; font-size: 18px; }
@media (min-width: 700px) { .service-list { columns: 2; } }
.service-cta { margin: 18px 0 0; }
.service-note { margin: 16px 0 0; }
.service-how { margin-top: 26px; }
.good h3 { margin: 0 0 6px; font: 700 19px/1.2 var(--heading); color: var(--red-text); text-transform: uppercase; }
.good h3 .num { margin-right: 4px; }
.more-links { margin: 22px 0 0; }
.more-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }
.more-links a { display: inline-block; padding: 6px 0; font-size: 18px; }
.checks li a { color: inherit; text-decoration-color: var(--red); }

/* ---------- listings ---------- */
.devices-lede { margin: 0 0 16px; font-size: 18px; }
.promise { margin: 14px 0 18px; padding: 8px 12px; border: 2px dashed var(--green); border-radius: 4px; font-size: 17px; background: rgba(255, 250, 235, .2); }

/* ---------- languages ---------- */
/* The switch to the other language: a small outlined tag at the end of the nav, so it reads as "language", not a page. */
.nav a.lang-switch { margin-left: 4px; padding: 4px 2px; font-size: 14px; } /* the link keeps the 44px tap height; the pill is drawn inside */
.lang-switch .pill-tag { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px 1px 6px; border: 2px solid var(--ink);
  border-radius: 999px; background: rgba(255, 252, 240, .55); }
/* Each language wears its country's colors: Mexico for Español, the US for English (red on hover: both flags have it). */
.lang-switch[data-lang="es"] .pill-tag { border-color: #006847; }
.lang-switch[data-lang="en"] .pill-tag { border-color: #0a3161; }
.nav a.lang-switch:hover { text-decoration: none; color: var(--red-text); }
.nav a.lang-switch:hover .pill-tag { border-color: #ce1126; }
/* The little flags, drawn in CSS (flag emoji don't show on Windows). */
.flag { display: inline-block; flex: none; width: 18px; height: 12px; border-radius: 2px; vertical-align: -1px;
  box-shadow: 0 0 0 1px rgba(29, 23, 20, .4); }
.flag-mx { background: radial-gradient(circle, #8b5a2b 0 1.5px, transparent 2px),
  linear-gradient(90deg, #006847 0 33.4%, #fff 33.4% 66.6%, #ce1126 66.6%); }
.flag-us { background: linear-gradient(#0a3161, #0a3161) 0 0 / 45% 54% no-repeat,
  repeating-linear-gradient(#b22234 0 calc(100% / 7), #fff calc(100% / 7) calc(200% / 7)); } /* 7 bands: red top and bottom */
.footer-lang .flag { margin-right: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Spanish pages on phones: "English" just under the top bar (see the media rule below). */
.lang-mini { display: none; }
/* Phones: a compact top bar, so the logo and the links fit at 360px in either language. On Spanish pages (longer words)
   the switch back to English moves to the footer; English pages keep "ES" up top, for Spanish speakers whose phone is
   set to English. */
@media (max-width: 420px) {
  .topbar-inner { padding: 6px 8px 8px; gap: 4px; }
  .brand img { height: 32px; }
  .nav a { padding: 4px; font-size: 14px; }
  .nav a.lang-switch { margin-left: 2px; padding: 4px 0; font-size: 12px; }
  .lang-switch .pill-tag { gap: 4px; padding: 1px 5px 1px 4px; }
  .lang-switch .flag { width: 15px; height: 10px; }
  html[lang^="es"] .nav a.lang-switch { display: none; }
  html[lang^="es"] .lang-mini { display: block; margin: 2px var(--gutter) -18px; text-align: right; }
  .lang-mini a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 6px; color: var(--cream); font-size: 15px;
    letter-spacing: .04em; text-transform: uppercase; }
}
/* The smallest phones (320px): Spanish links are longer, so the top bar tightens once more. */
@media (max-width: 340px) {
  .brand img { height: 28px; }
  .nav a { padding: 4px 2px; font-size: 13px; }
}
/* The "¿Prefieres español?" offer, above the top bar. */
.lang-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 14px; padding: 6px var(--gutter);
  background: var(--cream); color: var(--ink); font-size: 17px; text-align: center; }
.lang-bar p { margin: 0; }
.lang-bar a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; } /* the flag, then the underlined words */
.lang-bar .link-btn { min-height: 40px; font-size: 16px; }
/* Inbox: a request sent from the Spanish site. */
.ticket-head .lang-tag { padding: 0 8px; border: 2px solid var(--blue); border-radius: 999px; color: var(--blue); font-size: 14px; text-transform: uppercase; }

/* ---------- blog (docs/design/website-blog.md §9) ---------- */
:root { --serif: "Source Serif 4", Georgia, "Times New Roman", serif; --lift: 0 2px 0 rgba(40, 25, 10, .22), 0 10px 22px -12px rgba(40, 25, 10, .55); }
.tag {
  display: inline-block;
  padding: 1px 10px;
  border: 2px solid var(--red);
  border-radius: 999px;
  color: var(--red-text);
  font-size: 14px;
  letter-spacing: .04em;
  line-height: 1.4;
  text-transform: uppercase;
  text-decoration: none;
  background: rgba(255, 250, 235, .35);
}
a.tag:hover { background: var(--red); color: #fff; }
.tag.claude { border-color: var(--blue); color: var(--blue); }

/* Cards: a photo print on the kraft paper. The whole card is the link; it lifts on hover and the photo zooms a touch. */
.post-cards { display: grid; gap: 18px; margin: 18px 0 22px; }
@media (min-width: 620px) { .post-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .post-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.post-card { min-width: 0; }
.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 2px solid rgba(29, 23, 20, .82);
  border-radius: 6px 9px 5px 10px / 9px 5px 10px 6px;
  background: rgba(255, 251, 240, .5);
  box-shadow: var(--lift);
  color: var(--ink);
  text-decoration: none;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s;
}
.post-card-link:hover, .post-card-link:focus-visible { transform: translateY(-3px); box-shadow: 0 3px 0 rgba(40, 25, 10, .2), 0 18px 30px -14px rgba(40, 25, 10, .7); }
.post-card-photo { aspect-ratio: 16 / 10; overflow: hidden; background: rgba(60, 35, 15, .14) url(/img/logo-sm.webp) no-repeat center / 46%; border-bottom: 2px solid rgba(29, 23, 20, .82); }
.post-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.post-card-link:hover .post-card-photo img { transform: scale(1.03); }
.post-card-text { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 14px 16px; }
.post-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; color: var(--ink-soft); letter-spacing: .03em; text-transform: uppercase; }
.post-card-place::before { content: "·"; margin-right: 10px; }
.post-card-title { margin: 0; font: 700 25px/1.15 var(--heading); text-wrap: balance; overflow-wrap: break-word; }
.post-card-summary { margin: 0; font-size: 18px; line-height: 1.3; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-more { margin-top: auto; padding-top: 6px; color: var(--red-text); font: 18px/1.1 var(--marker); text-transform: uppercase; }
.post-card-more span { display: inline-block; transition: transform .2s; }
.post-card-link:hover .post-card-more span { transform: translateX(4px); }

/* The newest post: a large torn sheet, the photo beside the words (stacked on phones). */
.post-card.featured { margin: 6px 0 4px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.post-card.featured .post-card-link { border: 0; border-radius: 0; clip-path: var(--torn-b); background: var(--paper-light) url(/img/paper.webp); box-shadow: inset 0 0 40px rgba(105, 62, 20, .3); }
.post-card.featured .post-card-link:hover { transform: translateY(-2px); }
.post-card.featured .post-card-photo { border: 0; margin: 14px 14px 0; border-radius: 3px; box-shadow: 0 6px 14px -6px rgba(40, 25, 10, .6); }
.post-card.featured .post-card-text { padding: 16px 20px 24px; gap: 10px; }
.post-card.featured .post-card-title { font-size: clamp(30px, 6vw, 44px); line-height: 1.02; }
.post-card.featured .post-card-summary { -webkit-line-clamp: 4; font-size: 20px; }
@media (min-width: 860px) {
  .post-card.featured .post-card-link { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
  .post-card.featured .post-card-photo { margin: 18px 0 18px 18px; }
  .post-card.featured .post-card-text { padding: 24px 32px; }
}

/* Cards fade up as they scroll into view (site.js); never hidden without the script, never with reduced motion. */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .3, 1); }
.reveal-on [data-reveal].revealed { opacity: 1; transform: none; }
.post-cards > :nth-child(3n+2) { transition-delay: .06s; }
.post-cards > :nth-child(3n+3) { transition-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on [data-reveal] { opacity: 1; transform: none; }
  .post-card-link:hover, .post-card-link:hover .post-card-photo img, .video-facade:hover img { transform: none; }
}

.blog-empty { margin: 8px 0 20px; text-align: center; }
.blog-empty .lede { max-width: 46ch; margin: 0 auto 14px; }
.blog-pager { align-items: center; flex-wrap: wrap; }
.pager-count { font-size: 17px; color: var(--ink-soft); }
.blog-foot { margin-top: 10px; }
.feed-link { margin-left: 10px; font-size: 15px; letter-spacing: .05em; color: var(--ink-soft); }

/* ---------- a post ---------- */
.post-sheet { background: linear-gradient(rgba(252, 247, 236, .5), rgba(252, 247, 236, .5)), var(--paper) url(/img/paper.webp); }
.post { max-width: 920px; margin: 0 auto; }
.post-head { max-width: 760px; margin: 4px auto 22px; text-align: center; }
.post-kicker { margin: 0 0 12px; }
.post-title {
  margin: 0 0 14px;
  font: 700 clamp(32px, 7vw, 54px)/1.08 var(--heading);
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.post-lede { margin: 0 auto 14px; max-width: 40em; font: italic 400 21px/1.45 var(--serif); color: var(--ink-soft); text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 0; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.byline-item { display: inline-flex; align-items: center; gap: 6px; }
.byline strong { color: var(--ink); font-weight: 400; }
.ico { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.post-hero { margin: 0 0 30px; }
.post-hero img, .post-figure img {
  display: block;
  width: 100%;
  border: 1px solid rgba(29, 23, 20, .35);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 10px 26px -12px rgba(40, 25, 10, .65);
}
.post-hero a, .post-figure a { display: block; cursor: zoom-in; }
.post-hero figcaption, .post-figure figcaption, .post-video figcaption {
  margin-top: 8px;
  font: italic 15px/1.4 var(--serif);
  color: var(--ink-soft);
  text-align: center;
}

/* The body: a readable serif in a column about 68 characters wide. */
.post-body { max-width: 680px; margin: 0 auto; font: 400 19px/1.65 var(--serif); color: var(--ink); overflow-wrap: break-word; }
.post-body::after { content: ""; display: table; clear: both; }
.post-body > p { margin: 0 0 1.05em; text-wrap: pretty; }
.post-body h2, .post-body h3 { margin: 1.5em 0 .5em; font-family: var(--heading); font-weight: 700; line-height: 1.15; text-transform: uppercase; text-wrap: balance; }
.post-body h2 { font-size: 30px; }
.post-body h3 { font-size: 23px; }
.post-body a { color: var(--red-text); text-decoration-thickness: 1px; }
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body mark { padding: 0 .15em; background: linear-gradient(transparent 35%, rgba(245, 214, 70, .6) 35%, rgba(245, 214, 70, .6) 92%, transparent 92%); color: inherit; }
.post-body code { font-size: .82em; background: rgba(29, 23, 20, .08); border-radius: 3px; }
.post-body ul, .post-body ol { margin: 0 0 1.05em; padding-left: 1.4em; display: flow-root; }
.post-body li { margin: 0 0 .35em; padding-left: .2em; }
.post-body li::marker { color: var(--red); }
.post-quote { display: flow-root; margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--red); }
.post-quote blockquote { margin: 0; font: italic 400 23px/1.45 var(--serif); }
.post-quote blockquote p { margin: 0; }
.post-quote figcaption { margin-top: 8px; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.post-rule { width: 120px; height: 11px; margin: 2em auto; border: 0; background: var(--brush) no-repeat center / 100% 100%; clear: both; }
.post-figure { margin: 1.5em 0; }
.post-figure.align-center, .post-figure.align-wide { clear: both; }
/* Floats: on wider screens a left or right photo takes 45% and the words wrap around it; on phones, full width. */
@media (min-width: 700px) {
  .post-figure.align-left { float: left; width: 45%; margin: .35em 1.6em 1em 0; }
  .post-figure.align-right { float: right; width: 45%; margin: .35em 0 1em 1.6em; }
  .post-figure.align-left figcaption, .post-figure.align-right figcaption { text-align: left; }
}
/* Wide: breaks out of the text column, up to the post's full width. */
@media (min-width: 900px) {
  .post-figure.align-wide { width: min(920px, calc(100vw - 2 * var(--gutter) - 88px)); margin-left: 50%; transform: translateX(-50%); }
}

/* Videos: the thumbnail with a play button; the player loads on a tap (site.js). */
.post-video { margin: 1.6em 0; clear: both; }
.video-facade, .video-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #1a120c;
  box-shadow: 0 12px 28px -12px rgba(40, 25, 10, .7);
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .25s, transform .5s cubic-bezier(.2, .7, .3, 1); }
.video-facade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent 45%); }
.video-play {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23fff'/%3E%3C/svg%3E") no-repeat 56% 50% / 46%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  transition: transform .2s cubic-bezier(.2, .7, .3, 1);
}
.video-facade:hover .video-play, .video-facade:focus-visible .video-play { transform: scale(1.08); }
.video-facade:hover img { opacity: 1; transform: scale(1.02); }
.video-title { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 12px; color: #fff; font: 600 17px/1.3 var(--serif); text-align: left; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

/* A slim bar along the top edge shows how far through the post the reader is. */
.read-progress { position: absolute; left: calc(var(--gutter) + 6px); right: calc(var(--gutter) + 6px); bottom: -3px; height: 4px; pointer-events: none; }
@media (min-width: 1212px) { .read-progress { left: calc((100% - 1180px) / 2 + 6px); right: calc((100% - 1180px) / 2 + 6px); } }
.read-progress span { display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }

.post-translation { max-width: 680px; margin: 26px auto 0; text-align: center; }
.post-translation a { display: inline-flex; align-items: center; gap: 8px; }
.post-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; max-width: 760px; margin: 32px auto 0; padding: 16px 18px; border: 2px dashed var(--red); border-radius: 4px; text-align: center; }
.post-cta-text { margin: 0; font-size: 20px; }
.preview-ribbon { margin: 14px 0 -8px; padding: 8px 14px; background: var(--blue); color: #fff; font-size: 17px; text-align: center; border-radius: 3px; }
.preview-ribbon a { color: #fff; }

/* ---------- staff: the blog list ---------- */
.new-post { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px auto; }
.nav .nav-count { margin-left: .3em; }
.admin-group { margin: 22px 0 6px; font: 700 22px/1.15 var(--heading); text-transform: uppercase; }
.admin-group .count { font-family: var(--hand); font-size: 17px; color: var(--ink-soft); }
.admin-posts { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.admin-posts a, .admin-posts li.trashed {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 12px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: rgba(255, 250, 235, .18);
  color: var(--ink);
  text-decoration: none;
}
.admin-posts li.trashed { grid-template-columns: minmax(0, 1fr) auto; opacity: .85; }
.admin-posts .thumb { display: block; width: 64px; height: 48px; overflow: hidden; border-radius: 3px; background: rgba(0, 0, 0, .06); }
.admin-posts .thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-post-text { display: flex; flex-direction: column; min-width: 0; }
.admin-post-text strong { font-size: 20px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-post-text span { font-size: 15px; color: var(--ink-soft); }
.admin-post-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.admin-trash { margin-top: 24px; }
.admin-trash summary { cursor: pointer; }
@media (max-width: 560px) {
  .admin-posts a { grid-template-columns: 56px minmax(0, 1fr); }
  .admin-post-tags { grid-column: 2; justify-content: flex-start; }
}

/* ---------- staff: the editor ---------- */
.editor-sheet { padding-top: 18px; }
.editor-bar { position: sticky; top: 64px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 -8px 14px; padding: 8px; background: var(--paper) url(/img/paper.webp); border-bottom: 2px solid rgba(29, 23, 20, .25); }
.editor-crumbs { margin: 0; font-size: 17px; }
.editor-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.state-chip { padding: 1px 12px; border: 2px solid var(--ink); border-radius: 999px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.state-chip[data-state=live] { border-color: var(--green); background: var(--green); color: #fff; }
.state-chip[data-state=scheduled] { border-color: var(--blue); color: var(--blue); }
.state-chip.claude { border-color: var(--blue); color: var(--blue); }
/* Room for its usual words ("Unsaved changes", "Saving…"), so the bar doesn't reflow as they change under a click. */
.save-state { min-width: 17ch; font-size: 15px; color: var(--ink-soft); }
.save-state[data-kind=error], .save-state[data-kind=signedout], .save-state[data-kind=offline] { color: var(--red-text); font-weight: 700; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.claude-note { padding: 10px 14px; border-left: 5px solid var(--blue); background: rgba(189, 208, 232, .45); font-size: 18px; }
.editor-error { padding: 8px 12px; border-left: 5px solid var(--red); background: rgba(243, 216, 205, .8); }
.editor-grid { display: grid; gap: 20px; }
/* Wide screens: the settings sit beside the post and scroll with the page (no scrollbar of their own). */
@media (min-width: 1040px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
}
.editor-main { min-width: 0; }
textarea.editor-title {
  min-height: 0;
  overflow: hidden;
  padding: 6px 4px;
  border: 0;
  border-bottom: 2px dashed rgba(29, 23, 20, .3);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font: 700 clamp(28px, 5vw, 44px)/1.1 var(--heading);
  text-transform: uppercase;
  resize: none;
}
textarea.editor-title:focus { outline: none; border-bottom-color: var(--red); }
.editor-body { max-width: none; min-height: 320px; margin: 14px 0 0; padding: 6px 4px 30px; }
.editor-hint { font-size: 15px; color: var(--ink-soft); }
.add-blocks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 4px; }
.add-blocks-label { font-size: 17px; color: var(--ink-soft); }
.add-blocks .btn-ghost.small { min-height: 44px; }
.editor-body .ce-block__content, .editor-body .ce-toolbar__content { max-width: 720px; }
.editor-body .ce-paragraph { line-height: 1.65; }
.editor-body .ce-header { font-family: var(--heading); font-weight: 700; text-transform: uppercase; }
.editor-body h2.ce-header { font-size: 28px; }
.editor-body h3.ce-header { font-size: 22px; }
.editor-body .cdx-quote__text { min-height: 60px; font-style: italic; border-left: 4px solid var(--red); padding-left: 16px; }
.editor-body .cdx-input { border-color: rgba(29, 23, 20, .3); background: rgba(255, 251, 240, .5); box-shadow: none; font-family: var(--serif); }
.editor-body .ce-block.has-error { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 3px; }
.editor-side { min-width: 0; font-size: 17px; }
.editor-side .field { margin-bottom: 16px; }
.editor-side input:not([type=checkbox]):not([type=radio]):not([type=file]), .editor-side select, .editor-side textarea { min-height: 44px; font-size: 17px; }
.editor-side small { color: var(--ink-soft); }
.editor-side .count { float: right; font-size: 14px; color: var(--ink-soft); }
.suggestion { margin-top: 4px; }
.suggestion .link-btn { min-height: 32px; padding: 0 4px; font-size: 16px; }
.editor-side .hero-field { padding: 10px 12px 2px; border: 2px dashed rgba(29, 23, 20, .35); border-radius: 4px; }
.hero-field legend { padding: 0 6px; }
.hero-field label { display: block; margin: 8px 0 4px; }
.hero-pick img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; box-shadow: 0 6px 14px -8px rgba(40, 25, 10, .6); }
.hero-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.source-note, .bt-note { margin: 6px 0 0; font-size: 15px; color: var(--ink-soft); }
.bt-claude { color: var(--blue); font-weight: 700; }
.slug-row { display: flex; align-items: center; gap: 4px; }
.date-row { display: flex; align-items: center; gap: 8px; }
.date-row input { flex: 1; min-width: 0; }
.date-row .btn-ghost.small { flex: none; min-height: 44px; }
[data-date-clear] { min-height: 36px; padding: 2px 0; font-size: 16px; }
.slug-prefix { flex: none; font-size: 15px; color: var(--ink-soft); }
.editor-danger { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 16px; margin-top: 10px; text-align: left; }
/* One post, two languages (website-blog-translations.md §4): the tabs, the Spanish's empty state and notes. */
/* One row always: the state is a word or two, and never wraps the tabs under a tap (code review CR2-M3). */
.lang-tabs { display: flex; flex-wrap: nowrap; gap: 4px; margin: 0 0 14px; border-bottom: 2px solid rgba(29, 23, 20, .3); }
.lang-tabs [role=tab] { min-height: 46px; margin-bottom: -2px; padding: 6px 14px; white-space: nowrap; border: 2px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: transparent; color: var(--ink-soft); font: 700 19px var(--hand); cursor: pointer; }
.lang-tabs [role=tab][aria-selected=true] { border-color: rgba(29, 23, 20, .3); background: rgba(255, 251, 240, .7); color: var(--ink); }
.lang-tabs [role=tab]:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tab-state { margin-left: 6px; font-size: 15px; font-weight: 400; color: var(--ink-soft); }
.tab-state[data-state=todo] { color: var(--red-text); }
.tab-state[data-state=live] { color: var(--green); }
.tab-state[data-warn=true]::before { content: "⚠ "; color: var(--red-text); }
.es-empty { padding: 16px 18px; border: 2px dashed rgba(29, 23, 20, .35); border-radius: 5px; }
.es-empty .lede { margin-top: 0; }
.es-start { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.es-start .btn, .es-start .btn-ghost { min-height: 44px; }
.es-join { margin: 14px 0 0; }
.es-join select { display: block; width: 100%; min-height: 44px; margin: 4px 0 8px; }
.es-note { margin: 0 0 12px; padding: 8px 12px; border-left: 5px solid var(--blue); background: rgba(189, 208, 232, .45); }
.es-note p { margin: 0 0 6px; }
.es-note.small { font-size: 15px; }
.es-todo { margin: 0 0 12px; padding: 8px 12px; border-left: 5px solid var(--red); background: rgba(243, 216, 205, .55); font-size: 17px; }
.es-todo p { margin: 0 0 4px; }
.es-todo ul { margin: 0; padding-left: 20px; }
.es-todo .link-btn { min-height: 36px; padding: 2px 0; color: var(--ink); text-align: left; font-size: 17px; }
/* "Same in Spanish": a button of its own, on its own line, never a small link beside the long one (CR2-M5). */
.es-todo .same-btn, .publish-spanish .same-btn { display: block; min-height: 44px; margin: 4px 0 8px; }
.es-kept { margin: 0 0 12px; font-size: 16px; color: var(--ink-soft); }
.es-kept p { margin: 0 0 2px; }
.es-kept ul { margin: 0; padding-left: 20px; }
.es-kept .link-btn { min-height: 36px; padding: 2px 6px; font-size: 16px; }
.moved-note { font-size: 15px; color: var(--blue); font-weight: 700; }
.moved-note .link-btn { min-height: 36px; padding: 2px 4px; font-size: 15px; }
.shared-settings { margin: 0 0 16px; }
.shared-head { margin: 4px 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.publish-spanish { margin: 0 0 10px; padding: 8px 12px; border-left: 5px solid var(--blue); background: rgba(189, 208, 232, .35); font-size: 17px; }
.publish-spanish p { margin: 0 0 6px; }
.publish-spanish-list { margin: 0 0 6px; padding-left: 20px; }
.publish-spanish .link-btn { min-height: 36px; padding: 2px 0; color: var(--ink); text-align: left; font-size: 17px; }
.publish-spanish .link-btn.small { font-size: 15px; color: var(--blue); text-decoration: underline; }
.admin-posts .langs { font-weight: 700; }
.editor-dialog .sheet { padding: 24px 22px 6px; }
.publish-errors { margin: 0 0 10px; padding: 8px 12px 8px 30px; border-left: 5px solid var(--red); background: rgba(243, 216, 205, .7); font-size: 17px; }
.publish-errors .publish-errors-head { margin-left: -18px; list-style: none; font-weight: 700; }
.publish-errors .link-btn { min-height: 36px; padding: 2px 0; color: var(--ink); text-align: left; font-size: 17px; }
.editor-dialog .btn:disabled { background: #9a7b80; cursor: not-allowed; }
.dialog-actions.stacked { flex-direction: column; }
.dialog-actions.stacked > * { flex: none; width: 100%; }

/* The editor's photo and video blocks. */
.bt-photo, .bt-video { margin: 10px 0; padding: 10px; border: 2px dashed rgba(29, 23, 20, .28); border-radius: 5px; font-family: var(--hand); }
.bt-photo-pick { display: flex; align-items: center; justify-content: center; min-height: 120px; border-radius: 4px; background: rgba(255, 251, 240, .45); font: 20px/1.1 var(--marker); text-transform: uppercase; color: var(--red-text); cursor: pointer; }
.bt-photo-fig { margin: 0 0 8px; }
.bt-photo-fig img { display: block; max-height: 360px; margin: 0 auto; border-radius: 3px; box-shadow: 0 6px 14px -8px rgba(40, 25, 10, .6); }
/* Left and right photos float in the editor as they do on the post (700 px and up), so the words after them wrap
   around them while writing; centered and wide ones, and videos, start below any float. */
@media (min-width: 700px) {
  .editor-body .ce-block:has(> .ce-block__content > .bt-photo[data-align=left]) { float: left; width: 45%; margin: 0 1.4em .4em 0; }
  .editor-body .ce-block:has(> .ce-block__content > .bt-photo[data-align=right]) { float: right; width: 45%; margin: 0 0 .4em 1.4em; }
  .editor-body .ce-block:has(> .ce-block__content > .bt-photo[data-align=left]) > .ce-block__content,
  .editor-body .ce-block:has(> .ce-block__content > .bt-photo[data-align=right]) > .ce-block__content { max-width: none; }
  .editor-body .ce-block:has(> .ce-block__content > .bt-photo[data-align=center]),
  .editor-body .ce-block:has(> .ce-block__content > .bt-photo[data-align=wide]),
  .editor-body .ce-block:has(> .ce-block__content > .bt-video) { clear: both; }
}
.editor-body .codex-editor__redactor::after { content: ""; display: block; clear: both; }
.bt-aligns { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.bt-align { min-height: 36px; padding: 2px 12px; border: 2px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 16px var(--hand); cursor: pointer; }
.bt-align[aria-pressed=true] { background: var(--ink); color: var(--cream); }
.editor-body .bt-input { width: 100%; min-height: 40px; margin: 0 0 6px; font-size: 16px; }
.bt-video-add { display: flex; gap: 8px; }
.editor-body .bt-video-add .bt-input { margin: 0; }
.bt-video-preview { position: relative; max-width: 480px; aspect-ratio: 16 / 9; margin: 0 0 8px; overflow: hidden; border-radius: 4px; background: #1a120c; }
.bt-video-preview img { width: 100%; height: 100%; object-fit: cover; }
.bt-video-preview .video-play { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
.bt-video-title { margin: 0 0 6px; font-size: 17px; }
.bt-uploaded { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.editor-body .bt-uploaded .bt-date { width: auto; margin: 0; }

/* ---------- the spam check (docs/design/website-spam-check.md) ----------
   Google's floating badge is replaced by the "protected by reCAPTCHA" line above each protected form's send button. It's
   moved off the page and hidden, never display: none (reported to stop the check). */
.grecaptcha-badge { visibility: hidden !important; position: fixed !important; left: -10000px !important; bottom: 0 !important; }
.recaptcha-note { margin: 10px 0 0; text-align: center; font-size: 15px; }
.recaptcha-note a { color: var(--ink-soft); }
