:root {
  --ink: #11231d;
  --muted: #5c6a63;
  --surface: #f4f1ea;
  --paper: #fffdf8;
  --line: #d7d0c4;
  --dark: #141922;
  --dark-2: #173027;
  --green: #39744d;
  --blue: #356b8f;
  --purple: #6554a3;
  --red: #9a434a;
  --gold: #8b7121;
  --radius: 8px;
  --shadow: 0 18px 44px rgba(20, 25, 34, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
}
button, input, select, textarea {
  font: inherit;
}
a { color: inherit; }

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--surface);
}
.login-card {
  position: relative;
  z-index: 10;
  width: min(100%, 440px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: var(--shadow);
}
.login-card h1,
.topbar h1,
.content-panel h2,
.content-panel h3 {
  margin: 0;
  line-height: 1.05;
}
.login-card h1 { font-size: clamp(2.3rem, 8vw, 4rem); }
.login-card p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: 0.4rem; font-weight: 800; }
label span { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.8rem 0.9rem;
}
textarea {
  min-height: 420px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}
.button {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-weight: 900;
  cursor: pointer;
}
.button.primary { background: var(--green); border-color: var(--green); color: #fff; }
.login-card .button.primary {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.button.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.button.small { padding: 0.55rem 0.7rem; font-size: 0.9rem; }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(53, 107, 143, 0.34);
  outline-offset: 2px;
}
.status {
  padding: 0.8rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.status.error { border-color: #c77478; color: #7b2028; background: #fff2f2; }
.status.ok { border-color: #8dbd95; color: #1f5d35; background: #edf8ef; }
.muted {
  color: var(--muted);
}
.mfa-panel h2 {
  margin: 0;
  font-size: 1.5rem;
}
.mfa-setup-box {
  display: grid;
  gap: 0.8rem;
}
.mfa-qr {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.mfa-qr span {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 900;
}
.mfa-qr svg {
  display: block;
  width: min(240px, 100%);
  height: auto;
  image-rendering: pixelated;
}
.mfa-secret-box {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.mfa-secret-box span {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 900;
}
.mfa-secret-box strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.mfa-secret-box input {
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.app-root {
  min-height: 100vh;
}
.home-view {
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2rem);
}
.home-shell {
  display: grid;
  gap: 1.2rem;
  max-width: 1440px;
  margin-inline: auto;
}
.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
}
.module-header h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.module-title-button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
}
.module-header p {
  max-width: 86ch;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.55;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.module-card {
  min-height: 220px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  border: 1px solid var(--line);
  border-top: 8px solid var(--green);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(1rem, 3vw, 1.4rem);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(20, 25, 34, 0.06);
}
.module-card-services { border-top-color: var(--green); }
.module-card-technical { border-top-color: var(--blue); }
.module-card-pricing { border-top-color: var(--gold); }
.module-card-ai { border-top-color: var(--purple); }
.module-card-readiness { border-top-color: var(--red); }
.module-card strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.module-meta {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}
.sidebar {
  background: linear-gradient(180deg, var(--dark), var(--dark-2));
  color: #fff;
  padding: 1.2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.brand-mark {
  width: 42px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--blue), var(--purple));
  font-weight: 950;
}
.brand strong { display: block; font-size: 1.1rem; }
.brand span { color: rgba(255, 255, 255, 0.7); }
.service-search {
  margin-top: 1rem;
  color: #fff;
}
.service-search span {
  color: rgba(255, 255, 255, 0.68);
}
.service-search input {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.service-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
.service-tree { display: grid; gap: 1rem; margin-top: 1rem; }
.tree-empty {
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}
.tree-group {
  display: grid;
  gap: 0.45rem;
  border-left: 2px solid rgba(255, 255, 255, 0.14);
  padding-left: 0.75rem;
}
.tree-group h2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.66);
}
.tree-group h2 small {
  display: inline-grid;
  min-width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}
.tree-branch-toggle {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.8;
}
.tree-branch-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.86rem;
  line-height: 1.45;
}
.tree-children {
  display: grid;
  gap: 0.45rem;
}
.tree-button {
  width: 100%;
  display: grid;
  gap: 0.25rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left-width: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
}
.tree-button span { color: rgba(255, 255, 255, 0.68); font-size: 0.88rem; }
.tree-button.active { background: rgba(255, 255, 255, 0.17); }
.branch-huvudtjanst { border-left-color: var(--green); }
.branch-arbetsplats { border-left-color: var(--blue); }
.branch-sakerhet { border-left-color: var(--red); }
.branch-ai { border-left-color: var(--purple); }
.branch-drift { border-left-color: var(--gold); }
.branch-kommunikation { border-left-color: var(--blue); }
.branch-migration { border-left-color: var(--gold); }
.branch-radgivning { border-left-color: var(--blue); }
.branch-default { border-left-color: var(--gold); }

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem clamp(1rem, 3vw, 2rem);
  background: var(--dark);
  color: #fff;
}
.topbar h1 { font-size: clamp(2rem, 5vw, 4rem); overflow-wrap: anywhere; }
.topbar-module-button {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  font: inherit;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.topbar .eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.topbar .eyebrow span::before {
  content: "·";
  margin-right: 0.45rem;
  color: rgba(255, 255, 255, 0.42);
}
.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 950;
  color: var(--blue);
}
.topbar .eyebrow { color: rgba(255, 255, 255, 0.62); }
.tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.8rem clamp(1rem, 3vw, 2rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.tab-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 0.55rem 0.85rem;
  font-weight: 900;
  cursor: pointer;
}
.tab-button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.content-panel {
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem);
}
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1rem;
  align-items: start;
}
.card,
.package-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 8px 24px rgba(20, 25, 34, 0.06);
  min-width: 0;
}
.card.dark {
  background: var(--dark);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}
.content-panel p,
.content-panel li {
  color: #33413a;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.card.dark p,
.card.dark li { color: rgba(255, 255, 255, 0.78); }
.package-grid,
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.package-card {
  border-top: 8px solid var(--green);
}
.package-card:nth-child(2) { border-top-color: var(--blue); }
.package-card:nth-child(3) { border-top-color: var(--purple); }
.package-card:nth-child(4) { border-top-color: var(--red); }
.package-card:nth-child(5) { border-top-color: var(--gold); }
.package-card ul,
.card ul { padding-left: 1.2rem; }
.package-fit {
  font-weight: 800;
}
.calc-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.commercial-editor-grid {
  margin-top: 1rem;
}
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}
.checkbox-group legend {
  width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.35rem 0.6rem;
  font-weight: 850;
}
.checkbox-group input {
  width: auto;
  min-height: 0;
}
.admin-wide-card {
  grid-column: 1 / -1;
}
.runtime-status-card {
  align-items: start;
}
.runtime-status-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.runtime-status-badge {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
}
.runtime-status-badge.ok { border-color: rgba(49, 125, 86, 0.38); color: var(--green); }
.runtime-status-badge.warn { border-color: rgba(189, 139, 55, 0.42); color: #8a5d14; }
.runtime-status-badge.fail { border-color: rgba(167, 74, 60, 0.42); color: var(--red); }
.runtime-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.runtime-check-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.runtime-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff;
}
.runtime-check.ok { border-left-color: var(--green); }
.runtime-check.warn { border-left-color: var(--gold); }
.runtime-check.fail { border-left-color: var(--red); }
.runtime-check.info { border-left-color: var(--blue); }
.runtime-check p,
.runtime-check small {
  margin: 0.25rem 0 0;
  color: var(--muted);
}
.runtime-check small {
  display: block;
  line-height: 1.45;
}
.runtime-check > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.45rem;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
}
.audit-table {
  min-width: 760px;
}
.audit-table td {
  vertical-align: top;
}
.user-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}
.user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.user-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.calculator-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
}
.package-calculator-grid {
  grid-template-columns: 1fr;
}
.package-calculator-grid .calc-result-panel {
  position: static;
}
.package-calculator-grid .calc-result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.calculator-workbook {
  display: grid;
  gap: 1rem;
}
.workbook-card {
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.calc-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}
.package-calc-table {
  min-width: 860px;
}
.global-calc-table {
  min-width: 1180px;
}
.calc-table th,
.calc-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem;
  text-align: left;
  vertical-align: middle;
}
.calc-table th {
  background: #f7f5ef;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.calc-table input,
.calc-table select {
  min-height: 38px;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
}
.calc-table .number-output {
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}
.dual-number {
  line-height: 1.35;
}
.dual-number > span,
.dual-number > small {
  display: block;
}
.dual-number small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}
.table-subtext {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}
.admin-commercial-table th:first-child,
.admin-commercial-table td:first-child {
  min-width: 260px;
}
.admin-commercial-table input[type="number"] {
  width: 132px;
}
.admin-commercial-table input[type="text"],
.admin-commercial-table select {
  width: 132px;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  white-space: nowrap;
}
.inline-check input {
  width: 18px;
  height: 18px;
  min-height: 0;
}
.row-actions {
  display: flex;
  gap: 0.45rem;
  min-width: 220px;
}
.compact-toolbar {
  align-items: center;
}
.compact-control {
  min-width: 180px;
}
.global-package-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.global-package-targets span,
.commercial-chip-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 850;
}
.calc-result-panel {
  position: sticky;
  top: 1rem;
}
.calc-result-grid {
  display: grid;
  gap: 0.7rem;
}
.metric-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
}
.card .metric-card {
  border-color: var(--line);
  background: #fff;
}
.metric-card span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.card .metric-card span {
  color: var(--muted);
}
.metric-card strong {
  display: block;
  margin-top: 0.15rem;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.metric-card p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.72);
}
.card .metric-card p {
  color: var(--muted);
}
.readiness-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--dark);
  color: #fff;
}
.readiness-banner p {
  max-width: 82ch;
  color: rgba(255, 255, 255, 0.76);
}
.readiness-banner strong {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: rgba(255, 255, 255, 0.08);
}
.readiness-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.readiness-metric {
  background: #fff;
  border-color: var(--line);
}
.readiness-metric.warn { border-top: 6px solid var(--gold); }
.readiness-metric.ok { border-top: 6px solid var(--green); }
.readiness-metric span,
.readiness-metric small {
  color: var(--muted);
}
.readiness-metric small {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.35;
}
.readiness-gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.readiness-gate-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  border-radius: 8px;
  background: #fff;
}
.readiness-gate-card.ok { border-top-color: var(--green); }
.readiness-gate-card.warn { border-top-color: var(--gold); }
.readiness-gate-card.blocker { border-top-color: var(--red); }
.readiness-gate-card h2 {
  margin-bottom: 0.35rem;
}
.readiness-gate-card p {
  margin: 0;
  color: var(--muted);
}
.readiness-gate-card code {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}
.readiness-card {
  display: grid;
  gap: 1rem;
}
.readiness-issue-list,
.review-service-list {
  display: grid;
  gap: 0.65rem;
}
.readiness-action-card {
  align-items: start;
}
.readiness-action-list {
  display: grid;
  gap: 0.75rem;
}
.readiness-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  background: #fff;
}
.readiness-action-row.blocker {
  border-left-color: var(--red);
}
.readiness-action-main {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}
.readiness-action-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.readiness-action-head strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.readiness-action-owner {
  flex: 0 0 auto;
  max-width: 40%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.45rem;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}
.readiness-action-row p,
.readiness-action-row small {
  margin: 0;
  color: var(--muted);
}
.readiness-action-row small {
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.readiness-action-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.readiness-action-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}
.underlag-editor-card {
  align-items: start;
}
.underlag-editor {
  display: grid;
  gap: 1rem;
}
.underlag-editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}
.underlag-service-select {
  min-width: 0;
}
.underlag-status-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 8px;
  background: #fff;
}
.underlag-status-panel.blocker {
  border-left-color: var(--red);
}
.underlag-status-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: start;
}
.underlag-status-head h3,
.underlag-status-head p {
  margin: 0;
}
.underlag-status-head > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: right;
}
.underlag-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}
.underlag-status-item {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  min-height: 118px;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: 8px;
  background: var(--paper);
}
.underlag-status-item.blocker {
  border-top-color: var(--red);
}
.underlag-status-item.warning {
  border-top-color: var(--gold);
}
.underlag-status-item div {
  display: grid;
  gap: 0.15rem;
}
.underlag-status-item strong {
  font-size: 0.92rem;
}
.underlag-status-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.underlag-status-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.underlag-status-fields {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.underlag-status-fields > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.underlag-status-fields span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}
.underlag-question-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}
.underlag-question-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}
.underlag-question-head h3,
.underlag-question-head p {
  margin: 0;
}
.underlag-question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.underlag-question-group {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.underlag-question-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  justify-content: space-between;
  align-items: center;
}
.underlag-question-group span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}
.underlag-question-group p {
  margin: 0;
  color: var(--muted);
}
.underlag-question-group ul {
  margin: 0;
  padding-left: 1.1rem;
}
.underlag-question-group li + li {
  margin-top: 0.35rem;
}
.underlag-editor-section {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.underlag-editor-section h3 {
  margin: 0;
}
.underlag-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.underlag-field {
  min-width: 0;
}
.underlag-field textarea {
  min-height: 118px;
  resize: vertical;
}
.underlag-field small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.readiness-issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.8rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  background: #fff;
}
.readiness-issue.blocker { border-left-color: var(--red); }
.readiness-issue.warning { border-left-color: var(--gold); }
.readiness-issue span {
  font-size: 1.1rem;
  font-weight: 950;
}
.readiness-issue p {
  grid-column: 1 / -1;
  margin: 0;
}
.review-service-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  text-align: left;
  cursor: pointer;
}
.review-service-button span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}
.review-service-button.branch-huvudtjanst { border-left-color: var(--green); }
.review-service-button.branch-arbetsplats { border-left-color: var(--blue); }
.review-service-button.branch-sakerhet { border-left-color: var(--red); }
.review-service-button.branch-ai { border-left-color: var(--purple); }
.review-service-button.branch-drift { border-left-color: var(--gold); }
.review-service-button.branch-kommunikation { border-left-color: var(--blue); }
.review-service-button.branch-migration { border-left-color: var(--gold); }
.review-service-button.branch-radgivning { border-left-color: var(--blue); }
.review-service-button.branch-default { border-left-color: var(--gold); }
.commercial-summary-card,
.ai-answer-card,
.ai-search-panel {
  display: grid;
  gap: 1rem;
}
.commercial-summary-card,
.ai-answer-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  border-radius: 8px;
  padding: clamp(1rem, 3vw, 1.4rem);
}
.commercial-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ai-search-panel {
  margin-top: 0.2rem;
}
.module-search-form p {
  margin: 0;
  color: var(--muted);
}
.ai-followups {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f6ef;
  padding: 1rem;
}
.ai-followups h4 {
  margin: 0 0 0.5rem;
}
.compact-table-scroll .calc-table,
.ai-price-table {
  min-width: 760px;
}
.result-number {
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 950;
  margin: 0.2rem 0 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}
.compact-actions {
  gap: 0.5rem;
}
.data-help {
  margin-top: 0;
  max-width: 76ch;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.meta-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
}
.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
  padding: clamp(1.2rem, 3vw, 2rem);
}
.guide-hero h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}
.guide-hero p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 82ch;
}
.guide-score {
  min-width: 140px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}
.guide-score strong {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
}
.guide-score span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.guide-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tldr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.guide-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 6px solid var(--green);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(20, 25, 34, 0.05);
}
.guide-card:nth-child(2) { border-top-color: var(--blue); }
.guide-card:nth-child(3) { border-top-color: var(--purple); }
.guide-card.warning {
  border-top-color: var(--gold);
  background: #fff9e8;
}
.guide-card-wide {
  grid-column: 1 / -1;
}
.guide-card h3 {
  margin-bottom: 0.5rem;
}
.guide-card ul {
  padding-left: 1.15rem;
}
.document-page {
  max-width: 1040px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 12px 34px rgba(20, 25, 34, 0.08);
}
.document-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.document-toolbar h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}
.document-section,
.document-edit-section {
  display: grid;
  gap: 0.55rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid rgba(215, 208, 196, 0.72);
}
.document-section:last-child,
.document-edit-section:last-child {
  border-bottom: 0;
}
.document-section h3,
.document-edit-section h3 {
  font-size: 1rem;
  color: var(--dark-2);
}
.document-section p,
.document-section li {
  max-width: 82ch;
}
.document-editor {
  max-width: 1120px;
}
.product-sheet-preview {
  max-width: 1040px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 8px solid var(--green);
  border-radius: 8px;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 12px 34px rgba(20, 25, 34, 0.08);
}
.editable-field {
  min-height: 3.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.editable-field:focus {
  outline: 3px solid rgba(53, 107, 143, 0.28);
  outline-offset: 2px;
  border-color: var(--blue);
}
.editable-field.list-field {
  min-height: 5rem;
}
.technical-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.technical-list {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.technical-list .tree-group {
  padding-left: 0.65rem;
}
.technical-list .tree-group h2 {
  color: var(--muted);
}
.technical-list .tree-group h2 small {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
}
.tech-service-button {
  display: grid;
  gap: 0.25rem;
  text-align: left;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.7rem;
  cursor: pointer;
}
.tech-service-button.branch-huvudtjanst { border-left-color: var(--green); }
.tech-service-button.branch-arbetsplats { border-left-color: var(--blue); }
.tech-service-button.branch-sakerhet { border-left-color: var(--red); }
.tech-service-button.branch-ai { border-left-color: var(--purple); }
.tech-service-button.branch-drift { border-left-color: var(--gold); }
.tech-service-button.branch-kommunikation { border-left-color: var(--blue); }
.tech-service-button.branch-migration { border-left-color: var(--gold); }
.tech-service-button.branch-radgivning { border-left-color: var(--blue); }
.tech-service-button.branch-default { border-left-color: var(--gold); }
.tech-service-button.active {
  background: #eef6fb;
  border-top-color: #9cc6df;
  border-right-color: #9cc6df;
  border-bottom-color: #9cc6df;
}
.tech-service-button span {
  color: var(--muted);
  font-size: 0.86rem;
}
.tech-guide {
  margin-inline: 0;
}
.reference-list a {
  color: var(--blue);
  font-weight: 800;
}
.search-results {
  display: grid;
  gap: 1rem;
}
.search-result h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .service-tree { grid-template-columns: 1fr; }
  .section-grid, .calc-grid, .admin-grid, .calculator-grid, .technical-layout, .readiness-metric-grid, .readiness-gate-grid, .runtime-summary-grid, .underlag-editor-grid, .underlag-status-grid, .underlag-question-grid { grid-template-columns: 1fr; }
  .readiness-banner { display: grid; }
  .readiness-gate-card { display: grid; }
  .runtime-status-head, .runtime-check { display: grid; }
  .underlag-editor-toolbar { grid-template-columns: 1fr; }
  .underlag-question-head { grid-template-columns: 1fr; }
  .underlag-status-head { grid-template-columns: 1fr; }
  .underlag-status-head > span { justify-self: start; text-align: left; }
  .readiness-action-row { grid-template-columns: 1fr; }
  .readiness-action-head { display: grid; }
  .readiness-action-owner { max-width: none; text-align: left; justify-self: start; }
  .package-grid, .list-grid, .guide-grid, .guide-grid.two, .tldr-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .document-toolbar { flex-direction: column; }
  .guide-hero { grid-template-columns: 1fr; }
  .technical-list, .calc-result-panel { position: static; max-height: none; }
  .module-header { flex-direction: column; }
  .package-calculator-grid .calc-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .sidebar { padding: 1rem; }
  .topbar { flex-direction: column; }
  .button.ghost { color: var(--ink); background: #fff; }
  .tabs { padding-inline: 1rem; }
  .content-panel { padding: 1rem; }
  .login-card h1 { font-size: 2.4rem; }
  .topbar h1 { font-size: 2.1rem; }
  .home-view { padding: 0.8rem; }
  .module-card { min-height: 180px; }
}
