{
  "$schema": "https://tr.designtokens.org/format/",
  "$description": "Sundsvall DS – alternativ C (Startsidan). Härledd 2026-09-17 ur packages/tokens/src/theme.css i repot startsidan. Rotens font-size är 62,5 %, så 1rem = 10px. Endast ljust läge finns i källan. Sex värden justerade 2026-09-17 efter tillgänglighetsanalysen; originalvärden i $extensions.",
  "color": {
    "neutral": {
      "$description": "Bär all yta och all text som inte har en betydelse att signalera.",
      "ink": {
        "$value": "#1f1f25",
        "$type": "color",
        "$description": "Brödtext och rubriker."
      },
      "ink-soft": {
        "$value": "#4a4a55",
        "$type": "color",
        "$description": "Metatext, andrahandsinformation."
      },
      "surface": {
        "$value": "#fff",
        "$type": "color",
        "$description": "Kortets botten."
      },
      "page": {
        "$value": "#edf1f5",
        "$type": "color",
        "$description": "Sidans botten, och rader inuti kort."
      },
      "page-deep": {
        "$value": "#e4eaf0",
        "$type": "color",
        "$description": "Ett steg mörkare botten för helbreddsband."
      },
      "border": {
        "$value": "#a5b1bc",
        "$type": "color",
        "$description": "Kortets ram, tunna avdelare.",
        "$extensions": {
          "se.sundsvall.original": "#dde3e9",
          "se.sundsvall.note": "Justerad 2026-09-17: kortram ≥ 2:1 mot kort (källan 1,29:1)."
        }
      },
      "border-strong": {
        "$value": "#76828d",
        "$type": "color",
        "$description": "Ram på interaktiva ytor, t.ex. ghost-knapp.",
        "$extensions": {
          "se.sundsvall.original": "#c3ccd4",
          "se.sundsvall.note": "Justerad 2026-09-17: fältkant ≥ 3:1 enligt WCAG 1.4.11 (källan 1,6:1)."
        }
      },
      "muted-bg": {
        "$value": "#eef0f2",
        "$type": "color",
        "$description": "Dämpad chipbotten, listavdelare."
      },
      "muted-tx": {
        "$value": "#5a6470",
        "$type": "color",
        "$description": "Text på dämpad botten."
      },
      "ink-faint": {
        "$value": "#5f6b75",
        "$type": "color",
        "$description": "Platshållartext: ett fält som väntar på innehåll.",
        "$extensions": {
          "se.sundsvall.original": "#9aa3ad",
          "se.sundsvall.note": "Justerad 2026-09-17: platshållartext ≥ 4,5:1 (källan 2,6:1)."
        }
      }
    },
    "identitet": {
      "$description": "Blått betyder 'den här personen eller saken'. Aldrig status.",
      "blue": {
        "$value": "#005595",
        "$type": "color",
        "$description": "Primärknapp, avatar, aktiv markering."
      },
      "blue-h": {
        "$value": "#004070",
        "$type": "color",
        "$description": "Hovertillstånd för primärknapp."
      },
      "blue-bg": {
        "$value": "#eaf1f8",
        "$type": "color",
        "$description": "Ljus botten: hover på rader, info-chip."
      },
      "blue-acc": {
        "$value": "#cfe0ec",
        "$type": "color",
        "$description": "Accentram, t.ex. kort vid hover."
      },
      "blue-tx": {
        "$value": "#004c85",
        "$type": "color",
        "$description": "Länktext och text på blue-bg."
      },
      "blue-lift": {
        "$value": "#1472b8",
        "$type": "color",
        "$description": "Identitetsblå mot mörk platta."
      },
      "sidebar": {
        "$value": "#003c69",
        "$type": "color",
        "$description": "Endast sidopanelens botten."
      }
    },
    "status": {
      "$description": "Grönt = klart, gult = väntar, rött = tidsgräns eller avvikelse. Bärs av kant, chip eller värde, aldrig hel yta.",
      "green": {
        "$value": "#12874e",
        "$type": "color",
        "$description": "Klart. Statusgrönt, inte AI-grönt."
      },
      "green-bg": {
        "$value": "#e8f4ec",
        "$type": "color",
        "$description": "Botten i chip med tone=ok."
      },
      "green-acc": {
        "$value": "#c9e4d7",
        "$type": "color",
        "$description": "Accentram för klart-tillstånd."
      },
      "green-tx": {
        "$value": "#0c6a3c",
        "$type": "color",
        "$description": "Text på green-bg."
      },
      "amber": {
        "$value": "#b06a1f",
        "$type": "color",
        "$description": "Väntar på någon annan. Endast som kant och punkt; som text används amber-tx."
      },
      "amber-bg": {
        "$value": "#fbeede",
        "$type": "color",
        "$description": "Botten i chip med tone=warn."
      },
      "amber-tx": {
        "$value": "#8a5117",
        "$type": "color",
        "$description": "Text på amber-bg."
      },
      "red": {
        "$value": "#b3261e",
        "$type": "color",
        "$description": "Tidsgräns passerad, avvikelse."
      },
      "red-bg": {
        "$value": "#fceceb",
        "$type": "color",
        "$description": "Botten i chip med tone=avv."
      }
    },
    "ai": {
      "$description": "RESERVERAT för ytor där AI gör något. Aldrig som statusfärg.",
      "ai": {
        "$value": "#00733b",
        "$type": "color",
        "$description": "AI-knapp, AI-märke, AI-fältets fokusram. Reserverat för AI-ytor."
      },
      "ai-deep": {
        "$value": "#00592d",
        "$type": "color",
        "$description": "Hovertillstånd på AI-knapp."
      },
      "ai-bg": {
        "$value": "#f1f9f5",
        "$type": "color",
        "$description": "Botten på AI-tonade kort och chips."
      },
      "ai-acc": {
        "$value": "#c9e4d7",
        "$type": "color",
        "$description": "Ram på AI-tonade ytor."
      },
      "ai-tx": {
        "$value": "#00592d",
        "$type": "color",
        "$description": "Text på ai-bg."
      },
      "ai-line": {
        "$value": "#2f8f5e",
        "$type": "color",
        "$description": "Ny 2026-09-17: kant på AI-fält, AI-chips, AI-bubblor och AI-kort, 4,0:1 mot kort. ai-acc behålls för tonade ramar utan interaktion."
      }
    },
    "fokus": {
      "$description": "Fokusmarkering.",
      "ring": {
        "$value": "#005595",
        "$type": "color",
        "$description": "Fokusring."
      }
    }
  },
  "typography": {
    "family": {
      "sans": {
        "$value": [
          "Arial",
          "Helvetica",
          "sans-serif"
        ],
        "$type": "fontFamily",
        "$description": "Brödtext och all UI-text."
      },
      "heading": {
        "$value": [
          "Raleway",
          "Arial",
          "sans-serif"
        ],
        "$type": "fontFamily",
        "$description": "Rubriker, knappar, chips, radrubriker."
      }
    },
    "size": {
      "eyebrow": {
        "$value": "1.2rem",
        "$type": "dimension",
        "$description": "12px – versal etikett över nyckeltal. Justerad 2026-09-17 från 1.1rem: aldrig under 12 px.",
        "$extensions": {
          "se.sundsvall.original": "1.1rem"
        }
      },
      "xs": {
        "$value": "1.2rem",
        "$type": "dimension",
        "$description": "12px – metatext, chips, sidfot."
      },
      "sm": {
        "$value": "1.4rem",
        "$type": "dimension",
        "$description": "14px – radrubriker, knappar."
      },
      "base": {
        "$value": "1.6rem",
        "$type": "dimension",
        "$description": "16px – brödtext."
      },
      "h2": {
        "$value": "1.7rem",
        "$type": "dimension",
        "$description": "17px – kortrubrik, sätts av Card."
      },
      "lg": {
        "$value": "1.8rem",
        "$type": "dimension",
        "$description": "18px – AI-fältets inmatning, ingress."
      },
      "kpi": {
        "$value": "3rem",
        "$type": "dimension",
        "$description": "30px – nyckeltalets värde."
      }
    }
  },
  "spacing": {
    "unit": {
      "$value": "0.4rem",
      "$type": "dimension",
      "$description": "Tailwinds skalsteg: p-4 = 16px."
    },
    "container-wrap": {
      "$value": "128rem",
      "$type": "dimension",
      "$description": "Innehållsbredd 1280px."
    },
    "sidebar-w": {
      "$value": "26rem",
      "$type": "dimension",
      "$description": "Sidopanelens bredd."
    },
    "sidebar-min": {
      "$value": "7.2rem",
      "$type": "dimension",
      "$description": "Sidopanelen ihopfälld."
    }
  },
  "radius": {
    "xs": {
      "$value": "0.6rem",
      "$type": "dimension",
      "$description": "6px – chip, rad inuti kort."
    },
    "sm": {
      "$value": "0.8rem",
      "$type": "dimension",
      "$description": "8px – knapp."
    },
    "md": {
      "$value": "1rem",
      "$type": "dimension",
      "$description": "10px – shadcns --radius."
    },
    "lg": {
      "$value": "1.6rem",
      "$type": "dimension",
      "$description": "16px – kort och nyckeltalsruta."
    }
  },
  "shadow": {
    "card": {
      "$value": "0 1px 2px rgba(31, 31, 37, 0.05), 0 12px 30px -20px rgba(31, 31, 37, 0.32)",
      "$type": "shadow",
      "$description": "Allt som ligger på arbetsytan."
    },
    "pop": {
      "$value": "0 20px 48px -18px rgba(31, 31, 37, 0.35)",
      "$type": "shadow",
      "$description": "Menyer som svävar över ytan."
    }
  },
  "motion": {
    "msg-in": {
      "$value": "0.25s ease",
      "$type": "duration",
      "$description": "Nytt meddelande i ett samtalsflöde."
    },
    "blink": {
      "$value": "1.2s infinite",
      "$type": "duration",
      "$description": "Assistenten skriver."
    },
    "flash": {
      "$value": "1s ease",
      "$type": "duration",
      "$description": "Fält som AI just fyllt i formulärspegeln."
    }
  },
  "shadcn": {
    "$description": "shadcn/ui:s semantiska tokens mappade mot paletten (ur :root i theme.css).",
    "background": {
      "$value": "{color.neutral.page}",
      "$type": "color",
      "$description": ""
    },
    "foreground": {
      "$value": "{color.neutral.ink}",
      "$type": "color",
      "$description": ""
    },
    "card": {
      "$value": "{color.neutral.surface}",
      "$type": "color",
      "$description": ""
    },
    "primary": {
      "$value": "{color.identitet.blue}",
      "$type": "color",
      "$description": ""
    },
    "primary-hover": {
      "$value": "{color.identitet.blue-h}",
      "$type": "color",
      "$description": ""
    },
    "primary-foreground": {
      "$value": "#fff",
      "$type": "color",
      "$description": ""
    },
    "secondary": {
      "$value": "{color.neutral.muted-bg}",
      "$type": "color",
      "$description": ""
    },
    "secondary-foreground": {
      "$value": "{color.neutral.muted-tx}",
      "$type": "color",
      "$description": ""
    },
    "muted": {
      "$value": "{color.neutral.muted-bg}",
      "$type": "color",
      "$description": ""
    },
    "muted-foreground": {
      "$value": "{color.neutral.ink-soft}",
      "$type": "color",
      "$description": ""
    },
    "accent": {
      "$value": "{color.identitet.blue-bg}",
      "$type": "color",
      "$description": ""
    },
    "accent-foreground": {
      "$value": "{color.identitet.blue-tx}",
      "$type": "color",
      "$description": ""
    },
    "destructive": {
      "$value": "{color.status.red}",
      "$type": "color",
      "$description": ""
    },
    "border": {
      "$value": "{color.neutral.border}",
      "$type": "color",
      "$description": ""
    },
    "input": {
      "$value": "{color.neutral.border-strong}",
      "$type": "color",
      "$description": ""
    },
    "ring": {
      "$value": "{color.fokus.ring}",
      "$type": "color",
      "$description": ""
    },
    "sidebar": {
      "$value": "{color.identitet.sidebar}",
      "$type": "color",
      "$description": ""
    }
  },
  "rules": {
    "$description": "Bärande regler R1–R10 ur apps/web/src/app/dev/ui/system/regler.ts, prioritetsordning.",
    "R1": "Grönt (--color-ai-*) är reserverat för AI-ytor och får aldrig betyda status.",
    "R2": "Allt AI-genererat märks synligt med AiChip.",
    "R3": "Blått betyder identitet. Avvikande färg betyder status.",
    "R4": "Färg alltid ur tokens, mått ur Tailwinds skala eller rem, aldrig px.",
    "R5": "Statusfärg bärs av kantlinje, chip eller enskilt värde, aldrig av hel yta.",
    "R6": "Moduler skriver Tailwind-utilities; shell.css ägs av skalet.",
    "R7": "Server components som default.",
    "R8": "Varje kort får en tillgänglig rubrik via headingId.",
    "R9": "Svenska i all UI-text.",
    "R10": "TypeScript strict; varianter som unionstyper."
  },
  "contrast-rules": {
    "$description": "Samma regler som A (tokens.json): text 4.5, kanter 2 (mjuka ytor och fält 3), intilliggande ytor 1.18 eller kant.",
    "text-min": 4.5,
    "surface-border-min": 2.0,
    "ui-component-border-min": 3.0,
    "adjacent-surfaces-min": 1.18,
    "bordered-surfaces-exempt-from-adjacency": true,
    "text-min-size-px": 12
  }
}