/* Broke Automation: the channel's look. Blueprint blue, yellow, ink navy, paper, sticky yellow.
   The site keeps this look in dark mode on purpose, the same as the videos. */
:root {
  --ink: #0A1235; --plate: #0E1433; --blue: #2448B8; --blue-2: #2C55CC; --yellow: #FFC71F; --sticky: #FFE45C;
  --paper: #FFF8E7; --white: #F5F7FC; --red: #FF4A3D; --green: #2BD67B; --muted: #4A4F6B; --locked: #C9CCD8;
  color-scheme: light;
}
/* fonts live on this site (SIL Open Font License, see fonts/OFL.txt): nothing loads from Google */
@font-face { font-family: "Atkinson Hyperlegible"; src: url(../fonts/atkinson-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(../fonts/atkinson-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lilita One"; src: url(../fonts/lilita-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(../fonts/spacemono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(../fonts/spacemono-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--blue) url(../img/grid_tile.png) repeat; color: var(--white);
  font: 17px/1.6 "Atkinson Hyperlegible", "Trebuchet MS", system-ui, sans-serif;
}
main { flex: 1 0 auto; display: flex; flex-direction: column; }
main > .band:last-child { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 20; font-weight: 700; }
.skip:focus { left: 8px; }

/* header: small and readable, not a poster */
.mast { background: linear-gradient(180deg, var(--blue-2), #1F42AE); border-bottom: 4px solid var(--ink); }
.mast-in { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand-note { width: clamp(52px, 8vw, 92px); flex: none; transform: rotate(-4deg); filter: drop-shadow(3px 3px 0 rgba(10,18,53,.35)); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: clamp(26px, 4.6vw, 46px)/1 "Lilita One", sans-serif; color: var(--yellow); letter-spacing: .5px;
  -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); text-transform: uppercase; }
.brand-tag { font: 700 clamp(11px, 1.4vw, 14px)/1.4 "Space Mono", monospace; color: var(--white); margin-top: 6px; }
.brand-mascot { display: block; width: clamp(128px, 20vw, 212px); flex: none; }
.brand-mascot img { display: block; width: 100%; height: auto; }
/* phones: keep the tagline and the mascot with the board. The tagline breaks into two short lines,
   and the name, note and picture shrink with the screen so nothing gets squeezed */
@media (max-width: 560px) {
  .mast-in { padding: 10px 14px; gap: 10px; }
  .brand { gap: 10px; }
  .brand-note { width: clamp(44px, 12vw, 56px); }
  .brand-name { font-size: clamp(21px, 6.2vw, 28px); }
  .brand-tag { font-size: 11px; margin-top: 5px; }
  .brand-tag > span { display: block; }
  .brand-mascot { width: clamp(100px, 30vw, 150px); }
}

/* menu: one bar on computers and tablets, a Menu button on phones */
.nav { position: sticky; top: 0; z-index: 10; background: var(--plate); border-bottom: 4px solid var(--ink); }
.nav-in { max-width: 1100px; margin: 0 auto; padding: 8px 12px; display: flex; align-items: center; position: relative; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; align-items: center; }
.nav-links a, .menu-btn { font: 17px "Lilita One", sans-serif; letter-spacing: .3px; color: var(--white); text-decoration: none;
  border: 3px solid transparent; border-radius: 10px; padding: 5px 12px; background: transparent; cursor: pointer; }
.nav-links a:hover { border-color: #3A4685; }
.nav-links a[aria-current="page"] { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.nav-links .nav-fund { margin-left: auto; background: var(--sticky); color: var(--ink); border-color: var(--ink); }
.menu-btn { display: none; border-color: #3A4685; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch;
    background: var(--plate); border-bottom: 4px solid var(--ink); padding: 8px 12px 14px; }
  .nav.open .nav-links { display: flex; }
  .nav-links .nav-fund { margin-left: 0; }
}

/* page bands */
.band { padding: 32px 16px; }
.in { max-width: 1100px; margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }
.paper { background: var(--paper); color: var(--ink); border-block: 4px solid var(--ink); }
.stickyb { background: var(--sticky); color: var(--ink); border-block: 4px solid var(--ink); }
main > .band:last-child { padding-bottom: 40px; }

h1 { font: clamp(32px, 5.4vw, 50px)/1.08 "Lilita One", sans-serif; margin: 0 0 12px; color: var(--yellow);
  -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
h2 { font: clamp(23px, 3.2vw, 29px)/1.15 "Lilita One", sans-serif; margin: 0 0 10px; }
.on-blue { margin-top: 26px; }
p { margin: 0 0 12px; }
.lede { font-size: 19px; max-width: 660px; }
.label { font: 700 12px/1.4 "Space Mono", monospace; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 6px; opacity: .9; }
.paper .label, .stickyb .label { color: var(--muted); opacity: 1; }
.crumb a { color: inherit; }
.small { font-size: 15px; }
.center { text-align: center; }
.note { font-size: 15px; color: var(--muted); border-left: 4px solid var(--yellow); padding-left: 10px; }
code { font: 15px "Space Mono", monospace; background: rgba(10,18,53,.08); padding: 1px 5px; border-radius: 4px; }

/* big buttons and doors */
.btn { display: inline-block; font: 20px "Lilita One", sans-serif; color: var(--ink); background: var(--yellow); border: 4px solid var(--ink);
  border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); padding: 9px 18px; text-decoration: none; margin-top: 6px; }
.btn:hover { transform: translate(1px, 1px); box-shadow: 4px 4px 0 var(--ink); }
.btn.disabled { background: var(--locked); color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }
.doors { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 20px; }
.door { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); background: var(--yellow);
  border: 4px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); padding: 16px; font-size: 15px; }
.door:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }
.door-title { font: 25px/1.1 "Lilita One", sans-serif; }
.newest { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: center; }
.newest-photo { border: 4px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); }
@media (min-width: 760px) { .newest { grid-template-columns: 1.3fr 1fr; } }

/* build and concept cards: unlocked are bright, locked are dimmed */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 8px; }
.card { display: flex; flex-direction: column; gap: 4px; color: var(--ink); background: var(--paper); border: 4px solid var(--ink);
  border-radius: 16px; padding: 14px 16px; text-decoration: none; min-height: 150px; }
.card.unlocked { box-shadow: 6px 6px 0 var(--ink); }
.card.unlocked:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }
.card.locked { background: var(--locked); border-style: dashed; color: #4A4F6B; }
.card[hidden] { display: none; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { font: 22px/1.15 "Lilita One", sans-serif; margin-top: 4px; }
.card-meta { font-size: 15px; }
.code { font: 700 13px "Space Mono", monospace; background: var(--plate); color: var(--yellow); border-radius: 6px; padding: 1px 7px; }
.card.locked .code { background: #6B7190; color: var(--white); }
.badge { font: 700 11px "Space Mono", monospace; letter-spacing: .8px; text-transform: uppercase; border: 2px solid var(--ink); border-radius: 6px; padding: 1px 6px; }
.badge.on { background: var(--green); color: var(--ink); }
.badge.off { background: #E3E5EE; color: #4A4F6B; border-color: #6B7190; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.chip { font: 12px "Space Mono", monospace; border: 2px solid currentColor; border-radius: 6px; padding: 0 6px; background: rgba(255,255,255,.6); }
.unlock-count { font: 700 15px "Space Mono", monospace; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.filter { font: 16px "Lilita One", sans-serif; color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.filter.toggle[aria-pressed="true"] { background: var(--green); }
.showing { font: 13px "Space Mono", monospace; }
.none { font-weight: 700; margin-top: 12px; }

/* guide pages */
.meta-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.meta-strip span { font: 13px "Space Mono", monospace; background: var(--plate); color: var(--white); border: 2px solid var(--ink); border-radius: 8px; padding: 3px 9px; }
.two { display: grid; gap: 26px; grid-template-columns: 1fr; }
.two > * { min-width: 0; }
@media (min-width: 900px) { .two { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li + li { border-top: 3px dashed rgba(10,18,53,.22); margin-top: 18px; padding-top: 18px; }
.codebox { background: var(--plate); color: var(--white); border: 4px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); overflow-x: auto; margin-bottom: 14px; }
.codebox pre { margin: 0; padding: 16px 18px; font: 14.5px/1.55 "Space Mono", monospace; }
.codebox .c { color: #4FD8FF; } .codebox .k { color: var(--yellow); }
.photo { display: block; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); margin-top: 8px; }
.art { display: block; width: 100%; max-width: 560px; margin: 0 auto; }
details { border: 3px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); padding: 10px 14px; margin: 10px 0; }
summary { font: 19px "Lilita One", sans-serif; cursor: pointer; }
details p { margin: 8px 0 2px; }
.kit-groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 14px 0; }
.kit-group { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 12px 16px; }
.kit-group ul, .rules { margin: 0; padding-left: 20px; }
.kit-group li, .rules li { margin: 4px 0; }
.formcard { background: #fff; border: 4px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); padding: 16px; }
.formcard iframe { width: 100%; min-height: 760px; border: 0; }

/* tables scroll sideways on phones instead of squashing */
.tablewrap { overflow-x: auto; border-radius: 12px; box-shadow: 6px 6px 0 var(--ink); }
table { width: 100%; min-width: 560px; border-collapse: collapse; background: #fff; color: var(--ink); border: 4px solid var(--ink); font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 2px solid #E4DCC6; vertical-align: top; }
thead th { font: 18px "Lilita One", sans-serif; background: var(--plate); color: var(--white); }
tbody th { font-weight: 700; white-space: nowrap; }

/* printer fund bar */
.bar { height: 26px; border: 4px solid var(--ink); border-radius: 999px; background: #2A3570; overflow: hidden; margin: 6px 0 14px; }
.bar-fill { display: block; height: 100%; background: var(--green); min-width: 14px; border-right: 3px solid var(--ink); }
.fill-0 { width: 0; }

/* footer sits at the very bottom, with no blueprint gap under it */
.foot { background: var(--plate); border-top: 4px solid var(--ink); color: var(--white); text-align: center; font: 13px/1.6 "Space Mono", monospace; }
.foot-in { max-width: 1100px; margin: 0 auto; padding: 20px 16px 24px; }
.foot p { margin: 0 0 8px; }
.foot-links a { margin: 0 8px; }
.foot-sign { font: 18px "Lilita One", sans-serif; color: var(--yellow); }
.foot-copy { opacity: .7; margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .btn:hover, .door:hover, .card.unlocked:hover { transform: none; } }
