/* AI-label · Kursusfabrikken */

/* Fonts are self-hosted so no visitor data is sent to third parties (SIL OFL 1.1).
   Manrope matches kursusfabrikken.dk; 600 maps to the Bold file like on the main site. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Manrope-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/Manrope-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600 700; font-display: swap; src: url('../fonts/Manrope-Bold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }
:root {
  --ink: #1c1b19;
  --muted: #66635c;
  --body: #4a4842;
  --line: #e3e1db;
  --line-2: #ecebe6;
  --line-3: #d9d6cf;
  --soft: #f8f7f4;
  --soft-2: #faf9f7;
  --hover: #f1efea;
  --page: #f5f4f1;
  --green: #2f7a4f;
  --brand: linear-gradient(90deg, #ffac34, #fe7610 46%, #da0404);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Manrope', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--muted); }
button { font-family: inherit; color: inherit; }
input { font-family: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.brandbar { height: 4px; background: var(--brand); }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* Header */
.site-header { padding-top: 20px; padding-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand a { display: flex; }
.brand img { height: 30px; display: block; }
.brand .divider { width: 1px; height: 26px; background: var(--line-3); }
.brand h1 { display: contents; margin: 0; font-size: inherit; font-weight: inherit; }
.brand .name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.brand .tagline { font-size: 14px; color: var(--muted); }
.privacy-pill { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid #d6e4da; background: #f0f6f1; border-radius: 999px; }
.privacy-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.privacy-pill span { font-size: 13.5px; font-weight: 500; color: #1f4d33; }

/* Layout */
/* Two fixed columns on desktop, so content (long file names, many images) never reflows the layout. */
.tool { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.step { padding: 22px; }
.step + .step { border-top: 1px solid var(--line-2); }
.step-title { display: flex; align-items: baseline; gap: 10px; }
.step-title .num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.step-title .label { font-size: 16px; font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; text-wrap: pretty; }

/* Upload */
.dropzone { margin-top: 14px; border: 1.5px dashed #cfccc4; background: var(--soft-2); border-radius: 8px; padding: 34px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer; }
.dropzone.compact { padding: 16px; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag { border-color: var(--ink); }
.dropzone.drag { background: var(--hover); }
.dropzone .t1 { font-size: 15px; font-weight: 500; }
.dropzone .t2 { font-size: 13.5px; color: var(--muted); }

.image-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.image-row { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.image-row.on { border-color: var(--ink); background: var(--soft-2); }
.image-row .select { all: unset; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.image-row img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; background: #eee; }
.image-row .info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.image-row .fname { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-row .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.image-row .remove { border: none; background: none; font-size: 13px; color: var(--muted); cursor: pointer; padding: 10px; border-radius: 6px; }
.image-row .remove:hover { background: var(--hover); color: var(--ink); }

.rejected { margin-top: 12px; padding: 10px 12px; border: 1px solid #ecd3c9; background: #fbf3ef; border-radius: 7px; font-size: 13px; line-height: 1.5; color: #7a3a22; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rejected button { border: none; background: none; cursor: pointer; color: #7a3a22; font-size: 13px; padding: 0 2px; }

/* Type options */
.type-option { text-align: left; display: flex; gap: 14px; align-items: flex-start; min-height: 84px; padding: 14px; border: 1.5px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; width: 100%; }
.type-option:hover, .color-option:hover { border-color: var(--ink); }
.type-option[aria-pressed="true"] { border-color: var(--ink); background: var(--soft-2); }
.type-option .icon { width: 78px; height: 28px; flex: none; display: flex; align-items: center; }
.type-option .icon img { height: 24px; max-width: 78px; }
.type-option .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.type-option .title { font-size: 14.5px; font-weight: 600; }
.type-option .desc { font-size: 13px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }

/* Colors */
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.color-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.color-option { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; min-height: 44px; }
.color-option[aria-pressed="true"] { border-color: var(--ink); }
.color-option .swatch { height: 46px; border-radius: 5px; background: linear-gradient(135deg, #dcd9d2 0 50%, #5f5c56 50% 100%); display: flex; align-items: center; justify-content: center; }
.color-option .swatch img { height: 26px; }
.color-option .clabel { font-size: 12.5px; font-weight: 500; text-align: center; }
.color-option .tag { font-family: var(--mono); font-size: 10.5px; text-align: center; color: var(--green); min-height: 13px; }
.link-btn { align-self: flex-start; border: none; background: none; padding: 4px 0; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }

/* Placement + size */
.split { display: flex; flex-wrap: wrap; gap: 22px 28px; }
.corners { position: relative; width: 168px; height: 112px; border: 1.5px solid var(--line-3); border-radius: 8px; background: var(--soft); }
.corner { position: absolute; width: 46px; height: 44px; border: none; background: none; cursor: pointer; display: flex; padding: 7px; }
.corner i { display: block; width: 20px; height: 12px; border-radius: 3px; background: var(--line-3); }
.corner[aria-pressed="true"] i { background: var(--ink); }
.corner[data-corner="tl"] { top: 2px; left: 2px; align-items: flex-start; justify-content: flex-start; }
.corner[data-corner="tr"] { top: 2px; right: 2px; align-items: flex-start; justify-content: flex-end; }
.corner[data-corner="bl"] { bottom: 2px; left: 2px; align-items: flex-end; justify-content: flex-start; }
.corner[data-corner="bc"] { bottom: 2px; left: 50%; transform: translateX(-50%); align-items: flex-end; justify-content: center; }
.corner[data-corner="br"] { bottom: 2px; right: 2px; align-items: flex-end; justify-content: flex-end; }
.size-col { flex: 1; min-width: 180px; }
.segmented { display: flex; border: 1.5px solid var(--line-3); border-radius: 8px; padding: 3px; gap: 3px; background: var(--soft); }
.segmented button { flex: 1; min-height: 40px; border: none; border-radius: 6px; background: transparent; color: var(--ink); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input { flex: 1; min-width: 0; accent-color: var(--ink); height: 28px; }
.range-value { font-size: 12px; color: var(--muted); min-width: 46px; text-align: right; }

/* Text switch */
.switch { all: unset; display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.switch .track { width: 40px; height: 24px; border-radius: 999px; background: #cfccc4; position: relative; flex: none; transition: background .15s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch[aria-checked="true"] .track { background: var(--ink); }
.switch[aria-checked="true"] .knob { transform: translateX(16px); }
.switch .slabel { font-size: 14px; font-weight: 500; }
.text-input { width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid var(--line-3); border-radius: 8px; font-size: 14.5px; background: #fff; color: var(--ink); outline: none; }
.text-input:focus { border-color: var(--ink); }

/* Download */
.download { position: sticky; bottom: 0; z-index: 5; padding: 16px 22px 18px; background: #fff; border-top: 1px solid var(--line-2); box-shadow: 0 -10px 24px -14px rgba(28,27,25,.22); display: flex; flex-direction: column; gap: 10px; }
.dl-row { display: flex; gap: 10px; align-items: stretch; }
.dl-btn { flex: 1; width: 100%; min-height: 50px; border: none; border-radius: 8px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.dl-btn:hover:not(:disabled) { opacity: .88; }
.dl-btn:disabled { cursor: not-allowed; }
.dl-btn.empty { background: #b9b6ae; }
.format-note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* Stage */
.stage { --stage-bg: #e8e6e0; --stage-ink: var(--ink); --stage-muted: #5d5a53; --stage-dash: #c4c1b9; --stage-stripe: rgba(0,0,0,.035);
  min-width: 0; position: sticky; top: 20px; background: var(--stage-bg); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: 560px; }
.stage.dark { --stage-bg: #2b2a27; --stage-ink: #f2f0eb; --stage-muted: #b8b5ad; --stage-dash: #55524c; --stage-stripe: rgba(255,255,255,.04); }
.stage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 2px 4px; }
.stage-head .t { font-size: 13px; font-weight: 500; color: var(--stage-ink); }
.stage-head .m { font-family: var(--mono); font-size: 11.5px; color: var(--stage-muted); min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canvas-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.canvas-wrap canvas { display: block; max-width: 100%; max-height: calc(100vh - 190px); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 8px 28px rgba(0,0,0,.08); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.thumbs button { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; }
.thumbs button.on { border-color: var(--ink); }
.stage.dark .thumbs button.on { border-color: #fff; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-empty { flex: 1; border: 1.5px dashed var(--stage-dash); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px; text-align: center; background-image: repeating-linear-gradient(135deg, transparent 0 10px, var(--stage-stripe) 10px 11px); }
.stage-empty div { font-family: var(--mono); font-size: 12.5px; color: var(--stage-muted); }

/* Examples */
.examples { padding-top: 64px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 22px; }
.examples-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 28px; }
.examples-head .intro { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.examples h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.examples p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body); text-wrap: pretty; }
.examples-head > a { font-size: 14px; }
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.example { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.example .icon { height: 30px; display: flex; align-items: center; }
.example .icon img { height: 28px; }
.example .title { font-size: 15px; font-weight: 600; }
.example .text { font-size: 14px; line-height: 1.55; color: var(--body); text-wrap: pretty; }
.examples-note { max-width: 720px; font-size: 14px; line-height: 1.6; color: var(--body); text-wrap: pretty; }

/* Footer */
.site-footer { padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.site-footer .left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-footer img { height: 22px; display: block; }
.site-footer .left div { max-width: 620px; text-wrap: pretty; }
.site-footer a { color: var(--muted); }
.site-footer .right { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-link { border: none; background: none; padding: 0; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Cookie notice */
.notice { position: fixed; z-index: 50; right: 16px; bottom: 16px; width: 440px; max-width: calc(100% - 32px); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 16px 40px rgba(28,27,25,.16); display: flex; flex-direction: column; }
.notice .bar { height: 4px; flex: none; background: var(--brand); border-radius: 12px 12px 0 0; }
.notice .body { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.notice .h { font-size: 16px; font-weight: 600; }
.notice .p { font-size: 13.5px; line-height: 1.55; color: var(--body); text-wrap: pretty; }
.notice .cats { padding: 14px 20px 0; display: flex; flex-direction: column; }
.cat { padding: 12px 0; display: flex; gap: 14px; align-items: flex-start; }
.cat + .cat, .cat-group + .cat, .cat-group + .cat-group { border-top: 1px solid var(--line-2); }
.cat-group { padding: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.cat-group .cat { padding: 0; }
.cat .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cat .top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cat .n { font-size: 14px; font-weight: 600; }
.cat .c { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.cat .d { font-size: 13px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.mini-switch { width: 36px; height: 22px; border-radius: 999px; background: var(--line); position: relative; flex: none; opacity: .7; }
.mini-switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.mini-switch.on { background: var(--ink); opacity: .55; }
.mini-switch.on i { left: 17px; }
.pref-switch { all: unset; cursor: pointer; padding: 11px 0; margin: -11px 0; flex: none; }
.pref-switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 999px; }
.mini-switch.live { display: block; opacity: 1; background: #cfccc4; transition: background .15s; }
.mini-switch.live i { transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.pref-switch[aria-checked="true"] .mini-switch.live { background: var(--ink); }
.pref-switch[aria-checked="true"] .mini-switch.live i { transform: translateX(14px); }
.cat-table { padding: 10px 12px; background: var(--soft); border-radius: 7px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 12.5px; line-height: 1.45; color: var(--body); }
.cat-table b { font-weight: 500; color: var(--ink); }
.notice .actions { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-outline, .btn-solid { min-height: 44px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-outline { background: #fff; color: var(--ink); }
.btn-outline:hover { background: var(--hover); }
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { opacity: .88; }
.notice .toggle { align-self: center; border: none; background: none; padding: 6px 0; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }

.cookie-bubble { position: fixed; z-index: 40; right: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 8px 24px rgba(28,27,25,.14); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: transform .15s, box-shadow .15s; }
.cookie-bubble:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 12px 28px rgba(28,27,25,.2); }

@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
}

/* Mobile preview sheet. Desktop keeps the side-by-side preview. */
.mini-preview, .sheet-handle, .sheet-close, .sheet-backdrop { display: none; }

@media (max-width: 900px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
  .mini-preview:not([hidden]) { display: block; position: relative; flex: none; width: 50px; min-height: 50px; padding: 0; border: 1.5px solid var(--line-3); border-radius: 8px; overflow: hidden; background: var(--soft); cursor: pointer; }
  .mini-preview canvas { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); display: block; }
  .mini-eye { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(28,27,25,.78); color: #fff; display: flex; align-items: center; justify-content: center; }

  .stage { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; top: auto; min-width: 0; min-height: 0; max-height: 88vh; max-height: 88dvh;
    border-radius: 16px 16px 0 0; padding: 6px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(28,27,25,.25);
    transform: translateY(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
  .stage.open { transform: translateY(0); visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
  .stage.dragging { transition: none; }
  .sheet-handle { display: flex; justify-content: center; padding: 6px 0 4px; cursor: grab; touch-action: none; }
  .sheet-handle i { width: 40px; height: 5px; border-radius: 999px; background: var(--stage-dash); }
  .stage-head { touch-action: none; align-items: center; }
  .stage-head .m { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sheet-close { display: block; border: none; background: none; padding: 8px 2px 8px 8px; font-size: 14px; font-weight: 500; color: var(--stage-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .canvas-wrap canvas { max-height: calc(88dvh - 170px); }
  .stage-empty { min-height: 200px; }
  .sheet-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(28,27,25,.45); }

  /* The bubble would cover the download button; the footer link remains. */
  .cookie-bubble { display: none; }
}
