/* Personliga verktyg: ärver appens valda tema och accent. */
.toolkit, .tools-entry { color: var(--text); }
.toolkit { min-width: 0; padding-bottom: 20px; }
.toolkit *, .tools-entry * { box-sizing: border-box; }
.toolkit h1, .toolkit h2, .toolkit h3, .toolkit p { margin-top: 0; }
.toolkit h1 { font-family: Georgia, serif; font-size: clamp(29px, 7vw, 42px); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 14px; }
.toolkit h2 { font-size: 21px; letter-spacing: -.025em; }
.toolkit h3 { font-size: 18px; }
.toolkit button, .toolkit input, .toolkit select, .toolkit textarea { font: inherit; }
.toolkit button { cursor: pointer; }
.toolkit button:disabled { cursor: default; opacity: .55; }
.toolkit :is(button, input, select, textarea):focus-visible, .tools-entry:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.tool-hero { position: relative; padding: 28px 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface-2); margin-bottom: 28px; overflow: hidden; }
.tool-hero > p:last-child { max-width: 42ch; color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.tool-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; color: var(--muted); margin: 20px 0 12px; }
.tool-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; color: var(--text); background: var(--accent-soft); border: 1px solid var(--line); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.tool-category { margin: 0 0 28px; }
.tool-deck { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-card { position: relative; min-width: 0; text-align: left; display: flex; flex-direction: column; padding: 18px; gap: 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.tool-card-icon svg { width: 23px; height: 23px; }
.tool-card-title { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.tool-card-description { font-size: 13px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.tool-card-arrow { position: absolute; right: 17px; top: 17px; color: var(--muted); }
.tool-page-heading { margin: 0 0 22px; }
.tool-page-heading .tool-eyebrow { margin-top: 24px; }
.tool-note { color: var(--muted); line-height: 1.55; font-size: 14px; overflow-wrap: anywhere; }
.tool-panel { min-width: 0; }
.tool-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tool-title { margin: 0; font-size: 20px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.tool-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: var(--text); font-weight: 600; font-size: 13px; }
.toolkit .tool-input, .toolkit select, .toolkit textarea { width: 100%; min-width: 0; min-height: 46px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font-size: 16px; font-weight: 400; }
.toolkit input[type="date"] { max-width: 100%; }
.toolkit input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--accent); }
.tool-button { display: inline-flex; justify-content: center; align-items: center; text-align: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 11px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.tool-button--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tool-button--quiet { background: transparent; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.tool-actions > * { min-width: 0; }
.tool-list { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 16px 0; list-style: none; }
.tool-row { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow-wrap: anywhere; }
.tool-row > div { min-width: 0; flex: 1 1 160px; }
.tool-row .tool-actions { margin: 0; flex: 0 1 auto; }
.tool-row p, .tool-row small { color: var(--muted); }
.tool-row p:last-child { margin-bottom: 0; }
.tool-preview { min-width: 0; margin: 18px 0; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); overflow-wrap: anywhere; }
.tool-preview img, .tool-preview canvas, .tool-panel canvas, .tool-panel img { display: block; width: auto; max-width: 100%; height: auto; border-radius: 12px; }
.tool-preview ol { padding-left: 23px; }
.tool-preview li { padding: 5px 0; }
.tool-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 8px; margin: 16px 0; }
.tool-metric { padding: 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; overflow-wrap: anywhere; }
.tool-metric strong { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.tool-metric dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.tool-metric dd { margin: 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tool-metric small, .tool-metric span { font-size: 12px; color: var(--muted); }
.tool-empty, .tool-error { margin: 16px 0; padding: 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); background: var(--surface); line-height: 1.6; overflow-wrap: anywhere; }
.tool-error { border-style: solid; color: var(--danger); }
.tool-check { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; overflow-wrap: anywhere; }
.tool-check > span { min-width: 0; }
.tool-calendar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 18px 0; }
.tool-day { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); min-width: 0; overflow-wrap: anywhere; }
.tool-day h3 { margin-bottom: 10px; }
.tool-day .tool-actions { margin-bottom: 0; }
.tool-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; margin: 16px 0; }
.tool-table th, .tool-table td { padding: 11px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tool-table th { color: var(--muted); font-weight: 600; }
.tool-table caption { text-align: left; margin-bottom: 10px; font-weight: 700; }
.tool-table .tool-metrics { grid-template-columns: minmax(0, 1fr); }
.tool-table .tool-metric { padding: 8px; }
.tool-table .tool-row { padding: 8px; }
.tools-entry { display: flex; align-items: center; text-align: left; gap: 14px; width: 100%; min-height: 76px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; margin: 14px 0 20px; background: var(--surface-2); font: inherit; cursor: pointer; }
.tools-entry > span:first-child { flex: 1; min-width: 0; }
.tools-entry strong { display: block; font-size: 18px; margin-bottom: 4px; }
.tools-entry small { display: block; color: var(--muted); line-height: 1.45; }
.tools-entry > span:last-child { font-size: 25px; color: var(--accent); }
@media (max-width: 380px) {
  .tool-hero { padding: 23px 18px; }
  .tool-deck, .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 13px; }
  .tool-card-icon { grid-row: span 2; }
  .tool-card-title { padding-right: 12px; }
  .tool-card-description { grid-column: 2; }
  .tool-card-arrow { right: 12px; top: 18px; }
  .tool-row, .tool-day, .tool-preview { padding: 14px; }
  .tool-table { font-size: 12px; }
  .tool-table th, .tool-table td { padding: 9px 4px; }
}
@media (prefers-reduced-motion: reduce) { .tool-card { transition: none; } .tool-card:hover { transform: none; } }
@media (forced-colors: active) {
  .toolkit :is(.tool-card, .tool-preview, .tool-day, .tool-metric, .tool-hero, .tool-row), .tools-entry { border: 1px solid CanvasText; }
  .toolkit .tool-button--primary { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
}
@media print { .tools-entry, .toolkit .tool-actions, .toolkit .tool-button { display: none; } }
