/* KC Bewertungslink — tokens from business/brand/DESIGN-DERIVATION-2026-07-18.md
   Paper surface, ink type, one accent (signal red) for feedback only. Radius 0. */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('/assets/fonts/instrument-sans-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/dm-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/dm-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f2efe6;
  --ink: #0c0b09;
  --signal: #c43c16;
  --body: #3a342b;
  --meta: #6b6155;
  --ok: #3f8f5b;
  --line: rgba(12, 11, 9, 0.18);
  --wash: rgba(12, 11, 9, 0.045);
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* The whole page is toggled with the `hidden` attribute, and any author rule that
   sets `display` silently beats the browser's own [hidden] rule. That is how
   `.verify { display: flex }` kept a "permanently closed" warning on screen for an
   open business. One gate here instead of a per-class patch each time it bites. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 20px 56px;
}

/* ---------------------------------------------------------------- header */

.top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 24px;
}

.mark {
  display: block;
  height: 30px;
  width: auto;
  flex: none;
}

.top h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.top .sub {
  margin: 3px 0 0;
  font-size: 14px;
  color: var(--meta);
}

/* ----------------------------------------------------------------- input */

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.45 var(--mono);
  resize: none;
  -webkit-appearance: none;
  appearance: none;
}

textarea::placeholder {
  color: var(--meta);
  font-family: var(--sans);
}

textarea:focus-visible,
.btn:focus-visible,
.pick:focus-visible,
.hist:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  margin-top: 10px;
}

.hint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--meta);
}

.hint strong {
  font-weight: 500;
  color: var(--body);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 16px/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out), border-color 120ms var(--ease-out);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn:active {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--paper);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: default;
}

.btn-quiet {
  border-color: var(--line);
  min-height: 44px;
  font-size: 15px;
}

.stack > * + * {
  margin-top: 8px;
}

/* ------------------------------------------------------------- feedback */

.status {
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 1.45;
}

.status.is-error {
  padding: 12px 14px;
  border-left: 3px solid var(--signal);
  background: var(--wash);
  color: var(--body);
}

.status.is-busy {
  color: var(--meta);
}

.status.is-busy::after {
  content: '…';
  display: inline-block;
  min-width: 1.2em;
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
  0% {
    content: '';
  }
  25% {
    content: '.';
  }
  50% {
    content: '..';
  }
  75% {
    content: '…';
  }
}

/* ------------------------------------------------------------------ card */

.card {
  margin-top: 24px;
  padding: 18px 16px 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
  animation: rise 220ms var(--ease-out);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  margin: 0 0 10px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--meta);
}

.card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.meta {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--meta);
  overflow-wrap: anywhere;
}

.linkbox {
  margin: 14px 0 8px;
  padding: 12px;
  background: var(--wash);
  border: 1px solid var(--line);
}

.linkbox code,
code.long {
  display: block;
  font: 500 15px/1.4 var(--mono);
  color: var(--ink);
  word-break: break-all;
  -webkit-user-select: all;
  user-select: all;
}

.verify {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--meta);
}

.verify::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ok);
}

.verify.is-warn {
  color: var(--signal);
}

.verify.is-warn::before {
  background: var(--signal);
}

.card .hint {
  margin: 8px 0 12px;
}

details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  list-style: none;
}

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

summary::after {
  content: ' +';
  color: var(--meta);
}

details[open] summary::after {
  content: ' −';
}

code.long {
  margin: 10px 0;
  font-size: 13px;
  font-weight: 400;
}

/* --------------------------------------------------------------- chooser */

.picks {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.pick {
  display: block;
  width: 100%;
  padding: 12px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 15px/1.35 var(--sans);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.picks li + li .pick {
  border-top: 0;
}

.pick:active {
  background: var(--ink);
  color: var(--paper);
}

.pick strong {
  display: block;
  font-weight: 500;
}

.pick span {
  display: block;
  font-size: 13px;
  color: inherit;
  opacity: 0.7;
}

.pick .pick-type {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 2px;
}

.pick .pick-facts {
  margin-top: 6px;
  opacity: 0.85;
  overflow-wrap: anywhere;
}

.pick .pick-closed {
  margin-top: 6px;
  font-weight: 500;
  color: var(--signal);
  opacity: 1;
}

.pick:active .pick-closed {
  color: var(--paper);
}

/* Identity facts on the result card: the last chance to spot a wrong profile. */
.facts {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--body);
}

.facts li {
  padding: 5px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.facts li:first-child {
  border-top: 0;
}

.facts b {
  display: inline-block;
  min-width: 92px;
  font-weight: 400;
  color: var(--meta);
}

/* --------------------------------------------------------------- history */

.history {
  margin-top: 36px;
}

.hist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.hist {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 15px/1.35 var(--sans);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hist:active {
  color: var(--signal);
}

.hist .who {
  min-width: 0;
}

.hist strong {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist code {
  display: block;
  font: 400 12px/1.3 var(--mono);
  color: var(--meta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist .act {
  flex: none;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--meta);
}

.history-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.link-quiet {
  background: none;
  border: 0;
  padding: 6px 0;
  font: 400 13px/1 var(--sans);
  color: var(--meta);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font: 500 15px/1.3 var(--sans);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
  z-index: 10;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-signal {
  background: var(--signal);
}

/* ---------------------------------------------------------------- footer */

.foot {
  margin-top: 40px;
  font: 400 12px/1.4 var(--mono);
  letter-spacing: 0.04em;
  color: var(--meta);
}

@media (min-width: 480px) {
  .app {
    padding: 32px 24px 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
