:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 76px;
  padding: 0 max(28px, calc((100% - 1060px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 760;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.brand span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--warm-bg);
  color: var(--warm-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 55px 28px;
}
.hero,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.hero {
  margin-bottom: 32px;
}
h1 {
  font-size: 34px;
  letter-spacing: -0.05em;
  margin: 0 0 8px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.03em;
  margin: 0 0 7px;
}
p,
small {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.button {
  display: inline-block;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 730;
  text-decoration: none;
  cursor: pointer;
}
.back-link {
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-bottom: 30px;
}
.stats div,
.items,
.settings-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.stats div {
  padding: 17px 19px;
}
.stats strong {
  display: block;
  font-size: 25px;
  letter-spacing: -0.05em;
}
.stats small {
  font-size: 11px;
}
.upload-page {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 300px;
  padding: 30px;
  margin-bottom: 20px;
  border: 1.5px dashed var(--drop-border);
  border-radius: 15px;
  background: var(--surface);
}
.drop-copy {
  text-align: center;
  margin: auto;
}
.drop-icon {
  font-size: 40px;
  margin-bottom: 10px;
  color: var(--accent-text);
}
.upload-page form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.upload-page input {
  max-width: 220px;
  font-size: 11px;
}
.info-note,
.success-note {
  padding: 15px 17px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.5;
}
.info-note {
  background: var(--info-bg);
  color: var(--info-text);
}
.success-note {
  margin: -12px 0 20px;
  background: var(--success-bg);
  color: var(--accent-text);
}
.section-head {
  margin-bottom: 13px;
}
.section-head span {
  font-size: 11px;
  color: var(--text-muted);
}
.receipt-list {
  margin-top: 30px;
}
.item {
  display: grid;
  grid-template-columns: 42px 1fr 90px 90px;
  align-items: center;
  gap: 13px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
}
.item:last-child {
  border-bottom: 0;
}
.thumb {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--warm-bg);
  color: var(--thumb-text);
  font-size: 18px;
}
.item b,
.item small {
  display: block;
}
.item small {
  margin-top: 3px;
}
.price {
  color: var(--price);
}
.item em {
  font-style: normal;
  color: var(--item-em);
  font-size: 10px;
  font-weight: 700;
}
.empty {
  padding: 36px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.large-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--warm-bg);
  color: var(--warm-text);
  font-weight: 750;
}
.profile-row h2 {
  margin: 0;
}
.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
}
.setting:last-child {
  border-bottom: 0;
}
.setting strong,
.setting small {
  display: block;
}
.setting small {
  margin-top: 4px;
}
.setting > span {
  color: var(--text-muted);
  font-size: 11px;
}
.status-good {
  color: var(--accent-text) !important;
  font-weight: 700;
}
@media (max-width: 700px) {
  main {
    padding: 32px 18px;
  }
  .hero,
  .upload-page {
    display: block;
  }
  .hero .button,
  .back-link {
    display: inline-block;
    margin-top: 18px;
  }
  .upload-page form {
    display: block;
    margin-top: 25px;
  }
  .upload-page input {
    display: block;
    margin-bottom: 12px;
  }
  .item {
    grid-template-columns: 38px 1fr 65px;
  }
  .item em {
    display: none;
  }
  .stats {
    gap: 8px;
  }
  .stats div {
    padding: 13px;
  }
  .setting {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}
header a.brand,
header a.avatar,
header a.brand:hover,
header a.avatar:hover,
header a.brand:focus-visible,
header a.avatar:focus-visible {
  text-decoration: none;
}
header a.brand:hover {
  color: var(--accent-text);
}
.public-hero {
  max-width: 730px;
  margin: 12px auto 45px;
  text-align: center;
}
.public-hero h1 {
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: -0.055em;
}
.public-hero p {
  max-width: 540px;
  margin: 20px auto;
  font-size: 16px;
}
.public-hero .actions {
  justify-content: center;
  margin-bottom: 16px;
}
.product-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 15px 50px var(--shadow);
}
.preview-stats {
  display: flex;
  gap: 40px;
  padding: 18px 0;
}
.preview-stats strong,
.preview-stats small {
  display: block;
}
.preview-stats strong {
  font-size: 26px;
}
.sample-row {
  display: grid;
  grid-template-columns: 40px 1fr 100px 100px;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
  color: inherit;
  text-decoration: none;
  font-size: 13px;
}
.sample-row small {
  display: block;
}
.preview-question {
  padding: 20px;
  margin-top: 18px;
  background: var(--preview-bg);
  border-radius: 12px;
  font-size: 14px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 48px;
}
.feature-grid h2 {
  margin-top: 12px;
}
.login-card {
  max-width: 520px;
  margin: 35px auto;
  padding: 32px;
}
.login-card .button {
  margin: 15px 0;
}
.demo-search {
  margin: 24px 0;
}
.demo-item {
  margin-bottom: 14px;
}
.demo-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 17px;
  list-style: none;
}
.demo-item summary:before {
  content: "+";
}
.demo-item[open] summary:before {
  content: "−";
}
.demo-item summary span:first-child {
  flex: 1;
}
.demo-item .button {
  margin-top: 15px;
}
.demo-item[hidden] {
  display: none;
}
#demo-ask {
  margin-top: 15px;
}
@media (max-width: 700px) {
  .public-hero h1 {
    font-size: 34px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .product-preview {
    padding: 18px;
  }
  .sample-row {
    grid-template-columns: 32px 1fr 85px;
    gap: 10px;
  }
  .sample-row .badge {
    grid-column: 2/4;
    justify-self: start;
  }
  .preview-stats {
    gap: 22px;
  }
  .login-card {
    padding: 22px;
  }
  .demo-item summary {
    font-size: 15px;
  }
}
.thumb {
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.photo-grid img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: var(--evidence-bg);
  border-radius: 8px;
}
.photo-grid .button {
  padding: 8px;
  font-size: 11px;
}
.photo-grid .badge {
  display: inline-block;
  margin-top: 5px;
}
nav {
  display: flex;
  gap: 22px;
}
nav a {
  color: var(--text-faint);
  text-decoration: none;
  font-size: 13px;
}
nav a:hover {
  color: var(--accent-text);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
footer {
  max-width: 904px;
  margin: 40px auto;
  padding: 20px 0;
  border-top: 1px solid var(--border-footer);
  font-size: 12px;
  color: var(--text-footer);
  display: flex;
  justify-content: space-between;
}
footer a {
  color: var(--accent-text);
  text-decoration: none;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 750;
  color: var(--eyebrow);
  margin: 14px 0;
}
.attention,
.ask-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: var(--accent-soft);
  padding: 22px;
  border-radius: 14px;
  margin: 24px 0;
}
.attention p,
.ask-card p {
  margin: 5px 0 0;
}
.ask-card {
  color: inherit;
  text-decoration: none;
  background: var(--warm-soft);
  margin-top: 32px;
}
.ask-card > span {
  font-size: 30px;
  color: var(--warm-icon);
}
.ask-card > div {
  flex: 1;
}
.secondary {
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
}
.button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.badge {
  font-style: normal;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--badge-bg);
  white-space: nowrap;
}
.status-confirmed {
  background: var(--status-bg);
}
.tabs {
  display: flex;
  gap: 9px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.tabs a {
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--tabs);
  text-decoration: none;
  font-size: 13px;
}
.tabs a.active {
  background: var(--accent);
  color: var(--on-accent);
}
.search {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.search input {
  flex: 1;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.wide {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 12px;
  color: var(--label);
  font-weight: 600;
  margin: 12px 0;
}
input,
textarea,
select {
  font: inherit;
  display: block;
  width: 100%;
  border: 1px solid var(--input-border);
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  margin-top: 7px;
}
input[type="file"] {
  max-width: 100%;
  margin: 20px 0;
  background: var(--file-bg);
}
textarea {
  resize: vertical;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hint {
  font-size: 11px;
  line-height: 1.7;
}
.item-layout {
  grid-template-columns: 1.4fr 1fr;
}
aside .detail-card {
  margin-bottom: 18px;
}
.evidence-link {
  display: block;
  padding: 16px 10px;
  border-bottom: 1px solid var(--border-soft);
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.evidence-link:hover {
  background: var(--surface-hover);
}
.evidence-link small {
  display: block;
  margin: 5px 0;
}
.history {
  margin-top: 26px;
}
details {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  overflow-wrap: anywhere;
}
summary {
  cursor: pointer;
  color: var(--accent-text);
  font-weight: 600;
}
.error-note {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 16px;
  border-radius: 10px;
  margin: 16px 0;
}
.answer {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.8;
  color: var(--answer);
}
.dragging {
  background: var(--accent-soft);
}
.detail-card form > .button {
  margin-top: 14px;
}
.file-summary {
  overflow-wrap: anywhere;
}
h1 {
  overflow-wrap: anywhere;
}
.item {
  grid-template-columns: 42px minmax(0, 1fr) 110px 100px;
}
.item b {
  overflow-wrap: anywhere;
}
.upload-page {
  display: block;
}
.upload-page .drop-copy {
  max-width: 520px;
}
header {
  gap: 20px;
}
@media (max-width: 700px) {
  header {
    height: auto;
    min-height: 76px;
    padding: 16px;
    flex-wrap: wrap;
  }
  nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  nav a {
    font-size: 12px;
  }
  .detail-grid.item-layout {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .item {
    grid-template-columns: 32px minmax(0, 1fr) 92px;
    gap: 10px;
  }
  .item em {
    display: block;
    grid-column: 2/4;
    justify-self: start;
  }
  .stat-link {
    padding: 14px 10px;
  }
  .attention {
    align-items: flex-start;
    flex-direction: column;
  }
  footer {
    margin: 30px 18px;
  }
  .search {
    flex-wrap: wrap;
  }
  .hero h1 {
    font-size: 29px;
  }
  .ask-card {
    padding: 18px;
  }
}
header a.avatar:hover,
header a.avatar:focus-visible {
  background: var(--warm-hover);
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-row input {
  width: auto;
  margin: 0;
}
.evidence-preview {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
  background: var(--evidence-bg);
  border-radius: 8px;
  margin: 10px 0;
}
.stat-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 17px 19px;
}
.stat-link:hover {
  border-color: var(--accent-text);
  background: var(--surface-hover);
}
.stat-link strong {
  display: block;
  font-size: 25px;
  letter-spacing: -0.05em;
}
.stat-link small {
  font-size: 11px;
}
.item-link {
  display: grid;
  color: inherit;
  text-decoration: none;
}
.item-link:hover {
  background: var(--surface-hover);
}
.status-needs_review {
  color: var(--status-needs_review) !important;
}
.status-candidate {
  color: var(--status-candidate) !important;
}
.status-confirmed {
  color: var(--status-confirmed) !important;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}
.evidence-card,
.detail-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 19px;
}
.evidence-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
  margin: 15px 0;
  background: var(--evidence-bg);
  border-radius: 10px;
  overflow: hidden;
}
.evidence-frame img {
  display: block;
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}
.evidence-frame iframe {
  width: 100%;
  height: 500px;
  border: 0;
}
.extracted-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.extracted-item:last-child {
  border-bottom: 0;
}
.extracted-item strong,
.extracted-item small {
  display: block;
}
.extracted-item small {
  margin: 4px 0 12px;
}
.field-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 11px;
  color: var(--text-muted);
}
.field-row b {
  color: var(--text);
}
.extracted-item em {
  display: inline-block;
  margin-top: 8px;
  font-style: normal;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}
.compact {
  padding: 24px 8px;
}
@media (max-width: 700px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .evidence-frame {
    min-height: 240px;
  }
  .evidence-frame iframe {
    height: 380px;
  }
}
.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--accent-text);
  border-color: var(--accent-text);
}
.theme-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
  display: block;
}
.theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
