/* Feedback & bugs page (2026-10-01). Builds on /assets/legal.css (tokens: --ink, --paper, --muted, --line, --flare, --sans). */
:root {
  --field: #13151b;
  --field-hi: #181b22;
  --edge: rgba(244, 242, 238, 0.14);
  --edge-hi: rgba(244, 242, 238, 0.32);
  --soft: #b9bdc6;
  --err: #ff8a80;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
[hidden] { display: none !important; }
::selection { background: rgba(240, 85, 74, 0.35); color: var(--paper); }
html { scrollbar-color: #2a2d36 var(--ink); }

.fb-wrap { max-width: 42rem; }
header { margin-bottom: clamp(1.75rem, 5vw, 3rem); }
.fb-back {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; color: var(--soft); border: 0;
  padding: 0.4rem 0.2rem;
}
.fb-back svg { width: 1rem; height: 1rem; transition: transform 0.25s var(--ease); }
.fb-back:hover { color: var(--paper); }
.fb-back:hover svg { transform: translateX(-3px); }

h1 { font-size: clamp(2.1rem, 6.5vw, 3.4rem); text-wrap: balance; }
.lead { max-width: 34rem; margin-bottom: 2.25rem; text-wrap: pretty; }

form { display: flex; flex-direction: column; gap: 1.6rem; }
.fb-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fb-field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.fb-field > label, .fb-label {
  margin: 0; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft);
}
.fb-opt { margin-left: 0.4em; font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--muted); }

select, textarea, input[type="email"] {
  width: 100%; font: inherit; font-size: 1rem; color: var(--paper);
  background: var(--field); border: 1px solid var(--edge); border-radius: 12px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  caret-color: var(--flare);
}
select:hover, textarea:hover, input[type="email"]:hover { border-color: var(--edge-hi); }
select:focus-visible, textarea:focus-visible, input[type="email"]:focus-visible {
  outline: none; border-color: var(--flare); background: var(--field-hi);
  box-shadow: 0 0 0 3px rgba(240, 85, 74, 0.22);
}
.fb-select { position: relative; }
.fb-select::after {
  content: ""; position: absolute; right: 1rem; top: 50%; width: 0.55rem; height: 0.55rem; margin-top: -0.4rem;
  border-right: 1.6px solid var(--soft); border-bottom: 1.6px solid var(--soft); transform: rotate(45deg); pointer-events: none;
}
select { appearance: none; -webkit-appearance: none; padding: 0.85rem 2.6rem 0.85rem 1rem; min-height: 3.1rem; cursor: pointer; }
select:invalid { color: var(--muted); }
select option { color: var(--paper); background: var(--field); }
textarea { padding: 0.9rem 1rem; min-height: 10rem; resize: vertical; line-height: 1.55; }
textarea::placeholder, input[type="email"]::placeholder { color: #7d828d; }
input[type="email"] { padding: 0.85rem 1rem; min-height: 3.1rem; }
[aria-invalid="true"] { border-color: var(--err) !important; }

.fb-under { display: flex; justify-content: space-between; gap: 1rem; }
.fb-help, .fb-count { margin: 0; font-size: 0.8rem; color: var(--muted); }
.fb-count { font-variant-numeric: tabular-nums; }
.fb-err { margin: 0; font-size: 0.85rem; color: var(--err); }
.fb-err-block { padding: 0.75rem 1rem; border-radius: 10px; background: rgba(255, 138, 128, 0.08); }

/* drop zones */
.fb-drop {
  position: relative; border: 1px dashed var(--edge-hi); border-radius: 14px; background: var(--field);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.fb-drop.is-over { border-color: var(--flare); border-style: solid; background: rgba(240, 85, 74, 0.07); }
.fb-drop.is-full .fb-drop-btn { opacity: 0.5; cursor: not-allowed; }
.fb-pick { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fb-pick:focus-visible + .fb-drop-btn { outline: 2px solid var(--flare); outline-offset: 3px; border-radius: 12px; }
.fb-drop-btn {
  display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem; cursor: pointer;
  text-transform: none; letter-spacing: normal; font-size: 1rem; color: var(--paper);
}
.fb-drop-btn svg { flex: none; width: 1.7rem; height: 1.7rem; color: var(--flare); }
.fb-drop-btn b { display: block; font-weight: 500; }
.fb-drop-btn small { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.4; margin-top: 0.1rem; }
.fb-drop-btn:hover b { text-decoration: underline; text-decoration-color: var(--flare); text-underline-offset: 4px; }

.fb-thumbs, .fb-files { list-style: none; margin: 0; padding: 0 1.1rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.fb-thumbs:not(:empty), .fb-files:not(:empty) { padding-bottom: 1.1rem; }
.fb-thumbs li {
  position: relative; width: 7.5rem; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  background: #0f1116; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: fb-in 0.35s var(--ease);
}
.fb-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-thumbs .fb-size {
  position: absolute; left: 0.4rem; bottom: 0.35rem; font-size: 0.68rem; padding: 0.05rem 0.4rem; border-radius: 6px;
  background: rgba(11, 12, 16, 0.78); color: var(--soft); font-variant-numeric: tabular-nums;
}
.fb-files { flex-direction: column; gap: 0.5rem; }
.fb-files li {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.55rem 0.55rem 0.85rem; border-radius: 10px;
  background: #0f1116; animation: fb-in 0.35s var(--ease); font-size: 0.9rem;
}
.fb-files .fb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-files .fb-size { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.fb-x {
  display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%;
  background: rgba(11, 12, 16, 0.78); color: var(--paper); cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.fb-thumbs .fb-x { position: absolute; top: 0.35rem; right: 0.35rem; }
.fb-x svg { width: 0.9rem; height: 0.9rem; }
.fb-x:hover { background: var(--flare); }
.fb-x:focus-visible { outline: 2px solid var(--flare); outline-offset: 2px; }
@keyframes fb-in { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: none; } }

.fb-carrier, .fb-trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.fb-meter { display: flex; align-items: center; gap: 0.9rem; margin-top: -0.6rem; }
.fb-meter-bar { flex: 1; height: 4px; border-radius: 4px; background: #22252d; overflow: hidden; }
.fb-meter-bar span { display: block; height: 100%; width: 0; background: var(--soft); border-radius: 4px; transition: width 0.35s var(--ease), background-color 0.2s; }
.fb-meter.is-high .fb-meter-bar span { background: var(--flare); }
.fb-meter p { margin: 0; font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* send */
.fb-send { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; margin-top: 0.4rem; }
.fb-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3.2rem; padding: 0 1.6rem; border: 0; border-radius: 999px;
  font: inherit; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--flare); color: #160605; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 24px rgba(240, 85, 74, 0.25);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s;
}
.fb-submit svg { width: 1rem; height: 1rem; transition: transform 0.3s var(--ease); }
.fb-submit:hover { background: #ff6a5f; box-shadow: 0 12px 30px rgba(240, 85, 74, 0.32); border: 0; }
.fb-submit:hover svg { transform: translateX(3px); }
.fb-submit:active { transform: translateY(1px); }
.fb-submit:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.fb-submit[aria-busy="true"] { cursor: progress; background: #b8463e; box-shadow: none; }
.fb-submit[aria-busy="true"] svg { animation: fb-nudge 0.9s var(--ease) infinite; }
@keyframes fb-nudge { 50% { transform: translateX(5px); opacity: 0.4; } }
.fb-fine { margin: 0; font-size: 0.78rem; color: var(--muted); max-width: 32rem; line-height: 1.5; }
.fb-fine a { color: var(--soft); }

/* done */
.fb-done { min-height: 52vh; display: flex; flex-direction: column; justify-content: center; outline: none; }
.fb-done-mark { width: 3.25rem; height: 3.25rem; margin-bottom: 1.4rem; }
.fb-done-mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: fb-tick 0.7s 0.15s var(--ease) forwards; }
@keyframes fb-tick { to { stroke-dashoffset: 0; } }
.fb-done-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.fb-ghost {
  min-height: 3.2rem; padding: 0 1.4rem; border-radius: 999px; border: 1px solid var(--edge-hi);
  background: transparent; color: var(--paper); font: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.fb-ghost:hover { border-color: var(--paper); }
.fb-ghost:focus-visible { outline: 2px solid var(--flare); outline-offset: 3px; }

@media (max-width: 560px) {
  .fb-pair { grid-template-columns: 1fr; }
  .fb-thumbs li { width: calc(50% - 0.375rem); }
  .fb-submit { width: 100%; }
  .fb-send { align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .fb-done-mark path { stroke-dashoffset: 0; }
}
