:root {
  --ink: #17382f;
  --ink-2: #35574e;
  --paper: #f5f4ed;
  --card: #fffef9;
  --line: #d9ddd3;
  --accent: #ff6b47;
  --mint: #c9f0df;
  --mint-deep: #1e6d57;
  --shadow: 0 18px 60px rgba(26, 55, 47, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 85% 8%, #dff3e8 0, transparent 28rem), var(--paper); }
button, input { font: inherit; }
button { color: inherit; }
.shell { min-height: 100vh; }
.topbar { height: 88px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(23,56,47,.12); }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--ink); border-radius: 10px 10px 10px 2px; font: 800 19px/1 Georgia, serif; }
.brand-mark.large { width: 48px; height: 48px; font-size: 25px; margin: auto; }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 19px/1.1 Georgia, serif; }
.brand small { margin-top: 3px; color: #698078; font-size: 10px; letter-spacing: .17em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.mode-pill { padding: 8px 12px; border: 1px solid #bddbce; border-radius: 999px; background: rgba(255,255,255,.5); color: var(--mint-deep); font-size: 12px; font-weight: 700; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; transform: rotate(135deg); }
main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 60px; padding: clamp(64px, 10vw, 126px) 0 56px; }
.eyebrow, .step-number { margin: 0 0 18px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; max-width: 760px; font: 500 clamp(52px, 8vw, 94px)/.93 Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
.hero-copy { max-width: 400px; margin: 0 0 4px; color: var(--ink-2); font-size: clamp(16px, 2vw, 19px); line-height: 1.65; }
.workspace-card { padding: clamp(24px, 4vw, 50px); background: var(--card); border: 1px solid rgba(23,56,47,.12); border-radius: 28px; box-shadow: var(--shadow); }
.card-heading, .results-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 36px; }
.card-heading > div:first-child, .results-heading > div:first-child { display: flex; gap: 20px; }
.step-number { white-space: nowrap; margin-top: 7px; }
h2 { margin: 0; font: 500 clamp(28px, 4vw, 40px)/1.05 Georgia, serif; letter-spacing: -.025em; }
.card-heading p, .results-heading p { margin: 8px 0 0; color: #70827c; }
.segmented { padding: 4px; display: flex; border: 1px solid var(--line); background: #f1f2eb; border-radius: 12px; }
.segmented button { padding: 9px 14px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.segmented button.active { color: #fff; background: var(--ink); }
.entry-form { display: grid; grid-template-columns: 1fr 1.35fr auto; gap: 14px; align-items: end; }
label span { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 750; }
input { width: 100%; height: 54px; padding: 0 16px; border: 1px solid #cfd6ce; border-radius: 11px; outline: none; background: #fff; color: var(--ink); transition: .2s; }
input:focus { border-color: var(--mint-deep); box-shadow: 0 0 0 3px rgba(30,109,87,.1); }
.primary-button { height: 54px; min-width: 178px; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; gap: 24px; border: 0; border-radius: 11px; color: #fff; background: var(--accent); font-weight: 800; cursor: pointer; box-shadow: 0 8px 20px rgba(255,107,71,.18); transition: transform .2s, opacity .2s; }
.primary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.batch-form { display: grid; gap: 16px; }
.dropzone { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1.5px dashed #abc4b8; border-radius: 16px; background: #f7fbf7; cursor: pointer; text-align: center; }
.dropzone.dragging { border-color: var(--accent); background: #fff8f5; }
.dropzone span:last-child { color: #74877f; font-size: 13px; }
.upload-icon { width: 34px; height: 34px; display: grid !important; place-items: center; border-radius: 50%; background: var(--mint); color: var(--mint-deep); font-size: 20px !important; }
.batch-summary { padding: 12px 16px; display: flex; justify-content: space-between; border-radius: 10px; background: #edf6f1; font-size: 13px; }
.batch-form .primary-button { justify-self: end; }
.run-panel { margin-top: 24px; padding: 24px 28px; color: #fff; background: var(--ink); border-radius: 18px; }
.run-topline { display: flex; justify-content: space-between; align-items: center; }
.run-topline > div { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #76e6b5; box-shadow: 0 0 0 5px rgba(118,230,181,.12); animation: pulse 1.5s infinite; }
.progress-track { height: 7px; margin: 22px 0 12px; overflow: hidden; background: rgba(255,255,255,.13); border-radius: 99px; }
.progress-track div { width: 0; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s; }
.run-panel p { margin: 0; color: #b9c9c4; font-size: 13px; }
.results-section { padding: 70px 0 20px; }
.export-actions { display: flex; gap: 8px; }
.quiet-button, .copy-button, .download-button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); font-size: 12px; font-weight: 750; cursor: pointer; }
.results-list { display: grid; gap: 14px; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.result-card summary { padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; list-style: none; cursor: pointer; }
.result-card summary::-webkit-details-marker { display: none; }
.result-title { min-width: 0; }
.result-title strong, .result-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-title span { margin-top: 5px; color: #788982; font-size: 12px; }
.status-badge { padding: 6px 9px; color: var(--mint-deep); background: var(--mint); border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.chevron { transition: transform .2s; }
details[open] .chevron { transform: rotate(180deg); }
.result-body { padding: 4px 22px 24px; border-top: 1px solid #edf0eb; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.field { min-width: 0; padding: 14px; border-radius: 10px; background: #f4f5ef; }
.field.wide { grid-column: 1 / -1; }
.field-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.field label { color: #70827c; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.field-value { margin: 9px 0 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; }
.copy-button { padding: 5px 8px; background: transparent; }
.result-actions { display: flex; justify-content: flex-end; }
.description-preview { max-height: 250px; overflow: auto; }
.failed-card { border-color: #efb9ad; }
.error-text { color: #a43b2c; }
.how-it-works { padding: 100px 0 90px; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; border-top: 1px solid #bec8c1; }
.process-grid article { padding: 30px 34px 0 0; }
.process-grid article + article { padding-left: 34px; border-left: 1px solid #bec8c1; }
.process-grid article > span { color: var(--accent); font-size: 12px; font-weight: 850; }
.process-grid h3 { margin: 34px 0 10px; font: 500 28px/1 Georgia, serif; }
.process-grid p { margin: 0; color: #667a73; line-height: 1.6; }
footer { padding: 30px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; border-top: 1px solid rgba(23,56,47,.12); color: #768780; font-size: 11px; letter-spacing: .1em; }
footer p { margin: 0; letter-spacing: normal; }
.hidden { display: none !important; }
dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 22px; background: var(--card); box-shadow: 0 30px 100px rgba(10,36,29,.28); }
dialog::backdrop { background: rgba(11,35,29,.72); backdrop-filter: blur(8px); }
.login-card { padding: 38px; text-align: center; }
.login-card .eyebrow { margin: 20px 0 10px; }
.login-card > p:not(.eyebrow):not(.form-error) { margin: 12px auto 26px; color: #6c7e78; }
.login-card label { display: block; text-align: left; }
.login-card .primary-button { width: 100%; margin-top: 14px; }
.form-error { margin: 10px 0 0; color: #b5392c; font-size: 12px; text-align: left; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 20; padding: 12px 16px; color: #fff; background: var(--ink); border-radius: 10px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
@keyframes pulse { 50% { opacity: .45; } }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .entry-form { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .card-heading, .results-heading { display: grid; }
  .segmented { justify-self: stretch; }
  .segmented button { flex: 1; }
  .export-actions { order: 2; }
}
@media (max-width: 560px) {
  .topbar { height: 72px; }
  main { width: min(100% - 24px, 1120px); }
  .mode-pill { display: none; }
  .hero { padding: 54px 4px 38px; }
  h1 { font-size: 51px; }
  .workspace-card { padding: 22px 18px; border-radius: 20px; }
  .card-heading > div:first-child, .results-heading > div:first-child { gap: 12px; }
  .field-grid, .process-grid { grid-template-columns: 1fr; }
  .process-grid article + article { padding-left: 0; border-left: 0; }
  .process-grid article { padding: 26px 0; border-bottom: 1px solid #bec8c1; }
  .process-grid h3 { margin-top: 15px; }
  .result-card summary { grid-template-columns: minmax(0, 1fr) auto; }
  .status-badge { display: none; }
  .export-actions { width: 100%; }
  .export-actions button { flex: 1; }
  footer { gap: 12px; flex-wrap: wrap; }
}
