/* The site's other pages (the desktop agent, the player survey, the status page), on the front page's stylesheet:
   home.css brings the tokens, the type, the top bar, the buttons, the sheets and the footer; these
   are those pages' own parts, in the same vocabulary. */

/* The page fills the window, so a short page keeps its footer at the bottom. */
.page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }

/* A page's opening, on the frame like the front page's hero. */
.page-hero { background: var(--frame); padding: 72px 0 88px; }
.page-hero-in { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: end; }
.page-hero .lede { margin-top: 0; }

/* home.css gives buttons and inputs the page's type; the survey's textarea too. */
textarea { font: inherit; color: inherit; }

/* ---------- The desktop agent ---------- */
.dl__builds { padding: 56px 0 104px; }
.dl__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; min-height: 48px; }
.dl__status { font-size: 22px; font-weight: 800; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.25; max-width: 44ch; }
.dl__status:focus:not(:focus-visible) { outline: none; }
.dl__list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 24px; }
.dl__card { display: flex; flex-direction: column; padding: 24px; background: var(--paper); border: 1px solid var(--edge); border-radius: 16px; min-width: 0; }
.dl__card.is-recommended { background: var(--wash); border-color: var(--felt); box-shadow: inset 0 0 0 1px var(--felt); }
h2.dl__name { font-size: 24px; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.15; }
.dl__detail { margin: 6px 0 24px; color: var(--slate); font-size: 15px; }
.dl__card .btn { align-self: stretch; }
.dl__facts { margin-top: 12px; font-size: 12px; line-height: 1.45; color: var(--slate); overflow-wrap: anywhere; }
.dl__unsigned { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 13px; line-height: 1.45; color: var(--slate); }
.dl__soon { padding-top: 14px; border-top: 1px solid var(--hair); font-size: 16px; font-weight: 700; color: var(--slate); }

.dl__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.dl__steps { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: s; }
.dl__steps li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 8px; padding: 16px 0 18px; border-bottom: 1px solid var(--hair); }
.dl__steps li::before { content: counter(s); grid-column: 1; grid-row: 1 / 3; padding-top: 6px; font-size: 13px; font-weight: 700; color: var(--slate); }
.dl__steps b { grid-column: 2; font-size: 20px; font-weight: 800; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.3; }
.dl__steps span { grid-column: 2; color: var(--slate); font-size: 16px; }
.dl__note { margin-top: 20px; color: var(--slate); font-size: 15px; max-width: 52ch; }
.dl__panel { width: 100%; max-width: 520px; justify-self: end; }
.dl__entry { display: grid; gap: 16px; padding: 22px 24px 24px; }
.dl__entry p { font-size: 15px; }
.dl__field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--slate); }
.dl__code { height: 44px; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: .08em; }
.dl__entry .btn { justify-self: start; height: 44px; }

/* ---------- The player survey: one question at a time on a sheet ---------- */
.sv { background: var(--frame); }
.sv__body { padding: 40px 0 104px; }
.sv__sheet { max-width: 760px; margin: 0 auto; }
/* survey.js scrolls the form to the top of the window: it stops under the sticky bar, where it
   already stands at the top of the page (the bar, the band's padding, the sheet's edge). */
.sv__form, .sv__done { scroll-margin-top: 109px; }
.sv__form { display: grid; gap: 8px; padding: 28px 32px; }
.sv__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Where you are: the sheet's head. */
.sv__progress { display: grid; gap: 10px; margin: -28px -32px 16px; padding: 16px 32px 18px; border-bottom: 1px solid var(--hair); }
.sv__where { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 13px; color: var(--slate); font-weight: 500; }
.sv__where .sv__partno { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.sv__bar { height: 4px; background: var(--hair); border-radius: 2px; overflow: hidden; }
.sv__bar span { display: block; height: 100%; width: 0; background: var(--felt); transition: width .3s var(--ease); }

/* The steps: only the current one shows (survey.js marks it); before the script runs, the welcome. */
.sv__part { display: none; }
.sv__q { display: none; margin: 0; padding: 0; border: 0; min-width: 0; }
.sv__q.is-current, .sv__form:not(:has(.is-current)) .sv__welcome { display: grid; gap: 12px; align-content: start; min-height: 20rem; }
/* Floated, the legend is a plain grid item, so the gap spaces it like the rest. */
.sv__legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; font-size: clamp(1.375rem, 1rem + 1vw, 1.75rem); font-weight: 800; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.2; text-wrap: balance; }
.sv__legend:focus, .sv__legend:focus-visible { outline: none; box-shadow: none; }
h1.sv__title { font-size: clamp(2rem, 1rem + 2vw, 3.25rem); font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.02; margin-bottom: 8px; }
.sv__welcome p { max-width: 60ch; color: var(--slate); font-size: 17px; }
.sv__hint { color: var(--slate); font-size: 15px; }
.sv__note { padding: 14px 16px; background: var(--wash); border-left: 3px solid var(--felt); border-radius: 0 6px 6px 0; color: var(--felt-deep); font-size: 15px; }

/* Options: rows on the rule, like the front page's lists. */
.sv__opts { display: grid; margin-top: 4px; border-top: 1px solid var(--rule); }
.sv__opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 10px; border-bottom: 1px solid var(--hair); cursor: pointer; font-size: 16px; line-height: 1.45; transition: background-color .15s ease-out; }
.sv__opt:hover { background: var(--wash); }
.sv__opt:has(:checked) { background: var(--selected); }
.sv__opt input, .sv__choice input, .sv__scale input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--felt); cursor: pointer; }
.sv__scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.sv__scale label { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 14px 4px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); text-align: center; cursor: pointer; font-size: 13px; line-height: 1.25; color: var(--slate); transition: background-color .15s ease-out, border-color .15s ease-out; }
.sv__scale label b { color: var(--ink); font-size: 20px; font-weight: 800; font-stretch: 108%; }
.sv__scale input { margin: 0; }
.sv__choice { display: grid; gap: 10px; margin-top: 4px; }
.sv__choice label { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); cursor: pointer; color: var(--slate); font-size: 15px; line-height: 1.45; transition: background-color .15s ease-out, border-color .15s ease-out; }
.sv__choice label b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 17px; font-weight: 800; }
.sv__scale label:hover, .sv__choice label:hover { background: var(--wash); }
.sv__scale label:has(:checked), .sv__choice label:has(:checked) { background: var(--selected); border-color: var(--felt); box-shadow: inset 0 0 0 1px var(--felt); }

/* Typed answers: the front page's field. */
.sv__num { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.sv__cur { font-size: 18px; font-weight: 800; color: var(--ink); }
.sv__num input, .sv__text, .sv__email { height: 44px; border: 1px solid var(--rule); border-radius: 6px; padding: 0 12px; font-size: 16px; background: var(--paper); color: var(--ink); transition: border-color .15s ease-out; }
.sv__num input { width: 9rem; }
.sv__text { width: 100%; height: auto; min-height: 8rem; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.sv__email { width: 100%; }
.sv__num input:hover, .sv__text:hover, .sv__email:hover { border-color: var(--ink); }
.sv__num input:focus, .sv__text:focus, .sv__email:focus { border-color: var(--felt); }
.sv__email::placeholder { color: var(--rule); }
.sv__field { display: grid; gap: 6px; max-width: 28rem; font-size: 13px; font-weight: 600; color: var(--slate); }
.sv__field input { font-weight: 400; }

/* Back, next and what happened: the sheet's foot. */
.sv__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 20px -32px -28px; padding: 18px 32px 20px; border-top: 1px solid var(--rule); }
.sv__submit .btn:disabled { opacity: .6; cursor: default; }
.sv__status { flex: 1 1 14rem; min-height: 1.5em; font-size: 15px; font-weight: 600; }
.sv__status.is-error { color: var(--brick); }
/* Empty, the status takes no line of its own (it stays in place for the screen reader). */
.sv__status:empty { position: absolute; min-height: 0; }
.sv__form > noscript .sv__status { display: block; margin-top: 16px; }
.sv__done { display: grid; gap: 16px; padding: 40px 32px 44px; }
.sv__done p { color: var(--slate); font-size: 17px; max-width: 60ch; }
.sv__done:focus { outline: none; box-shadow: none; }

/* ---------- The status page: a row per service, a bar per day ---------- */
/* A quiet page: one line says how things are, and a good day is a pale bar, so only downtime draws the eye. */
.st .page-hero { padding: 56px 0 64px; }
.st .page-hero-in { grid-template-columns: 1fr; gap: 12px; }
h1.st__title { font-size: clamp(2rem, 1rem + 2vw, 3.25rem); line-height: 1.02; }
.st__checked { min-height: 1.5em; font-size: 17px; color: var(--slate); }
.st__body { padding: 32px 0 104px; border-top: 0; }
.st__msg { color: var(--slate); font-size: 16px; max-width: 60ch; }
.st__failed { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 24px; }
.st__list { list-style: none; margin: 0; padding: 0; }
.st__row { display: grid; padding: 24px 0 20px; border-bottom: 1px solid var(--hair); }
.st__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
h2.st__name { font-size: 20px; font-weight: 600; font-stretch: 100%; letter-spacing: -0.01em; line-height: 1.3; }
.st__detail { margin: 2px 0 14px; color: var(--slate); font-size: 15px; }
.st__state { flex: none; font-size: 15px; font-weight: 600; color: var(--felt); }
.st__row.is-down .st__state { color: var(--brick); }
.st__row.is-unknown .st__state { color: var(--slate); }
/* The days: height says it too, so a day with downtime reads as a dip without its colour. A bar
   is one ninetieth of the row (the page's 90 days, less the 89 gaps), so a young history starts
   at the left and grows to the full width. */
.st__bars { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.st__bars i { flex: 0 0 calc((100% - 267px) / 90); min-width: 0; height: 100%; border-radius: 2px; background: color-mix(in srgb, var(--felt) 38%, var(--paper)); transition: background-color .12s ease-out; }
.st__bars .is-some { height: 64%; background: color-mix(in srgb, var(--brick) 60%, var(--paper)); }
.st__bars .is-bad { height: 40%; background: var(--brick); }
.st__bars .is-none { height: 3px; background: var(--hair); }
.st__bars i:not(.is-none):hover { background: var(--ink); }
.st__pct { margin-top: 10px; font-size: 13px; font-weight: 600; }
.st__past { margin-top: 64px; max-width: 760px; }
.st__past h2 { font-size: 24px; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.15; margin-bottom: 12px; }
.st__outs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.st__out { display: grid; grid-template-columns: 9rem 1fr auto; gap: 2px 24px; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 15px; }
.st__out b { font-weight: 600; }
.st__out span { color: var(--slate); }
.st__out .st__len { color: var(--ink); text-align: right; }

/* ---------- The blog: a ruled sheet of the sites, then one guide per site ---------- */
.bl__mark { flex: none; border-radius: 8px; border: 1px solid var(--edge); background: var(--paper); }
.bl__hero { display: grid; gap: 20px; }
.bl__hero .lede { margin: 0; max-width: 44em; }
h1.bl__h1 { font-size: clamp(2.2rem, 1rem + 2.6vw, 4rem); line-height: 1.02; max-width: 18em; }

/* The index: per group a sheet whose rows each open their guide. */
.bl__index { padding: 64px 0 104px; }
h2.bl__group { font-size: 28px; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.15; }
.bl__group-note { margin-top: 8px; max-width: 60ch; color: var(--slate); font-size: 17px; }
.bl__sheet { margin: 24px 0 64px; overflow: hidden; }
.bl__heads, .bl__row { grid-template-columns: minmax(14rem, 1.1fr) 1fr 1fr; column-gap: 32px; }
.bl__rows { list-style: none; margin: 0; padding: 0; }
.bl__rows li + li { border-top: 1px solid var(--hair); }
.bl__row { display: grid; align-items: center; padding: 16px 24px; color: var(--ink); text-decoration: none; transition: background-color .15s ease-out; }
.bl__row:hover { background: var(--wash); color: var(--ink); }
.bl__row:focus-visible { outline: 2px solid var(--felt); outline-offset: -2px; }
.bl__site { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bl__site > span { display: grid; gap: 2px; min-width: 0; }
.bl__site b { font-size: 17px; font-weight: 600; }
.bl__row:hover .bl__site b { color: var(--felt-deep); }
.bl__site small, .bl__cell { font-size: 15px; line-height: 1.45; color: var(--slate); }
.bl__site small { font-size: 13px; }
.bl__closed { padding-top: 20px; border-top: 1px solid var(--hair); color: var(--slate); font-size: 15px; max-width: 60ch; }

/* A guide: where it sits, its title with the site's mark, the date. */
.bl__crumb { font-size: 14px; font-weight: 600; color: var(--slate); }
.bl__title { display: flex; align-items: center; gap: 20px; }
.bl__meta { font-size: 14px; color: var(--slate); }

/* How a site's hands arrive: the felt dot when the agent follows them, a hollow one when you upload. */
.bl__arrive::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--felt); vertical-align: 1px; }
.bl__arrive.is-upload::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule); }

.bl__body { display: grid; grid-template-columns: minmax(0, 46rem) minmax(12rem, 16rem); justify-content: space-between; gap: 64px; padding-top: 56px; padding-bottom: 104px; }
.bl__article { display: grid; gap: 48px; min-width: 0; }
.bl__article section { display: grid; gap: 16px; }
.bl__article section.bl__glance { display: block; }
.bl__article h2 { font-size: 28px; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.15; }
.bl__article p, .bl__notes li { font-size: 17px; line-height: 1.6; max-width: 66ch; }
.bl__article code { padding: 1px 6px; background: var(--sunk); border: 1px solid var(--hair); border-radius: 4px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .86em; overflow-wrap: anywhere; }

/* The guide's facts at a glance: four cells on a sheet, hairlines between. */
.bl__facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.bl__facts > div { display: grid; gap: 4px; padding: 16px 24px; border-top: 1px solid var(--hair); }
.bl__facts > div:nth-child(-n + 2) { border-top: 0; }
.bl__facts > div:nth-child(even) { border-left: 1px solid var(--hair); }
.bl__facts dt { font-size: 13px; color: var(--slate); }
.bl__facts dd { margin: 0; font-size: 16px; line-height: 1.45; }

.bl__steps { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: s; }
.bl__steps li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 8px; row-gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.bl__steps li::before { content: counter(s); grid-column: 1; grid-row: 1 / span 3; padding-top: 4px; font-size: 13px; font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; }
.bl__steps b { grid-column: 2; font-size: 18px; font-weight: 600; line-height: 1.4; }
.bl__steps span { grid-column: 2; color: var(--slate); font-size: 16px; line-height: 1.55; }
.bl__notes { display: grid; gap: 12px; margin: 0; padding-left: 20px; }
.bl__notes li::marker { color: var(--felt); }

.bl__aside { align-self: start; position: sticky; top: 92px; }
h2.bl__aside-title { margin-bottom: 12px; font-size: 14px; font-weight: 600; font-stretch: 100%; letter-spacing: 0; line-height: 1.3; color: var(--slate); }
.bl__others { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.bl__others a { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; transition: color .15s ease-out; }
.bl__others a:hover { color: var(--felt); }

/* ---------- Narrower windows ---------- */
@media (max-width: 1080px) {
  .bl__body { grid-template-columns: 1fr; gap: 56px; }
  .bl__aside { position: static; }
  .bl__others { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); column-gap: 24px; }
  .page-hero-in, .dl__pair { grid-template-columns: 1fr; }
  .page-hero-in { gap: 24px; }
  .dl__pair { gap: 40px; }
  .dl__panel { justify-self: start; }
}
@media (max-width: 760px) {
  .page-hero { padding: 32px 0 48px; }
  .bl__index { padding: 40px 0 64px; }
  .bl__body { padding-top: 40px; padding-bottom: 64px; }
  .bl__title { flex-direction: column; align-items: flex-start; gap: 16px; }
  .bl__heads { display: none; }
  .bl__row { grid-template-columns: 1fr; row-gap: 8px; padding: 16px; }
  .bl__cell::before { content: attr(data-head); display: block; font-size: 12px; font-weight: 600; color: var(--slate); }
  .bl__cell { padding-left: 44px; color: var(--ink); }
  .bl__facts { grid-template-columns: 1fr; }
  .bl__facts > div { padding: 16px; }
  .bl__facts > div:nth-child(2) { border-top: 1px solid var(--hair); }
  .bl__facts > div:nth-child(even) { border-left: 0; }
  .bl__title .bl__mark { width: 40px; height: 40px; }
  h2.bl__group, .bl__article h2 { font-size: 24px; }
  .dl__builds { padding: 40px 0 64px; }
  .dl__status { font-size: 19px; }
  .dl__card { padding: 20px 16px; }
  .dl__steps b { font-size: 18px; }
  .dl__entry { padding: 18px 16px 20px; }
  .sv__body { padding: 16px 0 64px; }
  .sv__form, .sv__done { scroll-margin-top: 77px; }
  .sv__form { padding: 20px 16px; }
  .sv__progress { margin: -20px -16px 12px; padding: 14px 16px 16px; }
  .sv__q.is-current, .sv__form:not(:has(.is-current)) .sv__welcome { min-height: 16rem; }
  .sv__welcome p { font-size: 16px; }
  .sv__opt { padding: 12px 8px; }
  .sv__choice label { padding: 14px; gap: 12px; }
  .sv__submit { margin: 16px -16px -20px; padding: 16px; }
  .sv__submit .btn-primary { flex: 1 1 auto; }
  .sv__done { padding: 28px 16px 32px; }
  .st .page-hero { padding: 28px 0 36px; }
  .st__checked { font-size: 16px; }
  .st__body { padding: 16px 0 64px; }
  .st__row { padding: 20px 0 18px; }
  h2.st__name { font-size: 18px; }
  /* The newest 45 days on a phone, where 90 bars would be hairlines: a 45th of the row each. */
  .st__bars { gap: 2px; }
  .st__bars i { flex-basis: calc((100% - 88px) / 45); }
  .st__bars i:nth-last-child(n+46) { display: none; }
  .st__past { margin-top: 48px; }
  .st__past h2 { font-size: 21px; }
  .st__out { grid-template-columns: 1fr auto; }
  .st__out b { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .sv__scale label span { display: none; }
  .sv__scale label:first-child span, .sv__scale label:last-child span { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .sv__bar span { transition: none; }
  .st__bars i { transition: none; }
}
