:root {
  color-scheme: light;
  --ink: #263c3d;
  --muted: #5b6e6d;
  --accent: #176b67;
  --line: #cfddda;
  --paper: #f3f7f5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.6 system-ui,
    -apple-system,
    sans-serif;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 48px 32px;
}
header {
  max-width: 1050px;
  margin-bottom: 32px;
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.15em;
}
h1 {
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 14px 0;
}
.lede {
  font-size: 22px;
  color: var(--muted);
}
.memory-note {
  padding: 14px 18px;
  border-left: 4px solid #a57024;
  background: #fff5df;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 26px;
}
aside,
section {
  min-width: 0;
}
section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
aside section + section {
  margin-top: 24px;
}
h2 {
  font-size: 22px;
  margin: 0 0 18px;
}
label {
  display: block;
  font-weight: 650;
  margin: 14px 0 8px;
}
textarea,
select,
input,
button {
  font: inherit;
}
textarea,
select,
input[type="file"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid #829b97;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 10px;
}
textarea {
  font:
    13px/1.55 ui-monospace,
    SFMono-Regular,
    monospace;
  resize: vertical;
}
input[type="file"] {
  font-size: 14px;
  overflow: hidden;
}
button {
  min-height: 48px;
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 650;
  cursor: pointer;
}
.secondary {
  background: white;
  color: var(--accent);
  border-color: #7b9e98;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.replace-note {
  font-size: 14px;
  padding: 10px;
  background: #f8f2e8;
  border-left: 3px solid #b68c48;
}
.hint,
footer {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.mono {
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
summary {
  font-weight: 650;
  cursor: pointer;
  padding: 12px 0;
}
.restore {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 8px;
}
#restore-preview {
  padding: 12px;
  background: #ecf5f1;
  border-left: 3px solid var(--accent);
}
.downloads a {
  display: block;
  color: var(--accent);
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.save-state {
  font-size: 14px;
}
.counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.counts div {
  background: #f0f6f3;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}
.counts strong,
.counts span {
  display: block;
}
.counts strong {
  font-size: 27px;
}
.counts span {
  font-size: 12px;
  color: var(--muted);
}
progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
}
.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.navigation {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin: 20px 0;
}
#position {
  font-size: 13px;
  color: var(--muted);
}
#record-panel {
  padding: 22px;
  background: #f5f8f6;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 260px;
}
.record-id {
  font-weight: 750;
  overflow-wrap: anywhere;
}
blockquote {
  margin: 20px 0;
  padding: 8px 0 8px 18px;
  border-left: 3px solid #86afa5;
  font-size: 21px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.decision {
  font-size: 14px;
}
.label-buttons,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.label-buttons button {
  overflow-wrap: anywhere;
  max-width: 100%;
}
.label-buttons button[aria-pressed="true"] {
  background: #f5d589;
  color: #3e3925;
  border-color: #92732e;
}
.actions {
  margin-top: 16px;
}
.undo-row {
  align-items: center;
}
.undo-row p {
  margin: 0;
}
#status {
  font-size: 14px;
  color: var(--muted);
  min-height: 23px;
}
#error {
  padding: 14px;
  background: #fff0e8;
  border-left: 4px solid #a54428;
  color: #87381e;
}
.placeholder {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
footer {
  margin-top: 28px;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid #c1892d;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  main {
    padding: 28px 18px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  section {
    padding: 20px;
  }
  .counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .navigation {
    flex-wrap: wrap;
  }
  .controls {
    grid-template-columns: minmax(0, 1fr);
  }
  blockquote {
    font-size: 19px;
  }
}
