/* The ROS 2 cheat sheet, landing page.
   One white screen, one form. Type: Fraunces (the sheet adds IBM Plex Mono). One accent: turtlesim blue.
   Colours and sizes live in :root. The desktop layout is fixed to the viewport (no scrolling);
   phones and short windows fall back to a normal scrolling column, see the media queries at the end. */

@font-face{font-family:"Fraunces";src:url(fonts/Fraunces.woff) format("woff");font-weight:100 900;font-style:normal;font-display:swap}

:root{
  --paper:#ffffff;
  --ink:#000000;
  --mute:#5c5c58;
  --rule:#d2d2cd;
  --soft:#f1f1ee;
  --blue:#4556ff;
  --blue-deep:#2d3bd1;
  --red:#b3261e;
  --gutter:clamp(24px, 4vw, 72px);
  --vpad:clamp(18px, 3vh, 36px);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
html{background:var(--paper);-webkit-text-size-adjust:100%}
body{font-family:"Fraunces",Georgia,"Times New Roman",serif;font-optical-sizing:auto;color:var(--ink);background:var(--paper);font-size:clamp(15px, 0.95vw + 0.6vh, 17.5px);line-height:1.45;-webkit-font-smoothing:antialiased;font-feature-settings:"lnum" 1;overflow:hidden}
a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.15em}
a:hover{color:var(--blue-deep)}
:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
img{display:block;max-width:100%;height:auto}
b{font-weight:600}
small{font-weight:400;color:var(--mute)}

/* ---- the screen: header row, then two columns that share the rest ---- */
.screen{height:100dvh;display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);column-gap:clamp(32px, 5vw, 96px);row-gap:clamp(16px, 3vh, 40px);padding:var(--vpad) var(--gutter)}

.top{grid-column:1 / -1;display:flex;justify-content:space-between;align-items:center;gap:24px}
.who{display:inline-flex;align-items:center;gap:10px;text-decoration:none;font-weight:600;font-size:1em}
.who img{width:30px;height:30px;object-fit:cover;border:1px solid var(--ink)}
.who:hover{color:inherit}
.who:hover span{text-decoration:underline}
.top nav{display:flex;gap:clamp(14px, 1.8vw, 26px)}
.top nav a{font-size:.94em;text-decoration:none;color:var(--mute)}
.top nav a:hover{color:var(--ink);text-decoration:underline}

/* ---- left: what it is, what it is not, the sheet ---- */
.say{display:flex;flex-direction:column;min-height:0}
h1{font-size:clamp(34px, 2.4vw + 1.6vh, 56px);font-weight:500;letter-spacing:-.015em;line-height:1;font-variation-settings:"opsz" 144;margin-bottom:clamp(10px, 1.6vh, 18px)}
.lead{max-width:36em;color:#1c1c1a}
.honest{display:grid;grid-template-columns:1fr 1fr;gap:clamp(12px, 2vh, 20px) clamp(16px, 2vw, 28px);margin-top:clamp(12px, 2.2vh, 24px);padding-top:clamp(10px, 1.8vh, 18px);border-top:1px solid var(--ink)}
.honest dt{font-weight:600;margin-bottom:.25em}
.honest dd{font-size:.92em;line-height:1.42;color:#1c1c1a}
.sheet{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;margin-top:clamp(14px, 2.6vh, 28px)}
.sheet a{flex:1 1 auto;min-height:0;display:block;text-decoration:none}
.sheet img{height:100%;width:auto;max-width:100%;object-fit:contain;object-position:left top;border:1px solid var(--ink)}
.sheet a:hover img{border-color:var(--blue)}
.sheet figcaption{margin-top:8px;font-size:.84em;color:var(--mute)}

/* ---- right: the form ---- */
/* Auto margins centre the form when it fits and let the column scroll when it does not
   (the workshop block makes it taller). The 4px padding keeps focus rings from being clipped. */
.ask{display:flex;flex-direction:column;min-height:0;overflow-y:auto;padding:4px;margin:-4px}
.ask > *{margin-top:auto;margin-bottom:auto}
.ask h2{font-size:clamp(22px, 1.3vw + 0.8vh, 28px);font-weight:500;letter-spacing:-.01em;line-height:1.1;margin-bottom:4px}
.hint{color:var(--mute);font-size:.92em;margin-bottom:clamp(14px, 2.4vh, 24px)}
.field{display:block;border:0;margin-bottom:clamp(10px, 1.9vh, 18px)}
.label{display:block;font-weight:600;font-size:.92em;margin-bottom:6px}
.label small{font-size:.9em;margin-left:4px}
legend.label{margin-bottom:8px}
input[type=text],input[type=email],input[type=tel]{width:100%;font:inherit;font-size:1em;padding:clamp(8px, 1.3vh, 12px) 12px;border:1px solid var(--ink);border-radius:0;background:#fff;color:var(--ink);appearance:none}
input[type=text]:focus,input[type=email]:focus,input[type=tel]:focus{outline:2px solid var(--blue);outline-offset:0;border-color:var(--blue)}
input::placeholder{color:#9a9a96;opacity:1}
input[aria-invalid=true]{border-color:var(--red);outline-color:var(--red)}

.choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.choices label{display:flex;gap:10px;align-items:center;padding:clamp(7px, 1.1vh, 10px) 11px;border:1px solid var(--rule);cursor:pointer;font-size:.92em;line-height:1.3;background:#fff}
.choices label:hover{border-color:var(--ink)}
.choices label:has(input:checked){border-color:var(--ink);background:var(--soft)}
.choices input,.check input{appearance:none;width:14px;height:14px;flex:0 0 14px;border:1px solid var(--ink);background:#fff;border-radius:0;cursor:pointer;margin:0}
.choices input:checked,.check input:checked{background:var(--blue);border-color:var(--blue);box-shadow:inset 0 0 0 2px #fff}
.choices input:focus-visible,.check input:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.check{display:flex;gap:12px;align-items:flex-start;margin:clamp(2px, .6vh, 6px) 0 clamp(12px, 2.2vh, 22px);cursor:pointer;font-size:.92em;line-height:1.4}
.check input{margin-top:4px}
/* Phone: one bordered box holding the country code (a real <select>, made invisible over the
   flag + code it shows) and the number. The box carries the focus ring for both. */
.phone{display:flex;align-items:stretch;border:1px solid var(--ink);background:#fff}
.phone:focus-within{outline:2px solid var(--blue);outline-offset:0;border-color:var(--blue)}
.phone:has(input[aria-invalid=true]){border-color:var(--red);outline-color:var(--red)}
.phone input[type=tel]{border:0;width:auto;flex:1 1 auto;min-width:0}
.phone input[type=tel]:focus,.phone input[aria-invalid=true]{outline:none;border:0}
.cc{position:relative;display:flex;align-items:center;gap:7px;padding:0 10px 0 12px;border-right:1px solid var(--rule);white-space:nowrap;cursor:pointer}
.cc:focus-within{background:var(--soft)}
.cc-show{display:inline-flex;align-items:center;gap:6px}
.cc-show::after{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid var(--mute);margin-left:2px}
.cc select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font:inherit}

.more{margin:0 0 clamp(12px, 2.2vh, 22px);padding-left:clamp(12px, 1.4vw, 18px);border-left:2px solid var(--blue)}
.more .field:last-child{margin-bottom:0}
legend.label{max-width:30em}
.hp{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}

button,.button{display:inline-block;font:inherit;font-size:1em;font-weight:600;padding:clamp(11px, 1.6vh, 14px) 22px;background:var(--ink);color:#fff;border:1px solid var(--ink);border-radius:0;cursor:pointer;text-decoration:none;line-height:1.2}
button:hover,.button:hover{background:var(--blue);border-color:var(--blue);color:#fff}
button:disabled{background:#8a8a86;border-color:#8a8a86;cursor:progress}
.fine{color:var(--mute);font-size:.8em;line-height:1.45;margin-top:clamp(10px, 1.6vh, 14px);max-width:34em}
.fine a{color:inherit}
.error{color:var(--red);font-size:.92em;margin:-4px 0 12px}
.done h2{margin-bottom:8px}
.done p{margin-bottom:18px;max-width:34em}
.done:focus{outline:none}

/* ---- phones, narrow windows and short windows: a normal scrolling column ---- */
@media (max-width: 880px), (max-height: 600px){
  html,body{height:auto}
  body{overflow:auto;font-size:16px}
  .screen{height:auto;min-height:100dvh;display:block;padding:20px var(--gutter) 48px}
  .top{margin-bottom:28px}
  h1{font-size:clamp(34px, 9vw, 48px)}
  .honest{grid-template-columns:1fr}
  .sheet{margin:28px 0 36px;display:block}
  .sheet a{display:block}
  .sheet img{height:auto;width:100%}
  .ask{display:block;max-width:34rem}
}
@media (max-width: 520px){
  .top{flex-wrap:wrap;gap:12px 16px}
  .choices{grid-template-columns:1fr}
}
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto !important}
}
@media print{
  body{overflow:visible}
  .ask,.top nav{display:none}
}

.check .sub{display:block;margin-top:2px;font-size:.92em}
#done-note:empty{display:none}
