/* OpenMyDrawing. Graphite chrome on white; colour belongs to the measurements, in chalk-line
   pigments. Quantities are set in osifont (ISO 3098 technical lettering) so they read as part
   of the drawing. */

@font-face { font-family: "osifont"; src: url("fonts/osifont.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 400; src: url("fonts/Barlow-Regular.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 500; src: url("fonts/Barlow-Medium.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 600; src: url("fonts/Barlow-SemiBold.woff") format("woff"); font-display: swap; }

:root {
  --paper: #ffffff;
  --board: #dde2e6;
  --graphite: #262a2e;
  --pencil: #5f676f;
  --rule: #ccd2d7;
  --wash: #f3f5f6;
  --floor: #1f5fd6;
  --wall: #d02a2a;
  --roof: #1f8a4c;
  --count: #e8b400;
  --measure: #7b3fb0;
  --selection: #ff6a13;
  --selection-wash: #fff1e7;
  --lettering: "osifont", "Barlow", sans-serif;
  --text: "Barlow", system-ui, sans-serif;
  --toolbar-height: 52px;
  color-scheme: light;
}

/* Black background (D24): the chrome around the black drawing goes dark too, AutoCAD's dark grey
   with light lettering, from the first paint (chrome-theme.js; showChrome in viewer-shell.js).
   Every text at WCAG AA on it (lettering 11.8:1, pencil 7.0:1 on the bars, 6.2:1 on the wash),
   edges and the focus ring at 3:1 or more; the measurement pigments are the canvas's own for black
   (DARK_COLORS in viewer.js). The primary button and Measure are filled light with dark lettering.
   color-scheme makes the browser's own parts dark too: the page picker's list, checkboxes,
   scroll bars. Screen only: prints and the report stay on white. */
@media screen {
  :root.dark-chrome {
    color-scheme: dark;
    --paper: #2b2f36;
    --board: #22262c;
    --graphite: #eef0f3;
    --pencil: #b4bcc6;
    --rule: #7a828d;
    --wash: #33373e;
    --floor: #5b8ff0;
    --wall: #f0504a;
    --roof: #3cb371;
    --measure: #b27ee6;
    --selection: #ff7a2b;
    --selection-wash: #4a3427;
  }
  .dark-chrome .primary:hover:not(:disabled) { background: #ffffff; }
  /* A light fill would hold a disabled button's grey lettering at 1.3:1: unfilled, it reads 3:1. */
  .dark-chrome :is(.primary, .bar-actions .tool):disabled { background: var(--paper); border-color: var(--rule); color: var(--pencil); }
  .dark-chrome dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
}

* { box-sizing: border-box; }

/* Buttons set their own display, which would otherwise show hidden ones. */
[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; }

body {
  font: 400 15px/1.45 var(--text);
  color: var(--graphite);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 600; }

/* ---- Controls ---- */

/* Buttons and labels set their own display below; the hidden attribute must still win. */
[hidden] { display: none !important; }

button, .button, select, input {
  font: inherit;
  color: inherit;
}

button, .button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 11px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  cursor: pointer;
  white-space: nowrap;
}

button:hover:not(:disabled), .button:hover { border-color: var(--graphite); }
button:disabled { color: var(--pencil); opacity: 0.55; cursor: default; }

.primary { background: var(--graphite); border-color: var(--graphite); color: var(--paper); }
.primary:hover:not(:disabled) { background: #000000; }

.quiet { border-color: transparent; background: transparent; color: var(--pencil); }
.quiet:hover:not(:disabled) { color: var(--graphite); border-color: var(--rule); }

select, input[type="text"], input[type="number"] {
  min-height: 32px;
  padding: 3px 7px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
}

input[type="number"] { width: 6.5em; }

:focus-visible { outline: 2px solid var(--selection); outline-offset: 2px; }

kbd {
  font: 500 11px/1 var(--text);
  color: var(--pencil);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 2px 4px;
}

.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check input { margin: 0; accent-color: var(--graphite); }

.note { color: var(--pencil); font-size: 13px; margin: 6px 0; }

.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---- Layout ---- */

body.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* The toolbar has two bars. The file bar: name, the open file and its drawing, the converter,
   keys and language. The tool bar is laid out like a drawing's title block: cells divided by
   rules, each with a small caption over its controls, free tools first, then Scale, then the Pro
   switch with the takeoff tools it shows, Edit, and the view settings (units, background). */
.toolbar { display: flex; flex-direction: column; border-bottom: 1px solid var(--graphite); }

.strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.file-bar { min-height: 46px; padding: 6px 14px; border-bottom: 1px solid var(--rule); }
.bar-end { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.brand {
  font: 400 19px/1 var(--lettering);
  text-decoration: none;
  letter-spacing: 0.01em;
  padding-right: 6px;
}

.tool-bar { align-items: stretch; gap: 0; padding: 0 4px; }
.cell { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 10px 6px; border-right: 1px solid var(--rule); }
.cell:last-child { border-right: 0; }
.caption { font-size: 11.5px; line-height: 1; color: var(--pencil); letter-spacing: 0.01em; }
.cell-body { display: flex; align-items: center; gap: 2px; min-height: 32px; }
/* Settings for the view sit at the right end, apart from the tools. */
.view-cell { margin-left: auto; border-left: 1px solid var(--rule); }

.tool { border-color: transparent; position: relative; padding: 4px 9px; }
/* Key hints only where there is room; the Keys dialog lists them all. */
@media (max-width: 1500px) { .tool kbd { display: none; } }
.tool[aria-pressed="true"] { border-color: var(--graphite); }
/* The active drawing tool is underlined in the colour it will draw with. */
.tool[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 3px;
  background: var(--graphite);
}
.tool[data-kind="floor"][aria-pressed="true"]::after { background: var(--floor); }
.tool[data-kind="wall"][aria-pressed="true"]::after { background: var(--wall); }
.tool[data-kind="roof"][aria-pressed="true"]::after { background: var(--roof); }
.tool[data-kind="count"][aria-pressed="true"]::after { background: var(--count); }
.tool[data-kind="measure"][aria-pressed="true"]::after { background: var(--measure); }

/* Pro is a switch, not a tool: a track with a knob. On, its cell holds the takeoff tools. */
.switch { gap: 8px; padding: 4px 9px 4px 5px; border-color: transparent; }
.switch .track {
  position: relative;
  width: 30px;
  height: 18px;
  border: 1.5px solid var(--pencil);
  border-radius: 9px;
  background: var(--paper);
  transition: background-color 0.15s, border-color 0.15s;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pencil);
  transition: transform 0.15s;
}
.switch[aria-checked="true"] { font-weight: 600; }
.switch[aria-checked="true"] .track { background: var(--graphite); border-color: var(--graphite); }
.switch[aria-checked="true"] .track::after { background: var(--paper); transform: translateX(12px); }
.pro-tools { display: flex; align-items: center; gap: 2px; padding-left: 8px; margin-left: 4px; border-left: 1px solid var(--rule); }
.pro-cell:has(.switch[aria-checked="true"]) { background: var(--wash); }
.pro-cell .tool, .pro-cell .switch { background: transparent; }

/* The scale is a value, written like the drawing's lettering; it opens Set scale. Missing, it
   asks for one in the selection colour. */
.scale-badge { font: 400 17px/1 var(--lettering); border-color: transparent; padding: 4px 6px; }
.scale-badge:disabled { opacity: 1; color: var(--pencil); font: 400 15px/1 var(--text); }
.scale-badge.missing { border-color: var(--selection); color: var(--selection); font: 500 15px/1 var(--text); }

/* Two or more choices side by side: language, units, background. */
.language, .choice { display: flex; gap: 0; }
.language button, .choice button { min-height: 28px; padding: 2px 9px; border-radius: 0; color: var(--pencil); }
.language button:first-child, .choice button:first-child { border-radius: 3px 0 0 3px; }
.language button:last-child, .choice button:last-child { border-radius: 0 3px 3px 0; margin-left: -1px; }
.language button[aria-pressed="true"], .choice button[aria-pressed="true"] { color: var(--graphite); border-color: var(--graphite); position: relative; }

@media (prefers-reduced-motion: reduce) {
  .switch .track, .switch .track::after { transition: none; }
}

.page-picker { max-width: 14em; }

.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 410px; }

/* ---- Drawing board ---- */

.stage { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--board); }
/* Black background (D24): the canvas inverts the plan; the board around it goes dark too. */
.stage.dark { background: #33383d; }

canvas { flex: 1; min-height: 0; width: 100%; display: block; cursor: crosshair; touch-action: none; }
canvas[data-tool="select"] { cursor: default; }
canvas[data-panning] { cursor: grab; }

.stage.dragging { outline: 3px dashed var(--graphite); outline-offset: -10px; }

.statusbar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 40px;
  padding: 4px 12px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
}

.status { flex: 1; min-width: 0; color: var(--pencil); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readout { font: 400 15px/1 var(--lettering); white-space: pre; }
.view-controls { display: flex; align-items: center; gap: 4px; }
.view-controls button { min-height: 28px; padding: 2px 9px; }
.view-controls .check { margin-right: 8px; }

/* The first screen is laid out like a drawing's title block. */
.empty {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(40rem, calc(100% - 32px));
  background: var(--paper);
  border: 2px solid var(--graphite);
}

.empty h1 {
  font: 400 28px/1.15 var(--lettering);
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--graphite);
}

.empty ol { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.empty li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 14px;
  align-items: center;
  min-height: 46px;
  padding-right: 16px;
  border-bottom: 1px solid var(--rule);
}
.empty li::before {
  content: counter(step);
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 20px/1 var(--lettering);
  border-right: 1px solid var(--rule);
}

.empty-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px 24px 8px; }
.drop-hint { color: var(--pencil); font-size: 13px; }
.privacy { margin: 0; padding: 4px 24px 18px; color: var(--pencil); font-size: 13px; }

/* ---- Side panel ---- */

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid var(--rule);
  background: var(--paper);
}

.panel > section { padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.panel h2 { font-size: 16px; }

.takeoff > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.takeoff .check { font-size: 13px; color: var(--pencil); }

.group + .group { margin-top: 10px; }
.group > header { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0 4px; border-bottom: 1px solid var(--graphite); }
.group h3 { font-size: 14px; }
.subtotal { font: 400 14px/1.2 var(--lettering); white-space: pre; }
.group ul { list-style: none; margin: 0; padding: 0; }

.element { display: flex; align-items: center; border-bottom: 1px solid var(--wash); }
.element .pick {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: baseline;
  border: 0;
  border-radius: 0;
  padding: 7px 4px;
  text-align: left;
  background: transparent;
}
.element .page { grid-column: 2; font-size: 12px; color: var(--pencil); }
.element .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.element .quantity { font: 400 15px/1 var(--lettering); text-align: right; }
.element .visibility { align-self: center; border-color: transparent; color: var(--pencil); font-size: 12.5px; min-height: 26px; padding: 2px 7px; }
.element.selected { background: var(--selection-wash); box-shadow: inset 3px 0 var(--selection); }
.element.hidden .name, .element.hidden .quantity { color: var(--pencil); text-decoration: line-through; }

.swatch { width: 12px; height: 12px; border: 1px solid rgba(38, 42, 46, 0.35); align-self: center; }
.element[data-kind="floor"] .swatch { background: var(--floor); }
.element[data-kind="wall"] .swatch { background: var(--wall); }
.element[data-kind="roof"] .swatch { background: var(--roof); }
.element[data-kind="count"] .swatch { background: var(--count); border-radius: 50%; }
/* A measurement is a line, not a surface: its swatch is a bar. */
.element[data-kind="measure"] .swatch { background: var(--measure); height: 3px; border: 0; }

/* The drawing's layers: a switch, the name as the file writes it, how much is on it. */
.layers > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.layers .quiet { min-height: 26px; padding: 2px 7px; font-size: 12.5px; }
#layer-list { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow-y: auto; border-top: 1px solid var(--graphite); }
.layer { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--wash); }
.layer .check { flex: 1; min-width: 0; padding: 6px 4px; }
.layer .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer .count { min-width: 4ch; text-align: right; font: 400 14px/1 var(--lettering); color: var(--pencil); padding-right: 4px; }
.layer .only { min-height: 26px; padding: 2px 7px; font-size: 12.5px; }
.layer.off .name { color: var(--pencil); text-decoration: line-through; }

.editor { background: var(--wash); }
.editor h2 { margin-bottom: 10px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.fields label, .field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--pencil); }
.fields input, .fields select { color: var(--graphite); width: 100%; }
.fields label:first-child, .fields label:nth-child(2) { grid-column: 1 / -1; }
.fields label.check { flex-direction: row; color: var(--graphite); }
.fields .check input { width: auto; }

table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
th { font-weight: 500; color: var(--pencil); text-align: right; padding: 4px 5px; border-bottom: 1px solid var(--graphite); }
td { text-align: right; padding: 4px 5px; border-bottom: 1px solid var(--wash); }
th:first-child, td:first-child { text-align: left; }
td:nth-child(2), td:nth-child(5), tfoot td:last-child { font-family: var(--lettering); font-size: 15px; white-space: nowrap; }
td input[type="number"] { width: 5.2em; text-align: right; min-height: 28px; padding: 2px 5px; }
tfoot td { border-bottom: 0; padding-top: 6px; }
tfoot tr:first-child td { border-top: 1px solid var(--graphite); }
tfoot .grand td { font-weight: 600; }
tfoot .grand td:last-child { font-size: 18px; }
#vat-rate { width: 4em; min-height: 26px; }

.legal { display: flex; flex-wrap: wrap; gap: 14px; padding: 14px 18px; margin-top: auto; font-size: 13px; color: var(--pencil); }

/* ---- Dialogs ---- */

dialog {
  width: min(30rem, calc(100% - 32px));
  border: 1px solid var(--graphite);
  border-radius: 4px;
  padding: 20px 22px;
  color: var(--graphite);
  background: var(--paper);
}
dialog::backdrop { background: rgba(38, 42, 46, 0.35); }
dialog h2 { font-size: 18px; margin-bottom: 8px; }
dialog section { margin: 14px 0; }
dialog form { margin-top: 14px; }
.offers { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.offers button { justify-content: center; min-height: 40px; }
.length-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.length-row .note { flex-basis: 100%; margin: 0; }
.keys { padding-left: 18px; margin: 8px 0; }
.keys li { margin: 6px 0; }

/* ---- Narrow screens ---- */

@media (max-width: 900px) {
  body.app { height: auto; overflow: auto; }
  .workspace { grid-template-columns: 1fr; }
  .stage { height: 70vh; }
  .panel { border-left: 0; }
  .file-bar { padding: 6px 10px; }
  .keys-button { display: none; } /* no keyboard on a phone; the list stays one ? away on a tablet */
  .tool-bar { padding: 0; border-top: 0; }
  .cell { padding: 5px 8px 6px; }
  .tool { padding: 4px 7px; }
  .tool kbd { display: none; }
  .pro-tools { flex-wrap: wrap; }
  .view-cell { margin-left: 0; border-left: 0; }
  /* Layer names often share a long prefix; a touch screen has no tooltip to tell them apart. */
  .layer .name { white-space: normal; overflow-wrap: anywhere; }
}

/* ---- Takeoff tools that explain themselves (D29) ----
   Each Pro tool shows the mark it draws, in its plan colour, its name, and under the name what
   it gives in the chosen units; a tip with an everyday example opens on hover (after a moment)
   or keyboard focus. With nothing measured the panel lists the same as a legend. On a phone the
   tools are one row of five, the mark over the name, and the legend explains. */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; color: var(--graphite); }
.tool .icon { width: 18px; height: 18px; }
.icon[data-kind="floor"] { color: var(--floor); }
.icon[data-kind="wall"] { color: var(--wall); }
.icon[data-kind="roof"] { color: var(--roof); }
.icon[data-kind="count"] { color: var(--count); }
/* The marks' grey ground and an opening's hole follow the chrome (dark with the Black background). */
.mark-ground { stroke: var(--pencil); }
.mark-ground[fill="#5f676f"] { fill: var(--pencil); }
.mark-hole { fill: var(--paper); }

/* The takeoff tools are taller than the other controls: every cell's caption stays level at the
   top, and its controls are centred in the height left. */
.tool-bar .cell { justify-content: flex-start; }
.tool-bar .cell-body { flex: 1; }

.pro-tools { gap: 0; }
.pro-tool { position: relative; display: flex; }
.pro-tool > .tool { gap: 4px; padding: 3px; text-align: left; }
.tool-text { display: flex; flex-direction: column; line-height: 1.12; }
.tool-line { font-size: 11px; color: var(--pencil); margin-top: 2px; }

.tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 5;
  width: max-content;
  max-width: 17rem;
  padding: 8px 11px;
  border: 1px solid var(--graphite);
  border-radius: 3px;
  background: var(--paper);
  color: var(--graphite);
  font-size: 13.5px;
  line-height: 1.4;
  white-space: normal;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.12s, visibility 0s 0.12s;
}
/* The gap between a button and its tip counts as the button, so the pointer can reach the tip. */
.tip::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px; }
@media (hover: hover) {
  .pro-tool:hover .tip { visibility: visible; opacity: 1; transition-delay: 0.45s; }
}
.pro-tool .tool:focus-visible + .tip { visibility: visible; opacity: 1; transition-delay: 0s; }
.tool-bar.tips-off .pro-tool .tip { visibility: hidden; opacity: 0; transition: none; }

.tool-legend { list-style: none; margin: 2px 0 0; padding: 0; border-top: 1px solid var(--graphite); }
.tool-legend li {
  display: grid;
  grid-template-columns: 20px 4.6em minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  padding: 7px 4px;
  border-bottom: 1px solid var(--wash);
}
.tool-legend .name { font-weight: 500; }
.tool-legend .what { color: var(--pencil); font-size: 13.5px; line-height: 1.3; }

/* Hints and live values never resize the plan. The disclosure opens the full hint over it,
   including on touch screens and from the keyboard. */
.statusbar { position: relative; height: 40px; flex: none; }
.status { line-height: 20px; }
.status summary { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.status summary::before { content: "+"; flex: none; }
.status[open] summary::before { content: "−"; }
.status summary::-webkit-details-marker { display: none; }
.status summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-full {
  position: absolute;
  z-index: 5;
  left: 8px;
  right: 8px;
  bottom: 100%;
  margin: 0 0 4px;
  padding: 8px 11px;
  border: 1px solid var(--graphite);
  border-radius: 3px;
  background: var(--paper);
  color: var(--graphite);
  white-space: normal;
  line-height: 1.4;
}
.readout { min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.view-controls { flex: none; }
.element[data-kind="roof"] .quantity { grid-column: 2 / -1; white-space: pre-line; line-height: 1.35; }
.element[data-kind="roof"] .name { grid-column: 2 / -1; }

/* With Pro on the toolbar is a little taller. The workspace's row takes the height left by the
   window, never the canvas's earlier size, so the status bar stays on screen. */
@media (min-width: 901px) {
  .workspace { grid-template-rows: minmax(0, 1fr); }
}

/* Where the lines under the names do not fit in one toolbar row, the mark stands over the name,
   so the tools take no more room than plain names did. */
@media (max-width: 1279px) {
  .tool-line { display: none; }
  .pro-tool > .tool { flex-direction: column; justify-content: center; gap: 2px; padding: 2px 6px; }
}

@media (max-width: 900px) {
  .pro-cell { flex-grow: 1; }
  .pro-cell .cell-body { flex-wrap: wrap; }
  .pro-tools {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    flex-basis: 100%;
    margin: 2px 0 0;
    padding: 4px 0 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .pro-tool > .tool { flex: 1; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 2px 6px; text-align: center; }
  .tip { display: none; } /* no hover on a touch screen; the legend in the panel says the same */
  .statusbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 20px 28px; gap: 2px 8px; height: 59px; }
  .status { grid-column: 1 / -1; }
  .readout { max-width: none; }
}

/* ---- Printed report ---- */

.report { display: none; }

@media print {
  body.app { display: block; height: auto; overflow: visible; }
  .toolbar, .workspace, dialog { display: none !important; }
  .report { display: block; font-size: 11pt; }
  .report header { border-bottom: 2px solid var(--graphite); margin-bottom: 12pt; padding-bottom: 6pt; }
  .report h1 { font: 400 20pt/1.2 var(--lettering); }
  .report h2 { margin: 14pt 0 4pt; font-size: 13pt; }
  .report p { margin: 2pt 0; }
  .report figure { margin: 0 0 12pt; break-inside: avoid; }
  .report img { width: 100%; border: 1px solid var(--rule); }
  .report figcaption { color: var(--pencil); font-size: 9pt; }
  .report table { break-inside: auto; }
  .report tr { break-inside: avoid; }
}

/* ---- Document pages (privacy, terms, company, security) ---- */

body.doc { max-width: 44rem; margin: 0 auto; padding: 0 20px; }
.doc-header { padding: 18px 0; border-bottom: 1px solid var(--rule); }
body.doc main { padding: 24px 0 8px; }
body.doc h1 { font: 400 30px/1.2 var(--lettering); margin-bottom: 14px; }
body.doc h2 { font-size: 17px; margin: 26px 0 6px; }
body.doc p, body.doc li { line-height: 1.6; }
body.doc ul { padding-left: 20px; }
body.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
body.doc dl > div { display: contents; }
body.doc dt { color: var(--pencil); }
body.doc dd { margin: 0; }
body.doc .legal { padding: 22px 0; border-top: 1px solid var(--rule); margin-top: 24px; }
body.doc pre { white-space: pre-wrap; font-size: 12.5px; line-height: 1.5; padding: 12px 14px; background: var(--wash); }

/* Persistent drawing fidelity notices, independent of transient tool hints: under the drawing,
   by the thumb bar, so the scale prompt over the top of the drawing never covers them. */
.drawing-notices { order: 1; flex: 0 1 auto; max-height: 22%; overflow: auto; background: var(--paper); border-top: 1px solid var(--rule); padding: 1px 12px; font-size: 13px; line-height: 1.4; }
.drawing-notices summary { display: block; padding: 3px 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawing-notices summary::-webkit-details-marker { display: none; }
.drawing-notices summary::before { content: "\25B8\00A0"; color: var(--pencil); }
.drawing-notices details[open] summary { white-space: normal; }
.drawing-notices details[open] summary::before { content: "\25BE\00A0"; }

/* Read by screen readers and search engines, not shown: the app page's heading. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
