/* AVA AI Audit, portal. Tokens från designytan (Grund och komponenter). */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.0e46e732cced.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --ink: #0A0A0A; --frame: #111111; --frame-2: #262626; --frame-line: #2E2E2E;
  --text-2: #474747; --label: #5A5A5A; --on-frame: #C8C8C8; --on-frame-2: #A3A3A3;
  --bg: #EFEEE9; --panel: #FFFFFF; --line: #E2E0D8; --line-2: #EFEEE9; --soft: #F7F6F2; --col: #E6E4DC;
  --yellow: #FFF055; --yellow-soft: #FFF9C2; --green: #2F6B4F; --green-soft: #E3EFE8; --green-ink: #1F4D38; --rival: #8A8A8A;
  --r: 14px; --r-s: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Geist", system-ui, sans-serif; font-variant-numeric: tabular-nums lining-nums; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 4px var(--yellow); }
h1, h2, h3, p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Ram */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--frame); color: #fff; padding: 28px 20px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; }
.brand img { width: 56px; height: 18px; }
.brand span { font-size: 14px; color: #B5B5B5; }
.clientbox { border: 1px solid var(--frame-line); border-radius: 10px; padding: 12px 14px; }
.clientbox small { display: block; font-size: 12px; color: var(--on-frame-2); }
.clientbox strong { display: block; font-size: 15px; font-weight: 500; margin-top: 2px; }
.clientbox select { margin-top: 8px; width: 100%; background: var(--frame-2); color: #fff; border: 1px solid var(--frame-line); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; }
.nav { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.nav a { display: flex; justify-content: space-between; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 8px; text-decoration: none; color: var(--on-frame); }
.nav a:hover { background: #1C1C1C; color: #fff; }
.nav a[aria-current="page"] { background: var(--frame-2); color: #fff; box-shadow: inset 3px 0 0 var(--yellow); }
.nav a span:last-child { font-size: 12px; color: var(--on-frame-2); margin-left: 8px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-foot .meta { font-size: 12px; color: var(--on-frame-2); line-height: 1.6; padding: 0 8px; }
.btn-dl { display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 8px; background: var(--yellow); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.btn-dl.alt { background: transparent; color: var(--on-frame); border: 1px solid var(--frame-line); font-weight: 400; }
.side-foot .who { font-size: 12px; color: var(--on-frame-2); padding: 0 8px; }
.side-foot .who a { color: var(--on-frame); }

.main { padding: 32px 40px 56px; min-width: 0; }
.crumbs { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 13px; color: var(--label); flex-wrap: wrap; }
.draft { background: var(--yellow-soft); border: 1px solid #E8DC6A; color: var(--ink); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.h1 { font-size: 34px; line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; max-width: 880px; margin-bottom: 8px; }
.lead { font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 760px; margin-bottom: 24px; }

/* Byggstenar */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.pad { padding: 24px 26px; }
.ph { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.label { font-size: 13px; color: var(--label); }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.kpi { padding: 20px 22px; }
.kpi .v { font-size: 40px; font-weight: 500; letter-spacing: -0.03em; margin: 8px 0 4px; line-height: 1.1; }
.kpi .n { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.kpi.accent { box-shadow: inset 0 4px 0 var(--yellow); }
.chip { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; line-height: 1.5; white-space: nowrap; }
.k-risk { background: var(--yellow); }
.k-svaghet { background: var(--line-2); }
.k-möjlighet { border: 1px solid var(--ink); }
.k-styrka { background: var(--green-soft); color: var(--green-ink); }
.k-neutral { border: 1px solid #CFCDC4; color: var(--text-2); }
.bar-risk { background: var(--yellow); } .bar-svaghet { background: var(--rival); } .bar-möjlighet { background: var(--ink); }
.bar-styrka { background: var(--green); } .bar-neutral { background: #D4D2CA; }
.more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; border: 1px solid var(--ink); background: var(--panel); color: var(--ink); }
.btn.primary { background: var(--frame); color: #fff; border-color: var(--frame); }

/* Punktdiagram */
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot-me { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--yellow); display: inline-block; }
.dot-rv { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--rival); display: inline-block; }
.drow { display: grid; grid-template-columns: 150px minmax(0, 1fr) 170px; align-items: center; gap: 20px; min-height: 62px; border-top: 1px solid var(--line-2); }
.track { position: relative; height: 24px; }
.track .axis { position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: var(--line); }
.track .ci { position: absolute; top: 11px; height: 2px; background: var(--ink); }
.track .rv { position: absolute; top: 6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--rival); background: #fff; }
.track .me { position: absolute; top: 5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--yellow); }
.dval { font-size: 13px; line-height: 1.35; }
.dval b { font-weight: 600; }
.dval span { color: var(--text-2); }
.scale { display: grid; grid-template-columns: 150px minmax(0, 1fr) 170px; gap: 20px; font-size: 12px; color: var(--label); border-top: 1px solid var(--line-2); padding-top: 8px; }
.scale div { display: flex; justify-content: space-between; }

.list-item { padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.list-item h3 { font-size: 16px; font-weight: 500; line-height: 1.35; margin-top: 8px; }
.list-item p { font-size: 14px; line-height: 1.5; color: var(--text-2); margin-top: 4px; }
.firm { display: grid; grid-template-columns: 24px minmax(0, 1fr) 120px 48px; gap: 12px; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px; font-size: 15px; }
.firm.me { background: var(--yellow-soft); font-weight: 600; }
.firm .r { color: var(--label); }
.firm .b { height: 6px; border-radius: 3px; background: var(--line-2); position: relative; }
.firm .b i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ink); }
.firm .p { text-align: right; font-weight: 600; }
.rec-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.rec-row .id { font-size: 13px; color: var(--label); }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--line-2); white-space: nowrap; }

/* Insikter */
.dist { padding: 20px 24px; }
.dist .bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.dist .keys { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.dist .keys span { display: inline-flex; align-items: center; gap: 6px; }
.dist .keys i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.two { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.filter { padding: 18px 16px; position: sticky; top: 24px; }
.filter .t { font-size: 12px; color: var(--label); margin: 0 8px 8px; }
.filter a { display: flex; justify-content: space-between; min-height: 40px; align-items: center; padding: 0 10px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.filter a[aria-current="true"] { background: var(--frame); color: #fff; }
.filter .dim { display: flex; justify-content: space-between; min-height: 32px; align-items: center; padding: 0 10px; font-size: 14px; color: #2A2A2A; }
.filter .dim span:last-child { color: var(--label); }
.cards { display: flex; flex-direction: column; gap: 10px; }
.icard { display: grid; grid-template-columns: 6px minmax(0, 1fr) 140px; overflow: hidden; }
.icard .body { padding: 20px 24px; }
.icard .top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.icard h2 { font-size: 18px; font-weight: 500; line-height: 1.3; margin-bottom: 6px; }
.icard p { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.icard .side2 { padding: 20px 20px 20px 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 13px; color: var(--label); text-align: right; }
.icard .side2 b { color: var(--ink); font-weight: 500; }
.ai-note { font-size: 12px; color: var(--label); }

/* Rekommendationer */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--col); border-radius: 16px; padding: 12px; }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 12px; }
.col-h h2 { font-size: 15px; font-weight: 600; }
.col-h span { font-size: 13px; color: var(--text-2); }
.rcard { padding: 18px 18px 16px; margin-bottom: 10px; }
.rcard .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.rcard h3 { font-size: 17px; font-weight: 500; line-height: 1.3; margin-bottom: 10px; }
.rcard ul { margin: 0 0 12px; padding-left: 18px; font-size: 14px; line-height: 1.5; color: #2A2A2A; }
.rcard li { margin-bottom: 3px; }
.rcard .foot { border-top: 1px solid var(--line-2); padding-top: 10px; font-size: 13px; line-height: 1.45; }
.imp-hög { background: var(--yellow); } .imp-medel { background: var(--line-2); } .imp-låg { border: 1px solid #CFCDC4; color: var(--text-2); }

/* Data */
.toolbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.field { min-height: 38px; padding: 0 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font: inherit; font-size: 14px; color: var(--ink); }
.field.search { min-width: 260px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.qtable { overflow: hidden; }
.qhead, .qrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) repeat(var(--n), 58px); gap: 8px; align-items: center; padding: 8px 18px; }
.qhead { font-size: 12px; color: var(--label); border-bottom: 1px solid var(--line); padding: 14px 18px; align-items: end; }
.qrow { min-height: 58px; border-bottom: 1px solid var(--line-2); text-decoration: none; }
.qrow:hover { background: var(--soft); }
.qrow[aria-current="true"] { background: var(--yellow-soft); }
.qrow .num { font-size: 13px; color: var(--label); }
.qrow .q { font-size: 14px; line-height: 1.35; }
.qrow .m { display: block; font-size: 12px; color: var(--label); margin-top: 2px; }
.qrow .d { font-size: 11px; letter-spacing: 2px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; font-size: 13px; color: var(--text-2); }
.pager a { margin-left: 6px; }
.ans { padding: 22px 22px 20px; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; }
.ans h2 { font-size: 18px; font-weight: 500; line-height: 1.35; margin: 6px 0 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--line-2); text-decoration: none; }
.tabs a[aria-current="true"] { background: var(--frame); color: #fff; }
.runs { display: flex; gap: 6px; font-size: 12px; margin-bottom: 12px; }
.runs a { padding: 3px 10px; border-radius: 999px; background: var(--line-2); text-decoration: none; }
.runs a[aria-current="true"] { background: var(--frame); color: #fff; }
.atext { background: var(--soft); border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.6; color: #2A2A2A; }
.atext p { margin: 0 0 10px; }
.atext h3 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; color: var(--ink); }
.atext h3:first-child { margin-top: 0; }
.atext h3 .n { color: var(--label); font-weight: 500; }
.atext ul { margin: 0 0 10px; padding-left: 18px; }
.atext li { margin-bottom: 6px; }
.atext li::marker { color: var(--label); }
.atext strong { font-weight: 600; color: var(--ink); }
.atext mark { background: var(--yellow); color: var(--ink); padding: 0 2px; font-weight: 600; }
.srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.srcs span { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--line-2); }

.filterbar { margin: -4px 0 12px; font-size: 14px; color: var(--text-2); }
.filterbar a { font-weight: 500; color: var(--ink); }

/* Metod */
.facts .v { font-size: 34px; }
.mrow { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 14px; line-height: 1.45; }
.mrow b { font-weight: 500; }
.mrow span { color: var(--text-2); }
ol.steps { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; color: #2A2A2A; }
ol.steps li { margin-bottom: 8px; }
.limits { box-shadow: inset 0 4px 0 var(--yellow); }

/* Inloggning */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 560px; }
.auth-hero { background: var(--frame); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; }
.auth-hero h1 { font-size: 44px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 16px; max-width: 560px; }
.auth-hero p { font-size: 17px; line-height: 1.55; color: var(--on-frame); max-width: 520px; }
.auth-hero .mid { margin-top: auto; }
.auth-hero .foot { margin-top: 56px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--on-frame-2); }
.auth-hero .foot i { width: 28px; height: 4px; background: var(--yellow); border-radius: 2px; display: inline-block; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px; }
.auth-card { width: 100%; max-width: 400px; padding: 36px 32px; border-radius: 16px; }
.auth-card h2 { font-size: 24px; font-weight: 500; margin-bottom: 6px; }
.auth-card .sub { font-size: 15px; color: var(--text-2); margin-bottom: 24px; }
.auth-card label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.auth-card input[type=email], .auth-card input[type=password], .auth-card input[type=text] { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #CFCDC4; border-radius: 8px; font: inherit; font-size: 15px; margin-bottom: 16px; }
.auth-card .btn { width: 100%; height: 48px; }
.err { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; background: var(--yellow-soft); font-size: 14px; line-height: 1.45; }
.helptext, .auth-card ul.errorlist { font-size: 13px; color: var(--text-2); }

/* Mobil */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g21, .g2, .split, .two, .cols { grid-template-columns: minmax(0, 1fr); }
  .filter, .ans { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 0 16px; gap: 0; }
  .side .brandrow { display: flex; justify-content: space-between; align-items: center; height: 56px; }
  .clientbox, .side-foot .meta, .side-foot .who { display: none; }
  .nav { flex-direction: row; overflow-x: auto; white-space: nowrap; gap: 4px; padding-bottom: 10px; font-size: 14px; }
  .nav a { min-height: 40px; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--yellow); }
  .side-foot { margin: 0 0 12px; flex-direction: row; }
  .side-foot .btn-dl { flex: 1; min-height: 40px; }
  .main { padding: 24px 16px 40px; }
  .h1 { font-size: 26px; line-height: 1.18; }
  .drow { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; }
  .scale { display: none; }
  .icard { grid-template-columns: 5px minmax(0, 1fr); }
  .icard .side2 { grid-column: 2; flex-direction: row; justify-content: space-between; padding: 0 16px 16px; align-items: center; }
  .icard .body { padding: 16px; }
  .qhead { display: none; }
  .qrow { grid-template-columns: 28px minmax(0, 1fr); }
  .qrow .d { display: none; }
  .field.search { min-width: 0; width: 100%; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { padding: 32px 20px; }
  .auth-hero h1 { font-size: 28px; }
  .auth-hero .foot { display: none; }
  .auth-form { padding: 24px 16px; }
  .firm { grid-template-columns: 24px minmax(0, 1fr) 48px; }
  .firm .b { display: none; }
}

/* AVA-personalens formulär */
.staffform input[type=email], .staffform input[type=text], .staffform input[type=number], .staffform select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #CFCDC4; border-radius: 8px; font: inherit; font-size: 15px; background: #fff; }
.staffform .btn { margin-top: 8px; }
.auth-card input[inputmode=numeric] { letter-spacing: 0.3em; font-size: 20px; }
/* Kontosidor (allauth): långa svenska ord ska brytas, inte skjuta ut kortet */
.auth-card h1 { font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 12px; overflow-wrap: anywhere; hyphens: auto; }
.auth-panel { margin-top: 22px; }
.auth-panel h2 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.auth-panel p { font-size: 14px; color: var(--text-2); margin: 0 0 12px; }
.auth-actions { display: grid; gap: 8px; }
@media (max-width: 480px) { .auth-card { padding: 28px 22px; } .auth-card h1 { font-size: 23px; } }
.atable { overflow-x: auto; margin: 10px 0 14px; }
.atable table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.atable th, .atable td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--line, #E4E2DA); }
.atable th { font-weight: 600; color: var(--ink); }
.atext em { font-style: italic; }
form.inline { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.side-foot .who .linkbtn { color: var(--on-frame); }
.mobile-foot { display: none; }
@media (max-width: 760px) {
  .mobile-foot { display: block; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line, #E4E2DA); font-size: 13px; color: var(--text-2); }
  .mobile-foot .who { line-height: 2; }
  .mobile-foot a, .mobile-foot .linkbtn { color: var(--ink); }
}
