/* Sales Cockpit styles. Colours and type sizes come from tokens.css (Netcloud brand, V2 07/2026);
   the only additions are the brand's own tint steps (computed below) and two status colours the
   brand does not define. Light only: the brand defines no dark theme. Contrast pairs are checked
   by tests/web/contrast.test.js. */
:root {
  /* Tint steps per brand ("x % of the base colour on white"), computed from the token hex. */
  --tint-blue-10: #edecff;   /* Glowing Blue 10 % */
  --tint-violet-10: #f2e6ff; /* Services Violet 10 % */
  --tint-grey-20: #f3f3f3;   /* Grey 20 % */
  --tint-grey-40: #e7e7e7;   /* Grey 40 % */
  --tint-grey-70: #d5d5d5;   /* Grey 70 % */

  /* Roles */
  --c-page: var(--nc-color-surface-subtle);
  --c-surface: var(--nc-color-surface);
  --c-text: var(--nc-color-text);
  --c-text-2: var(--nc-color-deep-blue);  /* secondary text; Meta #7a7d99 is only 4.0:1, too light for text */
  --c-accent: var(--nc-color-primary);
  --c-brand: var(--nc-color-brand);
  --c-line: var(--tint-grey-40);          /* decorative dividers */
  --c-control: var(--nc-color-meta);      /* field borders: 4.0:1 on white, above the 3:1 for controls */
  --c-internal: var(--nc-color-deep-blue);
  /* Status: the brand has no red or amber. Stop = the red of "Cyber Incident" on netcloud.ch;
     amber is app-defined. Always paired with text and an icon, never colour alone. */
  --c-stop: #d10000;
  --c-stop-bg: #fdeeee;
  --c-warn: #8a5a00;
  --c-warn-bg: #fff4dc;

  --radius: 8px; /* brand Button.tsx and netcloud.ch */
  --gap: 24px;
  --page-max: 1360px;
  color-scheme: light;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--c-page); color: var(--c-text);
  font-family: var(--nc-font-display); font-size: var(--nc-text-p-s); line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
a { color: var(--c-brand); text-underline-offset: 2px; }
a:hover { color: var(--c-accent); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.note { color: var(--c-text-2); font-size: var(--nc-text-p-xs); font-weight: 400; }
.meta { color: var(--c-text-2); font-size: var(--nc-text-p-xs); }
.hint { color: var(--c-text-2); font-size: var(--nc-text-p-xs); }
.icon { display: block; flex: none; }
.icon-s { width: 32px; height: 32px; }
.icon-m { width: 36px; height: 36px; }
.icon-l { width: 44px; height: 44px; }

/* ------------------------------------------------------------------ app frame */
.appbar { background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.appbar-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 32px; display: flex; align-items: stretch; gap: 32px; min-height: 76px; }
/* Logo with claim (variant 1, colour on white). Clear space: the N height (about 9 px at 56 px)
   stays free on every side; the divider sits 16 px away. */
.brand { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.brand .logo { height: 56px; width: auto; display: block; }
.appname { border-left: 1px solid var(--c-line); padding-left: 16px; font-size: var(--nc-text-p-m); font-weight: 600; line-height: 1.2; }
.appname span { display: block; font-size: var(--nc-text-p-xs); font-weight: 400; color: var(--c-text-2); }
nav.tabs { display: flex; gap: 4px; }
nav.tabs .tab { display: flex; align-items: center; padding: 0 14px; color: var(--c-text); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
nav.tabs .tab:hover { color: var(--c-accent); }
nav.tabs .tab[aria-current="page"] { color: var(--c-accent); border-bottom-color: var(--c-accent); font-weight: 600; }
nav.tabs .tab:focus-visible { outline-offset: -4px; }
.user { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.who { text-align: right; line-height: 1.3; }
.user-name { display: block; font-weight: 500; }
.roles { display: block; font-size: var(--nc-text-p-xs); color: var(--c-text-2); }
.page { display: block; max-width: var(--page-max); margin: 0 auto; padding: 28px 32px 48px; }
.page:focus { outline: none; }
.appfoot { border-top: 1px solid var(--c-line); background: var(--c-surface); }
.appfoot-inner { max-width: var(--page-max); margin: 0 auto; padding: 16px 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--nc-text-p-xs); color: var(--c-text-2); }
.appfoot .claim { color: var(--c-brand); font-weight: 600; }
.state.boot { max-width: var(--page-max); margin: 0 auto; padding: 32px; }

/* ------------------------------------------------------------------ page head and cards */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { flex: 1 1 420px; min-width: 0; }
.page-head h1 { font-size: var(--nc-text-h3); }
.page-head .lead { margin-top: 8px; color: var(--c-text-2); max-width: 760px; }
.page-aside { flex: 0 1 auto; }
.backlink { margin-bottom: 12px; font-size: var(--nc-text-p-xs); }
.backlink a::before { content: "\2190\00a0"; }
.section-title { font-size: var(--nc-text-p-l); margin: 36px 0 16px; }

.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px 24px; min-width: 0; }
.card + .card, .card + details.card, .calc-form > * + * { margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.card-titles { min-width: 0; flex: 1; }
.card-head h2, .card-head h3 { font-size: var(--nc-text-p-m); }
.card-head .hint { margin-top: 4px; }
.kicker { font-size: var(--nc-text-p-xs); font-weight: 600; color: var(--c-accent); margin-bottom: 2px; }
.scroll { overflow-x: auto; position: relative; } /* relative: keeps visually hidden table cells inside the clip */
h3.sub, h4.sub { font-size: var(--nc-text-h5); margin: 20px 0 8px; }

/* ------------------------------------------------------------------ messages and states */
.notice { display: block; border: 1px solid var(--c-line); border-left-width: 4px; border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; background: var(--c-surface); }
.notice:empty { display: none; }
.notice.error { border-color: var(--c-stop); background: var(--c-stop-bg); }
.notice.ok { border-color: var(--c-accent); background: var(--tint-blue-10); }
.notice.info { border-color: var(--c-text-2); }
.state { display: flex; align-items: center; gap: 10px; color: var(--c-text-2); padding: 12px 0; }
.state.empty { justify-content: center; border: 1px dashed var(--c-control); border-radius: var(--radius); padding: 16px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--tint-grey-70); border-top-color: var(--c-accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; background: var(--tint-blue-10); border: 1px solid var(--nc-color-glowing-blue-40); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--nc-color-deep-blue); color: var(--nc-color-white); padding: 10px 18px; border-radius: var(--radius); z-index: 30; }

/* ------------------------------------------------------------------ chips and tags */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: var(--nc-text-p-xs); font-weight: 500; line-height: 1.4; border-radius: 999px; padding: 1px 10px; margin: 0 4px 4px 0; white-space: nowrap; background: var(--tint-grey-20); color: var(--c-text-2); border: 1px solid var(--c-line); }
.chip.stop { background: var(--c-stop-bg); color: var(--c-stop); border-color: var(--c-stop); }
.chip.warn { background: var(--c-warn-bg); color: var(--c-warn); border-color: var(--c-warn); }
.chip.ok { background: var(--tint-blue-10); color: var(--c-text-2); border-color: var(--nc-color-glowing-blue-40); }
.chip.active { background: var(--c-accent); color: var(--nc-color-white); border-color: var(--c-accent); }
.chips { margin-top: 8px; }
.tag { display: inline-block; font-size: var(--nc-text-p-xs); font-weight: 500; line-height: 1.3; color: var(--nc-color-services-violet); background: var(--tint-violet-10); border-radius: 999px; padding: 0 8px; margin-left: 2px; }

/* ------------------------------------------------------------------ buttons (brand Button.tsx) */
.btn { font: inherit; font-size: var(--nc-text-p-s); font-weight: 600; line-height: 1.25; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: var(--radius); border: 1px solid var(--c-accent); background: var(--c-accent); color: var(--nc-color-white); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--c-brand); border-color: var(--c-brand); color: var(--nc-color-white); }
.btn.ghost { background: var(--c-surface); color: var(--c-brand); border-color: var(--c-brand); }
.btn.ghost:hover { background: var(--tint-blue-10); color: var(--c-brand); }
.btn.small { font-size: var(--nc-text-p-xs); min-height: 36px; padding: 6px 14px; }
.btn.wide { width: 100%; }
.btn[disabled], .btn[disabled]:hover { opacity: .45; cursor: not-allowed; background: var(--c-accent); border-color: var(--c-accent); }
.linkbtn { font: inherit; background: none; border: 0; padding: 6px 2px; color: var(--c-brand); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-weight: 500; }
.linkbtn:hover { color: var(--c-accent); }
.actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

/* ------------------------------------------------------------------ form controls */
fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
fieldset.top { margin-top: 20px; }
legend.lbl, label.lbl, span.lbl { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span:first-child { font-size: var(--nc-text-p-xs); font-weight: 500; }
.fld-wrap { min-width: 0; }
.req { font-weight: 400; color: var(--c-text-2); }
.field-error { color: var(--c-stop); font-size: var(--nc-text-p-xs); font-weight: 600; margin-top: 4px; }
.fixed { font-weight: 600; min-height: 44px; display: flex; align-items: center; }
input[type="number"], input[type="text"], input[type="email"], input[type="date"], input[type="month"], select {
  font: inherit; font-size: var(--nc-text-p-s); color: var(--c-text); background: var(--c-surface);
  border: 1px solid var(--c-control); border-radius: 6px; padding: 8px 10px; min-height: 44px; width: 100%; }
input:hover, select:hover { border-color: var(--c-text-2); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 0; border-color: var(--c-accent); }
input[aria-invalid="true"] { border-color: var(--c-stop); box-shadow: 0 0 0 1px var(--c-stop); }
input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--c-accent); flex: none; }
input[type="range"] { width: 100%; margin: 6px 0 0; accent-color: var(--c-accent); height: 28px; }
input[type="file"] { font: inherit; font-size: var(--nc-text-p-xs); padding: 8px 0; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; color: var(--c-brand); background: var(--c-surface); border: 1px solid var(--c-brand); border-radius: var(--radius); padding: 8px 14px; margin-right: 12px; cursor: pointer; }
input.mini { width: 72px; min-height: 36px; padding: 4px 8px; display: inline-block; }
select.inline { width: auto; min-width: 240px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.row3 { display: grid; grid-template-columns: 1.2fr 1.2fr auto; gap: 16px; align-items: end; }
.range { margin-bottom: 16px; }
.optrow + .range { margin-top: 16px; }
.rangeval { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rangeval .lbl { margin: 0; }
.rangeval output { font-weight: 600; white-space: nowrap; }
.seg { display: inline-flex; flex-wrap: wrap; }
.seg button { font: inherit; font-weight: 500; min-height: 44px; padding: 8px 18px; background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-control); margin-left: -1px; cursor: pointer; position: relative; }
.seg button:first-child { margin-left: 0; border-radius: var(--radius) 0 0 var(--radius); }
.seg button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.seg button:hover { background: var(--tint-blue-10); }
.seg button[aria-pressed="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--nc-color-white); font-weight: 600; z-index: 1; }
.seg button:focus-visible { z-index: 2; }
.opt, .optrow { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid var(--c-line); flex-wrap: wrap; }
.opt label, .optrow label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.opt .p, .optrow .p { color: var(--c-text-2); font-size: var(--nc-text-p-xs); display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.optrow .opt-hint { flex-basis: 100%; margin: -4px 0 0; padding-left: 30px; } /* under the option name: checkbox 20 px + gap 10 px */
.opt .free { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; color: var(--c-text); font-weight: 500; }
details.more { margin-top: 4px; border-top: 1px solid var(--c-line); padding-top: 12px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--c-brand); }
details > summary .note { font-weight: 400; }
details.more[open] > summary { margin-bottom: 16px; }
details.inline > summary { font-weight: 500; font-size: var(--nc-text-p-xs); }

/* Professional services: a five-column grid, two columns when the form column is narrow. */
.calc-main { min-width: 0; }
.calc-main .page-head { margin-bottom: 16px; }
.calc-main .page-title { flex-basis: 300px; }
.calc-form { container-type: inline-size; min-width: 0; }
.svc { display: grid; grid-template-columns: 1.4fr .7fr 1fr .75fr .85fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.svc-head span { font-size: var(--nc-text-p-xs); font-weight: 600; color: var(--c-text-2); }
.svc .role small { display: block; font-size: var(--nc-text-p-xs); color: var(--c-text-2); }
.svc .fld > span:first-child { display: none; }
@container (max-width: 600px) {
  .svc { grid-template-columns: 1fr 1fr; padding-bottom: 12px; border-bottom: 1px solid var(--c-line); }
  .svc .role { grid-column: 1 / -1; }
  .svc-head { display: none; }
  .svc .fld > span:first-child { display: block; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt .p { justify-content: flex-start; }
}

/* ------------------------------------------------------------------ calculator layout */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: var(--gap); align-items: start; }
/* The column starts about 100 px below the app bar; the height cap keeps the pinned Export
   button on screen both before and after the column sticks. */
.calc-summary { position: sticky; top: 16px; max-height: calc(100vh - 112px); overflow-y: auto; border-radius: var(--radius); }
.summary { padding: 18px 20px 20px; }
.summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.summary-head h2 { font-size: var(--nc-text-p-m); overflow-wrap: anywhere; }
.updating { font-size: var(--nc-text-p-xs); color: var(--c-text-2); }
.summary .meta { margin-top: 4px; }
.summary.busy .price, .summary.busy .internal { opacity: .6; transition: opacity .2s; }
.section-label { font-size: var(--nc-text-p-xs); font-weight: 600; color: var(--c-text-2); margin: 0 0 8px; }
.price { margin-top: 12px; }
.hero { background: var(--tint-blue-10); border-radius: var(--radius); padding: 10px 16px 12px; }
.hero-label { font-weight: 500; }
.hero-value { font-size: var(--nc-text-h2); font-weight: 600; color: var(--c-accent); line-height: 1.15; letter-spacing: -0.01em; white-space: nowrap; }
.hero-value .cur, .figure .cur { font-size: .5em; font-weight: 600; margin-right: 6px; letter-spacing: 0; }
.hero-note { font-size: var(--nc-text-p-xs); color: var(--c-text-2); }
.figures { margin: 10px 0 0; display: grid; gap: 6px; }
.figure { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.figure dt { font-weight: 500; }
.figure dd { margin: 0 0 0 auto; text-align: right; }
.figure .value { font-size: var(--nc-text-p-m); font-weight: 600; white-space: nowrap; }
.figure .note { display: block; }
/* Internal: a different surface with a deep-blue rule, labelled in words. */
.internal { margin-top: 16px; background: var(--c-page); border-left: 4px solid var(--c-internal); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 14px; }
.internal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.internal-head h3 { font-size: var(--nc-text-h5); color: var(--c-internal); }
.verdict { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.verdict.low p { color: var(--c-stop); }
.alerts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.alert { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--c-surface); border: 1px solid var(--c-line); border-left-width: 4px; border-radius: var(--radius); padding: 10px 12px; }
.alert.stop { border-color: var(--c-stop); background: var(--c-stop-bg); }
.alert.stop strong { color: var(--c-stop); }
.alert.warn { border-color: var(--c-warn); background: var(--c-warn-bg); }
.alert.warn strong { color: var(--c-warn); }
.alert.info { border-left-color: var(--c-text-2); }
.alert-body strong { display: block; font-weight: 600; }
.alert ul, ul.details { margin: 6px 0 0; padding-left: 18px; font-size: var(--nc-text-p-xs); color: var(--c-text-2); }
.alert details > summary { font-size: var(--nc-text-p-xs); font-weight: 500; margin-top: 4px; }
/* The export stays reachable: pinned to the bottom of the scrolling summary column. */
.summary-actions { box-shadow: 0 -10px 14px -12px rgba(0, 0, 0, .25); position: sticky; bottom: 0; margin: 16px -20px -20px; padding: 12px 20px 16px; background: var(--c-surface); border-top: 1px solid var(--c-line); border-radius: 0 0 var(--radius) var(--radius); }
.summary-actions .notice { margin-bottom: 0; }

.loadbar { display: flex; flex-direction: column; gap: 6px; }
.loadbar .lbl { margin: 0; }
.loadrow { display: flex; gap: 8px; }
.loadrow input { width: 200px; }
details.card.assume { padding: 16px 24px; }
details.assume > summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--c-internal); list-style-position: inside; }
details.assume > summary::-webkit-details-marker { display: none; }
details.assume > summary .summary-title { font-size: var(--nc-text-p-m); }
details.assume[open] > summary { margin-bottom: 16px; }
.assume-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 12px; align-items: end; } /* labels of different length: the inputs line up */
.assume-grid label { font-size: var(--nc-text-p-xs); font-weight: 500; display: flex; flex-direction: column; gap: 4px; }
.assume-grid label.changed input { border-color: var(--c-warn); background: var(--c-warn-bg); box-shadow: 0 0 0 1px var(--c-warn); }
.assume .btn { margin-top: 8px; }

.details-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--gap); align-items: start; margin-bottom: 16px; }
.details-grid > .card { margin-top: 0; }

/* ------------------------------------------------------------------ tables */
table.t { width: 100%; border-collapse: collapse; font-size: var(--nc-text-p-xs); }
table.t th, table.t td { padding: 8px; text-align: left; vertical-align: top; }
table.t thead th { font-weight: 600; color: var(--c-text-2); border-bottom: 2px solid var(--c-text); white-space: nowrap; }
table.t thead tr.group th, table.t thead tr.group td { border-bottom: 0; padding-bottom: 2px; }
table.t tbody th { font-weight: 500; }
table.t tbody td, table.t tbody th { border-bottom: 1px solid var(--c-line); }
table.t td.wrap { min-width: 200px; }
table.t .num { text-align: right; white-space: nowrap; }
table.t tfoot th, table.t tfoot td { font-weight: 600; border-top: 2px solid var(--c-text); }
table.t .internal-col { background: var(--tint-grey-20); }
table.t thead tr.group th.internal-col { color: var(--c-internal); text-align: center; border-radius: 6px 6px 0 0; }
table.t td.derived { color: var(--c-text-2); }
table.t td.hl { background: var(--tint-blue-10); color: var(--c-text); font-weight: 600; box-shadow: inset 0 0 0 2px var(--c-accent); }
table.t .src { display: block; font-size: var(--nc-text-p-xs); color: var(--c-text-2); font-weight: 400; }
table.t tr.latest th { font-weight: 600; }
table.t tr.latest th .chip { margin: 2px 0 0; }
td.actions { display: table-cell; white-space: nowrap; }
td.actions > * + * { margin-left: 8px; }
.nowrap { white-space: nowrap; }
table.revisions .src { white-space: normal; max-width: 220px; }
table.revisions td.wrap { min-width: 0; }
table.revisions td.actions.stack > * { display: flex; width: 100%; }
table.revisions td.actions.stack > * + * { margin: 6px 0 0; }

/* ------------------------------------------------------------------ charts */
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--nc-text-p-xs); color: var(--c-text); margin: 12px 0 8px; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--nc-font-display); }
.chart .grid { stroke: var(--c-line); stroke-width: 1; }
.chart .axis { stroke: var(--c-control); stroke-width: 1; }
.chart .tick { fill: var(--c-text-2); font-size: 13px; }
.chart .cap, .chart .val { fill: var(--c-text); font-size: 14px; font-weight: 600; }
.chart .lab { fill: var(--c-text); font-size: 14px; }
.chart .mark { transition: opacity .12s; }
.chart:hover .mark { opacity: .6; }
.chart .mark:hover { opacity: 1; }

/* ------------------------------------------------------------------ offer and template pages */
.latest-grid { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: var(--gap) 48px; align-items: start; }
.latest-grid .price, .latest-grid .internal { margin-top: 0; }
.latest-grid .figures { margin-top: 0; }
.howto { display: flex; gap: 8px 32px; flex-wrap: wrap; margin: 0 0 16px; padding-left: 20px; color: var(--c-text-2); }
.howto li::marker { color: var(--c-accent); font-weight: 600; }
.howto strong { color: var(--c-text); }
.report.ok > summary { color: var(--c-text-2); }
.report.not-ok > summary { color: var(--c-stop); }
.rep { margin-top: 6px; }
.rep ul { margin: 2px 0 6px; padding-left: 18px; font-size: var(--nc-text-p-xs); }
.rep.error strong { color: var(--c-stop); }
.rep.warn strong { color: var(--c-warn); }

/* ------------------------------------------------------------------ modal dialogs (local preview sign-in; confirmations) */
.modal { position: fixed; inset: 0; background: rgba(44, 47, 102, .6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.modal .panel { background: var(--c-surface); border-radius: 12px; padding: 28px 32px; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 24px 64px rgba(0, 0, 0, .3); }
.modal .logo { height: 56px; width: auto; display: block; margin-bottom: 20px; }
.modal h2 { font-size: var(--nc-text-p-l); margin: 2px 0 8px; }
.modal .hint { margin-bottom: 16px; }
.modal .fld { margin-bottom: 16px; }
.modal fieldset { margin-bottom: 20px; }
.modal legend { font-weight: 600; margin-bottom: 6px; }
.modal .role { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--c-line); cursor: pointer; }
.modal .role input { margin-top: 2px; }
.modal .role strong { display: block; font-weight: 600; }
/* Confirmations: native <dialog> opened with showModal(), same panel and backdrop as the sign-in. */
dialog.confirm { border: 0; border-radius: 12px; padding: 24px 28px; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--c-surface); color: var(--c-text); box-shadow: 0 24px 64px rgba(0, 0, 0, .3); }
dialog.confirm::backdrop { background: rgba(44, 47, 102, .6); }
dialog.confirm h2 { font-size: var(--nc-text-p-l); margin: 0 0 12px; }
dialog.confirm .actions { margin-top: 24px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .calc-grid { grid-template-columns: minmax(0, 1fr) minmax(330px, 380px); }
  table.t th, table.t td { padding: 8px 6px; } /* German compounds are long: the price and revision tables still fit at 1024 px */
  .appbar-inner { gap: 20px; padding: 0 24px; }
  .page { padding: 24px 24px 40px; }
  .appfoot-inner { padding: 16px 24px; }
}
@media (max-width: 900px) {
  .calc-grid, .details-grid, .latest-grid, .row3 { grid-template-columns: minmax(0, 1fr); }
  .calc-summary { position: static; max-height: none; overflow: visible; }
  .summary-actions { position: static; }
  .appbar-inner { flex-wrap: wrap; padding: 8px 16px; gap: 8px 16px; }
  nav.tabs { order: 3; width: 100%; }
  nav.tabs .tab { padding: 10px 12px; }
  .page { padding: 20px 16px 32px; }
  .appfoot-inner { padding: 16px; }
  .grid-2, .assume-grid { grid-template-columns: minmax(0, 1fr); }
  .brand .logo { height: 48px; }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .loadrow input { width: 100%; }
  .user { margin-left: 0; width: 100%; justify-content: space-between; }
  .who { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
