/* Sweax Brush site: the plugin's cutting mat, full size. Green mat with its
   printed grid, cut pieces lying on it, crop marks around every picture. */
@font-face { font-family: "SBJura"; font-weight: 300 700; font-display: swap; src: url(../fonts/jura-latin-wght-normal.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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "SBJura"; font-weight: 300 700; font-display: swap; src: url(../fonts/jura-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "SBMono"; font-weight: 400; font-display: swap; src: url(../fonts/roboto-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-2199, U+2212; }
@font-face { font-family: "SBMono"; font-weight: 400; font-display: swap; src: url(../fonts/roboto-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: "SBMono"; font-weight: 500; font-display: swap; src: url(../fonts/roboto-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-2199, U+2212; }
@font-face { font-family: "SBMono"; font-weight: 500; font-display: swap; src: url(../fonts/roboto-mono-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF; }

:root {
  --mat: #17352A; --minor: #1E4235; --major: #2A5847; --card: #10281F; --edge: #2E5C4A; --field: #0B1E17; --hover: #1B3D30;
  --ink: #E6F2EA; --dim: #96BCAA; --line: #5C8F79; --accent: #7FE0A8; --on-accent: #0A2219; --danger: #FF7A66;
  --sans: "SBJura", "Segoe UI", system-ui, sans-serif; --mono: "SBMono", Consolas, "SF Mono", monospace;
  --gut: clamp(16px, 4vw, 48px);
  /* Line heights from measureText on Jura 500–700: Turkish ink reaches 0.89 em above the
     baseline (İ) and 0.22 em below (Ç, Ş, ğ), 1.11 em in all; the font box is 0.97 + 0.22.
     1.18 keeps two lines of Turkish capitals apart and nothing rises out of the box.
     tools/site_check.js re-measures every heading on the page. */
  --lh-display: 1.18; --lh-head: 1.2;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --mat: #CFE3D6; --minor: #BCD6C6; --major: #A3C6B1; --card: #F5FAF6; --edge: #9CC2AC; --field: #FFFFFF; --hover: #E2F0E7;
    --ink: #0F2A1F; --dim: #4E7262; --line: #78A08C; --accent: #1F7A4F; --on-accent: #FFFFFF; --danger: #C2412D; color-scheme: light; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-weight: 500; color: var(--ink); background-color: var(--mat);
  background-image:
    linear-gradient(var(--major) 1px, transparent 1px), linear-gradient(90deg, var(--major) 1px, transparent 1px),
    linear-gradient(var(--minor) 1px, transparent 1px), linear-gradient(90deg, var(--minor) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-attachment: fixed;
  line-height: 1.55; font-size: 17px;
}
a { color: var(--accent); }
code, .mono { font-family: var(--mono); }
code { font-size: .88em; background: var(--field); border: 1px solid var(--edge); padding: .08em .35em; border-radius: 2px; }
img, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { font-weight: 650; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(30px, 4.6vw, 54px); line-height: var(--lh-head); padding-top: .06em; }
h3 { font-size: clamp(21px, 2.2vw, 27px); line-height: var(--lh-head); }
p { margin: .7em 0 0; }

/* ruler along the top edge of the page */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 10px; z-index: 30; pointer-events: none;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 10px 3px, 50px 6px, 100px 10px; background-repeat: repeat-x; background-position: 0 0;
}

.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px;
  padding: 18px var(--gut) 12px; background: color-mix(in srgb, var(--mat) 88%, transparent); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--edge);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; }
.brand svg { color: var(--accent); fill: var(--accent); }
.top nav { display: flex; gap: 20px; margin-left: auto; }
.top nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--accent); }
.lang { display: flex; border: 1px solid var(--edge); background: var(--field); border-radius: 2px; padding: 2px; }
.lang button { font: 500 12px var(--mono); color: var(--dim); background: none; border: 0; padding: 4px 8px; cursor: pointer; border-radius: 1px; }
.lang button.on { background: var(--accent); color: var(--on-accent); }

main > section { padding: clamp(48px, 8vw, 104px) var(--gut) 0; max-width: 1360px; margin: 0 auto; }
.sec-head { max-width: 860px; margin-bottom: 28px; }
.sec-head p { color: var(--dim); }

/* crop marks: four corners drawn with gradients, used on every picture */
.crop { position: relative; }
.crop::after {
  content: ""; position: absolute; inset: -9px; pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 14px 2px, linear-gradient(var(--accent), var(--accent)) left top / 2px 14px,
    linear-gradient(var(--accent), var(--accent)) right top / 14px 2px, linear-gradient(var(--accent), var(--accent)) right top / 2px 14px,
    linear-gradient(var(--accent), var(--accent)) left bottom / 14px 2px, linear-gradient(var(--accent), var(--accent)) left bottom / 2px 14px,
    linear-gradient(var(--accent), var(--accent)) right bottom / 14px 2px, linear-gradient(var(--accent), var(--accent)) right bottom / 2px 14px;
  background-repeat: no-repeat;
}
img.crop, video.crop { outline: 9px solid transparent; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding-top: clamp(40px, 7vw, 92px) !important; }
.hero h1 { font-size: clamp(54px, 8.4vw, 118px); line-height: var(--lh-display); padding-top: .04em; letter-spacing: -.005em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 1.5px solid var(--accent); border-radius: 2px; color: var(--accent); text-decoration: none; font-weight: 700; background: var(--card); transition: background .2s, color .2s, transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.meta { color: var(--dim); font-size: 13px; margin-top: 22px; }
.hero-shot { margin: 0; }
.hero-shot img { border: 1px solid var(--edge); }
.hero-shot figcaption { color: var(--dim); font-size: 14px; margin-top: 12px; }

/* demo */
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.stage { aspect-ratio: 16 / 10; background: #b8d4e4; border: 1px solid var(--edge); }
.stage canvas { width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.stage-tools { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.stage-tools button { width: 34px; height: 34px; border-radius: 2px; border: 1px solid var(--edge); background: var(--card); color: var(--ink); font: 500 16px var(--mono); cursor: pointer; }
.stage-wait { position: absolute; inset: 0; display: grid; place-items: center; color: #23463a; font-size: 22px; }
.demo.ready .stage-wait { display: none; }
.keys { font-size: 14px; color: var(--ink); margin-top: 18px; }
.keys.dim { color: var(--dim); margin-top: 4px; }

/* modes */
.mode { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin: 0 0 clamp(44px, 6vw, 80px); }
.mode.flip > video { order: 2; }
.mode video { width: 100%; height: auto; background: #b8d4e4; border: 1px solid var(--edge); }
.mode p { color: var(--ink); }
.mode .small { color: var(--dim); font-size: 13px; line-height: 1.6; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card-grid img { width: 100%; height: auto; }

.shots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; padding: 10px; }
.shots img { width: 100%; height: auto; border: 1px solid var(--edge); }

.install-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.install ol { margin: 0; padding: 0; counter-reset: s; list-style: none; }
.install li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; background: var(--card); border: 1px solid var(--edge); border-radius: 2px; margin-bottom: 10px; }
.install li::before { content: counter(s); position: absolute; left: 16px; top: 13px; font: 500 15px var(--mono); color: var(--on-accent); background: var(--accent); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 1px; }
.paths { background: var(--card); border: 1px solid var(--edge); border-radius: 2px; padding: 18px; font-size: 14px; }
.paths div { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.paths span { color: var(--dim); min-width: 74px; }
.paths p { font-family: var(--sans); color: var(--dim); }
.paths h3 { font-family: var(--sans); font-size: 18px; margin-top: 18px; }
code.block { display: block; margin-top: 8px; padding: 10px 12px; }
.legacy { margin-top: 32px; padding: 20px 22px; background: var(--card); border: 1px dashed var(--line); border-radius: 2px; max-width: 900px; }
.legacy p { color: var(--dim); }

.foot { display: flex; flex-wrap: wrap; gap: 22px; padding: 56px var(--gut) 40px; max-width: 1360px; margin: 64px auto 0; border-top: 1px solid var(--edge); color: var(--dim); font-size: 14px; }

/* ---- the panel copy (UIController in HTML) ---- */
.panel { position: relative; background: var(--mat); border: 1px solid var(--edge); max-height: min(78vh, 820px); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  background-image: linear-gradient(var(--major) 1px, transparent 1px), linear-gradient(90deg, var(--major) 1px, transparent 1px), linear-gradient(var(--minor) 1px, transparent 1px), linear-gradient(90deg, var(--minor) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; font-size: 15px; }
.pn { padding: 12px 14px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.pn-title { display: flex; align-items: baseline; gap: 8px; }
.pn-title b { font-size: 24px; font-weight: 700; }
.pn-ver { color: var(--accent); font-size: 11px; }
.pn-sub, .pn-hint, .pn-small { color: var(--dim); font-size: 13px; }
.pn-start { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px; border: 1.5px solid var(--accent); background: var(--card); color: var(--accent); font: 700 16px var(--sans); border-radius: 2px; cursor: pointer; position: relative; overflow: hidden; text-align: left; }
.pn-start i { width: 10px; height: 10px; background: var(--accent); opacity: .55; border-radius: 1px; flex: none; }
.pn-start.on { background: var(--accent); color: var(--on-accent); }
.pn-start.on i { background: var(--on-accent); opacity: 1; animation: pulse 1.2s ease-in-out infinite alternate; }
.pn-start.on::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, .22) 50%, transparent 55%); background-size: 200% 100%; animation: sweep 1.8s ease-in-out infinite; }
@keyframes pulse { to { opacity: .3; } }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.pn-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pn-tile { position: relative; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding-bottom: 6px; background: var(--card); border: 1px solid var(--edge); border-radius: 2px; color: var(--ink); font: 700 14px var(--sans); cursor: pointer; transition: background .16s; }
.pn-tile svg { fill: currentColor; position: absolute; top: 9px; }
.pn-tile svg .o { fill: none; stroke: currentColor; stroke-width: 1.5; }
.pn-tile svg .x { stroke: currentColor; stroke-width: 2; }
.pn-tile:hover { background: var(--hover); }
.pn-tile.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pn-key { position: absolute; top: 3px; right: 5px; font-size: 10px; color: var(--dim); }
.pn-tile.on .pn-key { color: var(--on-accent); }
.pn-status { background: var(--card); border: 1px solid var(--edge); border-left: 3px solid var(--accent); padding: 7px 12px; border-radius: 2px; min-height: 34px; }
.pn-status.err { color: var(--danger); border-left-color: var(--danger); }
.pn-status.flash { animation: flash .4s ease-out; }
@keyframes flash { from { border-left-color: transparent; } }
.pn-card { background: var(--card); border: 1px solid var(--edge); border-radius: 2px; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; }
.pn-heading, .pn-sechead { display: flex; align-items: center; gap: 8px; font: 700 16px var(--sans); color: var(--ink); }
.pn-heading i, .pn-sechead i { flex: 1; height: 9px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.pn-sechead { background: none; border: 0; padding: 4px 0; cursor: pointer; width: 100%; text-align: left; }
.pn-sechead:hover > span:nth-child(2) { color: var(--accent); }
.pn-sec.flat > .pn-sechead { font-weight: 500; font-size: 15px; }
.chev { width: 12px; height: 12px; position: relative; flex: none; }
.chev::before, .chev::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--accent); left: 2px; transition: transform .16s, top .16s, left .16s; }
.chev::before { top: 3px; transform: rotate(45deg); }
.chev::after { top: 7px; transform: rotate(-45deg); }
.pn-sec.open > .pn-sechead .chev::before { top: 5px; left: 0; }
.pn-sec.open > .pn-sechead .chev::after { top: 5px; left: 5px; }
.pn-secbody { display: none; flex-direction: column; gap: 6px; }
.pn-sec.open > .pn-secbody { display: flex; }
.pn-list { display: flex; flex-direction: column; gap: 5px; }
.pn-obj { display: flex; align-items: center; gap: 10px; background: var(--field); border: 1px solid var(--edge); border-radius: 2px; padding: 4px 8px 4px 4px; cursor: pointer; }
.pn-obj.off { opacity: .55; }
.pn-crop { position: relative; width: 46px; height: 46px; flex: none; padding: 4px; }
.pn-crop img { width: 38px; height: 38px; }
.pn-crop::before, .pn-crop::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--accent), var(--accent)) left top / 7px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) left top / 2px 7px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 7px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) right bottom / 2px 7px no-repeat; }
.pn-crop::after { transform: scaleX(-1); }
.pn-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-box { width: 18px; height: 18px; flex: none; border: 1.5px solid var(--line); background: var(--field); border-radius: 2px; display: grid; place-items: center; cursor: pointer; }
.pn-box i { width: 0; height: 0; background: var(--accent); border-radius: 1px; transition: width .28s cubic-bezier(.3, 1.8, .5, 1), height .28s cubic-bezier(.3, 1.8, .5, 1); }
.pn-box.on { border-color: var(--accent); }
.pn-box.on i { width: 10px; height: 10px; }
.pn-check { display: flex; align-items: center; justify-content: space-between; min-height: 26px; cursor: pointer; }
.pn-checkline { display: flex; gap: 14px; flex-wrap: wrap; }
.pn-checkcell { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pn-num { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.pn-num input { width: 88px; height: 26px; text-align: right; background: var(--field); color: var(--ink); border: 1px solid var(--edge); border-radius: 2px; padding: 0 8px; font-size: 14px; }
.pn-num input:focus { outline: none; border-color: var(--accent); }
.pn-ruler { display: flex; flex-direction: column; gap: 2px; }
.pn-rulerhead { display: flex; justify-content: space-between; }
.pn-read { color: var(--accent); font-weight: 500; }
.pn-track { --a: 0; position: relative; height: 24px;
  background: linear-gradient(var(--line), var(--line)) 0 16px / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%) 0 11px / calc(100% + 1px) 5px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 50%) 0 7px / calc(100% + 1px) 9px no-repeat; }
.pn-track .fill { position: absolute; left: 0; top: 15px; height: 3px; width: calc(var(--a) * 100%); background: var(--accent); }
.pn-track .needle { position: absolute; top: 2px; left: calc(var(--a) * 100%); width: 3px; height: 20px; margin-left: -1.5px; background: var(--accent); }
.pn-track .needle::before { content: ""; position: absolute; top: 0; left: -3px; width: 9px; height: 4px; background: var(--accent); }
.pn-track input { position: absolute; inset: 0; width: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.pn-segwrap { display: flex; flex-direction: column; gap: 4px; }
.pn-seg { display: flex; background: var(--field); border: 1px solid var(--edge); border-radius: 2px; padding: 2px; }
.pn-seg button { flex: 1; min-width: 0; height: 24px; border: 0; background: none; color: var(--ink); font: 500 14px var(--sans); border-radius: 1px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .16s, color .16s; }
.pn-seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.pn-readout { background: var(--field); border: 1px solid var(--edge); border-radius: 2px; padding: 6px 8px; color: var(--accent); font-size: 13px; }
.pn-btn { height: 30px; background: var(--field); border: 1px solid var(--edge); border-radius: 2px; color: var(--ink); font: 500 15px var(--sans); cursor: pointer; }
.pn-btn:hover { background: var(--hover); }
.pn-btn.danger { color: var(--danger); border-color: var(--danger); background: var(--card); }
.pn-foot { text-align: center; color: var(--dim); font-size: 11px; padding: 4px 0; }

@media (max-width: 1100px) { .shots { grid-template-columns: repeat(5, 240px); overflow-x: auto; scroll-snap-type: x mandatory; } .shots img { scroll-snap-align: start; } }
@media (max-width: 900px) {
  .hero, .mode, .install-grid, .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .mode.flip > video { order: 0; }
  .panel { max-height: none; }
  .top nav { display: none; }
  .lang { margin-left: auto; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
