:root {
  color-scheme: light;
  --paper: #f5f3eb;
  --ink: #233a32;
  --muted: #737a6e;
  --line: #e0e1d6;
  --accent: #d5e7b4;
  --orange: #be633b;
  --white: #fffef9;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button:disabled,
select:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.masthead,
main,
footer {
  max-width: 1540px;
  margin: auto;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 48px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1.4px;
  display: flex;
  align-items: center;
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: var(--paper);
  font-size: 22px;
  margin-right: 10px;
}
.brand-dot {
  color: var(--orange);
}
.local-badge {
  font-size: 10px;
  letter-spacing: 1.5px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.local-badge > span {
  width: 7px;
  height: 7px;
  background: #748c59;
  border-radius: 50%;
}
main {
  padding: 0 48px;
}
.intro {
  display: flex;
  justify-content: center;

  align-items: end;
  padding: 49px 0 37px;
  gap: 24px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.9px;
}
.intro .eyebrow {
  color: var(--orange);
  margin: 0 0 18px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(42px, 4.3vw, 65px);
  line-height: 1.08;
  letter-spacing: -2.6px;
  margin: 0;
}
h1 em {
  font-weight: 400;
  color: #70835d;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) minmax(300px, 1.5fr) minmax(
      265px,
      1fr
    );
  gap: 18px;
  align-items: stretch;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  overflow: hidden;
}
.controls,
.results-panel {
  padding: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.step {
  font-size: 10px;
  color: #7b8771;
  background: #edf1e4;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.2px;
}
.controls > label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 9px;
}
select {
  appearance: none;
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23233a32'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--ink);
  width: 100%;
  padding: 13px 30px 13px 10px;
  border: 1px solid #cfd5c8;
  border-radius: 7px;
  font-size: 12px;
}
.model-spec {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}
.upload-heading {
  margin-top: 31px;
  margin-bottom: 17px;
}
.controls > .drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  border: 1px dashed #bac5a9;
  border-radius: 9px;
  background: #f7f8ef;
  gap: 8px;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  text-align: center;
  padding: 18px 8px;
}
.drop-zone.dragging {
  background: #e3edce;
  border-color: #71875b;
}

.assignment {
  text-align: center;
}
.upload-icon {
  font-size: 27px;
  font-weight: 300;
  width: 38px;
  height: 38px;
  border: 1px solid #d6ddca;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.drop-zone strong {
  font-size: 12px;
}
.drop-zone > span:not(.upload-icon) {
  font-size: 11px;
  color: var(--muted);
}
.drop-zone small {
  font-size: 9px;
  color: var(--muted);
  margin-top: 10px;
}
.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.drop-zone:focus-within {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.file-name {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
  min-height: 14px;
  margin: 12px 0 19px;
}
.primary {
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: var(--white);
  padding: 15px 17px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.primary:hover:enabled {
  background: #3c5547;
}
.primary:disabled {
  cursor: default;
  opacity: 0.4;
}
.status {
  font-size: 11px;
  line-height: 1.6;
  min-height: 35px;
  margin: 14px 0;
  color: var(--muted);
}
.status.error {
  color: #a83f2f;
}
.tip {
  display: flex;
  align-items: start;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.tip > span {
  font-size: 22px;
  color: #91a17f;
}
.tip p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.visual-panel {
  display: flex;
  flex-direction: column;
}
.visual-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  gap: 10px;
}
.view-toggle {
  display: flex;
  background: #f0f1e8;
  border-radius: 6px;
  padding: 3px;
  gap: 2px;
}
.view-toggle button {
  border: 0;
  background: transparent;
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 4px;
}
.view-toggle button[aria-pressed="true"] {
  background: var(--white);
  box-shadow: 0 1px 3px #233a3214;
}
.view-toggle button:disabled {
  cursor: default;
}
.image-stage {
  position: relative;
  background: #ecefe2;
  min-height: 360px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 14px;
  border-radius: 9px;
}
.empty-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 35px 15px;
}
.empty-art svg {
  width: min(230px, 75%);
  height: 200px;
  color: #83966d;
}
.empty-art strong {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  margin-top: 12px;
}
.empty-art p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
#image-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 520px;
  aspect-ratio: 1;
}

.visual-caption {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  padding: 0 20px;
  margin: 15px 0 18px;
  min-height: 30px;
}
.heatmap-controls {
  padding: 17px 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 9px;
  font-size: 10px;
}
.heatmap-controls input {
  width: 100%;
  accent-color: var(--ink);
}
.heat-scale {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  color: var(--muted);
}
.heat-scale i {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    #264bb2,
    #41c6d6,
    #e4e56b,
    #e25a34,
    #971c2c
  );
}
.results-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 4px;
}
.results-empty > span {
  font-size: 54px;
  color: #b1bea0;
}
.results-empty h3 {
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  margin: 24px 0 7px;
}
.results-empty p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 220px;
}
.result-label {
  color: var(--orange);
  font-size: 9px;
  margin-top: 30px;
}
.best-name {
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 400;
  line-height: 1.15;
  margin: 12px 0 13px;
  overflow-wrap: anywhere;
}
.best-confidence {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.best-confidence > span {
  font-size: 29px;
  letter-spacing: -1.1px;
  color: #718655;
}
.best-confidence small {
  font-size: 10px;
  color: var(--muted);
}
.result-model {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 21px 0;
}
h4 {
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 15px;
}
.top-five {
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: matches;
}
.top-five li {
  counter-increment: matches;
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 4px 7px;
  align-items: baseline;
  margin-bottom: 13px;
  font-size: 10px;
}
.top-five li:before {
  content: counter(matches, decimal-leading-zero);
  font-size: 9px;
  color: #9ba28e;
}
.match-name {
  line-height: 1.4;
}
.match-score {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.bar-track {
  height: 4px;
  background: #eff0e8;
  grid-column: 2/-1;
  border-radius: 3px;
  overflow: hidden;
}
.bar-track > span {
  display: block;
  height: 100%;
  background: #b5c995;
  border-radius: 3px;
}
.top-five li:first-child .bar-track > span {
  background: #6d8557;
}
.timings {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.timings > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
}
.timings dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timings small {
  font-size: 8px;
}
.timings > .timing-total {
  font-weight: 600;
  color: var(--ink);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 48px 28px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.footer-muted {
  color: var(--muted);
  margin-left: 10px;
}
footer > span:last-child {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
}
@media (min-width: 1500px) {
  .intro {
    padding-top: 60px;
  }
  .workspace {
    gap: 22px;
  }
  .image-stage {
    min-height: 420px;
  }
}
@media (max-width: 1100px) {
  .masthead {
    padding: 22px 26px;
  }
  main {
    padding: 0 26px;
  }
  .workspace {
    grid-template-columns: 260px 1fr;
  }
  .results-panel {
    grid-column: 1/-1;
  }
  .results-empty {
    padding: 25px;
  }
  .results-panel #results {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 0 30px;
  }
  .results-panel #results > * {
    grid-column: 1;
  }
  .results-panel #results > h4,
  .results-panel #results > .timings,
  .results-panel #results > .confidence-note {
    grid-column: 2;
  }
  .results-panel #results > .top-five {
    grid-row: 1/7;
    grid-column: 2;
  }
  .results-panel #results > .divider {
    display: none;
  }
  .results-panel #results > h4:first-of-type {
    display: none;
  }
  .results-panel #results > h4:last-of-type {
    margin-top: 22px;
    grid-column: 1;
  }
  .results-panel #results > .timings {
    grid-column: 1;
  }
  .results-panel #results > .confidence-note {
    grid-column: 2;
    grid-row: 7/10;
  }
  .result-label {
    margin-top: 0;
  }
  .intro-note {
    display: none;
  }
  footer {
    padding-left: 26px;
    padding-right: 26px;
  }
}
@media (max-width: 650px) {
  .masthead {
    padding: 18px;
  }
  .brand {
    font-size: 24px;
  }
  main {
    padding: 0 16px;
  }
  .intro {
    padding: 32px 0 28px;
  }
  h1 {
    font-size: 43px;
  }
  .lede {
    font-size: 12px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .controls {
    padding: 20px;
  }
  .controls > .drop-zone {
    min-height: 155px;
  }
  .visual-panel {
    min-height: 420px;
  }
  .image-stage {
    min-height: 300px;
  }
  .results-panel #results {
    display: block;
  }
  .results-panel #results > .divider {
    display: block;
  }
  .results-panel #results > h4:first-of-type {
    display: block;
  }
  .results-empty {
    padding: 35px 0;
  }
  .method > div {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .method summary > span {
    display: block;
    margin: 8px 0 0 15px;
  }
  footer {
    padding: 20px 16px;
    flex-direction: column;
    gap: 10px;
  }
  .best-name {
    font-size: 30px;
  }
  .top-five li {
    font-size: 12px;
  }
  .timings > div {
    font-size: 12px;
  }
}
