/* POLY5's install page: a wizard, one step at a time, beside the FM-1's screen as it will look (on top of site/site.css) */
.inst-page { min-height: 100vh; background:
  radial-gradient(900px 520px at 22% 38%, rgba(106,168,240,.10), transparent 70%),
  radial-gradient(700px 480px at 30% 70%, rgba(216,144,168,.08), transparent 70%), var(--ground); }
.inst-top { display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(18px, 4vw, 44px); }
.inst-top .logo { font-size: 24px; font-weight: 700; text-decoration: none; letter-spacing: -0.02em; }
.inst-back { color: var(--dim); text-decoration: none; font-size: 15px; }
.inst-back:hover { color: var(--cream); }
.inst-main { padding: clamp(10px, 3vw, 36px) clamp(18px, 4vw, 44px) 80px; }
.inst-grid { max-width: 1320px; margin: 0 auto; display: grid; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (min-width: 1040px) { .inst-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; } .inst-device { position: sticky; top: 60px; } }

/* ---- the FM-1: a line drawing until it is found, then filled in, its lights and its screen on */
.inst-device { width: 100%; max-width: 620px; margin: 0 auto; }
.dev { position: relative; aspect-ratio: 1760 / 1072; }
.dev > img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .7s ease, filter .7s ease; }
.dev-outline { opacity: .75; }
.dev-on { opacity: 0; border-radius: 3.8% / 6.2%; }
.dev:not([data-state="idle"]) .dev-on { opacity: 1; filter: drop-shadow(0 30px 60px rgba(0,0,0,.6)) drop-shadow(0 0 50px rgba(240,160,48,.10)); }
.dev:not([data-state="idle"]) .dev-outline { opacity: 0; }
.dev[data-state="idle"] .dev-outline { animation: dev-wait 2.6s ease-in-out infinite; }
@keyframes dev-wait { 50% { opacity: .4; } }
/* its screen: 372 of 1760 wide, at 481, 101 */
.dev-lcd { position: absolute; left: 27.33%; top: 9.42%; width: 21.14%; aspect-ratio: 1; overflow: hidden; container-type: inline-size; border-radius: 2%; }
.dev-lcd > * { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s ease; }
.dev-boot { object-fit: cover; image-rendering: pixelated; }
.dev[data-state="other"] .dev-other, .dev[data-state="update"] .dev-update, .dev[data-state="done"] .dev-boot { opacity: 1; }
.dev-other { background: #05060a; display: grid; place-content: center; justify-items: center; gap: 6cqw; font-family: "JetBrains Mono", monospace; color: var(--cream); font-size: 11cqw; text-align: center; line-height: 1.15; }
.dev-other small { font-size: 6.5cqw; color: var(--s3); letter-spacing: .1em; }
.dev-update { background: #151213; display: grid; grid-template-rows: 19cqw 5cqw 7cqw 9cqw 6cqw 14cqw 12cqw; justify-items: center; align-content: center;
  font-family: "JetBrains Mono", ui-monospace, monospace; }
.dev-name { grid-row: 1; align-self: end; font-size: 15cqw; font-weight: 600; letter-spacing: .06em; line-height: 1; }
.dev-line { grid-row: 2; display: flex; gap: 1cqw; width: 50cqw; align-self: center; }
.dev-line s { flex: 1; height: 1cqw; }
.dev-line s:nth-child(1) { background: var(--s1); } .dev-line s:nth-child(2) { background: var(--s2); } .dev-line s:nth-child(3) { background: var(--s3); }
.dev-line s:nth-child(4) { background: var(--s4); } .dev-line s:nth-child(5) { background: var(--s5); }
.dev-what { grid-row: 4; color: #EFE8E1; font-size: 7cqw; letter-spacing: .08em; }
.dev-sub { grid-row: 5; color: #A39A94; font-size: 3.4cqw; letter-spacing: .08em; }
.dev-segs { grid-row: 6; align-self: center; display: flex; gap: .8cqw; }
.dev-segs i { width: 3.4cqw; height: 4.4cqw; background: #3A3435; }
.dev-segs i.on { background: var(--amber); }
.dev-pct { grid-row: 7; color: #EFE8E1; font-size: 10cqw; line-height: 1; }
.dev-cap { text-align: center; color: var(--dim); font-size: 14px; margin: 18px 0 0; font-family: "JetBrains Mono", monospace; letter-spacing: .04em; transition: color .4s ease; }
.dev:not([data-state="idle"]) + .dev-cap { color: var(--s3); }

/* ---- the card */
.inst-card { max-width: 680px; width: 100%; }
.inst-h { color: var(--cream); font-size: clamp(36px, 5.2vw, 60px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; margin: 0 0 14px; }
.inst-lede { color: var(--text); font-size: clamp(18px, 2vw, 22px); margin: 0 0 30px; max-width: 28em; }
.tabs { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tabs li { font-size: 13px; color: var(--dim); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs i { display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 9px; transition: background .3s ease; }
.tabs li.is-done { color: var(--text); }
.tabs li.is-open { color: var(--cream); font-weight: 600; }
.tabs li:nth-child(1).is-done i, .tabs li:nth-child(1).is-open i { background: var(--s1); }
.tabs li:nth-child(2).is-done i, .tabs li:nth-child(2).is-open i { background: var(--s2); }
.tabs li:nth-child(3).is-done i, .tabs li:nth-child(3).is-open i { background: var(--s3); }
.tabs li:nth-child(4).is-done i, .tabs li:nth-child(4).is-open i { background: var(--s4); }
.tabs li:nth-child(5).is-done i, .tabs li:nth-child(5).is-open i { background: var(--s5); }
@media (max-width: 560px) { .tabs span { font-size: 0; } .tabs li.is-open span { font-size: 13px; } .tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tabs li { overflow: visible; } }

.pane { background: linear-gradient(180deg, #131724, #0f121b); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 3.4vw, 38px);
  min-height: 340px; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: pane-in .35s ease both; }
.pane[hidden] { display: none; }
@keyframes pane-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pane-h { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.02em; color: var(--cream); margin: 0 0 12px; }
.pane-p { color: var(--text); margin: 0 0 18px; max-width: 34em; }
.pane-foot { margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pane .btn { cursor: pointer; font-family: inherit; font-size: 16px; }
.pane .btn.primary { padding: 14px 26px; font-size: 17px; }
.pane .btn:disabled { opacity: .35; cursor: not-allowed; }
.pane .btn.quiet { background: none; }
.status { color: var(--cream); font-size: 18px; margin: 0 0 12px; min-height: 1.4em; }
.bad { color: var(--s2); font-weight: 500; margin: 0 0 14px; }
.warn { color: var(--amber); font-weight: 600; margin: 0; }

.browsers { list-style: none; margin: 6px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.browsers li { display: grid; gap: 4px; justify-items: center; text-align: center; border: 1px solid var(--line); border-radius: 14px; padding: 18px 8px; background: rgba(255,255,255,.015); opacity: .55; }
.browsers b { color: var(--cream); font-weight: 600; font-size: 17px; }
.browsers span { font-size: 13px; }
.browsers .yes { color: var(--s3); }
.browsers .no { color: var(--dim); }
.browsers li.is-yours { opacity: 1; border-color: var(--s1); box-shadow: 0 0 0 1px var(--s1) inset; }
.browsers li.is-yours::after { content: "Your browser"; font-size: 11px; font-family: "JetBrains Mono", monospace; letter-spacing: .06em; color: var(--s1); border: 1px solid var(--s1); border-radius: 999px; padding: 2px 9px; margin-top: 6px; }
@media (max-width: 560px) { .browsers { grid-template-columns: repeat(2, 1fr); } }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks label { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; }
.checks label:hover { background: rgba(255,255,255,.03); }
.checks input { appearance: none; -webkit-appearance: none; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--dim); margin: 1px 0 0; cursor: pointer; display: grid; place-items: center; transition: all .15s ease; }
.checks input:checked { background: var(--s3); border-color: var(--s3); }
.checks input:checked::after { content: "\2713"; color: #06140B; font-weight: 700; font-size: 15px; }
.checks input:focus-visible, .agree input:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.checks b { display: block; color: var(--cream); font-weight: 600; }
.checks small { display: block; color: var(--dim); font-size: 14.5px; margin-top: 2px; }
.checks input:checked + span b { color: var(--text); }

.agree { display: flex; gap: 12px; align-items: flex-start; color: var(--cream); cursor: pointer; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; margin: 4px 0 18px; }
.agree input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--amber); flex: none; }
.bar { height: 14px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 12px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--s1), var(--s2), var(--s3), var(--s4), var(--s5)); background-size: 680px 100%; transition: width .3s ease; }
.prog-label { font-family: "JetBrains Mono", monospace; color: var(--cream); font-size: 20px; margin: 0 0 6px; }

.pane-done { align-items: flex-start; }
.five { display: flex; gap: 10px; margin: 6px 0 22px; }
.five i { width: 34px; height: 34px; border-radius: 9px; animation: five-in .6s cubic-bezier(.2,1.4,.4,1) both; }
.five i:nth-child(1) { background: var(--s1); } .five i:nth-child(2) { background: var(--s2); animation-delay: .08s; border-radius: 50%; }
.five i:nth-child(3) { background: var(--s3); animation-delay: .16s; } .five i:nth-child(4) { background: var(--s4); animation-delay: .24s; clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.five i:nth-child(5) { background: var(--s5); animation-delay: .32s; transform: rotate(45deg); }
@keyframes five-in { from { opacity: 0; translate: 0 14px; scale: .5; } to { opacity: 1; translate: 0 0; scale: 1; } }

.help { margin: 26px 0 0; border: 1px solid var(--line); border-radius: 16px; padding: 14px 20px; }
.help summary { cursor: pointer; font-weight: 600; color: var(--cream); }
.help[open] summary { margin-bottom: 12px; }
.help ul { padding-left: 1.1em; display: grid; gap: 8px; margin: 0 0 14px; }
.inst-small { color: var(--dim); font-size: 14px; margin: 18px 0 0; }
@media (prefers-reduced-motion: reduce) { .pane, .five i, .dev[data-state="idle"] .dev-outline { animation: none; } .bar i, .dev-screen > *, .tabs i { transition: none; } }
.inst-page [hidden] { display: none !important; }
.inst-card { border: 0; padding-top: 0; }

/* ---- one screen, no scrolling: the page is as tall as the window; the steps sit in the middle */
.inst-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.inst-top { padding: 14px clamp(18px, 4vw, 44px); flex: none; }
.inst-main { flex: 1; display: flex; align-items: center; padding: 0 clamp(18px, 4vw, 44px) 18px; }
.inst-grid { width: 100%; gap: clamp(20px, 4vw, 56px); }
.inst-card .eyebrow { display: none; }
.inst-h { font-size: clamp(26px, 3.2vw, 40px); margin: 0 0 6px; }
.inst-lede { font-size: 16px; color: var(--dim); margin: 0 0 16px; }
.tabs { margin: 0 0 12px; }
.tabs i { margin-bottom: 7px; }
.pane { padding: clamp(18px, 2.4vw, 28px); min-height: 0; height: clamp(320px, 52vh, 400px); border-radius: 20px; }
.pane-h { font-size: clamp(21px, 2.4vw, 27px); margin: 0 0 8px; }
.pane-p { margin: 0 0 12px; font-size: 16px; }
.pane-foot { padding-top: 12px; }
.pane .btn.primary { padding: 12px 22px; font-size: 16px; }
.status { font-size: 16.5px; margin: 0 0 8px; }
.browsers { margin: 4px 0 14px; gap: 8px; }
.browsers li { padding: 12px 6px; }
.browsers b { font-size: 16px; }
.checks { gap: 0; }
.checks label { padding: 7px 10px; gap: 12px; }
.checks input { width: 24px; height: 24px; }
.checks b { font-size: 15.5px; }
.checks small { font-size: 13.5px; margin-top: 0; }
.agree { padding: 10px 14px; margin: 2px 0 10px; font-size: 15.5px; }
.five { margin: 2px 0 14px; }
.help { margin: 12px 0 0; padding: 9px 16px; font-size: 15px; position: relative; }
.help[open] { position: absolute; z-index: 5; background: #10131d; max-width: 620px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.inst-card { position: relative; }
.inst-small { font-size: 13px; margin: 10px 0 0; }
.dev-cap { margin: 10px 0 0; }
@media (max-width: 1039px) {   /* stacked: the device small above the steps */
  .inst-main { align-items: flex-start; }
  .inst-device { max-width: min(420px, 62vh); }
  .inst-grid { gap: 14px; }
  .pane { height: auto; min-height: 300px; }
}
@media (max-height: 700px) and (min-width: 1040px) { .inst-lede { display: none; } .pane { height: clamp(300px, 56vh, 360px); } }

/* ---- getting ready: something moves the moment Install is pressed */
.spin { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; margin-right: .55em; border-radius: 50%;
  border: 2.5px solid rgba(240,160,48,.25); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar.is-wait i { width: 32% !important; animation: bar-wait 1.3s ease-in-out infinite; }
@keyframes bar-wait { 0% { margin-left: -32%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .spin, .bar.is-wait i { animation-duration: 4s; } }

/* ---- simpler: the card has no padding of the page's sections; a step is as tall as it needs, within one screen */
.inst-card { padding: 0; }
.pane { height: auto; min-height: clamp(300px, 46vh, 360px); }
.checks label { padding: 9px 10px; }
.help { display: inline-block; border: 0; padding: 6px 2px; margin: 10px 0 0; color: var(--dim); }
.help summary { font-weight: 500; color: var(--dim); font-size: 14.5px; }
.help summary:hover { color: var(--cream); }
.help[open] { display: block; left: 0; right: 0; bottom: 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: 18px; color: var(--text); }

/* the browsers' marks (icons/, Simple Icons, CC0): one colour each, grey when it is not yours */
.b-ico { display: block; width: 38px; height: 38px; margin: 0 auto 4px; background: var(--dim); -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.b-chrome { -webkit-mask-image: url(icons/chrome.svg); mask-image: url(icons/chrome.svg); }
.b-edge { -webkit-mask-image: url(icons/edge.svg); mask-image: url(icons/edge.svg); }
.b-firefox { -webkit-mask-image: url(icons/firefox.svg); mask-image: url(icons/firefox.svg); }
.b-safari { -webkit-mask-image: url(icons/safari.svg); mask-image: url(icons/safari.svg); }
.browsers li.is-yours .b-chrome { background: #4C8BF5; } .browsers li.is-yours .b-edge { background: #2BA4E8; }
.browsers li.is-yours .b-firefox { background: #FF7139; } .browsers li.is-yours .b-safari { background: #5AC8FA; }
.browsers li { padding: 14px 6px 12px; }

/* ---- test connection: a mark that says how it stands: looking (it turns), connected (a tick), not found (a cross) */
#step-connect { align-items: center; text-align: center; }
#step-connect .pane-p, #step-connect .status, #step-connect .bad { margin-left: auto; margin-right: auto; max-width: 30em; }
#step-connect .pane-foot { align-self: stretch; }
.conn { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto 16px; position: relative; transition: background .35s ease, box-shadow .35s ease; }
.conn[data-state="look"] { border: 4px solid rgba(240,160,48,.2); border-top-color: var(--amber); animation: spin .9s linear infinite; }
.conn[data-state="ok"] { background: var(--s3); box-shadow: 0 0 0 10px rgba(125,212,152,.14), 0 0 50px rgba(125,212,152,.35); animation: conn-pop .45s cubic-bezier(.2,1.5,.4,1) both; }
.conn svg { width: 48px; height: 48px; display: none; }
.conn[data-state="ok"] .conn-ok { display: block; }
.conn[data-state="bad"] { background: rgba(240,138,112,.12); border: 3px solid var(--s2); color: var(--s2); animation: conn-pop .35s ease both; }
.conn[data-state="bad"] .conn-bad { display: block; }
@keyframes conn-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .conn[data-state="ok"] { animation: none; } }

/* the report: a quiet button beside Help; what it copied, or (no clipboard) the text to copy by hand */
.report-btn { background: none; border: 0; padding: 6px 2px; margin: 10px 0 0 18px; color: var(--dim); font: inherit; font-size: 14.5px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.report-btn:hover { color: var(--cream); }
.report-text { width: 100%; margin-top: 8px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 12px/1.5 "JetBrains Mono", monospace; }
