/* The sharp look (Tanja, Nov 27: "all the edges more sharp, more technology heavy, a serious enterprise tech vibe";
   then "make that one default for now"). Every rule is scoped to html.sharp: the pages carry class="sharp" on <html>,
   and ?look=night removes it (js/motion.js) to show the original night look from site.css. Same house rules: weight 600 at most, no uppercase, no gradients, no dots in front of text,
   neutral blacks, Flero blue for the main button.

   What changes:
     corners     square everywhere (buttons, popup, fields, panels), and in the 3D tower (js/models.js)
     type        Inter for headings too (no Figtree), a little lighter and tighter
     frame       the page is drawn on a frame: two vertical rules down the sides, crossed by a rule under the header,
                 above the stage, above the products and above the footer, with a small cross where they meet
     stage       a viewport: a faint square grid behind the tower, and live readouts in its top corners (the angle it
                 is turned to and tilted at, and the product under the pointer; js/stage.js fills them in)
     texture     flat black, no film grain: the grid and the dial carry the texture */

/* the readouts exist only in the sharp look */
.hud{ display:none; }

.sharp{
  --head:"Inter", ui-sans-serif, system-ui, sans-serif;
  --r-card:0;
  --r-pill:4px;                                 /* buttons: a small corner radius (Tanja, Nov 27); panels stay square */
  --frame:clamp(16px, 2.2vw, 32px);             /* the frame's side rules, in from the screen edge */
  --rule:rgba(255,255,255,.10);
  /* a small cross where two rules meet (an 11px image, not a gradient) */
  --cross:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2711%27 height=%2711%27%3E%3Cpath d=%27M5.5 0v11M0 5.5h11%27 stroke=%27%23F5F5F5%27 stroke-opacity=%27.5%27/%3E%3C/svg%3E");
  /* the viewport grid behind the tower: one 40px square, tiled */
  --grid:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2740%27 height=%2740%27%3E%3Cpath d=%27M.5 0v40M0 .5h40%27 stroke=%27%23FFFFFF%27 stroke-opacity=%27.045%27/%3E%3C/svg%3E");
  --panel:#111111;                              /* the popup and the contact panels */
  --panel-line:rgba(255,255,255,.12);
  --pop-line:rgba(255,255,255,.16);
  --pop-shadow:0 24px 60px rgba(0,0,0,.6);
  --ghost-line:rgba(255,255,255,.22);
}

/* ── the light theme (Tanja, Nov 27): js/motion.js sets data-theme="light" from the footer toggle or the device.
   White page and panels with hairlines (never grey fills), ink text, the same Flero blue buttons. The notes take the
   brand green and burgundy, since the pale night ones vanish on white. The night look (?look=night) stays dark ── */
.sharp[data-theme="light"]{
  --night:#FFFFFF; --night-2:#FFFFFF; --night-3:#F4F4F4;      /* page, cards, hover fills */
  --text:#141313;                               /* ink */
  --muted:#525252;                              /* body copy, 7.8:1 on white */
  --faint:#737373;                              /* small print, 4.7:1 */
  --line:rgba(0,0,0,.10); --line-2:rgba(0,0,0,.16); --line-3:rgba(0,0,0,.32);
  --peri:#1250FF;                               /* focus ring: the pale one is too faint on white */
  --ok:#185C48; --err:#9B0019;
  --inv-hover:#3A3A3A;                          /* the popup's dark button, hovered */
  --rule:rgba(0,0,0,.10);
  --cross:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2711%27 height=%2711%27%3E%3Cpath d=%27M5.5 0v11M0 5.5h11%27 stroke=%27%23141313%27 stroke-opacity=%27.45%27/%3E%3C/svg%3E");
  --grid:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2740%27 height=%2740%27%3E%3Cpath d=%27M.5 0v40M0 .5h40%27 stroke=%27%23000000%27 stroke-opacity=%27.055%27/%3E%3C/svg%3E");
  --panel:#FFFFFF;
  --panel-line:rgba(0,0,0,.12);
  --pop-line:rgba(0,0,0,.14);
  --pop-shadow:0 24px 60px rgba(0,0,0,.12);
  --ghost-line:rgba(0,0,0,.2);
  color-scheme:light;
}
.sharp[data-theme="light"] .field{ background:var(--night); }   /* fields white too */
.sharp body{ background:var(--night); }

/* ── the frame: two side rules, behind everything ───────────────────────── */
.sharp body::before{
  content:""; position:fixed; z-index:-1; top:0; bottom:0; left:var(--frame); right:var(--frame);
  border-left:1px solid var(--rule); border-right:1px solid var(--rule);
  pointer-events:none;
}
/* each section rule ends in a cross on both side rules. The rule is the element's top border (the header's bottom
   border); the crosses are one strip, 11px tall, centred on it */
.sharp .top::after,
.sharp .stage::after,
.sharp .products::before,
.sharp .foot::before{
  content:""; position:absolute; left:calc(var(--frame) - 5px); right:calc(var(--frame) - 5px); height:11px;
  background:var(--cross) left center no-repeat, var(--cross) right center no-repeat;
  pointer-events:none;
}
.sharp .stage::after, .sharp .products::before, .sharp .foot::before{ top:-6px; }

/* ── type ───────────────────────────────────────────────────────────────── */
.sharp h1{ font-weight:500; letter-spacing:-.045em; line-height:1.02; }
.sharp .sec-head h2, .sharp .row-name, .sharp .pop-name, .sharp .ct-form h2, .sharp .ct-info h2, .sharp .ct-big{
  font-weight:500; letter-spacing:-.03em;
}

/* ── buttons: square, a little tighter ──────────────────────────────────── */
.sharp .btn{ padding:12px 20px; font-weight:500; letter-spacing:-.005em; }
.sharp .btn-sm{ padding:9px 16px; font-size:14px; }
.sharp .btn-ghost{ border-color:var(--ghost-line); }

/* ── header: a bar ruled off under it ───────────────────────────────────── */
.sharp .top{ height:68px; padding:0 var(--gut); border-bottom:1px solid var(--rule); }
.sharp .top::after{ bottom:-6px; }
/* the wordmark (Tanja, Nov 27: "make AICE bold, and Technology almost no gap"): AICE bold (700: the wordmark is
   part of the logo, the one place above the 600 rule) with near-normal tracking, Technology right against it in the
   regular weight and the muted colour, so the weight and colour split the two words, not a space. The logo keeps
   its own distance (no flex gap: each piece sets its own margin) */
/* Then (Tanja, Nov 27): "the copy a bit bigger next to the logomark, and a few pixels more gap" (20px words, 14px
   gap), then "the gap a bit smaller, and the words even bigger": the words 22px, as tall as the logo's 22px box
   (1em), and 11px between them (.5em) */
.sharp .mark{ font-family:var(--body); font-size:22px; gap:0; letter-spacing:-.01em; }
.sharp .mark-logo{ width:1em; height:1em; margin-right:.5em; transform:none; }   /* at 1em its middle is already level with the capitals' (measured) */
.sharp .mark-a{ font-weight:700; letter-spacing:.015em; }
.sharp .mark-t{ margin-left:.1em; letter-spacing:-.015em; }
.sharp .mark-sm{ font-size:20px; }               /* the footer's, a size down: the logo 20px */

/* ── hero: the headline in its own band, then the stage as a viewport ───── */
.sharp .hero{ padding-top:clamp(112px, 14.5vh, 150px); }   /* the headline sits mid-band between the two rules */
.sharp .stage{ border-top:1px solid var(--rule); }
/* the viewport grid: 40px squares, centred, between the side rules. Behind the canvas (it comes first) */
.sharp .stage::before{
  content:""; position:absolute; top:0; bottom:0; left:var(--frame); right:var(--frame);
  background:var(--grid) center top;
  pointer-events:none;
}
.sharp #model:focus-visible{ outline-offset:-2px; }

/* the readouts, in the viewport's top corners: label, then value (tabular figures, so the numbers do not jiggle) */
.sharp .hud{
  position:absolute; z-index:2; top:20px; display:grid; gap:4px;
  font-size:12px; line-height:1.4; color:var(--faint); text-align:left;
  font-variant-numeric:tabular-nums; pointer-events:none;
}
.sharp .hud-l{ left:calc(var(--frame) + 20px); }
.sharp .hud-r{ right:calc(var(--frame) + 20px); }
.sharp .hud p{ display:grid; grid-template-columns:64px auto; gap:10px; }
.sharp .hud b{ font-weight:500; color:var(--muted); }
.sharp .hud-r p{ grid-template-columns:64px 88px; }
.sharp .drag-hint{ font-size:12px; }

/* ── the product popup: a square panel, a ruled head, the button across its foot ─────────────────────── */
.sharp .pop{
  padding:0; background:var(--panel); border:1px solid var(--pop-line);
  box-shadow:var(--pop-shadow);
  transform:translateY(4px);
}
.sharp .pop.open{ transform:none; }
.sharp .pop-head{ padding:16px 56px 16px 18px; border-bottom:1px solid var(--rule); }
.sharp .pop-x{ top:12px; right:12px; }
/* the tag: a ruled strip across the card's top, the close button beside it, then the head */
.sharp .pop-tag{ margin:0; padding:13px 56px 13px 18px; border-bottom:1px solid var(--rule); }
.sharp .pop.tagged .pop-x{ top:6px; }
.sharp .pop-layer{ font-size:12px; }
.sharp .pop-name{ font-size:22px; }
.sharp .pop-lead{ margin:18px 20px 0; }
.sharp .pop-text{ margin:8px 20px 0; }
/* the button runs across the panel's foot, so the panel takes the same small radius and the button's bottom corners
   follow it (5px: the panel's 6px, less its 1px border) */
.sharp .pop{ border-radius:6px; }
.sharp .pop-foot{ gap:0; flex-wrap:nowrap; }
.sharp .pop-btn{ display:flex; flex:1 1 0; width:auto; margin:0; padding:15px 20px; border-radius:0 0 5px 5px; }
/* two buttons (Tanja, Nov 28: "divide the existing one into 2"): two halves of the same foot, split by a hairline,
   each keeping its own outer corner */
.sharp .pop-foot.two .pop-btn{ min-width:0; padding:15px 10px; }   /* even halves: "Download at0" fits in one */
.sharp .pop-foot.two .pop-btn:first-child{ border-radius:0 0 0 5px; }
.sharp .pop-foot.two .pop-btn + .pop-btn{ border-radius:0 0 5px 0; box-shadow:inset 1px 0 0 rgba(128,128,128,.45); }
.sharp .prod-links:focus-within{ border-radius:0; }

/* ── products: the heading on the left, like the rest of a technical page ── */
.sharp .products{ position:relative; border-top:1px solid var(--rule); }
.sharp .sec-head{ max-width:1120px; text-align:left; margin-bottom:28px; }

/* ── contact page ───────────────────────────────────────────────────────── */
.sharp .field, .sharp textarea.field{ border-radius:0; }
.sharp .card{ background:var(--panel); border-color:var(--panel-line); }

/* ── footer ─────────────────────────────────────────────────────────────── */
.sharp .foot{ position:relative; border-top-color:var(--rule); }
.sharp .theme label{ border-radius:2px; }       /* inside the toggle's 4px corners */

/* ── smaller screens: no side rules (no room), so no crosses or readouts either ── */
@media (max-width:820px){
  .sharp body::before,
  .sharp .top::after, .sharp .stage::after, .sharp .products::before, .sharp .foot::before{ display:none; }
  .sharp .top{ height:60px; }
  .sharp .hero{ padding-top:108px; }
  .sharp .stage::before{ left:0; right:0; }
  .sharp .hud{ display:none; }
}
@media (min-width:821px){
  .sharp .hud{ display:grid; }
}
