:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #071109;
  color: #f3ffe9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(142, 227, 109, 0.14), transparent 32rem),
    linear-gradient(180deg, #071109 0%, #102515 100%);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(840px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f3ffe9;
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.previewBadge,
.label,
.kicker,
.sourceType {
  color: #98d982;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.previewBadge {
  border: 1px solid #345837;
  border-radius: 999px;
  padding: 7px 10px;
  text-align: center;
}

.scanner,
.section {
  border: 1px solid #284b2b;
  border-radius: 8px;
  background: rgba(16, 37, 21, 0.86);
  padding: 16px;
  margin-bottom: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 12px;
  font-size: clamp(36px, 10vw, 64px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  letter-spacing: 0;
}

.intro,
.statusText,
.capturePanel p,
.resultCard p,
.section p {
  color: #cfe8c6;
  line-height: 1.5;
}

.statusPanel,
.capturePanel {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #284b2b;
  border-radius: 8px;
  background: #071109;
}

.statusPanel {
  grid-template-columns: 1fr auto;
  align-items: center;
}

button,
.primaryAction,
.secondaryAction {
  min-height: 48px;
  border: 1px solid #345837;
  border-radius: 8px;
  background: #102515;
  color: #dfffd1;
  padding: 11px 12px;
  font-weight: 900;
  cursor: pointer;
}

.primaryAction,
.secondaryAction {
  display: grid;
  place-items: center;
  text-align: center;
}

.primaryAction {
  border-color: #8ee36d;
  background: #8ee36d;
  color: #071109;
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.hidden {
  display: none;
}

.settings {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #284b2b;
  border-radius: 8px;
  background: #071109;
}

.inputRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input[type="url"] {
  min-width: 0;
  border: 1px solid #345837;
  border-radius: 8px;
  background: #102515;
  color: #f3ffe9;
  padding: 12px;
}

.modeGroup {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mode.active {
  border-color: #8ee36d;
  background: #8ee36d;
  color: #071109;
}

.message {
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
  background: #1d5128;
  color: #f3ffe9;
}

.resultCard {
  margin-top: 12px;
}

.resultCard article,
.sourceGrid article {
  border: 1px solid #284b2b;
  border-radius: 8px;
  background: #071109;
  padding: 14px;
}

.scientific {
  color: #bce9ad;
  font-style: italic;
}

.confidence {
  color: #98d982;
  font-weight: 900;
}

.propagation {
  margin-top: 12px;
}

.propagation details {
  margin-top: 8px;
  border-top: 1px solid #284b2b;
  padding-top: 8px;
}

.propagation summary {
  cursor: pointer;
  color: #dfffd1;
  font-weight: 900;
}

.sourceGrid {
  display: grid;
  gap: 10px;
}

.rights {
  margin-top: 12px;
  color: #a8bfa0;
  font-size: 13px;
}

@media (min-width: 720px) {
  .capturePanel {
    grid-template-columns: 1fr 180px 180px;
    align-items: end;
  }

  .sourceGrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .topbar,
  .statusPanel,
  .inputRow {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .modeGroup {
    grid-template-columns: repeat(2, 1fr);
  }
}
