/* /settings: the touchscreen simulator and the display web page replica. Scoped to .tour. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Layout: one narrow reading column; the simulated touchscreen breaks out wide, then a plain reference of every setting.
   Page tokens follow sigbuddy.com (paper / ink / car-blue). The device keeps its own firmware palette in both themes. */
.tour {
  --bg: #E9EDF2;
  --surface: #F6F8FA;
  --fg: #101822;
  --muted: #55637A;
  --line: #C9D2DD;
  --accent: #2F5BD3;
  --chip: #FFE9B0;
  --chip-fg: #7A5000;
  --f-display: 'Archivo', system-ui, -apple-system, sans-serif;
  --f-ui: 'Archivo Narrow', 'Archivo', system-ui, sans-serif;
  --f-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  /* the device itself: firmware colours from panel_screen.c / panel_config.c */
  --d-bg: #17120E; --d-rail: #100C09; --d-rule: #453729; --d-field: #241D16;
  --d-cond: #7D6650; --d-ink: #F0E6D4; --d-dim: #9A8C79; --d-faint: #6B5F50;
  --d-solar: #F5A524; --d-batt: #4FC3A1; --d-grid: #FF7B72; --d-ev: #8FB0FF;
  --f-device: 'Montserrat', system-ui, sans-serif;
}
.tour { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.6; }
.tour .page { max-width: 1040px; margin: 0 auto; padding-inline: 20px; padding-block: 40px 72px; display: grid; gap: 40px; }
.tour .col { max-width: 68ch; }
.tour h1, .tour h2, .tour h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.2; }
.tour h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
.tour h2 { font-size: 1.45rem; font-weight: 700; }
.tour h3 { font-size: 1.05rem; font-weight: 700; }
.tour p { margin: 0; }
.tour .eyebrow { font-family: var(--f-ui); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tour .intro { display: grid; gap: 14px; }
.tour .lede { font-size: 1.1rem; color: var(--muted); }
.tour .beta { display: inline-block; font-family: var(--f-ui); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1; padding: 3px 5px; border-radius: 3px; background: var(--chip); color: var(--chip-fg); vertical-align: .15em; }
/* ---- the simulator ---- */
.tour .sim { display: grid; gap: 14px; }
.tour .sim__head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.tour .sim__hint { font-size: .95rem; color: var(--muted); min-width: 0; }
.tour .sim__hint strong { color: var(--fg); font-weight: 600; }
.tour .bezel { background: #0A0806; border-radius: 18px; padding: clamp(10px, 2.2vw, 22px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04) inset; }
.tour .viewport { position: relative; width: 100%; aspect-ratio: 800 / 480; max-width: 100%; overflow: hidden; border-radius: 4px; background: var(--d-bg); }
.tour .stage { position: absolute; left: 0; top: 0; width: 800px; height: 480px; transform-origin: 0 0; font-family: var(--f-device); color: var(--d-ink); background: var(--d-bg); user-select: none; -webkit-user-select: none; }
.tour .sim__foot { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .9rem; color: var(--muted); }
.tour .sim__reset { font: 600 .82rem var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.tour .sim__reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* device primitives, sized in device pixels (the stage is scaled as a whole) */
.tour .scr { position: absolute; inset: 0; background: var(--d-bg); }
.tour .rail { position: absolute; left: 0; top: 0; width: 800px; height: 44px; background: var(--d-rail); border-bottom: 1px solid var(--d-rule); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; box-sizing: border-box; font-size: 20px; letter-spacing: 3px; color: var(--d-faint); }
.tour .rail .mid { position: absolute; left: 50%; transform: translateX(-50%); letter-spacing: 1px; color: var(--d-dim); }
.tour .rail .brand { color: var(--d-solar); letter-spacing: 1px; }
.tour .lbl { position: absolute; font-size: 20px; letter-spacing: 3px; color: var(--d-faint); white-space: nowrap; }
.tour .val { position: absolute; font-size: 28px; white-space: nowrap; }
.tour .d-btn { position: absolute; box-sizing: border-box; background: var(--d-field); border: 2px solid var(--d-ink); color: var(--d-ink); font: 500 24px/1 var(--f-device); letter-spacing: 1px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tour .d-btn:active, .tour .key:active { background: var(--d-rule); }
.tour .d-btn:focus-visible, .tour .key:focus-visible, .tour .hit:focus-visible { outline: 3px solid var(--d-ev); outline-offset: 2px; }
.tour .dim-overlay { position: absolute; inset: 0; background: rgba(23,18,14,.9); display: flex; align-items: center; justify-content: center; }
.tour .d-card { position: relative; box-sizing: border-box; background: var(--d-rail); border: 1px solid var(--d-rule); padding: 28px; }
.tour .status { position: absolute; font-size: 20px; line-height: 1.35; white-space: normal; }
/* dashboard (an SVG in the stage) */
.tour .dash text { font-family: var(--f-device); }
.tour .t-lbl { font-size: 20px; letter-spacing: 3px; fill: var(--d-ink); }
.tour .t-big { font-size: 56px; font-weight: 500; }
.tour .t-unit { font-size: 24px; }
.tour .t-sub { font-size: 20px; letter-spacing: 2px; }
.tour .wire { stroke: var(--d-cond); stroke-width: 4; fill: none; }
.tour .flow { stroke-width: 4; fill: none; stroke-dasharray: 3 15; stroke-linecap: round; opacity: 0; }
.tour .flow.on { opacity: 1; animation: run .9s linear infinite; }
.tour .flow.rev { animation-direction: reverse; }
@keyframes run { to { stroke-dashoffset: -18; } }
@media (prefers-reduced-motion: reduce) {.tour .flow.on { animation: none; }
 }
.tour .hit { cursor: pointer; }
/* keypad and keyboard */
.tour .keys { position: absolute; display: grid; gap: 8px; }
.tour .key { box-sizing: border-box; background: var(--d-field); border: 1px solid var(--d-rule); color: var(--d-ink); font: 500 26px/1 var(--f-device); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tour .ta { position: absolute; box-sizing: border-box; background: var(--d-field); border: 2px solid var(--d-rule); font-size: 28px; padding: 0 14px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.tour .ta .ph { color: var(--d-faint); }
.tour .caret { display: inline-block; width: 2px; height: 30px; background: var(--d-solar); margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tour .netrow { position: absolute; left: 24px; width: 752px; height: 60px; box-sizing: border-box; border-bottom: 1px solid var(--d-rule); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 26px; cursor: pointer; background: transparent; color: var(--d-ink); border-top: 0; border-left: 0; border-right: 0; font-family: var(--f-device); }
.tour .netrow:active { background: var(--d-field); }
.tour .bars { font-size: 20px; color: var(--d-dim); letter-spacing: 2px; }
/* ---- the reference ---- */
.tour .ref { display: grid; gap: 28px; }
.tour .groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tour .group { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.tour .group h3 { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tour .where { font: 600 .74rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tour dl { margin: 0; display: grid; gap: 10px; }
.tour dt { font-weight: 600; }
.tour dd { margin: 0; color: var(--muted); font-size: .95rem; }
.tour .note { font-size: .95rem; color: var(--muted); }
/* ---- second half: the display's web page ---- */
.tour .web { display: grid; gap: 28px; }
.tour .web__grid { display: grid; gap: 32px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) {.tour .web__grid { grid-template-columns: 380px minmax(0, 1fr); }
 }
.tour .phone { width: 100%; max-width: 380px; justify-self: center; background: #0A0806; border-radius: 34px; padding: 14px; box-sizing: border-box; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.tour .phone__bar { display: flex; align-items: center; gap: 8px; background: #241D16; color: #9A8C79; font: 500 .8rem var(--f-body); border-radius: 18px 18px 0 0; padding: 10px 14px; }
.tour .phone__bar .url { flex: 1; min-width: 0; background: #100C09; border-radius: 8px; padding: 5px 10px; color: #F0E6D4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour .webpage { height: 620px; overflow-y: auto; border-radius: 0 0 22px 22px; background: #17120E; color: #F0E6D4; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; padding: 24px; line-height: 1.5; box-sizing: border-box; }
.tour .webpage h1 { font-size: 20px; letter-spacing: .08em; text-transform: uppercase; color: #F5A524; margin: 0 0 4px; font-family: inherit; }
.tour .webpage p { color: #9A8C79; margin: 0 0 20px; font-size: 14px; }
.tour .webpage a { color: #F5A524; }
.tour .webpage .wcard { border: 1px solid #33291F; border-radius: 8px; padding: 20px; margin-bottom: 24px; }
.tour .webpage h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #F5A524; margin: 0 0 14px; font-family: inherit; }
.tour .webpage dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; margin: 0 0 24px; }
.tour .webpage dt { color: #9A8C79; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; align-self: center; font-weight: 400; }
.tour .webpage dd { margin: 0; color: #F0E6D4; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tour .webpage input[type=text] { width: 100%; box-sizing: border-box; padding: 12px; font-size: 16px; background: #100C09; color: #F0E6D4; border: 1px solid #33291F; border-radius: 6px; }
.tour .webpage select { width: 100%; box-sizing: border-box; padding: 12px; font-size: 16px; background: #100C09; color: #F0E6D4; border: 1px solid #33291F; border-radius: 6px; font-family: inherit; }
.tour .webpage label { display: block; margin: 14px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9A8C79; }
.tour .webpage .file { width: 100%; box-sizing: border-box; padding: 12px; font-size: 15px; background: #100C09; color: #9A8C79; border: 1px solid #33291F; border-radius: 6px; cursor: pointer; text-align: left; font-family: inherit; }
.tour .webpage button.go { width: 100%; margin-top: 16px; padding: 14px; font-size: 16px; font-weight: 600; background: #4FC3A1; color: #100C09; border: 0; border-radius: 6px; cursor: pointer; font-family: inherit; }
.tour .webpage button.go:disabled { opacity: .5; cursor: default; }
.tour .webpage button.alt { background: #241D16; color: #F0E6D4; }
.tour .webpage .row { display: flex; gap: 12px; }
.tour .webpage .row button.go { margin-top: 12px; }
.tour .webpage .msg { margin-top: 14px; font-size: 14px; min-height: 20px; color: #F0E6D4; }
.tour .webpage .bar { height: 8px; background: #100C09; border-radius: 4px; margin-top: 20px; overflow: hidden; }
.tour .webpage .fill { height: 100%; width: 0; background: #F5A524; transition: width .15s; }
.tour .webpage .fine { margin-top: 24px; font-size: 12px; color: #9A8C79; }
.tour .webpage button:focus-visible, .tour .webpage input:focus-visible { outline: 2px solid #F5A524; outline-offset: 2px; }
.tour .pretend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; font-size: .9rem; color: var(--muted); }
.tour .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.tour .seg button { font: 600 .8rem var(--f-ui); letter-spacing: .08em; background: none; border: 0; color: var(--muted); padding: 6px 12px; cursor: pointer; }
.tour .seg button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.tour .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tour .up-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
.tour .up-steps li::marker { font-family: var(--f-display); font-weight: 700; color: var(--accent); }
.tour .explain { display: grid; gap: 22px; min-width: 0; }
.tour .explain section { display: grid; gap: 10px; }
.tour .facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.tour .fact { border-top: 2px solid var(--line); padding-top: 10px; display: grid; gap: 4px; }
.tour .fact strong { font-family: var(--f-display); }
.tour .fact span { color: var(--muted); font-size: .95rem; }
.tour .stack { display: grid; gap: 10px; }
.tour .phonecol { display: grid; gap: 12px; justify-items: center; min-width: 0; }
.tour .dash--abs { position: absolute; left: 0; top: 0; }
.tour .webpage p.byhand { margin: 24px 0 8px; }

