:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #10181b;
  color: #eef3ef;
}
* { box-sizing: border-box; }
body { margin: 0; }
.heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .9rem; border-bottom: 1px solid #37484d; }
figcaption { margin-top: .75rem; color: #c1d0d1; font-size: .875rem; text-align: center; }
#install-download { margin-top: .65rem; }
#install-download label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; }
#install-download-bar { width: 100%; accent-color: #98e4b8; }
.feature-led-status { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; margin-top: .6rem; font-size: .875rem; color: #c1d0d1; }
.feature-led-status strong { margin-left: .25rem; color: #eef3ef; }
.details h2 { margin: 0; font-size: 1.4rem; }
.boot-freshness { color: #c1d0d1; font-size: .875rem; min-height: 1.25rem; }
.milestones { padding: 0; margin: .6rem 0 1rem; list-style: none; }
.milestones li, dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; border-bottom: 1px solid #37484d; padding: .74rem 0; }
.milestones strong { color: #b3e8c8; font-size: .875rem; font-weight: 650; }
.milestones .pending { color: #ffd79b; }
details { margin: 1.1rem 0 1.6rem; }
summary { cursor: pointer; color: #b3e8c8; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #18272b; border-left: .2rem solid #89dbae; padding: 1rem; color: #d9f6e4; }
dl { margin: .45rem 0; }
dt { color: #c1d0d1; }
dd { margin: 0; }

.guest-ip { margin: .5rem 0 0; font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 650; }
.guest-ip strong { font-family: ui-monospace, monospace; color: #baf1cd; }

.boot-events { margin: 1.75rem 0; }
#boot-events-status { color: #c1d0d1; font-size: .875rem; margin: .45rem 0; }
#boot-events-list { list-style: none; max-block-size: min(17rem, 45vh); overflow: auto; margin: .65rem 0 0; padding: 0 .75rem; border: 1px solid #37484d; border-radius: .55rem; background: #18272b; }
#boot-events-list:focus-visible { outline: 2px solid #b3e8c8; outline-offset: 2px; }
#boot-events-list li { display: grid; grid-template-columns: minmax(0, max-content) 1fr; column-gap: .75rem; align-items: baseline; padding: .55rem 0; font-size: .875rem; }
#boot-events-list li + li { border-top: 1px solid #37484d; }
#boot-events-list time { color: #b4c6c8; font-variant-numeric: tabular-nums; }
@media (max-width: 31rem) { #boot-events-list li { grid-template-columns: 1fr; row-gap: .22rem; } }

main { max-width: 68rem; margin-inline: auto; padding: clamp(.65rem, 2dvh, 2rem) clamp(.65rem, 3vw, 2rem); }
.heading { align-items: center; margin-bottom: clamp(.5rem, 2dvh, 1.5rem); padding-bottom: .65rem; }
h1 { font-size: clamp(1.45rem, 3.5vmin, 2.65rem); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.toolbar button { border: 1px solid #52746f; border-radius: .45rem; background: #25383c; color: inherit; padding: .45rem .65rem; font: inherit; }
#poe[aria-pressed="true"] { color: #b3e8c8; }
#phone-status { flex-basis: 100%; margin: 0; font-size: .78rem; color: #c1d0d1; }
.workspace { display: block; }
/* The face and all hit targets share the same artwork coordinate system. */
.phone {
  width: min(100%, 64rem, max(23rem, calc((100dvh - 9rem) * 1.333)));
  margin: 0 auto;
}
.handset-view {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1448 / 1086;
  background: url("/desk-phone-7962-front.webp") center / 100% 100% no-repeat;
}
.lcd-shell {
  position: absolute;
  left: 41.23%;
  top: 20.07%;
  width: 30.99%;
  height: 27.76%;
  border-radius: 1.1% / 1.5%;
  overflow: hidden;
}
#live-lcd { display: block; width: 100%; height: 100%; }
#live-lcd[hidden] { display: none; }
.face button, .handset {
  position: absolute;
  z-index: 1;
  appearance: none;
  padding: 0;
  border: 0;
  border-radius: 35%;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.face button {
  left: var(--left);
  top: var(--top);
  width: var(--width);
  height: var(--height);
  transition: background-color 90ms, box-shadow 90ms;
}
.face button:disabled, .handset:disabled { cursor: default; opacity: 1; }
.face button:is(.held, :active:not(:disabled)) {
  background: #07101363;
  box-shadow: inset 0 0 0 2px #b3e8c888;
}
button:focus-visible { outline: 2px solid #a4f1d1; outline-offset: 2px; }
.handset {
  left: 12.16%; top: 4.37%; width: 18.34%; height: 81.68%;
  z-index: 2;
  overflow: visible;
}
.handset::before, .handset::after {
  position: absolute;
  content: "";
  inset: 0;
  pointer-events: none;
  clip-path: polygon(9% 4%, 26% 1%, 68% 0%, 91% 3%, 98% 8%, 95% 17%, 86% 29%, 81% 44%, 82% 62%, 93% 79%, 96% 92%, 93% 97%, 79% 100%, 18% 100%, 5% 96%, 1% 87%, 3% 68%, 6% 44%, 5% 23%);
}
.handset::before { opacity: 0; background: linear-gradient(115deg, #293238, #10191c); }
.handset::after {
  z-index: 1;
  visibility: hidden;
  background: url("/desk-phone-7962-front.webp") 14.89% 23.85% / 545.26% 122.43% no-repeat;
  transition: transform 240ms ease;
}
.handset[aria-pressed="true"]::before { opacity: 1; }
.handset[aria-pressed="true"]::after { visibility: visible; transform: translate(-17%, -3%) rotate(-8deg); }
.handset span {
  position: absolute; z-index: 2;
  left: 43%; top: 7%; width: 7%; height: 10%;
  border-radius: 80%; pointer-events: none;
  transform: rotate(6deg);
}
.handset[aria-pressed="true"] span { transform: translate(-245%, -31%) rotate(-2deg); }
.face i {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  pointer-events: none;
  transition: background-color 110ms, box-shadow 110ms;
}
.line-keys i { inset: 13%; }
.line-keys [data-line-led="1"] { inset: 0 5%; background: #565e61; box-shadow: inset 0 0 0 1px #2a3438; }
.face [data-line-led][data-indicator="active"] { background: #83ffad; box-shadow: 0 0 .5rem #83ffad; }
[data-feature-led][data-indicator="green"] { --lamp: #83ffad; }
[data-feature-led][data-indicator="amber"] { --lamp: #ffc25c; }
[data-feature-led][data-indicator="red"] { --lamp: #ff757d; }
[data-feature-led]:is([data-indicator="green"], [data-indicator="amber"], [data-indicator="red"]) {
  background: color-mix(in srgb, var(--lamp) 67%, transparent);
  box-shadow: 0 0 .55rem var(--lamp);
}
.details { max-width: 48rem; margin: 1.25rem auto; border: 1px solid #37484d; border-radius: .5rem; }
.details > summary { padding: .65rem .85rem; }
.diagnostics { padding: .25rem .85rem .85rem; }
.feature-led-status { justify-content: start; margin-bottom: .8rem; }

@media (max-width: 36rem) {
  .heading { gap: .35rem; }
  .phone { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .face button, .handset::after, [data-feature-led] { transition: none; }
}
#audio-status { color: #c1d0d1; font-size: .78rem; }

/* Touch targets measured against the 1448 × 1086 handset artwork. */
[data-key="line1"] { --left: 79.4890%; --top: 23.2965%; --width: 2.9006%; --height: 3.1308%; }
[data-key="line2"] { --left: 75.7597%; --top: 26.4273%; --width: 2.9006%; --height: 3.1308%; }
[data-key="line3"] { --left: 79.4890%; --top: 29.4659%; --width: 2.9006%; --height: 3.1308%; }
[data-key="line4"] { --left: 75.7597%; --top: 32.5967%; --width: 2.9006%; --height: 3.1308%; }
[data-key="line5"] { --left: 79.4890%; --top: 35.6354%; --width: 2.9006%; --height: 3.1308%; }
[data-key="line6"] { --left: 75.7597%; --top: 38.7661%; --width: 2.9006%; --height: 3.1308%; }
[data-key="soft1"] { --left: 43.1975%; --top: 49.9540%; --width: 4.4890%; --height: 3.9595%; }
[data-key="soft2"] { --left: 50.7942%; --top: 49.9540%; --width: 4.4890%; --height: 3.9595%; }
[data-key="soft3"] { --left: 58.3909%; --top: 49.9540%; --width: 4.4890%; --height: 3.9595%; }
[data-key="soft4"] { --left: 65.9185%; --top: 49.9540%; --width: 4.4890%; --height: 3.9595%; }
[data-key="1"] { --left: 36.1188%; --top: 59.1621%; --width: 5.2486%; --height: 6.5378%; }
[data-key="2"] { --left: 42.3343%; --top: 59.1621%; --width: 5.2486%; --height: 6.5378%; }
[data-key="3"] { --left: 48.5497%; --top: 59.1621%; --width: 5.2486%; --height: 6.5378%; }
[data-key="4"] { --left: 36.1188%; --top: 65.9761%; --width: 5.2486%; --height: 6.5378%; }
[data-key="5"] { --left: 42.3343%; --top: 65.9761%; --width: 5.2486%; --height: 6.5378%; }
[data-key="6"] { --left: 48.5497%; --top: 65.9761%; --width: 5.2486%; --height: 6.5378%; }
[data-key="7"] { --left: 36.1188%; --top: 72.7901%; --width: 5.2486%; --height: 6.5378%; }
[data-key="8"] { --left: 42.3343%; --top: 72.7901%; --width: 5.2486%; --height: 6.5378%; }
[data-key="9"] { --left: 48.5497%; --top: 72.7901%; --width: 5.2486%; --height: 6.5378%; }
[data-key="*"] { --left: 36.1188%; --top: 79.6041%; --width: 5.2486%; --height: 6.5378%; }
[data-key="0"] { --left: 42.3343%; --top: 79.6041%; --width: 5.2486%; --height: 6.5378%; }
[data-key="#"] { --left: 48.5497%; --top: 79.6041%; --width: 5.2486%; --height: 6.5378%; }
[data-key="messages"] { --left: 68.5083%; --top: 59.6225%; --width: 7.3204%; --height: 4.6961%; }
[data-key="directory"] { --left: 77.9696%; --top: 59.6225%; --width: 7.3204%; --height: 4.6961%; }
[data-key="services"] { --left: 68.5083%; --top: 65.6077%; --width: 7.3204%; --height: 4.6961%; }
[data-key="settings"] { --left: 77.9696%; --top: 65.6077%; --width: 7.3204%; --height: 4.6961%; }
[data-key="help"] { --left: 75.2762%; --top: 62.7993%; --width: 3.3149%; --height: 4.4199%; }
[data-key="up"] { --left: 58.4945%; --top: 55.2947%; --width: 4.5580%; --height: 6.1694%; }
[data-key="down"] { --left: 58.4945%; --top: 61.6483%; --width: 4.5580%; --height: 6.1694%; }
[data-key="volume_down"] { --left: 70.9945%; --top: 73.6188%; --width: 5.8011%; --height: 4.3278%; }
[data-key="volume_up"] { --left: 76.8646%; --top: 73.6188%; --width: 5.8011%; --height: 4.3278%; }
[data-key="headset"] { --left: 68.0939%; --top: 80.2026%; --width: 3.7293%; --height: 4.9724%; }
[data-key="mute"] { --left: 74.7928%; --top: 80.2026%; --width: 3.7293%; --height: 4.9724%; }
[data-key="speaker"] { --left: 81.4227%; --top: 80.2026%; --width: 3.7293%; --height: 4.9724%; }

.portal-tabs { display: flex; gap: .4rem; margin-bottom: .65rem; }
.portal-tabs button, .configuration-panel :is(button, select) {
  font: inherit;
  color: inherit;
  background: #25383c;
  border: 1px solid #52746f;
  border-radius: .45rem;
  padding: .42rem .65rem;
}
.portal-tabs [aria-selected="true"] { background: #36524e; color: #b3e8c8; }
.configuration-panel { max-width: 36rem; margin: 1.5rem auto; padding: 1rem; border: 1px solid #37484d; border-radius: .55rem; }
.configuration-panel h2 { margin: 0; font-size: 1.3rem; }
.configuration-panel form { display: grid; grid-template-columns: 1fr auto; gap: .65rem; }
.configuration-panel :is(p, label) { grid-column: 1 / -1; margin: 0; }
.configuration-panel p { color: #c1d0d1; font-size: .875rem; }
.configuration-panel select { min-width: 0; }
.configuration-panel :disabled { opacity: .65; }
#configuration-status:empty { display: none; }
#phone-panel[hidden], #configuration-panel[hidden] { display: none; }
