:root {
  --ink: #202c35;
  --muted: #606c70;
  --line: #e1e4df;
  --orange: #b94e2c;
  --bg: #f7f8f4;
}
html { scroll-behavior: smooth; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 14px 18px;
  background: var(--ink);
  color: white;
  border-radius: 6px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.intro-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 22px;
}
.intro-benefits span::before {
  content: "✓";
  color: #547347;
  margin-right: 6px;
}
#scan { background: var(--orange); }
#scan span { display: inline-block; transition: transform 180ms; }
.how > div { border-top: 1px solid var(--line); padding-top: 18px; }
.tile { box-shadow: 0 5px 12px #202c3508; }
.file:has(input:checked) { background: #f7f8f1; }
.file { transition: background-color 180ms; }
@media (hover: hover) {
  button:hover:not(:disabled):not(.folder-toggle):not(.text-button) {
    box-shadow: 0 3px 8px #202c351a;
    transform: translateY(-1px);
  }
  #scan:hover:not(:disabled) { background: #a64225; }
  #scan:hover:not(:disabled) span { transform: translate(2px, -2px); }
  header > a:last-child:hover, summary:hover { color: var(--orange); }
  .file:hover { background: #f0f3e9; }
  .empty:hover .tile-back { transform: translate(-6px, -3px) rotate(-23deg); }
  .empty:hover .tile-front { transform: translateY(-7px) rotate(5deg); }
  .empty:hover .tile-small { transform: translate(5px, -2px) rotate(3deg); }
}
@keyframes arrive {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes unpack {
  from { opacity: 0; translate: 0 14px; scale: .9; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .intro { animation: arrive 500ms ease-out both; }
  .workspace { animation: arrive 500ms 100ms ease-out both; }
  .tile { animation: unpack 600ms 250ms ease-out both; transition: transform 240ms ease; }
  .tile-front { animation-delay: 350ms; }
  .tile-small { animation-delay: 450ms; }
  #results:not([hidden]), .download-ready:not([hidden]) { animation: arrive 300ms ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}
header {
  max-width: 1240px;
  margin: auto;
  padding: 30px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
a {
  color: inherit;
  text-decoration: none;
}
.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
}
.dot {
  color: var(--orange);
}
.brand-icon {
  background: var(--ink);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  margin-right: 9px;
  text-align: center;
  padding-top: 2px;
  font-size: 26px;
}
.header-note {
  font-size: 12px;
  color: var(--muted);
}
header > a:last-child {
  font-size: 12px;
}
main {
  max-width: 1000px;
  margin: auto;
  padding: 20px 34px 0;
}
.intro {
  text-align: center;
  padding: 22px 0 32px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}
h1 {
  font-size: 68px;
  line-height: 1.04;
  letter-spacing: -3.8px;
  margin: 21px 0 17px;
  font-weight: 600;
}
h1 em {
  font-family: Georgia, serif;
  color: var(--orange);
  font-weight: 400;
}
p {
  line-height: 1.6;
}
.intro p {
  font-size: 16px;
  color: #707a80;
  line-height: 1.65;
}
.workspace {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 12px 40px #202c3508;
  padding: 28px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.2px;
  margin-bottom: 22px;
}
.local-tag {
  font-size: 10px;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
}
form > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.input-row {
  border: 1px solid #d9dfda;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fcfcfa;
  transition: border-color 180ms, box-shadow 180ms;
}
.link-icon {
  font-size: 21px;
  color: #87918b;
  margin: 0 4px 0 9px;
}
input {
  font: inherit;
  min-width: 0;
}
input[type="url"] {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 11px 0;
  color: var(--ink);
  outline: none;
}
.input-row:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px #b94e2c14;
}
button {
  font: inherit;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  padding: 13px 19px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  transition: background-color 180ms, box-shadow 180ms, transform 180ms;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button span {
  margin-left: 17px;
}
.options {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  color: var(--muted);
  font-size: 12px;
}
.options p {
  margin: 10px 0;
}
.options summary {
  cursor: pointer;
  white-space: nowrap;
  padding: 10px 0;
  color: var(--ink);
}
.options details[open] {
  display: grid;
  gap: 8px;
}
.options details label {
  display: block;
  margin: 10px 0 5px;
}
.options details input {
  width: 160px;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 5px;
}
.empty {
  text-align: center;
  margin-top: 27px;
  border-top: 1px dashed var(--line);
  padding: 28px 16px;
  background: #f8f9f5;
  border-radius: 0 0 8px 8px;
}
.empty h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 14px 0 8px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.folder-art {
  height: 80px;
  width: 150px;
  position: relative;
  margin: auto;
}
.tile {
  position: absolute;
  display: grid;
  place-items: center;
  font-size: 25px;
  width: 52px;
  height: 63px;
  border: 1px solid #d9dfda;
  background: #f1f3ee;
  border-radius: 8px;
  color: #829087;
}
.tile-back {
  transform: rotate(-17deg);
  left: 22px;
  top: 7px;
}
.tile-front {
  transform: rotate(10deg);
  left: 67px;
  top: 6px;
  background: #fbeade;
  color: #d37e57;
  border-color: #efd8c9;
}
.tile-small {
  font-size: 18px;
  width: 31px;
  height: 35px;
  left: 110px;
  top: 44px;
  transform: rotate(-9deg);
  background: white;
}
.format-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 21px;
  flex-wrap: wrap;
}
.format-tags span {
  background: #f5f6f2;
  padding: 6px 9px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 46px;
  margin: 36px 8px;
}
.step-number {
  font: italic 21px Georgia;
  color: var(--orange);
}
.how h3 {
  font-size: 16px;
  margin: 11px 0 8px;
  font-weight: 600;
}
.how p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.fine-print {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 20px 0 25px;
}
footer {
  max-width: 1160px;
  margin: auto;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}
footer .brand {
  font-size: 15px;
  color: var(--ink);
}
.status {
  background: #f0f4ed;
  padding: 12px 14px;
  margin-top: 18px;
  border-radius: 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.status.error {
  background: #fff0e8;
  color: #9a4227;
}
progress {
  width: 100%;
  height: 6px;
  accent-color: var(--orange);
  margin-top: 12px;
}
.text-button {
  background: transparent;
  color: var(--muted);
  padding: 10px 0;
}
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 20px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.results-heading h2 {
  font-size: 23px;
  margin: 10px 0 5px;
  overflow-wrap: anywhere;
}
.results-heading p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.found-badge {
  background: #edf2e7;
  color: #60764b;
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.chip {
  background: #f4f5f1;
  color: #6e7771;
  padding: 8px 10px;
  font-size: 10px;
  margin-right: 3px;
}
.chip.active {
  background: var(--ink);
  color: white;
}
input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 11px;
  width: 175px;
}
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--line);
  padding: 0 8px 10px;
}
.list-head label {
  display: flex;
  align-items: center;
  gap: 8px;
}
input[type="checkbox"] {
  accent-color: var(--orange);
}
.files {
  max-height: 350px;
  overflow: auto;
}
.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid #eff0ec;
}
.file-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 33px;
  height: 33px;
  border-radius: 6px;
  background: #f5eee5;
  color: #9d805c;
  font-size: 9px;
  font-weight: 700;
}
.file-info {
  flex: 1;
  min-width: 0;
}
.file-name {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-path {
  font-size: 10px;
  color: var(--muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}
.file-size {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.exports {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
}
.exports strong {
  display: block;
  font-size: 12px;
}
.exports small {
  display: block;
  font-size: 10px;
  margin-top: 6px;
  color: var(--muted);
}
.export-buttons {
  display: flex;
  gap: 8px;
}
.secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}
#zip {
  background: var(--orange);
}
.export-note {
  font-size: 10px;
  color: var(--muted);
  margin: 16px 0 0;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
@media (min-width: 1400px) {
  .intro {
    padding-top: 45px;
  }
}
@media (max-width: 650px) {
  header {
    padding: 22px;
  }
  .header-note {
    display: none;
  }
  main {
    padding: 6px 16px;
  }
  h1 {
    font-size: clamp(38px, 9vw, 53px);
    letter-spacing: -2px;
  }
  .intro {
    padding-bottom: 25px;
  }
  .workspace {
    padding: 20px 16px;
  }
  .input-row {
    flex-wrap: wrap;
  }
  .input-row button {
    width: 100%;
  }
  .input-row input {
    width: 75%;
    font-size: 16px;
  }
  .options {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .options p {
    max-width: none;
  }
  .how {
    gap: 20px;
    margin: 28px 4px;
    grid-template-columns: 1fr;
  }
  .how p {
    font-size: 13px;
  }
  .found-badge {
    display: none;
  }
  .exports {
    align-items: flex-start;
    flex-direction: column;
  }
  .export-buttons {
    width: 100%;
  }
  .export-buttons button {
    flex: 1;
    padding: 12px;
  }
  footer {
    margin: 0 20px;
  }
  footer > span:last-child {
    display: none;
  }
  .local-tag {
    display: none;
  }
  .format-tags {
    gap: 4px;
  }
  .format-tags span {
    font-size: 9px;
  }
  .results-heading h2 {
    font-size: 19px;
  }
}

.download-ready {
  margin-top: 18px;
  padding: 18px;
  background: #f1f5ec;
  border: 1px solid #dce5d3;
  border-radius: 8px;
}
.download-ready > strong {
  font-size: 14px;
}
.download-ready p {
  font-size: 12px;
  color: #607050;
  margin: 8px 0 12px;
}
#download-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.save-file {
  display: inline-block;
  background: #202c35;
  color: white;
  padding: 13px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.download-ready .open-app-help {
  font-size: 11px;
  margin-bottom: 0;
}
.open-app-help a {
  text-decoration: underline;
  cursor: pointer;
}

.files {
  max-height: 520px;
}
.folder-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.folder-actions p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
  max-width: 330px;
}
.folder-actions > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.folder-actions button {
  padding: 7px 0;
  font-size: 10px;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.folder-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 9px 0;
  background: #fff;
  overflow: hidden;
}
.folder-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  background: #f7f8f4;
}
.folder-select {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin: 0;
}
.folder-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
}
.folder-toggle span {
  margin: 0;
}
.folder-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.folder-chevron {
  display: inline-block;
  font-size: 23px;
  line-height: 16px;
  color: var(--orange);
  transition: transform 0.15s;
}
.folder-chevron.open {
  transform: rotate(90deg);
}
.folder-count {
  font-size: 10px;
  color: #6c7f60;
  white-space: nowrap;
}
.folder-meta {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.folder-body {
  padding: 0 10px 5px 20px;
  border-top: 1px solid var(--line);
}
.folder-body .folder-header {
  background: #fafbf8;
}
.folder-body .file:last-child {
  border-bottom: 0;
}
.folder-body .folder-section {
  border-color: #e8ebe4;
}
.folder-section .folder-section .folder-body {
  padding-left: 12px;
}
@media (max-width: 650px) {
  .folder-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .folder-actions > div {
    gap: 15px;
  }
  .folder-header {
    padding: 10px 8px;
    gap: 7px;
    flex-wrap: wrap;
  }
  .folder-toggle {
    font-size: 12px;
  }
  .folder-count {
    font-size: 9px;
  }
  .folder-meta {
    width: 100%;
    padding-left: 23px;
    font-size: 9px;
  }
  .folder-body {
    padding-left: 10px;
    padding-right: 5px;
  }
  .files {
    max-height: 480px;
  }
}
