:root {
  color-scheme: light;
  --paper: oklch(98% 0.012 85);
  --ink: oklch(25% 0.014 65);
  --muted: oklch(47% 0.016 65);
  --line: oklch(84% 0.021 80);
  --accent: oklch(41% 0.07 145);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    17px/1.6 system-ui,
    sans-serif;
}
main {
  max-width: 760px;
  margin: auto;
  padding: 48px 24px;
}
header {
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 28px;
}
h1 {
  font:
    2.5rem/1.15 Georgia,
    serif;
  letter-spacing: -0.035em;
  margin: 18px 0;
}
h2 {
  font-size: 1.35rem;
}
header p {
  max-width: 60ch;
  color: var(--muted);
}
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
legend {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}
label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.9rem;
  font-weight: 500;
}
label span,
small {
  color: var(--muted);
  font-weight: 400;
}
small {
  display: block;
  font-size: 0.8rem;
}
input:not([type="checkbox"]):not([type="file"]) {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: oklch(99% 0.007 85);
  border-radius: 3px;
  font: inherit;
}
input[type="file"] {
  max-width: 100%;
  font: inherit;
  font-size: 0.8rem;
}
input[type="checkbox"] {
  margin-right: 8px;
}
button {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
button.primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid oklch(50% 0.12 45);
  outline-offset: 3px;
}
#status {
  color: var(--accent);
  min-height: 1.5em;
  margin: 18px 0 8px;
}
#error,
#field-error {
  color: oklch(42% 0.16 30);
}
#field-error:empty,
#error:empty {
  display: none;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
#count {
  color: var(--muted);
  font-size: 0.8rem;
}
#list {
  list-style: none;
  padding: 0;
}
#list li {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
#list li div {
  min-width: 0;
}
#list a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
#list small {
  overflow-wrap: anywhere;
  margin-top: 5px;
}
.tools {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 32px;
}
.tools button {
  margin: 0 8px 12px 0;
}
#recovery {
  padding: 22px;
  background: oklch(94% 0.025 80);
  margin-bottom: 28px;
}
#recovery button {
  margin: 8px 6px 8px 0;
}
summary {
  cursor: pointer;
  margin-top: 12px;
}
footer {
  margin-top: 44px;
  font-size: 0.75rem;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 420px) {
  main {
    padding: 28px 16px;
  }
  #list li {
    flex-direction: column;
  }
  h1 {
    font-size: 2rem;
  }
}
