:root {
  --bg: #0f1216;
  --surface: #171b21;
  --border: #2a313b;
  --text: #e8ebf0;
  --muted: #9aa3b0;
  --accent: #ff8a1f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.layout {
  display: grid;
  grid-template-columns: auto minmax(0, 560px);
  gap: 48px;
  justify-content: center;
  align-items: start;
  padding: 40px 24px;
}

.device-col { display: grid; justify-items: center; gap: 14px; position: sticky; top: 24px; }

.device {
  padding: 12px;
  border-radius: 44px;
  background: #050608;
  border: 2px solid #323a45;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.55);
}
.device iframe { display: block; border: 0; border-radius: 32px; background: #000; }
.device[data-orientation="portrait"] iframe { width: 360px; height: 740px; }
.device[data-orientation="landscape"] iframe { width: 740px; height: 360px; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
button {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 34px;
  padding: 0 14px;
  cursor: pointer;
}
button:hover { border-color: #3d4653; }
.segmented { display: flex; }
.segmented button { border-radius: 0; margin-left: -1px; }
.segmented button:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.segmented button:last-child { border-radius: 0 8px 8px 0; }
button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.toggle { display: flex; gap: 6px; align-items: center; color: var(--muted); cursor: pointer; }
.events { margin: 0; color: var(--muted); font-size: 13px; min-height: 1.5em; }

.info h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.15; }
.info h1 span { display: block; font-size: 16px; font-weight: 500; color: var(--accent); letter-spacing: 0.04em; }
.info h2 { margin: 28px 0 10px; font-size: 18px; }
.lead { color: #cfd5dd; }
.note { color: var(--muted); font-size: 13px; }
ul { padding-left: 18px; }
li { margin-bottom: 8px; }
li b { color: #fff; }
code { font: 13px ui-monospace, Menlo, Consolas, monospace; background: var(--surface); padding: 1px 5px; border-radius: 4px; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
a { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .device-col { position: static; }
  .device[data-orientation="landscape"] iframe { width: min(740px, calc(100vw - 80px)); }
}
@media (max-width: 440px) {
  .device { padding: 6px; border-radius: 30px; }
  .device[data-orientation="portrait"] iframe { width: calc(100vw - 64px); height: calc((100vw - 64px) * 2.05); }
}
