/* F-klubben components: Win98 / Paint / Movie Maker chrome, built on tokens.css */
.fk, .fk * { box-sizing: border-box; }
.fk { font-family: var(--font-body); font-size: 15px; line-height: 23px; color: var(--ink); -webkit-font-smoothing: auto;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
.fk [hidden] { display: none !important; }
.fk ::selection { background: var(--title); color: var(--on-title); }
.fk :focus-visible { outline: 1px dotted var(--dark); outline-offset: -4px; }
.fk a { color: var(--title); text-underline-offset: 2px; }
.fk a.fk-btn, .fk a.fk-start, .fk a.fk-task, .fk a.fk-tbtn, .fk a.fk-menuitem { color: var(--ink); }
.fk a:focus-visible { outline-offset: 1px; }
.fk img.px, .fk .px { image-rendering: pixelated; }
.fk button, .fk a { touch-action: manipulation; }
.fk .fk-btn, .fk .fk-swatch, .fk .fk-clip, .fk .fk-start, .fk .fk-menuitem, .fk [role="tab"], .fk [role="option"] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Desktop */
.fk-desktop { background: var(--desktop); color: var(--on-desktop); }

/* Window */
.fk-window { background: var(--face); color: var(--ink); box-shadow: var(--bevel-out); padding: 3px; display: flex; flex-direction: column; min-width: 0; }
.fk-titlebar { display: flex; align-items: center; gap: var(--space-2); min-height: 22px; padding: 2px 2px 2px 4px;
  background: linear-gradient(90deg, var(--title) 0%, var(--title) 65%, var(--title-end) 100%); color: var(--on-title);
  font: 400 16px/18px var(--font-pixel); }
.fk-window.is-inactive .fk-titlebar { background: linear-gradient(90deg, var(--title-inactive) 0%, var(--title-inactive-end) 100%); color: var(--face-light); }
.fk-titlebar img { width: 16px; height: 16px; flex: none; }
.fk-titlebar .fk-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; font: inherit; }
.fk-tbtns { display: flex; gap: var(--space-1); flex: none; }
/* Markører: Windows-pilen overalt, hånden på links og knapper, I-bjælken i tekstfelter (variablerne står i cursors.css) */
.fk { cursor: var(--fk-arrow, default); }
.fk a[href], .fk summary, .fk label[for] { cursor: var(--fk-hand, pointer); }
.fk :is(input:not([type="checkbox"], [type="radio"], [type="button"], [type="submit"], [type="range"], [type="color"]), textarea, [contenteditable="true"]) { cursor: var(--fk-text, text); }
.fk-tbtn { position: relative; width: 18px; height: 16px; padding: 0; border: 0; background: var(--face); box-shadow: var(--bevel-out); display: grid; place-items: center; cursor: var(--fk-hand, pointer); }
.fk-tbtn::after { content: ""; position: absolute; inset: -10px -6px; } /* 38x36 touch target, same look */
.fk-tbtn:active { box-shadow: var(--bevel-in); }
.fk-tbtn svg { width: 8px; height: 7px; shape-rendering: crispEdges; }

/* Menu bar = site navigation */
.fk-menubar { display: flex; flex-wrap: wrap; gap: 0; padding: 2px 0; font: 400 16px/20px var(--font-pixel); }
.fk-menubar a { color: var(--ink); text-decoration: none; padding: 2px 8px; white-space: nowrap; }
.fk-menubar a u { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.fk-menubar a[aria-current="page"], .fk-menubar a:active { background: var(--title); color: var(--on-title); }
@media (hover: hover) { .fk-menubar a:hover { background: var(--title); color: var(--on-title); } }

/* Window body + status bar */
.fk-wbody { padding: var(--space-2); min-width: 0; }
.fk-statusbar { display: flex; gap: var(--space-1); margin-top: var(--space-1); font: 400 16px/18px var(--font-pixel); color: var(--ink); }
.fk-statusbar > * { box-shadow: var(--bevel-thin); padding: 1px 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fk-statusbar > :first-child { flex: 1; }

/* Paint canvas */
.fk-canvas-well { background: var(--shadow); box-shadow: var(--bevel-in); padding: var(--space-3); overflow: hidden; }
.fk-canvas { position: relative; background: var(--canvas); color: var(--ink); padding: var(--space-6) var(--space-5); }
.fk-canvas::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 4px; height: 4px; background: var(--title); }
.fk-canvas::before { content: ""; position: absolute; right: -4px; top: 50%; width: 4px; height: 4px; background: var(--title); }

/* Buttons */
.fk-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3); min-width: 88px; min-height: 30px;
  padding: 4px 14px; border: 0; border-radius: var(--radius-none); background: var(--face); color: var(--ink); box-shadow: var(--bevel-out);
  font: 400 16px/20px var(--font-pixel); text-decoration: none; cursor: var(--fk-hand, pointer); }
.fk-btn img, .fk-btn svg { width: 16px; height: 16px; }
.fk-btn:active, .fk-btn[aria-pressed="true"] { box-shadow: var(--bevel-in); padding: 5px 13px 3px 15px; }
.fk-btn[aria-pressed="true"] { background: repeating-conic-gradient(var(--face) 0% 25%, var(--highlight) 0% 50%) 0 0 / 2px 2px; }
.fk-btn:focus-visible { outline: 1px dotted var(--dark); outline-offset: -5px; }
.fk-btn--default { box-shadow: var(--default-ring), var(--bevel-out); }
.fk-btn--default:active { box-shadow: var(--default-ring), var(--bevel-in); }
.fk-btn:disabled, .fk-btn[aria-disabled="true"] { color: var(--shadow); text-shadow: 1px 1px 0 var(--highlight); cursor: var(--fk-arrow, default); }
.fk-btn:disabled:active, .fk-btn[aria-disabled="true"]:active { box-shadow: var(--bevel-out); padding: 4px 14px; }
.fk-btnrow { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Fields */
.fk-field { display: grid; gap: var(--space-1); font: 400 16px/20px var(--font-pixel); }
.fk-field input, .fk-field select { font: 400 16px/20px var(--font-body); color: var(--ink); background: var(--highlight); border: 0; border-radius: 0;
  box-shadow: var(--bevel-in); padding: 6px 7px; min-width: 0; -webkit-appearance: none; appearance: none; }
.fk-field input:focus-visible { outline: 1px dotted var(--dark); outline-offset: -4px; }
.fk-copy { display: flex; gap: var(--space-2); align-items: stretch; }
.fk-copy input { flex: 1; }

/* Tabs (properties dialog) */
.fk-tabs [role="tablist"] { display: flex; padding-left: 2px; position: relative; z-index: 1; }
.fk-tabs [role="tab"] { border: 0; background: var(--face); color: var(--ink); font: 400 16px/20px var(--font-pixel); padding: 3px 10px 4px; margin-top: 3px; cursor: var(--fk-hand, pointer); white-space: nowrap;
  box-shadow: inset 1px 1px 0 var(--highlight), inset -1px 0 0 var(--dark), inset -2px 0 0 var(--shadow), inset 2px 2px 0 var(--face-light); }
.fk-tabs [role="tab"][aria-selected="true"] { margin: 0 -2px -2px; padding: 5px 12px 6px; position: relative; z-index: 2; }
.fk-tabs [role="tabpanel"] { box-shadow: var(--bevel-out); padding: var(--space-5) var(--space-4); min-height: 120px; }
.fk-tabs [role="tabpanel"] > :first-child { margin-top: 0; }
.fk-tabs [role="tabpanel"] p { max-width: 62ch; }

/* Paint palette = category filter / legend */
.fk-palette { display: flex; align-items: center; gap: var(--space-3); }
.fk-palette .current { width: 34px; height: 34px; box-shadow: var(--bevel-in); background: var(--canvas); position: relative; flex: none; }
.fk-palette .current i { position: absolute; inset: 7px; box-shadow: 0 0 0 1px var(--dark); background: var(--sw, var(--canvas)); }
.fk-swatches { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.fk-swatch { display: inline-flex; align-items: center; gap: var(--space-2); border: 0; background: var(--face); color: var(--ink); cursor: var(--fk-hand, pointer);
  font: 400 16px/18px var(--font-pixel); padding: 3px 8px 3px 3px; box-shadow: var(--bevel-out); }
.fk-swatch i { width: 16px; height: 16px; background: var(--sw); box-shadow: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--highlight), 0 0 0 1px var(--dark); flex: none; }
.fk-swatch[aria-pressed="true"] { box-shadow: var(--bevel-in); background: var(--highlight); }
.fk-swatch:focus-visible { outline: 1px dotted var(--dark); outline-offset: -4px; }

/* Movie Maker storyboard */
.fk-storyboard { display: flex; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; padding: var(--space-4) var(--space-3); background: var(--canvas); box-shadow: var(--bevel-in);
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--space-3); scrollbar-color: var(--face) var(--face-light); }
.fk-storyboard > * { scroll-snap-align: start; }
.fk-clip { flex: none; width: 132px; display: grid; gap: var(--space-2); justify-items: start; align-content: start; text-align: left; border: 0; background: none; padding: var(--space-2);
  color: var(--ink); cursor: var(--fk-hand, pointer); font: inherit; }
.fk-clip .thumb { width: 124px; height: 92px; display: grid; place-items: center; background: var(--cat, var(--face)); position: relative;
  box-shadow: 0 0 0 1px var(--dark), inset 0 0 0 4px var(--canvas), inset 0 0 0 5px var(--dark); }
.fk-clip .thumb img { width: 48px; height: 48px; image-rendering: pixelated; }
.fk-clip .thumb .day { position: absolute; left: 9px; top: 7px; font: 400 16px/18px var(--font-pixel); color: var(--ink); background: var(--canvas); padding: 1px 3px; box-shadow: 0 0 0 1px var(--dark); }
.fk-clip .name { font: 400 16px/18px var(--font-pixel); }
.fk-clip .when { font: 400 12px/16px var(--font-body); color: var(--ink-muted); }
@media (hover: hover) { .fk-clip:hover .thumb { box-shadow: 0 0 0 1px var(--dark), inset 0 0 0 4px var(--canvas), inset 0 0 0 5px var(--dark), 0 0 0 3px var(--face); } }
.fk-clip[aria-pressed="true"] { background: var(--title); color: var(--on-title); }
.fk-clip[aria-pressed="true"] .when { color: var(--on-title); }
.fk-clip.is-past .thumb { filter: grayscale(1); opacity: .65; }
.fk-transition { flex: none; width: 22px; height: 22px; align-self: start; margin-top: 43px; background: var(--face-light); box-shadow: 0 0 0 1px var(--shadow);
  display: grid; place-items: center; }
.fk-transition::before { content: ""; width: 10px; height: 10px; background: linear-gradient(135deg, var(--shadow) 50%, transparent 50%); }

/* Movie Maker timeline */
.fk-timeline { background: var(--canvas); box-shadow: var(--bevel-in); padding: var(--space-3); overflow-x: auto; display: flex; flex-direction: column; justify-content: center; }
.fk-ruler, .fk-track { position: relative; min-width: 640px; }
.fk-ruler { height: 22px; border-bottom: 1px solid var(--dark); font: 400 12px/14px var(--font-pixel); color: var(--ink-muted);
  background: repeating-linear-gradient(90deg, var(--dark) 0 1px, transparent 1px calc(100% / var(--weeks, 8))) bottom / 100% 6px no-repeat; }
.fk-ruler span { position: absolute; top: 0; transform: translateX(2px); white-space: nowrap; }
.fk-track { height: 60px; margin-top: var(--space-2); background: var(--face-light); box-shadow: inset 0 0 0 1px var(--shadow); }
.fk-track .seg { position: absolute; top: 4px; bottom: 4px; min-width: 24px; background: var(--cat); border: 1px solid var(--dark); padding: 2px 4px; overflow: hidden;
  font: 400 12px/14px var(--font-pixel); color: var(--ink); text-align: left; cursor: var(--fk-hand, pointer); }
.fk-track .seg[aria-pressed="true"] { outline: 2px solid var(--title); outline-offset: 1px; }
.fk-track .now { position: absolute; top: -30px; bottom: -4px; width: 2px; background: var(--paint-red); }

/* Monitor (Movie Maker preview pane) */
.fk-monitor { background: var(--dark); padding: var(--space-2); box-shadow: var(--bevel-in); }
.fk-monitor .screen { background: var(--canvas); min-height: 220px; padding: var(--space-5); position: relative; }
.fk-monitor .screen.wipe { animation: fk-wipe .42s steps(7, end) both; }
.fk-monitor .controls { display: flex; gap: var(--space-1); margin-top: var(--space-2); }
@keyframes fk-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Desktop icons = link grid */
.fk-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: var(--space-4) var(--space-2); }
.fk-icon { display: grid; justify-items: center; align-content: start; gap: var(--space-2); text-align: center; color: var(--on-desktop); text-decoration: none; padding: var(--space-1);
  font: 400 16px/18px var(--font-pixel); }
.fk-icon img, .fk-icon svg { width: 40px; height: 40px; image-rendering: pixelated; }
.fk-icon span { padding: 0 2px; }
.fk-icon:focus-visible span, .fk-icon:active span { background: var(--title); color: var(--on-title); outline: 1px dotted var(--on-desktop); }
@media (hover: hover) { .fk-icon:hover span { background: var(--title); color: var(--on-title); outline: 1px dotted var(--on-desktop); } }
.fk-icon:focus-visible { outline: none; }
.fk-desktop .fk-icon { color: var(--on-desktop); }

/* Taskbar */
.fk-taskbar { position: relative; display: flex; align-items: center; gap: var(--space-2); background: var(--face); padding: 3px var(--space-1); box-shadow: inset 0 1px 0 var(--face-light), inset 0 2px 0 var(--highlight);
  font: 400 16px/18px var(--font-pixel); color: var(--ink); }
.fk-start { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; border: 0; background: var(--face); box-shadow: var(--bevel-out); padding: 3px 8px 3px 5px; font: 400 16px/18px var(--font-pixel); color: var(--ink); text-decoration: none; cursor: var(--fk-hand, pointer); }
.fk-start img { width: 20px; height: 20px; }
.fk-start:active, .fk-start[aria-expanded="true"] { box-shadow: var(--bevel-in); padding: 4px 7px 2px 6px; }
.fk-start:focus-visible { outline: 1px dotted var(--dark); outline-offset: -4px; }
.fk-task { flex: 1; min-width: 0; min-height: 30px; display: flex; align-items: center; gap: 6px; box-shadow: var(--bevel-in); background: repeating-conic-gradient(var(--face) 0% 25%, var(--highlight) 0% 50%) 0 0 / 2px 2px;
  padding: 3px 8px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; }
.fk-task b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.fk-task img { width: 16px; height: 16px; flex: none; }
/* Flere vinduer: hver knap er hævet, det aktive vindue er trykket ned */
.fk-tasks { flex: 1; min-width: 0; display: flex; gap: 3px; }
.fk-tasks .fk-task { flex: 0 1 180px; box-shadow: var(--bevel-out); background: var(--face); }
.fk-tasks .fk-task[aria-current] { box-shadow: var(--bevel-in); background: repeating-conic-gradient(var(--face) 0% 25%, var(--highlight) 0% 50%) 0 0 / 2px 2px; padding: 4px 7px 2px 9px; }
.fk-tasks .fk-task:focus-visible { outline: 1px dotted var(--dark); outline-offset: -4px; }
.fk-tray { flex: none; min-height: 30px; display: flex; align-items: center; gap: 6px; box-shadow: var(--bevel-thin); padding: 3px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Start menu */
.fk-startmenu { position: absolute; left: 2px; bottom: calc(100% - 1px); z-index: 30; display: flex; width: 252px; max-width: calc(100vw - 8px);
  max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px));
  background: var(--face); color: var(--ink); box-shadow: var(--bevel-out); padding: 3px; }
.fk-startmenu.is-opening { animation: fk-unroll .18s steps(6, end) backwards; }
@keyframes fk-unroll { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.fk-startmenu .side { flex: none; width: 28px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  background: linear-gradient(0deg, var(--title) 0%, var(--title) 55%, var(--title-end) 100%); }
.fk-startmenu .side span { writing-mode: vertical-rl; transform: rotate(180deg); font: 400 22px/1 var(--font-pixel); color: var(--face-light); white-space: nowrap; }
.fk-startmenu .side b { font-weight: 400; color: var(--on-title); }
.fk-startmenu > ul { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0; }
.fk-startmenu li { margin: 0; }
.fk-menuitem { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 2px 10px 2px 6px; border: 0; background: none;
  color: var(--ink); font: 400 16px/20px var(--font-pixel); text-decoration: none; text-align: left; cursor: var(--fk-hand, pointer); }
.fk-menuitem img { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
.fk-menuitem .arrow { width: 4px; height: 7px; margin-left: auto; fill: currentColor; shape-rendering: crispEdges; }
.fk-menuitem:focus-visible, .fk-menuitem:active, .fk-menuitem[aria-expanded="true"] { background: var(--title); color: var(--on-title); outline: none; }
@media (hover: hover) { .fk-menuitem:hover { background: var(--title); color: var(--on-title); } }
.fk-menusep { height: 2px; margin: 3px 2px; box-shadow: inset 0 1px 0 var(--shadow), inset 0 -1px 0 var(--highlight); }
.fk-submenu { position: absolute; left: calc(100% - 3px); top: 0; width: 232px; list-style: none; margin: 0; padding: 3px; background: var(--face); box-shadow: var(--bevel-out); }
.fk-submenu .fk-menuitem { min-height: 32px; }
.fk-submenu .fk-menuitem img { width: 16px; height: 16px; }
@media (max-width: 620px) {
  .fk-startmenu { width: min(320px, calc(100vw - 8px)); }
  .fk-startmenu > ul { overflow-y: auto; overscroll-behavior: contain; }
  .fk-menuitem { min-height: 44px; }
  .fk-submenu { position: static; width: auto; padding: 0 0 2px 20px; box-shadow: none; background: none; }
  .fk-submenu .fk-menuitem { min-height: 40px; }
  .fk-submenu .fk-menuitem img { width: 24px; height: 24px; }
  .fk-menuitem[aria-expanded="true"] { background: none; color: var(--ink); }
  .fk-menuitem[aria-expanded="true"]:active { background: var(--title); color: var(--on-title); }
  .fk-menuitem[aria-expanded="true"] .arrow { transform: rotate(90deg); }
}

/* Scribble (Paint pen marks) */
.fk-scribble { position: relative; display: inline-block; white-space: nowrap; isolation: isolate; }   /* ringen ligger bag ordet */
.fk-scribble svg { position: absolute; z-index: -1; inset: -18% -9% -22% -8%; width: 117%; height: 140%; overflow: visible; pointer-events: none; }
.fk-scribble canvas { position: absolute; z-index: -1; pointer-events: none; image-rendering: pixelated; }
.fk-scribble.is-px svg { visibility: hidden; }
.fk-scribble path { fill: none; stroke: var(--paint-red); stroke-width: 4; stroke-linecap: square; stroke-linejoin: miter; shape-rendering: crispEdges; vector-effect: non-scaling-stroke; }

/* Help topics (F-ordbog) */
.fk-help { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: var(--space-2); min-height: 260px; }
.fk-help [role="listbox"] { position: relative; background: var(--highlight); box-shadow: var(--bevel-in); padding: var(--space-2); margin: 0; list-style: none; overflow: auto; max-height: 320px; font: 400 16px/20px var(--font-pixel); }
.fk-help [role="option"] { padding: 0 4px; cursor: var(--fk-hand, pointer); }
.fk-help [role="option"][aria-selected="true"] { background: var(--title); color: var(--on-title); }
.fk-help article { background: var(--canvas); box-shadow: var(--bevel-in); padding: var(--space-4) var(--space-5); min-width: 0; }
/* Lange ord deles ved bløde bindestreger fra ordbogens "deling" og mailadresser ved @, når vinduet er smalt */
.fk-help article h3 { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }
.fk-help article dd { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) { .fk-monitor .screen.wipe, .fk-startmenu.is-opening { animation: none; } }

/* Phones: one row of everything, thumb-sized targets */
@media (max-width: 620px) {
  .fk-menubar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -3px; padding: 2px 3px; }
  .fk-menubar::-webkit-scrollbar { display: none; }
  .fk-menubar a { padding: 12px 10px; }
  .fk-palette .current { display: none; }
  .fk-palette, .fk-swatches { width: 100%; }
  .fk-swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-1); }
  .fk-swatch { flex-direction: column; justify-content: center; gap: 4px; min-height: 52px; padding: 6px 2px 4px; }
  .fk-swatch i { width: 20px; height: 20px; }
  .fk-swatch[aria-pressed="true"] { padding: 7px 1px 3px 3px; }
  .fk-tabs [role="tablist"] { padding-left: 0; }
  .fk-tabs [role="tab"] { flex: 1 1 auto; padding: 8px 4px 9px; min-width: 0; }
  .fk-tabs [role="tab"][aria-selected="true"] { padding: 10px 6px 11px; }
  .fk-statusbar > * { padding-block: 3px; }
  .fk-help { grid-template-columns: 1fr; min-height: 0; }
  .fk-help [role="listbox"] { max-height: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-2); }
  .fk-help [role="option"] { padding: 10px 6px; line-height: 20px; }
  .fk-icons { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4) var(--space-1); }
  .fk-icon { font-size: 16px; line-height: 18px; }
  .fk-ruler, .fk-track { min-width: 0; }
  .fk-clip .when { white-space: nowrap; }
  .fk-taskbar { padding: 4px 4px 5px; gap: 4px; }
  .fk-start { min-height: 52px; padding: 4px 12px 4px 8px; gap: 8px; }
  .fk-start:active, .fk-start[aria-expanded="true"] { padding: 5px 11px 3px 9px; }
  .fk-start img { width: 28px; height: 28px; }
  .fk-task, .fk-tray { min-height: 52px; }
  /* Telefonen viser selv klokken: bakken giver plads til programmerne */
  .fk-tray { display: none; }
  .fk-tray { padding: 3px 8px; }
  /* Kun ikoner; titlen er der stadig for skærmlæsere */
  .fk-tasks { gap: 2px; }
  .fk-tasks .fk-task { flex: 1 1 0; justify-content: center; padding: 3px; }
  /* Start-knappen: kun logoet, så alle programmerne er der */
  .fk-start { flex: 0 0 calc((100% - 14px) / 7); justify-content: center; padding-inline: 4px; }   /* samme bredde som en programknap */
  .fk-start span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .fk-tasks .fk-task[aria-current] { padding: 4px 2px 2px 4px; }
  .fk-tasks .fk-task b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .fk-tasks .fk-task img { width: 32px; height: 32px; }
  .fk-startmenu { bottom: calc(100% - 1px); }
  .fk-icon span { hyphens: manual; overflow-wrap: anywhere; }
}

/* Reklame: Bærbar Plus 98 (en bevidst irriterende bloatware-popup) */
.fk-ad { position: fixed; z-index: 60; left: 24px; top: 72px; width: 468px; max-width: calc(100vw - 16px); box-shadow: var(--bevel-out), 6px 6px 0 rgb(0 0 0 / .45); }
.fk-ad.is-in { animation: fk-pop .24s steps(4, end) backwards; }
.fk-ad.is-dodge { animation: fk-shake .36s steps(6, end); }
@keyframes fk-pop { from { transform: scale(.2); } }
@keyframes fk-shake { 20% { translate: -8px 0; } 40% { translate: 8px 0; } 60% { translate: -6px 0; } 80% { translate: 4px 0; } }
.fk-ad .fk-titlebar { background: linear-gradient(90deg, var(--cat-film), var(--paint-red) 55%, var(--cat-bar)); color: var(--on-title); text-shadow: 1px 1px 0 var(--ink);
  animation: fk-ad-flash .7s steps(1, end) infinite; }
@keyframes fk-ad-flash { 50% { background: linear-gradient(90deg, var(--cat-bar), var(--paint-red) 45%, var(--cat-film)); } }
.fk-ad-body { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 10px; margin: 3px 0 0; background: var(--canvas); box-shadow: var(--bevel-in); }
.fk-ad-stage { position: relative; width: 112px; height: 128px; overflow: hidden; font-size: 3px; box-shadow: 0 0 0 2px var(--ink);
  background: repeating-conic-gradient(from 0deg at 50% 55%, var(--cat-bar) 0 15deg, var(--highlight) 15deg 30deg); }
.fk-ad-man { position: absolute; left: 50%; bottom: 2px; width: 36em; height: 40em; margin-left: -18em; background-repeat: no-repeat; background-size: 1200% 100%;
  background-position: 0 0; image-rendering: pixelated; animation: fk-chug 6s infinite; animation-timing-function: step-end; }
/* 12 frames: hold, løft, 6 x bund (ca. 1,7 sek.), tilløb, kast, ræk om bag, ny øl frem */
@keyframes fk-chug {
  0% { background-position: 0% 0; }
  15% { background-position: 9.0909% 0; }
  19.5% { background-position: 18.1818% 0; }
  24.2% { background-position: 27.2727% 0; }
  28.8% { background-position: 36.3636% 0; }
  33.5% { background-position: 45.4545% 0; }
  38.2% { background-position: 54.5455% 0; }
  42.8% { background-position: 63.6364% 0; }
  47.5% { background-position: 72.7273% 0; }
  54% { background-position: 81.8182% 0; }
  64% { background-position: 90.9091% 0; }
  74% { background-position: 100% 0; }
  85%, 100% { background-position: 0 0; }
}
.fk-ad-glass { position: absolute; left: 25em; top: 1em; width: 9em; height: 9em; background-size: 100% 100%; image-rendering: pixelated; opacity: 0;
  animation: fk-throw 6s infinite; }
@keyframes fk-throw {
  0%, 53.9% { opacity: 0; transform: none; animation-timing-function: step-end; }
  54% { opacity: 1; transform: translate(0, 0) rotate(0deg); animation-timing-function: steps(6, end); }
  64% { opacity: 1; transform: translate(20em, -34em) rotate(630deg); animation-timing-function: step-end; }
  64.1%, 100% { opacity: 0; } }
.fk-ad-copy { min-width: 0; }
.fk-ad-copy p { margin: 0; }
.fk-ad-blink { font: 400 16px/20px var(--font-pixel); color: var(--paint-red); animation: fk-blink 1s steps(1, end) infinite; }
@keyframes fk-blink { 50% { visibility: hidden; } }
.fk-ad-h { margin: 4px 0 6px !important; font: 700 22px/1.05 var(--font-paint); }
.fk-ad-h sup { font-size: .6em; }
.fk-ad-h b { display: block; margin-top: 2px; font-size: 46px; line-height: 1; letter-spacing: -1px; color: var(--paint-red);
  text-shadow: 2px 2px 0 var(--cat-bar), 4px 4px 0 var(--ink); }
.fk-ad-when { font: 700 14px/18px var(--font-body); }
.fk-ad-fine { margin-top: 4px !important; font: 400 11px/14px var(--font-body); color: var(--ink-muted); }
.fk-ad-star { position: absolute; right: -16px; top: 6px; width: 76px; height: 76px; display: grid; place-items: center; background: var(--cat-bar); color: var(--paint-red);
  font: 700 15px/1 var(--font-paint); rotate: 14deg; filter: drop-shadow(2px 2px 0 var(--ink));
  clip-path: polygon(50% 0%, 60% 13%, 75% 7%, 77% 23%, 93% 25%, 87% 40%, 100% 50%, 87% 60%, 93% 75%, 77% 77%, 75% 93%, 60% 87%, 50% 100%, 40% 87%, 25% 93%, 23% 77%, 7% 75%, 13% 60%, 0% 50%, 13% 40%, 7% 25%, 23% 23%, 25% 7%, 40% 13%);
  animation: fk-throb .5s steps(1, end) infinite; }
@keyframes fk-throb { 50% { scale: 1.12; } }
.fk-ad-progress { display: flex; align-items: center; gap: 8px; padding: 8px 4px 0; font: 400 14px/18px var(--font-pixel); }
.fk-ad-progress .bar { flex: 1; height: 18px; padding: 2px; background: var(--highlight); box-shadow: var(--bevel-in); }
.fk-ad-progress .bar i { display: block; height: 100%; width: 97%; background: repeating-linear-gradient(90deg, var(--title) 0 8px, transparent 8px 10px); animation: fk-progress 5s steps(14, end) infinite; }
@keyframes fk-progress { from { width: 4%; } 85%, to { width: 97%; } }
.fk-ad-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 4px 2px; }
.fk-ad-ticker { display: flex; overflow: hidden; margin-top: 8px; background: var(--ink); color: var(--cat-bar); font: 400 14px/22px var(--font-pixel); white-space: nowrap; }
.fk-ad-ticker span { flex: none; animation: fk-ticker 16s linear infinite; }
@keyframes fk-ticker { to { transform: translateX(-100%); } }
@media (max-width: 620px) {
  .fk-ad { left: 8px; right: 8px; top: auto; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; }
  .fk-ad.is-top { top: calc(8px + env(safe-area-inset-top, 0px)); bottom: auto; }
  .fk-ad .fk-tbtn { width: 30px; height: 26px; }
  .fk-ad .fk-tbtn svg { width: 12px; height: 10px; }
  .fk-ad-body { grid-template-columns: 84px 1fr; gap: 10px; padding: 8px; }
  .fk-ad-stage { width: 84px; height: 96px; font-size: 2px; }
  .fk-ad-h { font-size: 19px; }
  .fk-ad-h b { font-size: 36px; }
  .fk-ad-star { width: 62px; height: 62px; right: -6px; top: 4px; font-size: 13px; }
  .fk-ad-progress { display: none; }
  .fk-ad-actions .fk-btn { flex: 1 1 100%; min-height: 44px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .fk-ad.is-in, .fk-ad.is-dodge, .fk-ad .fk-titlebar, .fk-ad-blink, .fk-ad-star, .fk-ad-progress .bar i, .fk-ad-ticker span { animation: none; }
  .fk-ad-man, .fk-ad-glass { animation: none; }
  .fk-ad-man { background-position: 0 0; }
}

/* Paint: tegnelag + værktøjskasse */
.fk-canvas > .fk-draw { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; image-rendering: pixelated; touch-action: none; }
/* Teksten og knapperne skal altid kunne klikkes og aldrig dækkes af streger; logoet skal kunne tegnes
   hen over, så det ligger uden sin egen z-index/position og lander i normal flow, under lærredet. */
.fkp-hero-text { position: relative; z-index: 1; }
.fk-canvas.is-drawing > :not(.fk-draw) { pointer-events: none; }
.fk-canvas.is-drawing a, .fk-canvas.is-drawing button { pointer-events: auto; }
.fk-canvas:not(.is-drawing) > .fk-draw { pointer-events: none; }
.fk-canvas.is-drawing { cursor: var(--fk-cross, crosshair); }
.fk-paintbox { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-2) 0 0; }
.fk-paintbox .tools, .fk-paintbox .colors { display: flex; gap: 2px; }
.fk-tool { width: 30px; height: 28px; padding: 0; border: 0; background: var(--face); box-shadow: var(--bevel-out); display: grid; place-items: center; cursor: var(--fk-hand, pointer); }
.fk-tool svg { width: 16px; height: 16px; shape-rendering: crispEdges; }
.fk-tool:active, .fk-tool[aria-pressed="true"] { box-shadow: var(--bevel-in); }
.fk-tool[aria-pressed="true"] { background: repeating-conic-gradient(var(--face) 0 25%, var(--highlight) 0 50%) 0 0 / 2px 2px; }
.fk-paintbox .current { width: 30px; height: 28px; display: grid; place-items: center; background: var(--canvas); box-shadow: var(--bevel-in); margin-right: 4px; }
.fk-paintbox .current i { width: 14px; height: 14px; box-shadow: 0 0 0 1px var(--dark); }
.fk-pcolor { width: 22px; height: 22px; padding: 0; border: 0; background: var(--c); box-shadow: var(--bevel-in); cursor: var(--fk-hand, pointer); }
.fk-pcolor[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
@media (max-width: 620px) {
  .fk-paintbox { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fk-paintbox .tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .fk-paintbox .colors { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
  .fk-tool { width: auto; height: 44px; }
  .fk-tool svg { width: 24px; height: 24px; }
  .fk-pcolor, .fk-paintbox .current { width: auto; height: 36px; margin: 0; }
}

/* Wizard: Win98-guide med billede til venstre, trin øverst og Tilbage/Næste nederst */
.fk-wizard { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-5); }
.fk-wizard .art { display: grid; place-items: start center; padding-top: var(--space-6); box-shadow: var(--bevel-in);
  background: linear-gradient(180deg, var(--title) 0%, var(--desktop) 100%); }
.fk-wizard .art img { width: 64px; height: 64px; image-rendering: pixelated; }
.fk-wizard .main { display: flex; flex-direction: column; min-width: 0; }
.fk-wizard .steps { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fk-wizard .steps button { all: unset; cursor: var(--fk-hand, pointer); display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; font: 400 16px/18px var(--font-pixel); color: var(--ink-muted); }
.fk-wizard .steps b { display: inline-grid; place-items: center; width: 18px; height: 18px; font-weight: 400; background: var(--face); box-shadow: var(--bevel-out); color: var(--ink); }
.fk-wizard .steps button[aria-current="step"] { background: var(--title); color: var(--on-title); }
.fk-wizard .steps button:focus-visible { outline: 1px dotted var(--dark); outline-offset: 1px; }
.fk-wizard .pages { flex: 1; display: grid; align-content: start; }
.fk-wizard .page { display: grid; gap: var(--space-3); align-content: start; }
.fk-wizard .page > * { margin: 0; }
.fk-wizard .nav { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-3);
  border-top: 1px solid var(--shadow); box-shadow: inset 0 1px 0 var(--highlight); }
.fk-wizard .nav .fk-btn:disabled { color: var(--shadow); text-shadow: 1px 1px 0 var(--highlight); cursor: var(--fk-arrow, default); }
@media (max-width: 620px) {
  .fk-wizard { grid-template-columns: 1fr; }
  .fk-wizard .art { display: none; }
  .fk-wizard .steps { display: grid; grid-template-columns: repeat(3, 1fr); }
  .fk-wizard .steps button { justify-content: center; min-height: 36px; padding: 2px 4px; }
  .fk-wizard .nav .fk-btn { flex: 1; min-height: 44px; }
}

/* Adresselinje: label + nedsænket felt med brødkrummer (F-klubben\Udvalg\TREO) */
.fk-addr { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); font: 400 16px/20px var(--font-pixel); }
.fk-addr-fld { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; min-height: 26px; padding: 2px 6px; background: var(--highlight); box-shadow: var(--bevel-in);
  white-space: nowrap; overflow: hidden; }
.fk-addr-fld img { width: 16px; height: 16px; flex: none; margin-right: 4px; }
.fk .fk-addr-fld a { color: var(--ink); text-decoration: none; }
.fk .fk-addr-fld a:hover { text-decoration: underline; }
.fk-addr-fld [aria-current] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Explorer (Stifinder): infofelt som Win98's web view + mapper */
.fk-explorer { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); background: var(--canvas); box-shadow: var(--bevel-in); padding: 2px; }
.fk-explorer .info { padding: var(--space-5) var(--space-4); min-width: 0; border-right: 1px solid var(--face); }
.fk-explorer .info > img { width: 32px; height: 32px; image-rendering: pixelated; }
.fk-explorer .info :is(h2, h3) { margin: var(--space-2) 0 var(--space-3); padding-bottom: var(--space-2); overflow-wrap: anywhere;
  border-bottom: 2px solid; border-image: linear-gradient(90deg, var(--title), var(--title-end) 60%, transparent) 1; }
.fk-explorer .info p { margin: 0 0 var(--space-3); font-size: 14px; line-height: 21px; }
.fk-explorer .info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: 14px; line-height: 21px; }
.fk-explorer .info li a { display: inline-flex; align-items: center; gap: 6px; }
.fk-explorer .info li img { width: 16px; height: 16px; }
.fk-explorer .files { padding: var(--space-4); min-width: 0; }
.fk-explorer .files ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--space-4) var(--space-2); }
.fk-explorer .grp { margin: var(--space-6) 0 var(--space-3); padding-bottom: 2px; font: 400 16px/20px var(--font-pixel); color: var(--ink-muted); border-bottom: 1px solid var(--face); }
.fk-file { display: grid; justify-items: center; align-content: start; gap: var(--space-1); padding: var(--space-1); text-align: center; text-decoration: none; font: 400 16px/18px var(--font-pixel); }
.fk a.fk-file { color: var(--ink); }
.fk-file img { width: 32px; height: 32px; image-rendering: pixelated; }
.fk-file span { padding: 0 2px; overflow-wrap: anywhere; }
.fk a.fk-file[aria-current="true"] span { background: var(--title); color: var(--on-title); }
.fk-file:focus-visible { outline: none; }
.fk-file:focus-visible span { outline: 1px dotted var(--dark); outline-offset: 1px; }
button.fk-file { width: 100%; border: 0; background: none; color: var(--ink); cursor: var(--fk-hand, pointer); }
.fk-person { cursor: var(--fk-arrow, default); }
.fk-person small { font: 400 12px/15px var(--font-body); color: var(--ink-muted); overflow-wrap: anywhere; }
.fk-addr-fld .crumbs { display: contents; }
.fk-explorer + .fk-statusbar a { color: inherit; }
/* Notesblok: readme.txt i et modalt vindue */
.fk-notepad { padding: 0; border: 0; margin: auto; width: min(560px, calc(100vw - 16px)); max-height: calc(100dvh - 32px); overflow: hidden auto; color: var(--ink); box-shadow: var(--bevel-out), 4px 4px 0 rgb(0 0 0 / .35); }
.fk-notepad:not([open]) { display: none; }
.fk-notepad::backdrop { background: rgb(0 0 0 / .2); }
.fk-notepad-body { margin: 2px; padding: var(--space-3) var(--space-4); background: var(--canvas); box-shadow: var(--bevel-in); max-height: min(60vh, 420px); overflow: hidden auto; }
/* Teksten ombrydes altid; vandret scroll ville kun komme af afrundinger ved zoom (fx Firefox med faste scrollbjælker) */
.fk-notepad pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 15px/22px "Courier New", ui-monospace, monospace; }
@media (max-width: 620px) {
  .fk-addr > span:first-child { display: none; }
  .fk-explorer.is-root .info { display: none; }
  .fk-addr-fld { min-height: 36px; }
  .fk-explorer { grid-template-columns: 1fr; }
  .fk-explorer .info { order: 2; border-right: 0; border-top: 1px solid var(--face); padding: var(--space-4) var(--space-3); scroll-margin-top: 12px; }
  .fk-explorer .files { padding: var(--space-3) var(--space-2); }
  .fk-explorer .files ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2) var(--space-1); }
  .fk-file { min-height: 72px; padding: var(--space-2) 2px; }
  .fk-explorer .info li a { min-height: 44px; }
}

/* Opener: sideskift. Timeglas-markør, til den nye side er hentet; titellinje-blink inden for samme side */
html.is-leaving, html.is-leaving * { cursor: var(--fk-busy, progress) !important; }
.fk-window.is-blink .fk-titlebar { animation: fk-title-blink .64s step-end .25s; }
@keyframes fk-title-blink {
  0%, 50% { background: linear-gradient(90deg, var(--title-inactive) 0%, var(--title-inactive-end) 100%); color: var(--face-light); }
  25%, 75% { background: linear-gradient(90deg, var(--title) 0%, var(--title) 65%, var(--title-end) 100%); color: var(--on-title); }
}
@media (prefers-reduced-motion: reduce) { .fk-window.is-blink .fk-titlebar { animation: none; } }

/* BlueScreen: 404 som Win98's blå skærm */
.fk-bsod-page { margin: 0; background: #000; }
.fk-bsod { --bsod: #0000aa; --bsod-grey: #aaaaaa; position: fixed; inset: 0; overflow: auto; display: grid; place-items: center; padding: 24px 8px;
  background: var(--bsod); color: #fff; font: 400 16px/24px var(--font-pixel); }
.fk-bsod-box { width: 100%; max-width: 40em; }
.fk-bsod h1 { display: table; margin: 0 auto 24px; padding: 0 8px; background: var(--bsod-grey); color: var(--bsod); font: inherit; }
.fk-bsod p { margin: 0 0 24px; }
.fk-bsod a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; margin-right: 1em; }
.fk-bsod a:focus-visible, .fk-bsod a:hover { background: #fff; color: var(--bsod); outline: none; }
.fk-bsod-cursor { animation: fk-blink 1s steps(1, end) infinite; }
@media (min-width: 621px) { .fk-bsod { font-size: 32px; line-height: 44px; padding: 48px 32px; } .fk-bsod h1, .fk-bsod p { margin-bottom: 44px; } }
@media (prefers-reduced-motion: no-preference) { .fk-bsod { animation: fk-crt .6s steps(8, end) both; } }
@keyframes fk-crt {
  0% { transform: scale(0, .004); filter: brightness(4); }
  40% { transform: scale(1, .004); filter: brightness(4); }
  to { transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) { .fk-bsod-cursor { animation: none; } }
