:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #607067;
  --line: #d6ddd6;
  --panel: #ffffff;
  --surface: #f3f7f4;
  --accent: #176b5d;
  --accent-soft: #d9eee9;
  --warn: #a03822;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 107, 93, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 107, 93, 0.08) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.workspace {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.panel,
.result-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(25, 39, 31, 0.08);
}

.panel {
  padding: 24px;
}

.result-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.unit {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.drop-zone {
  min-height: 210px;
  border: 2px dashed #95aaa0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.drop-zone[data-active="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
}

.drop-title {
  font-size: 20px;
  font-weight: 800;
}

.drop-subtitle,
.status,
.meta {
  color: var(--muted);
  font-size: 14px;
}

.upload-meta-row {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 12px;
  padding-bottom: 10px;
}

.privacy-note {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(214, 221, 214, 0.9);
}

.privacy-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  max-width: 52ch;
}

.status {
  min-height: 22px;
  line-height: 1.5;
}

.status[data-tone="success"] {
  color: var(--accent);
  font-weight: 700;
}

.status[data-tone="error"] {
  color: var(--warn);
  font-weight: 700;
}

.result {
  display: block;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin: 14px 0 20px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.result-unit {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.meta {
  min-height: 42px;
  margin-top: 4px;
  line-height: 1.5;
}

@media (max-width: 780px) {
  .shell {
    padding: 18px;
    place-items: start stretch;
  }

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

  .result-panel {
    min-height: 210px;
  }
}
