@font-face {
  font-family: "Manrope"; src: url("/static/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #0b1110;
  --surface: #111a18;
  --surface-2: #0d1513;
  --surface-3: #172220;
  --line: #1f2b28;
  --line-strong: #2c3a36;
  --ink: #eef3f1;
  --muted: #8d9b96;
  --faint: #66746f;
  --green: #6bd386;
  --green-ink: #04140b;
  --green-soft: rgba(107, 211, 134, .11);
  --green-line: rgba(107, 211, 134, .4);
  --red: #ff6a52;
  --red-soft: rgba(255, 106, 82, .12);
  --red-line: rgba(255, 106, 82, .42);
  --amber: #f4b740;
  --amber-soft: rgba(244, 183, 64, .12);
  --amber-line: rgba(244, 183, 64, .42);
  --drawing: #eef2f0;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-family: Manrope, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); position: relative; isolation: isolate; display: flex; flex-direction: column; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 65% 50% at 50% -5%, rgba(107, 211, 134, .13), transparent 70%),
    radial-gradient(ellipse 45% 40% at 90% 75%, rgba(107, 211, 134, .06), transparent 70%),
    radial-gradient(circle, rgba(107, 211, 134, .28) 0 1px, transparent 1.5px) 0 0 / 173px 173px,
    radial-gradient(circle, rgba(107, 211, 134, .18) 0 1px, transparent 1.5px) 61px 97px / 251px 251px;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--green); }

.topbar {
  height: 64px; padding: 0 clamp(18px, 5vw, 64px); display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 16, .82); position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(12px);
}
.brand, nav a { color: var(--ink); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 1.32rem; font-weight: 800; letter-spacing: -.035em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; }
.brand-mark svg { width: 30px; height: 30px; fill: #6bd386; }
nav { display: flex; align-items: center; gap: 6px; }
nav a { padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: .86rem; font-weight: 700; }
nav a.active, nav a:hover { color: var(--green); background: var(--green-soft); }
.logout-form { margin: 0; display: contents; }
.nav-button {
  padding: 8px 12px; border: 0; border-radius: 999px; background: none; color: var(--muted);
  font-size: .86rem; font-weight: 700;
}
.nav-button:hover { color: var(--ink); background: var(--surface-3); }
.nav-email {
  margin-left: 8px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--faint); font-family: var(--mono); font-size: .66rem; letter-spacing: .06em;
}
.learn-more {
  padding: 8px 14px; border: 1px solid var(--green-line); border-radius: 999px; color: var(--green);
  background: var(--green-soft); font-size: .82rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.learn-more:hover { box-shadow: 0 0 18px rgba(107, 211, 134, .25); }

main { width: calc(100% - 36px); max-width: 1180px; margin: 0 auto; padding: 44px 0 72px; flex: 1; }
.account-main { max-width: 960px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.eyebrow {
  margin: 0 0 12px; color: var(--green); font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2.1rem, 5.4vw, 3.9rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
.hl { color: var(--green); }
h2 { margin: 0 0 4px; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.lede { margin: 16px 0 0; max-width: 560px; color: var(--muted); font-size: 1.02rem; line-height: 1.5; }

.notice {
  margin: 0 0 22px; padding: 12px 16px; border: 1px solid var(--green-line); border-radius: 12px;
  background: var(--green-soft); color: var(--ink); font-weight: 600; line-height: 1.45;
}

.account-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card {
  padding: clamp(18px, 4vw, 30px); border: 1px solid var(--line); border-radius: 16px;
  background: rgba(17, 26, 24, .88);
}
.card h2 { margin-bottom: 18px; }
.account-form, .resend-form { display: grid; gap: 14px; }
label span {
  display: block; margin-bottom: 7px; color: var(--muted); font-family: var(--mono); font-size: .68rem;
  font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
input[type="email"], input[type="password"] {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; color: var(--ink); background: var(--surface-2);
}
input::placeholder { color: var(--faint); }
.primary-button {
  width: 100%; min-height: 46px; border: 0; border-radius: 999px; color: var(--green-ink);
  background: var(--green); font-weight: 800; box-shadow: 0 0 26px rgba(107, 211, 134, .28);
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.primary-button:hover { box-shadow: 0 0 34px rgba(107, 211, 134, .45); transform: translateY(-1px); }
.ghost-button {
  width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--muted); font-size: .86rem; font-weight: 700;
}
.ghost-button:hover { color: var(--ink); border-color: var(--green-line); }
.resend-form { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.hint { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }

.search-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.search-card {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 18px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(17, 26, 24, .88);
}
.search-card.light-red { border-color: var(--red-line); }
.search-card.light-green { border-color: var(--green-line); }
.search-card.light-yellow { border-color: var(--amber-line); }
.search-thumb { width: 120px; height: 120px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.search-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.search-body { min-width: 0; grid-column: 2; }
.search-card > .search-body:first-child { grid-column: 1 / -1; }
.search-when { margin: 0 0 6px; color: var(--faint); font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; }
.search-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.search-head h2 { margin: 0; font-size: 1.15rem; }
.search-open { color: inherit; text-decoration: none; }
.search-brand { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.search-algorithm { margin: 2px 0 0; font-size: .72rem; color: var(--muted); font-family: var(--mono, monospace); }
.search-open:hover { text-decoration: underline; }
.search-thumb a { display: block; height: 100%; }
.search-photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }
.search-photos a { display: flex; flex-direction: column; gap: 4px; width: 140px; color: var(--muted); font-size: 0.8rem; text-decoration: none; }
.search-photos img { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); display: block; }
.search-photos a:hover img { border-color: var(--line-strong); }
.search-thumb.cleaned { background: #fff; }
.search-thumb.cleaned img, .search-photos img.cleaned { object-fit: contain; background: #fff; }
.search-summary { margin: 0 0 4px; line-height: 1.5; }
.search-advice { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.search-matches { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-matches a { display: block; width: 84px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--drawing); }
.search-matches a:hover { border-color: var(--green-line); }
.search-matches img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: contain; background: var(--drawing); }
.judge-reasons { margin: 10px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.judge-reasons li { margin: 4px 0; }
.judge-reasons .patent-number { margin-right: 6px; }
.utility-patent.verdict-reads, .utility-patent.verdict-reads a { color: var(--red); }
.utility-patent.verdict-possible a { color: var(--red); font-weight: 700; }
.patent-number {
  padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .06em;
}
.search-mode { margin: 12px 0 0; color: var(--faint); font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.search-when a { color: var(--muted); }
.search-again {
  display: inline-block; margin-top: 12px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); font-size: .8rem; font-weight: 700; text-decoration: none;
}
.search-again:hover { border-color: var(--green-line); color: var(--green); }
.empty-message { margin: 18px 0 0; color: var(--muted); }

.user-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.user-table th, .user-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.user-table th { color: var(--muted); font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.user-table .num { text-align: right; font-family: var(--mono); }
.user-table a { font-weight: 700; }

.risk-light {
  padding: 6px 13px; border: 1px solid var(--amber-line); border-radius: 999px; font-family: var(--mono);
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; color: var(--amber); background: var(--amber-soft); white-space: nowrap;
}
.risk-light.red, .light-red .risk-light { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }
.risk-light.yellow, .light-yellow .risk-light { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.risk-light.green, .light-green .risk-light { color: var(--green); background: var(--green-soft); border-color: var(--green-line); }

.site-footer {
  width: calc(100% - 36px); max-width: 1180px; margin: 0 auto; padding: 22px 0 40px; display: flex;
  justify-content: space-between; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line);
  color: var(--faint); font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
}

button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

@media (max-width: 760px) {
  .account-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  main { width: calc(100% - 22px); padding-top: 28px; }
  .hero { display: grid; }
  nav a, .nav-button { padding-inline: 9px; }
  .nav-email { display: none; }
  .topbar { height: auto; min-height: 64px; flex-wrap: wrap; gap: 6px 14px; padding-block: 10px; }
  .brand { flex-shrink: 0; }
  .topbar nav { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
  .learn-more { padding: 7px 10px; font-size: .74rem; }
  .search-card { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .search-thumb { width: 88px; height: 88px; }
  .search-photos a, .search-photos img { width: 104px; }
  .search-photos img { height: 104px; }
  .user-table { display: block; overflow-x: auto; }
  .user-table th, .user-table td { padding: 8px; white-space: nowrap; }
  .site-footer { width: calc(100% - 22px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.show-control { margin: 0 0 1rem; font-size: 0.9rem; opacity: 0.85; }
.show-control a { text-decoration: none; padding: 0 0.15rem; }
.show-control a.active { font-weight: 700; text-decoration: underline; }
.search-count { margin: 0.25rem 0 0; font-size: 0.8rem; opacity: 0.7; }


.search-trace { margin-top: 0.5rem; }
.search-trace summary { cursor: pointer; font-weight: 600; }
.search-trace .trace-copy { margin: 0.4rem 0; font: inherit; font-size: 0.85rem; padding: 0.15rem 0.6rem; cursor: pointer; }
.search-trace .trace-text { max-height: 32rem; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.75rem; line-height: 1.35; padding: 0.6rem;
  background: rgba(127, 127, 127, 0.08); border-radius: 6px; }
.search-trace-none { font-size: 0.8rem; opacity: 0.7; }
.search-trace .trace-cost { margin: 0.5rem 0 0.3rem; padding: 0.55rem 0.75rem; border-left: 3px solid var(--amber);
  background: var(--amber-soft); border-radius: 0 6px 6px 0; font-size: 0.85rem; line-height: 1.4; overflow-wrap: anywhere; }
.search-trace .trace-cost-total { margin: 0; font-weight: 600; }
.search-trace .trace-cost-total.not-recorded { font-weight: 500; opacity: 0.85; }
.search-trace .trace-cost ul { margin: 0.35rem 0 0.25rem; padding-left: 1.1rem; }
.search-trace .trace-cost li { margin: 0.1rem 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.75rem; }
.search-trace .trace-cost-note { margin: 0.2rem 0 0; font-size: 0.75rem; opacity: 0.75; }

.search-number { color: var(--ink); font-weight: 700; letter-spacing: .06em; }
.search-card.search-started { opacity: .72; padding: 10px 18px; }
.search-card.search-started .search-when { margin: 0; }
.search-expired-label { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
.search-matches.expired { margin-top: 6px; opacity: .8; }
.search-kinds { margin: 6px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.search-notice { margin: 6px 0 0; font-size: .82rem; line-height: 1.45; }
.search-notice.info { color: var(--muted); }
.search-owner { margin: 0 0 12px; font-size: .85rem; }
.search-lookup { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 18px; }
.search-lookup input { width: 9em; }

.search-card.score-alarm { border-color: var(--red-line); }
.score-chip {
  padding: 5px 11px; border: 1px solid rgba(140, 185, 230, .38); border-radius: 999px; font-family: var(--mono, monospace);
  font-size: .68rem; font-weight: 600; letter-spacing: .12em; white-space: nowrap; color: #9cc8f2; background: rgba(120, 170, 220, .16);
}
.score-chip.alarm { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }
.search-card.score-warn { border-color: var(--amber-line); }
.score-chip.warn { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.score-chip.checking, .score-chip.waiting { color: var(--muted, #8d9b96); background: transparent; border-color: var(--line, #1f2b28); }
.score-lines { list-style: none; margin: 8px 0 0; padding: 0; }
.score-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--line, #1f2b28); }
.score-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.score-words span, .score-words small { color: var(--muted, #8d9b96); font-size: .8rem; overflow-wrap: anywhere; }
.search-more { margin-top: 8px; }
.search-more > summary { cursor: pointer; color: var(--muted, #8d9b96); font-size: .8rem; }
@media (max-width: 480px) {
  .score-line { flex-direction: column; align-items: flex-start; }
}

.score-chip.quiet { color: var(--muted, #8d9b96); background: transparent; border-color: var(--line-strong, var(--line, #1f2b28)); }
.search-matches a.search-match { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.search-matches .match-number { display: block; padding: 3px 4px 4px; background: var(--surface-2); color: var(--ink);
  font-family: var(--mono, monospace); font-size: .66rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.report-frame, .report-frame > tbody, .report-frame > tbody > tr, .report-frame > tbody > tr > td { display: contents; }
.print-only { display: none; }
.report-notice {
  margin: 0 0 18px; padding: 10px 12px; border: 1px solid var(--line-strong); border-left: 3px solid var(--muted);
  border-radius: 10px; color: var(--ink); background: var(--surface); font-size: .86rem; line-height: 1.5;
}
@media print {
  @page { margin: 12mm; }
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #f2f4f3; --line: #c8cfcc; --line-strong: #8f9a96;
    --ink: #111; --muted: #3f4946; --faint: #5b6662; --green: #0b6b3a; --green-soft: transparent; --green-line: #0b6b3a;
    --red: #b42318; --red-soft: transparent; --red-line: #b42318; --amber: #7a5200; --amber-soft: transparent;
    --amber-line: #7a5200; --drawing: #fff; color-scheme: light; color: #111; background: #fff;
  }
  body { display: block; min-height: 0; min-width: 0; background: #fff; }
  body::before { display: none; }
  .topbar, .site-footer, .show-control, .search-lookup, .search-again, .send-open, .report-notice, .search-trace .trace-copy {
    display: none !important;
  }
  .report-frame { display: table; width: 100%; border-collapse: collapse; }
  .report-frame > thead { display: table-header-group; }
  .report-frame > tfoot { display: table-footer-group; }
  .report-frame > tbody { display: table-row-group; }
  .report-frame > thead > tr, .report-frame > tbody > tr, .report-frame > tfoot > tr { display: table-row; }
  .report-frame > thead > tr > td, .report-frame > tbody > tr > td, .report-frame > tfoot > tr > td {
    display: table-cell; padding: 0; vertical-align: top;
  }
  main { width: auto; max-width: none; margin: 0; padding: 0; }
  .hero { margin: 0 0 4mm; padding: 0; }
  .print-head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 1.5mm 3mm; margin: 0 0 4mm; padding: 0 0 2.5mm;
    border-bottom: 1px solid #8f9a96; color: #111; font-size: 9pt; line-height: 1.3;
  }
  .print-logo { flex: none; width: 8mm; height: 8mm; border-radius: 1.2mm; }
  .print-brand { font-size: 13pt; font-weight: 800; letter-spacing: -.01em; }
  .print-title { color: #3f4946; }
  .print-search:empty { display: none; }
  .print-site { margin-left: auto; font-family: var(--mono); font-size: 8pt; color: #3f4946; }
  .print-foot { margin: 4mm 0 0; padding: 2mm 0 0; border-top: 1px solid #8f9a96; }
  .print-foot p { margin: 0; color: #111; font-size: 8.5pt; line-height: 1.35; }
  .search-card { background: #fff; break-inside: avoid; }
  .score-chip { color: #1d4f86; background: transparent; border-color: #1d4f86; }
  .score-chip.alarm { color: #b42318; border-color: #b42318; }
  .score-chip.warn { color: #8a5a00; border-color: #8a5a00; }
  .score-chip.quiet, .score-chip.checking, .score-chip.waiting { color: #3f4946; border-color: #8f9a96; }
  a { color: #0b4a8a; }
}

@media (max-width: 640px) {
  .topbar nav a, .topbar .nav-button { white-space: nowrap; }
}

.view-choice { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; min-width: 0; }
.view-choice legend {
  margin: 0 0 7px; padding: 0; color: var(--muted); font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
}
.view-option {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface-2); cursor: pointer;
}
.view-option:has(input:checked) { border-color: var(--green-line); background: var(--green-soft); }
.view-option input { width: 18px; min-width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.view-option span {
  display: block; margin: 0; color: var(--muted); font-family: inherit; font-size: .86rem; font-weight: 400;
  letter-spacing: 0; line-height: 1.45; text-transform: none;
}
.view-option strong { display: block; color: var(--ink); font-size: .94rem; }
.view-hint { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.view-state { margin: 0 0 12px; line-height: 1.5; }
.view-form { max-width: 520px; }
.view-form .keep-button { justify-self: start; }
