/* Hallmark · checked: 2026-11-17 · genre: modern-minimal (inferred) · scope: app (a tool with its explainer below)
 * floor: 0 FAIL · fixed: 13 (7a, 19, 22, 24b, 25, 26a, 26b, 34, 40, 48, 50, 63, 74) · structural: none printed (app scope)
 * imprint.html (polish, same day): fixed 3 (19 title dash, 63 back-link arrow and footer dot, lang en to match the copy)
 * finish-review: subagent · 5 findings · 3 resolved (stats row on the tool grid, single focus ring, balanced subtitle) · 2 kept as the owner's words (Title Case labels, "Copied!")
 * built: the project · redesign: polish · v2.0.0 */
/* Hallmark · answered F14 · the paste and copy hints appear only after a failed clipboard call, so an empty reserved line under both button rows would cost more than that one shift */

:root {
  color-scheme: light;

  /* Paper and ink, tinted toward the accent hue (262) */
  --bg: #ffffff;
  --surface: oklch(97.6% 0.006 262);
  --text: oklch(20% 0.012 262);
  --text-soft: oklch(32% 0.012 262);
  --muted: oklch(46% 0.016 262);
  --placeholder: oklch(53% 0.014 262);
  --border: oklch(88% 0.01 262);
  --border-strong: oklch(72% 0.014 262);
  --field-edge: oklch(60% 0.014 262);
  --field-edge-hover: oklch(46% 0.016 262);

  /* Signal */
  --accent: oklch(50% 0.2 262);
  --accent-hover: oklch(43% 0.19 262);
  --accent-ink: oklch(99% 0.004 262);
  --focus: oklch(52% 0.2 262);
  --success: oklch(48% 0.13 150);
  --selection: oklch(90% 0.06 262);

  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --dur-micro: 80ms;
  --dur-short: 150ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scrollbar-color: var(--border-strong) var(--surface);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  caret-color: var(--accent);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

::selection {
  background: var(--selection);
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

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

h1,
h2 {
  overflow-wrap: break-word;
  min-width: 0;
  text-wrap: balance;
}

/* Header */
.site-header {
  padding: 40px 0 24px;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 auto;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.0625rem;
  text-wrap: balance;
}

/* Tool */
.tool {
  margin-bottom: 56px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--field-edge);
  border-radius: var(--radius);
  background: var(--surface);
}

.options {
  min-width: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 16px;
}

.option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

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

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel label {
  margin-bottom: 8px;
  font-weight: 600;
}

textarea {
  width: 100%;
  min-height: 320px;
  padding: 16px;
  border: 1px solid var(--field-edge);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.55;
  resize: vertical;
  transition: border-color var(--dur-short) ease-out;
}

textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

textarea:hover {
  border-color: var(--field-edge-hover);
}

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

textarea[readonly] {
  background: var(--surface);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) ease-out, border-color var(--dur-short) ease-out, color var(--dur-short) ease-out, transform var(--dur-micro) ease-out;
}

.btn:hover {
  border-color: var(--field-edge-hover);
  background: var(--surface);
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  padding: 8px 24px;
}

.btn-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.btn-primary.is-copied,
.btn-primary.is-copied:hover {
  border-color: var(--success);
  background: var(--success);
  color: var(--accent-ink);
}

.btn:disabled,
.btn:disabled:hover {
  border-color: var(--border);
  background: var(--surface);
  color: var(--placeholder);
  cursor: not-allowed;
  transform: none;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Stats: a quiet row on the tool grid, under a hairline; Original under the input, Cleaned under the output */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 20px;
  margin: 20px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.stats > div:nth-child(2) {
  grid-column: 3;
}

.stats dt {
  font-weight: 500;
}

.stats dd {
  margin: 0;
}

.stats strong {
  color: var(--text);
  font-weight: 600;
}

/* Content sections */
.content {
  max-width: 65ch;
  margin: 0 auto 48px;
}

.content h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.content p,
.content ol {
  margin: 0 0 16px;
}

.content ol {
  padding-left: 1.4em;
}

.content li {
  margin-bottom: 8px;
}

code {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.875em;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq details:first-of-type {
  border-top: 1px solid var(--border);
}

.faq summary {
  position: relative;
  padding: 16px 32px 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq summary:hover {
  color: var(--accent-hover);
}

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

.faq details p {
  margin: 0 0 16px;
  color: var(--text-soft);
}

/* Footer */
.site-footer {
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 4px;
}

.site-footer .footer-links {
  margin-top: 8px;
}

.site-footer a {
  color: var(--muted);
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--text);
}

/* Legal pages (Impressum) */
.back-link {
  margin: 0 0 12px;
  font-size: 0.9375rem;
}

.back-link a {
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

.legal h2 {
  margin: 28px 0 8px;
  font-size: 1.125rem;
}

.legal h2:first-child {
  margin-top: 0;
}

@media (max-width: 767px) {
  .site-header {
    padding: 28px 0 20px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  textarea {
    min-height: 220px;
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }

  .stats > div:nth-child(2) {
    grid-column: auto;
  }

  .stats > div {
    padding: 8px 0;
  }

  .stats > div + div {
    border-top: 1px solid var(--border);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  textarea {
    transition: none;
  }

  .btn:active {
    transform: none;
  }
}
