@font-face {
  font-family: Barlow Condensed;
  src: url(/fonts/BarlowCondensed-SemiBold.ttf) format('truetype');
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #162c30;
  --muted: #526867;
  --border: #cbd6d3;
  --paper: #f4f7f5;
  --teal: #006f68;
  --green: #08754e;
  --red: #af3639;
  --mono: ui-monospace, Consolas, monospace;
  font:
    100%/1.45 system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
input,
label {
  touch-action: manipulation;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
.secondary:focus-within {
  outline: 3px solid #eb9224;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.top {
  background: #142d31;
  color: white;
}
.top-inner,
main {
  max-width: 1480px;
  margin: auto;
  padding-inline: clamp(18px, 4.2vw, 72px);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 64px;
}
.brand {
  font-weight: 720;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  color: white;
  text-decoration: none;
}
.brand-mark {
  flex-shrink: 0;
  width: 28px;
  height: 26px;
  display: block;
  border-radius: 6px;
  background: #80e0bb;
  position: relative;
  margin-right: 10px;
}
.brand-mark:after {
  content: '';
  position: absolute;
  inset: 6px;
  background: repeating-linear-gradient(
    90deg,
    #183c39 0 2px,
    transparent 2px 4px,
    #183c39 4px 5px,
    transparent 5px 7px
  );
}
nav {
  display: flex;
  gap: 4px;
}
nav a {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  text-decoration: none;
  color: #c5d5d3;
  border-radius: 7px;
  padding: 8px 13px;
  font-size: 0.94rem;
  font-weight: 550;
}
nav a[aria-current='page'] {
  background: #2e4a4b;
  color: #fff;
}
.ico {
  width: 15px;
  height: 15px;
  display: inline-block;
}
.grid-icon {
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) left top/6px 6px,
    linear-gradient(currentColor, currentColor) right top/6px 6px,
    linear-gradient(currentColor, currentColor) left bottom/6px 6px,
    linear-gradient(currentColor, currentColor) right bottom/6px 6px;
  background-repeat: no-repeat;
}
.camera-icon {
  width: 17px;
  height: 12px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
  position: relative;
  display: inline-block;
}
.camera-icon:before {
  content: '';
  display: block;
  width: 5px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  margin: -4px auto 0;
}
.camera-icon:after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  margin: 2px auto;
}
main {
  padding-block: 30px 55px;
}
.heading {
  margin-bottom: 22px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font:
    600 clamp(2.45rem, 4.3vw, 4rem)/1.02 'Barlow Condensed',
    sans-serif;
  letter-spacing: -0.025em;
}
.heading p {
  color: var(--muted);
  margin-top: 8px;
}
.heading .subtitle {
  color: inherit;
  font-weight: 600;
}
h2 {
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: -0.035em;
}
.controls,
.panel,
.card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.controls p,
.hint,
.viewer-bottom p,
.muted {
  font-size: 0.89rem;
  color: var(--muted);
}
.controls p {
  margin-top: 3px;
}
.switches,
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f5f8f7;
  border: 1px solid #d4dfdb;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  z-index: 1;
  cursor: pointer;
  opacity: 0;
}
.switch:has(:focus-visible) {
  outline: 3px solid #eb9224;
  outline-offset: 2px;
}
.toggle {
  display: block;
  width: 25px;
  height: 15px;
  border-radius: 12px;
  background: #92a39e;
  position: relative;
}
.toggle:before {
  content: '';
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
}
.switch input:checked + .toggle {
  background: var(--teal);
}
.switch input:checked + .toggle:before {
  left: 12px;
}
#gallery-panel {
  margin-top: 23px;
}
.section-head,
.panel-header,
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
}
.section-head {
  margin-bottom: 12px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.sample {
  padding: 4px 4px 0;
  text-align: left;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: white;
  min-width: 0;
  transition: border-color 0.15s;
}
.sample:hover,
.sample[aria-pressed='true'] {
  border-color: var(--teal);
}
.sample[aria-pressed='true'] {
  box-shadow: inset 0 0 0 1px var(--teal);
}
.sample-art {
  height: clamp(66px, 6.4vw, 100px);
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #e5e9e3;
  overflow: hidden;
}
.sample:nth-child(3n + 2) .sample-art {
  background: #e5e9eb;
}
.sample:nth-child(3n) .sample-art {
  background: #efe8da;
}
.sample img {
  width: 88%;
  height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px #15282828);
  min-height: 0;
}
.sample-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 6px 8px;
  overflow-wrap: anywhere;
}
.hint {
  margin-top: 7px;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.25fr);
  align-items: start;
  gap: clamp(15px, 1.6vw, 26px);
  margin-top: 24px;
}
.viewer {
  overflow: hidden;
}
.panel-header {
  padding: 13px 17px;
}
.eyebrow {
  font: 600 0.76rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.065em;
  color: #54736d;
}
.panel-header h2 {
  font-size: 1.26rem;
  margin-top: 2px;
}
.image-mode {
  border: 1px solid #d5dfdb;
  border-radius: 5px;
  padding: 3px 7px;
  color: var(--muted);
  font: 0.78rem var(--mono);
}
.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.75;
  background-color: #16383b;
  background-image: radial-gradient(#436061 0.8px, transparent 1px);
  background-size: 15px 15px;
  overflow: hidden;
}
.corners {
  position: absolute;
  inset: 14px;
  pointer-events: none;
}
.corners i {
  position: absolute;
  width: 14px;
  height: 14px;
  border: solid #76b3a4;
  border-width: 1px 0 0 1px;
}
.corners i:nth-child(2) {
  right: 0;
  transform: rotate(90deg);
}
.corners i:nth-child(3) {
  right: 0;
  bottom: 0;
  transform: rotate(180deg);
}
.corners i:last-child {
  bottom: 0;
  transform: rotate(270deg);
}
#photo {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  overflow: visible;
}
.viewer-bottom {
  padding: 14px 17px;
}
.viewer-bottom p {
  margin-bottom: 10px;
}
.primary,
.secondary {
  padding: 9px 13px;
  border-radius: 6px;
  font-weight: 650;
  font-size: 0.9rem;
  display: inline-block;
  line-height: 1.35;
  cursor: pointer;
}
.primary {
  background: var(--teal);
  color: white;
  border: 1px solid var(--teal);
}
.primary:disabled {
  background: #758581;
  border-color: #758581;
}
.secondary {
  position: relative;
  border: 1px solid var(--border);
  background: #fff;
}
.secondary input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.results .section-head {
  min-height: 27px;
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  min-width: 0;
}
.card:disabled {
  color: inherit;
}
.card[data-state='off'] {
  opacity: 0.6;
}
.card.perfect {
  border: 2px solid var(--green);
  padding: 12px 13px;
}
.card[aria-pressed='true'] {
  box-shadow: 0 0 0 2px #17595855;
}
.card-head {
  margin-bottom: 10px;
}
.model-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 1.03rem;
}
.glyph {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 5px;
  color: #176153;
  background: #dff1e9;
  font-weight: 700;
  font-family: var(--mono);
}
.glyph.xgboost {
  background: #f6e6d1;
  color: #805019;
}
.glyph.layoutlm {
  background: #e2e8f5;
  color: #375483;
}
.glyph.qwen {
  background: #ece6f7;
  color: #694993;
}
.score {
  font: 0.76rem var(--mono);
  color: #536963;
  white-space: nowrap;
}
.field {
  display: grid;
  grid-template-columns: minmax(58px, 0.65fr) minmax(0, 1.65fr);
  gap: 5px;
  padding: 4px 0;
  border-top: 1px solid #e7edeb;
  font-size: 0.86rem;
}
.field-name {
  color: #536763;
}
.value {
  overflow-wrap: anywhere;
  font-weight: 550;
}
.value small {
  display: block;
  color: #654b4c;
  font-weight: 400;
}
.good {
  color: var(--green);
}
.bad {
  color: var(--red);
}
.card-note {
  display: block;
  font: 0.76rem/1.4 var(--mono);
  color: #566d68;
  margin-top: 8px;
}
.card[data-state='pending'] .card-note {
  color: var(--teal);
}
.card[data-state='error'] .card-note {
  color: var(--red);
}
#notice {
  margin-top: 16px;
  color: #832b2e;
  background: #fff2f1;
  border: 1px solid #e8c3c0;
  padding: 10px 14px;
  border-radius: 7px;
}
#camera-live,
#video,
#file-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#guide {
  position: absolute;
  inset: 19% 8%;
  border: 2px solid #98f5c8;
  border-radius: 7px;
  box-shadow: 0 0 0 100vmax #081c2380;
}
.camera-empty {
  color: #b8ddd2;
  display: grid;
  justify-items: center;
  gap: 16px;
  font-size: 0.9rem;
}
.camera-empty i {
  transform: scale(1.7);
}
.box {
  fill: transparent;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.box.ok {
  stroke: #10b96c;
}
.box.err {
  stroke: #ef4249;
}
.box.unknown {
  stroke: #328bea;
}
.box-tag.ok {
  fill: #086c41;
}
.box-tag.err {
  fill: #a8222e;
}
.box-tag.unknown {
  fill: #175d9b;
}
.box-text {
  fill: white;
  font-family: var(--mono);
  font-weight: 700;
}
@media (max-width: 1000px) {
  .workbench {
    grid-template-columns: minmax(0, 0.83fr) minmax(0, 1.17fr);
  }
  .card {
    padding: 11px;
  }
  .card.perfect {
    padding: 10px;
  }
  .card-head {
    flex-wrap: wrap;
  }
  .switches {
    gap: 6px;
  }
  .stage {
    aspect-ratio: 1.4;
  }
}
@media (max-width: 800px) {
  .workbench {
    grid-template-columns: 1fr;
  }
  .stage {
    aspect-ratio: 2;
  }
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sample-art {
    height: 72px;
  }
  .controls {
    align-items: flex-start;
  }
  .score {
    margin-left: auto;
  }
  .cards {
    gap: 12px;
  }
}
@media (max-width: 520px) {
  .top-inner {
    min-height: 58px;
  }
  .brand {
    font-size: 1.05rem;
  }
  nav a {
    padding: 8px 9px;
  }
  .heading {
    margin-bottom: 17px;
  }
  main {
    padding-top: 22px;
  }
  .controls {
    padding: 14px;
  }
  .switch {
    min-height: 40px;
  }
  .switches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .gallery {
    gap: 6px;
  }
  .sample-name {
    font-size: 0.81rem;
    padding: 5px 3px;
  }
  .sample-art {
    height: 54px;
  }
  .stage {
    aspect-ratio: 1.43;
  }
  .workbench {
    margin-top: 18px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .model-title {
    font-size: 1.05rem;
  }
  .field {
    grid-template-columns: 76px 1fr;
  }
  .viewer-bottom,
  .panel-header {
    padding: 13px;
  }
  .section-head .muted {
    font-size: 0.82rem;
  }
  .primary,
  .secondary {
    min-height: 42px;
  }
  .card {
    padding: 14px;
  }
  .card.perfect {
    padding: 13px;
  }
  .heading p {
    font-size: 0.95rem;
  }
}
