/* ShowMe – mørkt tema, flade farver (ingen forløb), høj kontrast */
:root {
  --bg: #0e1116;
  --surface: #161b22;
  --surface-2: #1d232c;
  --border: #2a323d;
  --border-strong: #3a4452;
  --text: #e8edf3;
  --muted: #9aa5b4;
  --accent: #58d6a3;
  --accent-hover: #6fe3b3;
  --accent-ink: #052318;
  --accent-dim: #163a2d;
  --warn: #f2c14e;
  --warn-dim: #3a3013;
  --danger: #ff7b72;
  --danger-dim: #3d1c1a;
  --focus: #8ec5ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.wrap { width: min(100% - 2rem, 760px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--accent); color: var(--accent-ink); padding: .4rem .8rem; border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { left: .5rem; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.brand .icon { width: 26px; height: 26px; color: var(--accent); }
.site-header nav { display: flex; gap: .25rem; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: .35rem .7rem; border-radius: var(--radius-sm); font-weight: 500; }
.site-header nav a:hover { color: var(--text); background: var(--surface-2); }
.site-header nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
main { flex: 1; padding: 2.5rem 0 3rem; }
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0 2rem; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0 0 .4rem; }
.site-footer .lang a { color: var(--muted); }
.site-footer .lang a[aria-current="true"] { color: var(--text); font-weight: 600; text-decoration: none; }

/* Hero */
.hero { margin-bottom: 1.75rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

/* Kort */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
  transition: border-color .3s ease;
}

/* Felter */
.field { margin-bottom: 1.4rem; }
.label { display: block; font-weight: 600; margin-bottom: .45rem; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .45rem; }
.label-row .label { margin: 0; }
textarea, input[type="text"], input[type="number"] {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .7rem .85rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { font-family: var(--mono); font-size: .95rem; line-height: 1.5; resize: vertical; min-height: 9rem; }
textarea::placeholder, input::placeholder { color: #6b7686; }
textarea:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

/* Dropzone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  padding: 1.25rem 1rem;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.dropzone .icon { width: 26px; height: 26px; margin-bottom: .25rem; }
.dropzone:hover, .dropzone.is-over, .dropzone:has(+ input:focus-visible) { border-color: var(--accent); color: var(--text); background: var(--surface-2); }
.dropzone.is-full { opacity: .5; pointer-events: none; }
.dz-text { font-weight: 500; }
.dz-hint { font-size: .85rem; }

/* Fil-liste */
.file-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; }
.file-list:empty { display: none; }
.file-list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: rise .2s ease both;
}
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: .9rem; }
.file-size { color: var(--muted); font-size: .85rem; white-space: nowrap; }

/* Udløb */
fieldset.expire { border: 0; padding: 0; margin: 0 0 1.4rem; }
fieldset.expire legend { padding: 0; }
.expire-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; }
.expire-or { align-self: center; color: var(--muted); font-size: .9rem; padding-top: .35rem; text-transform: uppercase; letter-spacing: .06em; }
.expire-item { display: grid; gap: .55rem; }
.num { display: flex; align-items: center; gap: .6rem; }
.num input { width: 6.5rem; font-variant-numeric: tabular-nums; font-size: 1.15rem; font-weight: 600; text-align: center; padding: .5rem; }
.num label { color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
  font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem .7rem;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.summary { margin: .9rem 0 0; font-size: .95rem; }

/* Knapper */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600;
  padding: .65rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn .icon { width: 18px; height: 18px; flex: none; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.05rem; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn.is-done { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.btn.is-busy { position: relative; }
.btn.is-busy .icon { animation: spin 1s linear infinite; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Notices */
.notice {
  padding: .75rem .95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: .95rem;
}
.notice.warn { background: var(--warn-dim); border-color: #6b5920; color: #ffe39a; }
.notice.error { background: var(--danger-dim); border-color: #7a3630; color: #ffb3ad; }
.notice.danger { background: var(--danger-dim); border-color: var(--danger); color: #ffb3ad; }

/* Resultat */
.result-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.result-head .icon { color: var(--accent); width: 24px; height: 24px; }
.result-head h2 { margin: 0; }
.linkbox { display: flex; gap: .5rem; margin: .5rem 0 .9rem; }
.linkbox input { font-family: var(--mono); font-size: .9rem; }
#result:not([hidden]) { animation: rise .3s ease both; }

/* Sådan virker det */
.how h2, .faq h2 { margin-bottom: 1rem; }
.steps { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; position: relative; }
.steps li p { margin: 0; color: var(--muted); font-size: .93rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: .9rem; right: 1rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
.step-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-dim); color: var(--accent); margin-bottom: .75rem; }
.step-icon .icon { width: 20px; height: 20px; }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: .5rem; }
.faq-item summary { cursor: pointer; padding: .85rem 1rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-weight: 400; flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0; padding: 0 1rem .9rem; color: var(--muted); }

/* Prose (privatliv) */
.prose h2 { font-size: 1.1rem; margin-top: 1.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose p:last-child { margin-bottom: 0; }

/* Visning af hemmelighed */
.reveal-head { text-align: center; margin-bottom: 1.25rem; }
.badge-icon {
  width: 60px; height: 60px; margin: 0 auto .9rem;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--accent-dim); color: var(--accent);
  transition: background-color .4s ease, color .4s ease;
}
.badge-icon .icon { width: 28px; height: 28px; }
.badge-icon.danger { background: var(--danger-dim); color: var(--danger); }
.status { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.pill .icon { width: 15px; height: 15px; }
.reveal .actions { justify-content: center; margin-top: 1rem; }
.reveal .notice { margin-bottom: .75rem; }
.secret-text {
  margin: 0;
  font-family: var(--mono); font-size: .95rem; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  max-height: 60vh; overflow: auto;
}
.secret-text.is-empty { color: var(--muted); font-style: italic; }
#post-reveal:not([hidden]) { animation: rise .35s ease both; }
.reveal.is-destroyed { border-color: var(--danger); animation: burn .9s ease both; }
.gone { text-align: center; }
.gone .actions { justify-content: center; }

/* Animationer */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes burn { 0% { box-shadow: 0 0 0 0 rgba(255,123,114,.55); } 100% { box-shadow: 0 0 0 18px rgba(255,123,114,0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsivt */
@media (max-width: 640px) {
  .expire-grid { grid-template-columns: 1fr; }
  .expire-or { padding: 0; text-align: left; }
  .steps { grid-template-columns: 1fr; }
  .linkbox { flex-direction: column; }
  .bar { padding: .7rem 0; }
  .site-header nav a { padding: .35rem .5rem; }
}
