:root {
  color-scheme: light;
  --paper: #f7f1ea;
  --sheet: #fffcf7;
  --ink: #181713;
  --quiet: #645e56;
  --line: #cec5b9;
  --orange: #ff600f;
  --focus: #aa4008;
  --gutter: clamp(18px, 3.8vw, 72px);
  font: 16px/1.5 "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { isolation: isolate; min-height: 100vh; margin: 0; }
body:has(#work:not([hidden]) .catalog-hero)::before,
body:has(#login:not([hidden]))::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: clamp(390px, 42vw, 650px);
  background: var(--paper) url("/hero.webp") center top / 100% 100% no-repeat;
  pointer-events: none;
}
header, main { max-width: 1800px; margin: 0 auto; }
header, header > div, #tabs, .row, .top, .tools, .card-jumps {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}
header { justify-content: space-between; min-height: 65px; padding: 18px var(--gutter) 14px; }
header strong { font-size: clamp(20px, 2vw, 30px); line-height: 1.1; letter-spacing: -.065em; }
header span {
  margin-left: 12px; padding-left: 18px; border-left: 1px solid #89837b;
  font-size: clamp(15px, 1.45vw, 21px); letter-spacing: -.04em;
}
#who { font-size: 14px; overflow-wrap: anywhere; }
#who:not(:empty) { padding: 3px 6px; background: var(--paper); border-radius: 8px; }
#who button, #close { font-size: 14px; padding: 5px 12px; border-radius: 20px; }
main { padding: 8px var(--gutter) 72px; }
#screen, #detail { min-width: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.052em; overflow-wrap: anywhere; }
h1 { margin: 32px 0; font-size: clamp(42px, 5.9vw, 84px); line-height: 1; }
h2 { margin: 28px 0 12px; font-size: clamp(23px, 2.15vw, 33px); line-height: 1.14; }
h3 { font-size: 20px; }
.muted, small { color: var(--quiet); }

button, a.btn {
  border: 1px solid #a69e93; border-radius: 8px; padding: 8px 14px;
  color: var(--ink); background: transparent; font: inherit; cursor: pointer; text-decoration: none;
}
button:not(:disabled):hover, a.btn:hover { border-color: var(--ink); }
button.primary, button[type=submit] {
  border-color: transparent; border-radius: 24px; padding: 10px 18px;
  background: var(--orange); color: #15120e; font-weight: 600;
}
button:disabled { opacity: .55; cursor: default; }
a, summary, button.link { color: var(--ink); text-underline-offset: 3px; }
button.link { border: 0; padding: 0; text-align: left; text-decoration: underline; }
a:hover, button.link:hover, summary:hover { color: #a13700; }
:is(button, a, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
#tabs { gap: clamp(12px, 2.4vw, 42px); margin: 0 0 34px; border-bottom: 1px solid var(--line); }
#tabs button {
  border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 12px 3px;
  font-size: clamp(15px, 1.5vw, 21px); letter-spacing: -.035em;
}
#tabs button:hover { border-bottom-color: #a79278; }
#tabs button.on { border-bottom-color: var(--orange); font-weight: bold; }
#work:has(.catalog-hero) #tabs {
  margin-bottom: 0; border-image: linear-gradient(90deg, var(--line) 45%, transparent 70%) 1;
}
input, select, textarea {
  min-width: 0; max-width: 100%; padding: 9px 12px; border: 1px solid #a69e93; border-radius: 7px;
  font: inherit; color: var(--ink); background: #fffaf5;
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: #c64d07; cursor: pointer; }
textarea { width: 100%; min-height: 80px; }
label, form { display: grid; gap: 4px; }
form { gap: 14px; max-width: 740px; }
form button { justify-self: start; }
fieldset { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
legend { padding: 0 5px; font-weight: 600; }
details { margin: 6px 0; }
summary { cursor: pointer; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }

#login { width: min(430px, 100%); margin: 12vh 0 0; padding: 26px; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; }
#login h1 { font-size: 40px; margin: 4px 0 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-heading h1 { margin: 0 0 10px; }
.catalog-hero {
  height: clamp(264px, calc(42vw - 125px), 525px);
  flex-direction: column; align-items: flex-start; justify-content: center;
  gap: clamp(12px, 1.65vw, 23px); padding-bottom: 14px;
}
.catalog-hero h1 {
  font-size: clamp(110px, 16.6vw, 248px); font-weight: 700; line-height: .91; letter-spacing: -.055em;
}
.catalog-hero h1::after {
  content: ""; display: block; width: .52em; height: 5px;
  margin: clamp(10px, 1.5vw, 23px) 0 0 3px; background: var(--orange);
}
.section-heading .primary { padding: 11px 21px; border-radius: 40px; font-size: clamp(16px, 1.48vw, 21px); font-weight: 500; }
.section-heading .row { padding-top: 4px; }
.case-more { position: relative; margin: 0; }
.case-more summary { padding: .4rem .7rem; border-radius: 6px; font-size: 14px; }
.case-more-options {
  position: absolute; z-index: 2; left: 0; top: 100%; padding: .3rem; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 7px; background: var(--sheet);
}
.case-more-options button { border: 0; }
.tools { gap: 10px; margin: 14px 0; }
.tools:has(#search) { margin: 18px 0 12px; }
.tools:has(#search) :is(input, select) { min-height: 45px; background: #fffaf580; }
#search { flex: 1; min-width: 220px; }
.list-actions { margin: 13px 0 19px; font-size: 14px; }
.list-actions span { margin-right: 6px; }
.list-actions button { padding: 5px 10px; }
.empty { padding: 26px 0; border-top: 1px solid var(--line); }
.table { overflow-x: auto; border-top: 1px solid #958c80; }
table { border-collapse: collapse; width: 100%; }
td, th { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--quiet); font-size: 13px; font-weight: 550; }
.table tbody tr:hover { background: #00000004; }
td.date, td.nowrap { white-space: nowrap; }
.table td.date { font-size: 14px; font-variant-numeric: tabular-nums; }
.table td:last-child { font-size: 14px; }
.case-name { width: 62%; }
.case-name button {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.17; letter-spacing: -.035em; font-size: clamp(17px, 1.5vw, 23px); font-weight: 650; text-decoration: none;
}
.case-name button:hover { text-decoration: underline; }
.case-name small { display: block; margin: 5px 0 0; font-size: 13px; }

.result-tag { font-size: 13px; font-weight: 600; }
.result-tag::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px;
  background: #8c8479; border-radius: 50%; vertical-align: .06em;
}
.result-tag.target::before { background: var(--orange); }
.result-tag.check::before, .result-tag.failed::before { background: #995117; }
.block { padding: 22px; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); }
.analysis-entry { padding: 22px 0 20px; margin: 0; border: 0; border-radius: 0; border-top: 1px solid #b7ac9f; background: transparent; }
.analysis-heading, .analysis-meta, .analysis-links { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.analysis-heading { justify-content: space-between; gap: 8px 24px; }
.analysis-heading h2 { flex: 1 1 20rem; max-width: 950px; margin: 0; line-height: 1.15; font-size: clamp(22px, 2.1vw, 33px); }
.analysis-heading h2 button { font-weight: 650; text-decoration: none; letter-spacing: inherit; line-height: inherit; }
.analysis-heading .result-tag { margin-top: 4px; font-size: 14px; }
.analysis-meta { gap: 4px 18px; margin: 8px 0 14px; color: var(--quiet); font-size: 13px; }
.analysis-entry > small { display: block; margin: 3px 0 6px; }
.analysis-entry p { margin: .55rem 0; }
.analysis-excerpt {
  display: grid; grid-template-columns: 105px minmax(0,860px); gap: 6px 18px;
  margin: 0 0 6px; font-size: 15px; line-height: 1.43;
}
.analysis-excerpt dt { color: var(--quiet); font-weight: 550; }
.analysis-excerpt dd { margin: 0; overflow-wrap: anywhere; }
.analysis-links { align-items: center; margin: 13px 0 8px; font-size: .92rem; }
.analysis-links button.link { font-weight: 650; }
.analysis-entry details { margin: 3px 0 0; color: var(--quiet); font-size: 13px; }
.analysis-status { padding: 13px 0; }

dialog {
  width: min(1060px, 94vw); max-width: none; max-height: 91vh; padding: 0 32px 32px;
  border: 1px solid #aa9c8a; border-radius: 14px; color: var(--ink); background: var(--sheet); overscroll-behavior: contain;
}
dialog::backdrop { background: #25201980; backdrop-filter: blur(3px); }
dialog .top {
  position: sticky; z-index: 1; top: 0; justify-content: space-between; padding: 12px 0;
  background: var(--sheet); border-bottom: 1px solid var(--line);
}
#dialog-kind { color: var(--quiet); font-size: 14px; font-weight: 600; }
#detail { overflow-wrap: anywhere; }
#detail h1 { font-size: clamp(26px, 3.2vw, 45px); line-height: 1.08; margin: 22px 0 16px; }
#detail h2 { font-size: clamp(21px, 2vw, 30px); }
.card-jumps { gap: 6px; margin: -2px 0 14px; }
.card-jumps button { padding: 4px 11px; border-radius: 20px; font-size: 13px; }
dialog :is(.verdict, .card-parameters, #card-review, details) { scroll-margin-top: 70px; }
.verdict { margin: 12px 0; padding: 15px 20px; border-left: 5px solid #a89b89; border-radius: 0 8px 8px 0; background: #f1eae1; }
.verdict.target { border-color: var(--orange); background: #fff0e3; }
.verdict.check { border-color: #b87934; }
.verdict h2 { margin: 5px 0 10px; }
.verdict p { margin: 7px 0; }
.verdict small { font-size: 13px; }
blockquote { margin: 8px 0; padding: 10px 14px; border-left: 3px solid var(--orange); background: #f4eee5; font-size: 15px; }
.card-parameters { margin: 26px 0 1rem; border-top: 1px solid var(--line); table-layout: fixed; }
.card-parameters th:first-child { width: 27%; }
.card-parameters tbody th { color: var(--ink); font-size: .95rem; font-weight: 600; }
.card-parameters details { font-size: 14px; }
.field-value, .full-summary { white-space: pre-line; }
.full-summary { max-width: 86ch; }
.developer-settings { display: grid; max-width: 780px; gap: 1.5rem; }
.provider-setting { width: fit-content; max-width: 100%; font-weight: 600; }
.developer-settings select { margin-top: 5px; width: 100%; font-weight: normal; }
.developer-settings h2 { margin: 0; font-size: 24px; }
.developer-settings p { margin: .35rem 0 .75rem; font-size: .9rem; }
.developer-settings .table { margin: 12px 0 4px; background: var(--sheet); }
.developer-settings th:last-child, .developer-settings td:last-child { text-align: right; white-space: nowrap; }
.developer-settings .price-note { margin: .6rem 0 0; color: var(--quiet); }
.developer-settings > button { justify-self: start; }
.error { color: #853c1f; }
#message:not(:empty) {
  position: fixed; bottom: 12px; left: 5%; z-index: 10; padding: 10px 16px; max-width: 90%;
  color: #fff; background: #24201d; border-radius: 8px;
}

@media (max-width: 750px) {
  header { gap: 10px; }
  header > div:first-child { gap: 5px; }
  header span { display: none; }
  main { padding-top: 0; }
  #tabs { margin-bottom: 22px; gap: 4px 12px; }
  #tabs button { padding-block: 9px; font-size: 15px; }
  #search { width: 100%; min-width: 100%; }
  .tools:has(#search) select { min-width: 0; flex: 1; }
  .list-actions { margin-bottom: 11px; }
  .case-more-options { left: auto; right: 0; }
  .table:has(.case-name) thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .table:has(.case-name) tr { display: grid; grid-template-columns: auto 1fr; column-gap: 5px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table:has(.case-name) td { padding: 0; border: 0; }
  .table:has(.case-name) :is(.case-name, .date, td:last-child) { grid-column: 2; }
  .table:has(.case-name) tr:has(.case-name:first-child) { grid-template-columns: 1fr; }
  .table:has(.case-name) tr:has(.case-name:first-child) td { grid-column: 1; }
  .case-name { width: auto; }
  .case-name small { margin: 3px 0; }
  .analysis-heading { display: grid; }
  .analysis-excerpt { grid-template-columns: 80px 1fr; gap: 7px 10px; }
  .card-parameters th:first-child { width: 30%; }
  dialog { width: 96vw; padding: 0 14px 22px; }
  .table:has(#region-rows) table { min-width: 650px; }
}
@media (max-width: 600px) {
  body:has(#work:not([hidden]) .catalog-hero)::before,
  body:has(#login:not([hidden]))::before {
    top: 95px; height: 205px; background-position: calc(50% + 59px) top; background-size: auto 100%;
  }
  #who { font-size: 12px; gap: 4px; }
  .catalog-hero { height: 215px; justify-content: flex-end; gap: 13px; padding-bottom: 12px; }
  .catalog-hero h1 { font-size: clamp(80px, 19vw, 110px); }
  .catalog-hero h1::after { height: 3px; }
  .section-heading .primary { font-size: 14px; padding: 8px 12px; }
  .section-heading .row { gap: 5px; padding-top: 0; }
  .case-more summary { background: var(--paper); }
  .tools:has(#search) { margin-top: 10px; }
  .analysis-excerpt { grid-template-columns: 1fr; }
  .analysis-excerpt dt { font-size: 12px; }
  .analysis-excerpt dd { margin-bottom: 6px; }
  .card-parameters, .card-parameters :is(tbody, tr, tbody td, tbody th:first-child) { display: block; width: 100%; }
  .card-parameters thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .card-parameters tbody th { border: 0; padding: 14px 0 1px; }
  .card-parameters tbody td { padding: 0 0 12px; }
  .full-summary { font-size: 15px; }
}

.case-files, .file-controls, .feedback-ratings { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .85rem; }
.case-files { margin-top: .35rem; }
.file-controls button.link, .case-files > button.link { width: auto; }
.document-files { padding: 0; margin: .75rem 0; list-style: none; }
.document-files li { display: grid; gap: .2rem; padding: .45rem 0; border-bottom: 1px solid var(--line,#d9d5ce); overflow-wrap: anywhere; }
.file-controls .file-error { color: #844223; }
.confirmation-case h3 { margin-bottom: .2rem; }
.confirmation-case ul { margin-top: .25rem; overflow-wrap: anywhere; }
.feedback-note { margin: .8rem 0; }
.feedback-note p { margin: .3rem 0; }
.feedback-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-ratings [aria-pressed="true"] { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; font-weight: 700; }
#feedback label { display: grid; gap: .3rem; margin: .7rem 0; }

#modal-message:not(:empty) { padding: .6rem .8rem; border-left: 3px solid currentColor; background: #f5f1eb; }
#modal-message:empty { display: none; }
