:root {
  color-scheme: light;
  --bg: #f7f7f7;
  --bg-2: #f1f2f2;
  --card: #ffffff;
  --ink: #13231f;
  --muted: #60706b;
  --line: #d3dfda;
  --accent: #1f6f55;
  --accent-dark: #154d3d;
  --accent-2: #e5f3ed;
  --accent-3: #cfe6dc;
  --danger: #a33a2b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 60px;
}

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

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

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .95;
  letter-spacing: -0.055em;
  max-width: 860px;
}

.subtext {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  max-width: 780px;
}

.source {
  color: var(--accent-dark);
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
}

.source:hover { background: #fff; }

.card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(211, 223, 218, .95);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(20,40,45,.08);
  backdrop-filter: blur(8px);
}

.input-card { padding: 22px; }

.input-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

label { display: block; font-weight: 850; }

.mini-note,
.file-status,
.hint {
  color: var(--muted);
}

.mini-note { font-size: 13px; font-weight: 700; }

textarea {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fbfdfc;
  color: var(--ink);
  font: 16px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

textarea:focus,
input[type="file"]:focus-visible,
button:focus-visible,
.source:focus-visible {
  outline: 4px solid var(--accent-3);
  outline-offset: 2px;
  border-color: var(--accent);
}

.upload-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  background: var(--accent-2);
  border: 1px dashed var(--accent);
  border-radius: 16px;
}

.file-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--line);
  cursor: pointer;
}

input[type="file"] { max-width: 290px; }

.options-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.65);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--ink);
}

.checkbox-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.actions, .status-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 850;
  cursor: pointer;
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 20px rgba(31,111,85,.18);
}

button:hover:not(:disabled) { background: var(--accent-dark); }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.secondary { background: var(--accent-2); color: var(--accent-dark); box-shadow: none; }
.secondary:hover:not(:disabled) { background: var(--accent-3); }
.ghost { background: transparent; color: var(--muted); box-shadow: none; }
.ghost:hover:not(:disabled) { background: rgba(255,255,255,.7); color: var(--ink); }

.hint { margin: 12px 0 0; font-size: 14px; line-height: 1.45; }
.status-row { justify-content: space-between; margin: 18px 0; min-height: 44px; }
#status { color: var(--muted); font-weight: 800; }
.results { display: grid; gap: 16px; }
.result-card { padding: 20px; }
.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.result-title { font-size: 24px; margin: 0; letter-spacing: -.02em; }
.badge {
  align-self: start;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
  background: var(--accent-2);
  color: var(--accent-dark);
}
.badge.missing { background: #fff0ed; color: var(--danger); }
.grid { display: grid; grid-template-columns: 190px 1fr; gap: 11px 18px; }
.key { color: var(--muted); font-weight: 850; }
.value { min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.value a { color: var(--accent-dark); font-weight: 750; }
.full-url { display: inline-block; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; }
.empty { color: var(--muted); font-style: italic; }

@media (max-width: 760px) {
  .shell { width: min(100% - 22px, 1180px); margin-top: 22px; }
  .hero, .result-head, .input-topline { display: block; }
  .source { display: inline-block; margin-top: 12px; }
  .grid { grid-template-columns: 1fr; gap: 4px; }
  .key { margin-top: 11px; }
  .status-row { align-items: stretch; }
  .status-row button { width: 100%; }
}
