@font-face {
  font-family: 'Device Raleway';
  src: url('assets/fw/Raleway-Regular.ttf?v=de90cc4f') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
:root {
  color-scheme: light;
  --page: #f0f3f1;
  --paper: #fcfdfc;
  --ink: #1d2825;
  --muted: #546661;
  --line: #cbd6d1;
  --accent: #205743;
  --soft: #e6eee9;
  --ui-font: 'Device Raleway', 'Segoe UI', system-ui, sans-serif;
  font: 15px/1.5 var(--ui-font);
}
body { margin: 0; min-width: 290px; color: var(--ink); background: var(--page) }
a { color: inherit; text-decoration: none }
button, select, input { font: inherit; color: inherit }
button, select { border: 1px solid var(--line); border-radius: 7px; background: var(--paper); min-height: 36px }
button { cursor: pointer; padding: 6px 12px }
button:hover:enabled { color: var(--accent); background: var(--soft); border-color: #9bad9e }
button:disabled, select:disabled, input:disabled { opacity: .46; cursor: default }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #21834f; outline-offset: 3px }
h1,h2,p,ol,dl,dd { margin: 0 }
.shell { max-width: 1512px; margin-inline: auto; padding-inline: clamp(14px, 3.2vw, 48px) }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line) }
.masthead-inner { min-height: 75px; display: flex; align-items: center; gap: 25px; padding-block: 9px }
.brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto }
.brand strong { display: block; font-size: 15px; line-height: 1.2; letter-spacing: .065em }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px }
.brand-mark { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; background: #204c3e; position: relative; color: #e9f4ed }
.brand-mark::before { content: ''; position: absolute; inset: 9px 7px 12px; border: 1.5px solid currentColor; border-radius: 3px }
.brand-mark::after { content: ''; position: absolute; bottom: 8px; width: 12px; height: 1.5px; background: currentColor; left: 13px }
.tabs { display: flex; align-items: center; gap: 3px; border-radius: 8px; padding: 3px; background: #e8edea; flex: 0 0 auto }
.tabs a { padding: 7px 14px; border-radius: 5px; font-size: 13px; font-weight: 650; color: #465953 }
.tabs a:hover { color: var(--accent) }
.tabs a[aria-current] { color: #173c2d; background: var(--paper); box-shadow: 0 1px 3px #26443a21 }
.version { font-size: 12px; color: var(--muted); flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px }
.version:hover, .version[aria-current] { color: #204c3e }
.version span, .device-activity > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #4b8a64 }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(242px,285px); gap: clamp(19px, 3vw, 44px); padding-top: clamp(22px, 4vw, 57px); padding-bottom: 42px }
.monitor-workspace { min-width: 0 }
.workspace-header { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap }
.eyebrow { font-size: 11px; letter-spacing: .05em; color: var(--muted); font-weight: 600 }
.monitor-route { margin-top: 5px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere }
h1 { font-size: clamp(25px, 3.6vw, 43px); letter-spacing: -.045em; line-height: 1.13; margin-top: 3px; text-wrap: balance }
.screen-actions { display: flex; gap: 6px; flex: 0 0 auto }
.quiet { font-size: 13px; background: #f8faf8 }
.quiet span { margin-right: 3px }
.device { border-radius: clamp(12px, 1.5vw, 23px); padding: clamp(6px, 1.15vw, 17px); background: linear-gradient(165deg, #303837 0, #151b1b 48%, #242e2b 100%); border: 1px solid #43504b; box-shadow: 0 15px 34px #2b453227, 0 3px 4px #213b2d26; }
.screen-frame { border: 1px solid #0c1110; padding: clamp(2px, .4vw, 5px); background: #131918; border-radius: clamp(5px, .75vw, 10px) }
.viewport { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1024 / 600; overflow: hidden; border-radius: clamp(3px,.5vw,5px); background: #0c1415 }
.is-actual-size .device { width: 100%; max-width: calc(var(--monitor-width, 1024px) + 52px); margin-inline: auto }
.is-actual-size .screen-frame { overflow-x: auto; container-type: inline-size }
.is-actual-size .screen-frame:focus-visible { outline: 2px solid #76be92; outline-offset: 3px }
.is-actual-size .viewport { width: var(--monitor-width, 1024px); height: var(--monitor-height, 600px); aspect-ratio: auto; margin-inline: auto }
.monitor-display { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 100%; height: 100% }
.viewport canvas { display: block; width: 100%; height: 100%; object-fit: contain }
.hotspots { position: absolute; inset: 0; pointer-events: none }
.monitor-key { position: absolute; display: block; min-height: 0; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 5px; pointer-events: auto; outline-offset: -2px; touch-action: manipulation }
.monitor-key:hover:enabled, .monitor-key:focus-visible { background: #e1ffe32c; border-color: #447a64; box-shadow: 0 0 0 1px #effbeb8c }
.monitor-key.is-pressed { background: #d3ffd595 !important; border-color: #174e34 !important; box-shadow: inset 0 0 0 1.5px #f4fff5, 0 0 0 1px #184e35b8 !important }
.monitor-key.has-value { display: grid; align-items: end; justify-items: center }
.monitor-value { position: relative; z-index: 1; display: block; max-width: 100%; padding: 1px 5px; border-radius: 4px; background: #f0fff2; color: #143a28; box-shadow: 0 0 0 1px #397855a1; font: 650 clamp(7px, 1.05vw, 13px)/1.15 var(--ui-font); text-overflow: ellipsis; overflow: hidden; white-space: nowrap; pointer-events: none }
.is-actual-size .monitor-value { color: #171a20; background: #f3f5f4; box-shadow: none; font-size: 18px; font-weight: 400 }
.monitor-key[data-choice="true"].has-value { align-items: center }
.monitor-key[data-choice="true"] .monitor-value { padding: 0 2px }
.show-hitboxes .monitor-key { border-color: #507b67c7; background: #effff124; }
.show-hitboxes .monitor-key:hover { background: #ebffea58 }
.monitor-loading, .wake-screen { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #e8f1ed; background: #172321; padding: 18px }
.monitor-loading { z-index: 4; font-size: 13px }
.wake-screen { z-index: 3; border: none; border-radius: 0; background: radial-gradient(ellipse at 50% 32%, #1d2b28 0%, #0c1312 68%) }
.wake-screen:hover:enabled { color: #eef9f4; background: #1a2c28 }
.wake-copy { display: grid }
.wake-copy > span { font-size: 12px; color: #b6c8c0 }
.wake-screen strong { font-size: clamp(15px, 2.5vw, 25px); font-weight: 520 }
.is-actual-size .wake-copy { max-width: calc(100cqw - 16px); padding: 12px 16px; border-radius: 6px; color: #171a20; background: #f3f5f4 }
.is-actual-size .wake-copy :is(span, strong) { color: inherit; font-size: 18px; font-weight: 400 }
.is-actual-size .monitor-loading { font-size: 18px; font-weight: 400; color: #171a20; background: #f3f5f4 }
.monitor-dialog { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: #101b1a7d; padding: 8px }
.dialog-card { display: grid; gap: 10px; max-width: min(94%, 365px); max-height: 96%; overflow-y: auto; min-width: min(220px,90%); padding: clamp(10px,2.4vw,24px); background: #f9fcfa; border: 1px solid #b8c5bd; border-radius: 10px; box-shadow: 0 8px 26px #18292569 }
.is-actual-size .dialog-card { max-width: min(94%, 365px, calc(100cqw - 16px)); min-width: min(220px, calc(100cqw - 16px)); padding: 24px; color: #171a20; font-size: 18px; font-weight: 400 }
.dialog-options { display: grid; gap: 5px }
.dialog-options button { text-align: left; }
.dialog-options button[aria-pressed="true"] { border-color: #497c61; background: #e2f0e5 }
.setting-form { display: grid; gap: 8px; }
.setting-form label { display: grid; gap: 4px; color: var(--muted); font-size: 12px }
.setting-form input:not([type="checkbox"]), .setting-form select { min-width: 0; width: 100%; padding: 6px 8px; min-height: 34px; border: 1px solid var(--line); background: white; border-radius: 6px; color: var(--ink); }
.setting-form input[type="range"] { border: 0; background: transparent; padding: 0; accent-color: var(--accent) }
.setting-apply { background: var(--accent); color: white; border-color: var(--accent); justify-self: start }
.setting-apply:hover:enabled { background: #173c2d; color: white }
.is-actual-size .dialog-card :is(h2, label, input, select, button) { color: inherit; font-size: inherit; font-weight: inherit }
.is-actual-size .dialog-card .setting-apply { background: #e2f0e5; border-color: #497c61; color: inherit }
.is-actual-size .dialog-card .setting-apply:hover:enabled { background: #d3e8d9 }
.device-bar { color: #cdd8d3; display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 9px 3px 0; min-height: 27px }
.device-name { font-size: 11px; font-weight: 700; opacity: .72 }
.device-activity { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; white-space: nowrap }
.device-activity > span:first-child { background: #83b995; }
.device.is-off .device-activity > span:first-child { background: #cea379 }
.workbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; color: var(--muted); margin-top: 13px; flex-wrap: wrap; font-size: 12px }
.check { display: flex; gap: 7px; align-items: center; font-weight: 500; cursor: pointer }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent) }
.workbar p { max-width: 70%; }
.control-rail { align-self: start; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); min-width: 0 }
.rail-section { padding: 16px; border-bottom: 1px solid #e0e7e2 }
.rail-section:last-child { border-bottom: none }
.rail-section h2 { font-size: 14px; font-weight: 700; line-height: 1.35; margin-bottom: 9px }
.scenario-actions { display: grid; gap: 5px }
.scenario-actions button { min-height: 37px; display: flex; justify-content: space-between; gap: 5px; align-items: center; text-align: left; font-size: 13px; padding: 5px 8px }
.scenario-actions span { color: var(--accent); font-size: 13px }
.status-list { display: grid; gap: 3px; margin-top: 12px; font-size: 12px }
.status-list div { display: flex; justify-content: space-between; gap: 10px }
.status-list dt { color: var(--muted) }
.status-list dd { font-weight: 600; text-align: right }
.settings { display: grid; gap: 7px; font-size: 12px }
.settings h2 { margin-bottom: 1px }
.settings label:not(.check) { display: grid; gap: 3px; color: var(--muted) }
.settings select { width: 100%; padding: 4px 6px; color: var(--ink); font-size: 13px }
.settings .check { margin-top: 4px }
.settings a { width: fit-content; color: var(--accent); font-weight: 600; }
.settings a:hover { text-decoration: underline }
.event-log { list-style: none; display: grid; gap: 5px; padding: 0; font-size: 12px }
.event-log li { border-bottom: 1px solid #e5ebe7; padding-bottom: 4px; overflow-wrap: anywhere }
.event-log li:last-child { border-bottom: 0; padding-bottom: 0 }
.event-log .empty { color: var(--muted) }
#monitor-controls summary { display: block; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer }
#monitor-controls summary::after { content: ' +'; color: var(--accent); float: right }
#monitor-controls[open] summary::after { content: ' −' }
#monitor-control-count { color: var(--muted); margin-left: 6px; font-size: 12px; font-weight: 500 }
.control-list { list-style: none; display: grid; gap: 4px; padding: 0; margin-top: 9px; max-height: 280px; overflow: auto }
.control-list button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 7px; min-height: 30px; text-align: left; font-size: 12px; overflow-wrap: anywhere }
.control-list button.is-pressed { border-color: #447a64; background: #e1f3e5 }
.control-list .value { color: var(--accent); font-size: 11px; font-weight: 650; max-width: 55% }
.control-list .empty { color: var(--muted); font-size: 12px }
@media (max-width: 1490px) {
  .workspace.is-actual-size { grid-template-columns: minmax(0, 1fr) }
}
@media (931px <= width <= 1490px) {
  .is-actual-size .control-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .is-actual-size .rail-section { border-right: 1px solid #e0e7e2; border-bottom: 0 }
  .is-actual-size .rail-section:nth-child(2n) { border-right: 0 }
  .is-actual-size .rail-section:nth-child(-n + 2) { border-bottom: 1px solid #e0e7e2 }
}
@media (max-width: 930px) {
  .workspace { grid-template-columns: minmax(0,1fr); gap: 22px }
  .control-rail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) }
  .rail-section { border-right: 1px solid #e0e7e2; border-bottom: 0 }
  .rail-section:nth-child(2n) { border-right: 0 }
  .rail-section:nth-child(-n + 2) { border-bottom: 1px solid #e0e7e2 }
}
@media (max-width: 630px) {
  .masthead-inner { min-height: 70px; gap: 7px; flex-wrap: wrap }
  .tabs a { padding: 6px 8px; font-size: 12px }
  .brand { gap: 6px }
  .brand strong { font-size: 13px }
  .brand small { font-size: 10px }
  .brand-mark { transform: scale(.79); margin-left: -3px; margin-right: -1px }
  .control-rail { grid-template-columns: minmax(0,1fr) }
  .rail-section { border-bottom: 1px solid #e0e7e2; border-right: none }
  .workbar p { max-width: 100%; }
}
