:root {
  --ink: #173d36;
  --green: #16745f;
  --green-dark: #0f5747;
  --mint: #e4f2ec;
  --paper: #fbfaf6;
  --sand: #f1eee6;
  --line: #d9e1de;
  --muted: #6c7b77;
  --warn: #fff4ce;
  --white: #fff;
  --shadow: 0 22px 65px rgba(23, 61, 54, .1);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
.topbar { height: 72px; max-width: 1180px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -.5px; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px 9px 9px 2px; color: white; background: var(--green); display: grid; place-items: center; font-size: 15px; }
.privacy-note { color: var(--muted); font-size: 13px; }
.privacy-note::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4db593; margin-right: 8px; }
.hero { text-align: center; padding: 74px 20px 54px; background: radial-gradient(circle at 50% 10%, #e4f3ec 0, rgba(228,243,236,.15) 40%, transparent 65%); }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 15px auto 20px; max-width: 760px; font-size: clamp(42px, 6vw, 70px); line-height: 1.06; letter-spacing: -.055em; }
.hero h1 em { color: var(--green); font-style: normal; }
.hero-copy { max-width: 570px; margin: auto; font-size: 17px; line-height: 1.8; color: var(--muted); }
.trust-row { margin-top: 30px; display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; color: #49625c; font-size: 13px; }
.workspace { max-width: 1080px; min-height: 580px; margin: 0 auto 110px; background: var(--white); border: 1px solid rgba(23,61,54,.1); box-shadow: var(--shadow); border-radius: 24px; overflow: hidden; }
.steps { height: 94px; padding: 0 54px; display: flex; align-items: center; background: #f4f7f5; border-bottom: 1px solid var(--line); }
.step { border: 0; background: transparent; color: #87938f; display: flex; align-items: center; gap: 10px; padding: 0; white-space: nowrap; }
.step b { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #bac6c2; display: grid; place-items: center; font-size: 12px; }
.step.active, .step.complete { color: var(--ink); }
.step.active b { color: white; background: var(--green); border-color: var(--green); }
.step.complete b { color: var(--green); border-color: var(--green); }
.steps i { height: 1px; flex: 1; background: #cad4d0; margin: 0 18px; }
.panel { display: none; padding: 48px 56px 36px; }
.panel.active { display: block; animation: reveal .3s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }
.panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 34px; }
.panel-heading > div { display: flex; align-items: center; gap: 14px; }
.section-index { color: #a6b3af; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.panel h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.panel-heading p { max-width: 350px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.template-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.template-card { min-height: 105px; padding: 22px; display: flex; align-items: center; gap: 17px; text-align: left; border-radius: 14px; border: 1px solid var(--line); background: white; color: var(--ink); cursor: pointer; transition: .2s; }
.template-card:hover, .template-card.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(22,116,95,.07); }
.template-card > span:nth-child(2) { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.template-card small { color: var(--muted); line-height: 1.4; }
.file-icon { width: 40px; height: 48px; color: white; background: var(--green); border-radius: 5px 10px 5px 5px; display: grid; place-items: center; font-weight: 800; }
.file-icon.outline { color: var(--green); border: 1px dashed var(--green); background: var(--mint); }
.radio { width: 18px; height: 18px; border: 1px solid #aab7b3; border-radius: 50%; }
.selected .radio { border: 5px solid var(--green); }
.mapping-area { margin-top: 24px; background: #f7f8f5; border-radius: 14px; padding: 22px; }
.mapping-title { display: flex; justify-content: space-between; margin-bottom: 18px; }
.mapping-title span { color: var(--muted); font-size: 13px; }
.mapping-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mapping-grid label { color: var(--muted); font-size: 12px; }
.mapping-grid select, .mapping-grid input { width: 100%; height: 40px; margin-top: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; }
.panel-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 34px; padding-top: 24px; border-top: 1px solid #e8ecea; }
.primary, .ghost { min-height: 46px; padding: 0 20px; border-radius: 9px; border: 0; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 20px; }
.primary { color: white; background: var(--green); box-shadow: 0 7px 16px rgba(22,116,95,.18); }
.primary:hover { background: var(--green-dark); }
.primary:disabled { cursor: not-allowed; opacity: .45; }
.ghost { color: var(--ink); background: transparent; }
.dropzone { min-height: 230px; border: 1.5px dashed #9fb9b0; border-radius: 16px; background: #f9fcfa; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 11px; cursor: pointer; transition: .2s; }
.dropzone.dragging { background: var(--mint); border-color: var(--green); }
.dropzone small { color: var(--muted); }
.drop-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--mint); font-size: 25px; }
.receipt-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.receipt-item { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; }
.receipt-item > span:first-child { width: 31px; height: 35px; display: grid; place-items: center; color: var(--green); background: var(--mint); border-radius: 5px; font-size: 10px; font-weight: 700; }
.receipt-item div { min-width: 0; flex: 1; }
.receipt-item strong, .receipt-item small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.receipt-item strong { font-size: 13px; }
.receipt-item small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.text-entry { padding: 17px 20px; margin-bottom: 20px; border-radius: 12px; background: var(--mint); display: grid; grid-template-columns: 150px 1fr; align-items: center; }
.text-entry label { font-size: 13px; font-weight: 700; }
.text-entry div { display: flex; }
.text-entry input { height: 42px; flex: 1; padding: 0 14px; border: 1px solid #bfd5cc; border-radius: 8px 0 0 8px; outline: 0; }
.text-entry button { width: 74px; border: 0; border-radius: 0 8px 8px 0; color: white; background: var(--green); cursor: pointer; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 10px; text-align: left; color: var(--muted); background: #f6f7f4; font-weight: 600; white-space: nowrap; }
td { padding: 8px 6px; border-top: 1px solid #e9edeb; }
td input { min-width: 80px; width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 6px; color: var(--ink); background: transparent; }
td input:focus { outline: 0; border-color: var(--green); background: white; }
tr.low-confidence td { background: #fffdf4; }
.source-badge { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; padding: 4px 7px; border-radius: 20px; color: #6a5b25; background: var(--warn); font-size: 10px; }
.delete-row { border: 0; color: #9b5b55; background: transparent; cursor: pointer; }
.summary { display: flex; justify-content: space-between; align-items: center; padding: 18px 5px 0; color: var(--muted); }
.summary strong { color: var(--ink); font-size: 19px; }
.notice { max-width: calc(100% - 112px); margin: 22px auto -22px; padding: 12px 15px; color: #8b3d36; background: #fff0ed; border: 1px solid #f0cec8; border-radius: 9px; font-size: 13px; }
.hidden { display: none !important; }
.success-panel { padding: 90px 20px; text-align: center; }
.success-mark { width: 72px; height: 72px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 32px; box-shadow: 0 12px 28px rgba(22,116,95,.24); }
.success-panel h2 { margin: 12px 0; font-size: 34px; }
.success-panel > p:not(.eyebrow) { max-width: 520px; margin: 0 auto 28px; color: var(--muted); line-height: 1.7; }
.download { width: 210px; margin: auto; }
.text-button { margin-top: 22px; border: 0; color: var(--green); background: none; cursor: pointer; }
.how-it-works { max-width: 1080px; margin: 0 auto 110px; padding: 0 24px; }
.how-it-works > h2 { max-width: 540px; margin: 15px 0 38px; font-size: 37px; letter-spacing: -.04em; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.value-grid article { min-height: 200px; padding: 26px; background: var(--sand); border-radius: 14px; }
.value-grid article span { color: #99a6a2; font-size: 11px; font-weight: 700; }
.value-grid h3 { margin: 30px 0 10px; font-size: 18px; }
.value-grid p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
footer { max-width: 1180px; margin: auto; padding: 27px 24px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; font-size: 12px; }

@media (max-width: 760px) {
  .hero { padding-top: 45px; }
  .workspace { margin: 0 12px 70px; border-radius: 17px; }
  .steps { height: 72px; padding: 0 18px; }
  .step span { display: none; }
  .steps i { margin: 0 8px; }
  .panel { padding: 30px 20px 25px; }
  .panel-heading { display: block; }
  .panel-heading p { margin: 10px 0 0 31px; }
  .template-options, .receipt-list, .value-grid { grid-template-columns: 1fr; }
  .mapping-grid { grid-template-columns: 1fr 1fr; }
  .text-entry { grid-template-columns: 1fr; gap: 10px; }
  .notice { max-width: calc(100% - 40px); }
  footer { flex-direction: column; gap: 8px; }
}
