:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; color: #202525; background: #eef1f1; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
header { background: #fff; border-bottom: 1px solid #d2dada; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.heading { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand { color: #256654; font-size: 21px; font-weight: 700; text-decoration: none; flex: none; }
h1 { margin: 0 0 5px; font-size: 24px; line-height: 1.2; font-weight: 600; }
.heading p { margin: 0; color: #626c6c; font-size: 12px; line-height: 1.4; }
.controls { display: flex; gap: 5px; align-items: center; flex: none; }
button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #304e46; cursor: pointer; flex: none; }
button:hover { background: #edf4f1; border-color: #c1d5cc; }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, main:focus-visible { outline: 2px solid #256654; outline-offset: 2px; }
button svg { width: 20px; height: 20px; }
.divider { height: 24px; width: 1px; background: #d2dada; margin: 0 5px; }
input { width: 90px; accent-color: #256654; }
output { width: 46px; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
main { position: relative; overflow: auto; overscroll-behavior: contain; }
#surface { min-width: 100%; min-height: 100%; padding: 16px; display: grid; place-items: center; }
#diagram { display: block; max-width: 100%; height: auto; user-select: none; }
main.enlarged { cursor: grab; }
main.dragging { cursor: grabbing; }
#error { position: absolute; top: 24px; left: 24px; right: 24px; padding: 20px; background: white; }
[hidden] { display: none !important; }
footer { display: flex; justify-content: space-between; gap: 12px; padding: 10px 24px; border-top: 1px solid #d2dada; color: #657070; font-size: 11px; background: #fff; }
footer a { color: #256654; text-decoration: none; }
@media (max-width: 850px) { header { flex-wrap: wrap; padding: 12px 16px; gap: 10px; } .controls { margin-left: auto; } }
@media (max-width: 520px) { .heading { gap: 12px; } h1 { font-size: 19px; } .brand { font-size: 17px; } .heading p { font-size: 11px; } .controls { width: 100%; justify-content: center; } input { flex: 1; max-width: 160px; min-width: 40px; } footer { padding: 9px 12px; flex-wrap: wrap; line-height: 1.4; } #surface { padding: 8px; } }
