:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #21313b;
  background: #f5f7f8;
  font-synthesis: none;
  --muted: #64747f;
  --border: #e2e8eb;
  --accent: #1c665f;
  --accent-hover: #154f49;
  --surface: #fff;
  --focus: #237fcb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
button {
  color: inherit;
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.035em;
  font-weight: 650;
  margin-bottom: 12px;
}
h2 {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  font-weight: 650;
  margin: 0;
}
h3 {
  font-size: 0.91rem;
  margin: 0 0 10px;
  font-weight: 650;
}
p {
  line-height: 1.65;
}
small {
  font-size: 0.76rem;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 12px;
  background: white;
  border: 2px solid var(--focus);
  border-radius: 8px;
}
.skip-link:focus {
  top: 10px;
}
.site-header {
  background: #ffffffeb;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1240px;
  margin: auto;
  padding: 20px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #21313b;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.73rem;
  margin-top: 3px;
}
.brand-mark {
  width: 38px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #eaf2ef;
  color: var(--accent);
  border-radius: 10px;
}
.brand-mark svg {
  width: 25px;
  height: 25px;
}
.page {
  max-width: 1240px;
  margin: auto;
  padding: 42px 36px 60px;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 29px;
}
.page-intro p {
  font-size: 0.92rem;
  max-width: 650px;
  margin-bottom: 0;
}
.eyebrow {
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  color: #76838c;
  display: block;
  margin-bottom: 13px;
}
.muted {
  color: var(--muted);
}
.private-label {
  font-size: 0.76rem;
  white-space: nowrap;
  color: #687a77;
  margin-bottom: 6px;
}
.private-label span {
  font-size: 0.5rem;
  color: #448d71;
  margin-right: 5px;
  vertical-align: middle;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(310px, 0.9fr) minmax(360px, 1.25fr);
  gap: 25px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 3px 10px #21313b03;
}
.capture-panel {
  padding: 26px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.step-mark {
  color: #82928f;
  font-size: 1.4rem;
  font-weight: 300;
}
.section-description {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 9px 0 23px;
}
.field {
  margin-bottom: 21px;
}
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 9px;
}
.optional {
  font-weight: 400;
  color: #8a959d;
  font-size: 0.73rem;
  margin-left: 5px;
}
input[type="password"],
textarea {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid #cfd9de;
  border-radius: 8px;
  padding: 12px 13px;
  color: #263740;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  font-size: 0.87rem;
  line-height: 1.6;
}
input[type="password"]:focus,
textarea:focus {
  border-color: #6b9e96;
  box-shadow: 0 0 0 3px #eaf3f0;
}
textarea {
  resize: vertical;
  min-height: 78px;
}
#captureText {
  min-height: 142px;
}
textarea::placeholder {
  color: #8d9aa2;
}
.field-hint {
  font-size: 0.72rem;
  color: #85919a;
  margin: 6px 0 0;
}
.dropzone {
  border: 1px dashed #c7d5d3;
  border-radius: 9px;
  background: #f9fbfa;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 21px 12px 17px;
  gap: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.dropzone.drag-over {
  background: #eaf4f0;
  border-color: var(--accent);
}
.upload-icon {
  width: 23px;
  height: 23px;
  color: #6a8c84;
  margin-bottom: 2px;
}
.dropzone small {
  color: #87948f;
  margin-top: 2px;
}
.button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  min-height: 42px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.button-primary {
  background: var(--accent);
  color: white;
}
.button-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.button-secondary {
  background: #fff;
  border-color: #d6e1dd;
}
.button-secondary:hover:not(:disabled) {
  background: #f1f6f4;
  border-color: #a9c3bb;
}
.button-quiet {
  background: transparent;
  color: #6a7a83;
  padding: 8px 12px;
}
.button-quiet:hover {
  background: #eef3f4;
}
.full-width {
  width: 100%;
}
#captureButton {
  justify-content: space-between;
  min-height: 46px;
  padding: 12px 16px;
}
#captureButton span:last-child {
  font-size: 1.1rem;
  font-weight: 400;
}
.submit-note {
  font-size: 0.71rem;
  text-align: center;
  color: #89949a;
  margin: 11px 0 0;
}
.feedback {
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0 0 13px;
  overflow-wrap: anywhere;
}
.feedback:empty {
  display: none;
}
.feedback.error {
  color: #9a3333;
  padding: 10px 12px;
  border-radius: 7px;
  background: #fff1f0;
}
.feedback.success {
  color: #276f4f;
  padding: 10px 12px;
  border-radius: 7px;
  background: #eef8f2;
}
.selected-files {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 7px;
}
.selected-file {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f8f7;
  border-radius: 7px;
  padding: 8px 10px;
  min-width: 0;
}
.file-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.77rem;
}
.file-info {
  min-width: 0;
  flex: 1;
}
.file-size {
  font-size: 0.69rem;
  color: #7e8d94;
}
.remove-file {
  border: 0;
  background: transparent;
  border-radius: 6px;
  min-width: 34px;
  min-height: 34px;
  font-size: 1.2rem;
  color: #6b7d83;
}
.remove-file:hover {
  background: #e7eeeb;
}
.queue-panel {
  overflow: hidden;
  min-height: 540px;
}
.queue-heading {
  padding: 26px 25px 17px;
}
.queue-heading .section-description {
  margin: 7px 0 0;
}
.icon-button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #798b92;
  flex: none;
}
.icon-button:hover {
  background: #eff4f4;
}
.icon-button svg {
  width: 20px;
  height: 20px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 25px;
  gap: 25px;
}
.tabs button {
  position: relative;
  background: transparent;
  border: 0;
  padding: 10px 2px 15px;
  min-height: 44px;
  font-size: 0.82rem;
  color: #7b8791;
  font-weight: 550;
}
.tabs button[aria-selected="true"] {
  color: var(--accent);
  font-weight: 650;
}
.tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  left: 0;
  right: 0;
}
.tab-count {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 5px;
  background: #edf2f0;
  color: #5c7970;
  font-size: 0.64rem;
}
.list-feedback {
  margin: 14px 23px;
}
.items-list {
  padding: 0 23px;
  min-height: 345px;
}
.item-card {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  background: transparent;
  text-align: left;
  padding: 20px 2px;
  display: block;
  position: relative;
}
.item-card:last-child {
  border-bottom: 0;
}
.item-card:hover .item-title {
  color: var(--accent);
}
.item-card:hover {
  background: #fbfcfc;
}
.item-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.item-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
  display: block;
  overflow-wrap: anywhere;
  transition: color 0.15s;
}
.item-preview {
  font-size: 0.77rem;
  color: #849099;
  line-height: 1.6;
  margin: 6px 0 11px;
  overflow-wrap: anywhere;
}
.item-date {
  font-size: 0.68rem;
  color: #89969d;
  white-space: nowrap;
}
.item-bottom {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #7c8f95;
  font-size: 0.68rem;
}
.item-arrow {
  margin-left: auto;
  font-size: 0.95rem;
  color: #94a39f;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.64rem;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 5px;
  background: #f0f3f5;
  color: #6a7d88;
  white-space: nowrap;
}
.status-inbox {
  background: #eef2f7;
  color: #647b99;
}
.status-processing {
  background: #edf1fb;
  color: #5c74a4;
}
.status-processed {
  background: #eaf5ef;
  color: #398363;
}
.status-needs_info {
  background: #fbf3e3;
  color: #9a7937;
}
.status-error {
  background: #faeeee;
  color: #ad6260;
}
.empty-state {
  min-height: 345px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 35px 20px;
  color: var(--muted);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #f1f5f4;
  margin-bottom: 17px;
  color: #9eb3ad;
}
.empty-icon svg {
  width: 27px;
  height: 27px;
}
.empty-state h3 {
  font-size: 0.88rem;
  color: #5c7079;
  margin-bottom: 7px;
}
.empty-state p {
  font-size: 0.78rem;
  max-width: 290px;
  margin-bottom: 0;
}
.queue-footnote {
  font-size: 0.67rem;
  color: #96a0a6;
  border-top: 1px solid #eef1f2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px 25px;
}
.live-dot {
  width: 5px;
  height: 5px;
  background: #92b7a7;
  border-radius: 50%;
}
.loading-screen {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}
.spinner {
  width: 19px;
  height: 19px;
  border: 2px solid #dce7e2;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.login-card {
  max-width: 420px;
  margin: 7vh auto 0;
  padding: 34px;
}
.login-card h1 {
  font-size: 1.7rem;
}
.login-card .muted {
  font-size: 0.85rem;
  margin-bottom: 26px;
}
.login-card input {
  margin-bottom: 15px;
}
.login-card .eyebrow {
  font-size: 0.61rem;
}
dialog {
  border: 1px solid var(--border);
  padding: 0;
  border-radius: 16px;
  color: inherit;
  width: min(720px, calc(100% - 30px));
  max-height: 90dvh;
  box-shadow: 0 20px 90px #17342d33;
}
dialog::backdrop {
  background: #21313b66;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 23px 4px;
}
.dialog-header .eyebrow {
  margin: 0;
}
.dialog-header .icon-button {
  font-size: 1.6rem;
}
.dialog-content {
  padding: 7px 27px 15px;
}
.dialog-content h2 {
  font-size: 1.32rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 13px 0 25px;
  flex-wrap: wrap;
}
.detail-section {
  padding: 19px 0;
  border-top: 1px solid var(--border);
}
.detail-text {
  font-size: 0.86rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.detail-links {
  margin: 0;
  padding-left: 19px;
  font-size: 0.84rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.detail-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.detail-files li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
}
.detail-files a {
  overflow-wrap: anywhere;
  min-width: 0;
}
.detail-files .file-size {
  flex: none;
}
.result-data {
  margin: 0;
  display: grid;
  gap: 13px;
}
.result-entry {
  min-width: 0;
}
.result-data dt {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.result-data dd {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.result-data .result-data {
  padding-left: 12px;
  border-left: 2px solid #e7efeb;
}
.detail-error {
  background: #fff5f3;
  border-radius: 9px;
  padding: 15px;
  color: #954642;
}
.detail-error p {
  font-size: 0.82rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 17px 25px;
  background: #fcfdfd;
  position: sticky;
  bottom: 0;
}
.noscript {
  max-width: 620px;
  margin: 30px auto;
  padding: 15px;
  border: 1px solid var(--border);
}
.dialog-header {
  justify-content: flex-end;
}
.clarification-field {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 20px;
}
.page-intro h1 {
  margin-bottom: 0;
}
.load-more-wrap {
  padding: 14px 24px 23px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border);
}
.field-hint,
.file-size,
.item-date,
.item-preview,
.item-bottom,
.optional,
.dropzone small {
  color: #657680;
}
.button-quiet {
  color: #596b75;
}
textarea::placeholder {
  color: #718089;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 950px) {
  .page {
    padding: 32px 24px 45px;
  }
  .header-inner {
    padding: 17px 24px;
  }
  .workspace {
    grid-template-columns: minmax(290px, 0.95fr) minmax(310px, 1.1fr);
    gap: 18px;
  }
  .capture-panel {
    padding: 22px;
  }
  .queue-heading {
    padding: 23px 21px 17px;
  }
  .items-list {
    padding: 0 19px;
  }
  .page-intro {
    align-items: flex-start;
  }
  .private-label {
    margin-top: 4px;
  }
  .page-intro p {
    max-width: 560px;
  }
  .page-intro .eyebrow {
    font-size: 0.61rem;
  }
}
@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .page-intro {
    display: block;
    margin-bottom: 24px;
  }
  .private-label {
    display: inline-block;
    margin-top: 16px;
  }
  .page {
    max-width: 620px;
    padding: 27px 18px 40px;
  }
  .header-inner {
    padding: 15px 19px;
  }
  .capture-panel {
    padding: 24px;
  }
  .queue-panel {
    min-height: 400px;
  }
  .empty-state,
  .items-list {
    min-height: 260px;
  }
  .page-intro h1 {
    font-size: 1.9rem;
  }
  .login-card {
    padding: 28px;
    margin-top: 5vh;
  }
  .dialog-content {
    padding: 7px 22px 15px;
  }
  .dialog-header {
    padding: 15px 18px 4px;
  }
  .dialog-footer {
    padding: 15px 20px;
  }
}
@media (max-width: 390px) {
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }
  .capture-panel {
    padding: 20px;
  }
  .brand {
    font-size: 0.87rem;
  }
  .brand-mark {
    width: 34px;
    height: 38px;
  }
  .page-intro h1 {
    font-size: 1.65rem;
  }
  .item-topline {
    align-items: flex-start;
  }
  .item-date {
    font-size: 0.62rem;
  }
  .detail-files li {
    flex-wrap: wrap;
  }
  .dialog-footer {
    flex-wrap: wrap;
  }
  .dialog-footer .button {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
