:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #16213a;
  background: #f7f8fc;
  font-size: 15px;
  line-height: 1.5;
  --ink: #16213a;
  --muted: #65728a;
  --line: #e3e7ef;
  --panel: #ffffff;
  --purple: #6247e8;
  --purple-dark: #4c35c5;
  --purple-soft: #f0edff;
  --green: #08795b;
  --green-soft: #e9f8f2;
  --amber: #805b13;
  --amber-soft: #fff7df;
  --red: #a42f3f;
  --red-soft: #fff0f2;
  --shadow: 0 18px 55px rgba(37, 44, 78, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; min-width: 280px; overflow-x: hidden; }
button, textarea, select { font: inherit; }
button, select, summary, input[type="file"] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
[hidden] { display: none !important; }

.shell { width: min(100%, 1200px); margin-inline: auto; padding-inline: 28px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.clipboard-helper { position: fixed; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-150%); padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 750; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

:focus-visible { outline: 3px solid #8f7aff; outline-offset: 3px; }
.site-header { position: relative; z-index: 10; border-bottom: 1px solid rgba(227, 231, 239, .8); background: rgba(247, 248, 252, .92); backdrop-filter: blur(14px); }
.nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 22px; font-weight: 850; letter-spacing: -1.1px; text-decoration: none; white-space: nowrap; }
.brandmark { display: inline-flex; width: 35px; height: 35px; align-items: center; justify-content: center; border-radius: 11px; background: linear-gradient(145deg, #7459f5, #5338da); color: white; font-size: 22px; font-weight: 900; letter-spacing: -2px; transform: rotate(-6deg); box-shadow: 0 8px 18px rgba(98, 71, 232, .22); }
.branddot { color: var(--purple); }
.navright { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.tiny-pill { color: #526178; font-size: 12px; font-weight: 700; white-space: nowrap; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #14a979; box-shadow: 0 0 0 3px #dff7ef; }
.plain-link { color: #344159; font-size: 13px; font-weight: 700; text-decoration: none; }
.plain-link:hover { color: var(--purple); }
.nav-cta, .big-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; color: #fff; background: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.nav-cta { padding: 11px 16px; }
.nav-cta:hover { background: #263451; }
.language-switch { display: flex; padding: 3px; border: 1px solid #d9ddea; border-radius: 9px; background: #fff; }
.language-switch button { min-width: 33px; border: 0; border-radius: 6px; padding: 5px 7px; background: transparent; color: #69758a; font-size: 10px; font-weight: 850; }
.language-switch button[aria-pressed="true"] { background: var(--purple-soft); color: var(--purple-dark); }

.hero { position: relative; padding-top: 88px; padding-bottom: 92px; text-align: center; }
.hero::before { content: ""; position: absolute; z-index: -1; top: 12px; left: 50%; width: min(820px, 92vw); height: 440px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(111, 84, 236, .09), transparent 68%); pointer-events: none; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 9px; color: #6048d7; font-size: 10px; font-weight: 850; letter-spacing: 1.8px; }
.spark { font-size: 15px; }
.eyebrow-line { width: 28px; height: 1px; background: #bdb2f7; }
.hero h1 { max-width: 930px; margin: 23px auto 20px; font-size: clamp(44px, 6.3vw, 76px); line-height: 1.03; letter-spacing: -4px; font-weight: 880; }
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--purple); }
.intro { max-width: 660px; margin: 0 auto; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 30px; }
.big-cta { padding: 14px 20px; background: var(--purple); box-shadow: 0 13px 28px rgba(98, 71, 232, .24); }
.big-cta:hover { background: var(--purple-dark); transform: translateY(-1px); }
.trust { color: #596981; font-size: 12px; }
.pill-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 24px; margin: 34px 0 0; padding: 0; color: #53627a; font-size: 12px; list-style: none; }
.pill-list li::before { content: "✓"; margin-right: 6px; color: #0aa276; font-weight: 900; }

.app-shell { margin-bottom: 105px; }
.workspace-top { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.workspace-kicker { color: var(--purple); font-size: 10px; font-weight: 850; letter-spacing: 1.7px; }
.workspace-top h2 { margin: 4px 0 0; font-size: 30px; letter-spacing: -1.2px; }
.workspace-top p { margin: 4px 0 0; color: #77849a; font-size: 13px; }
.privacy-badge { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 8px 12px; border: 1px solid #bce9da; border-radius: 30px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 800; }
.privacy-badge > span:first-child { font-size: 7px; }
.workspace-grid { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 18px; align-items: start; }
.left-panel, .right-panel { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.panel { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.section-num { padding: 5px 8px; border-radius: 8px; background: var(--purple-soft); color: var(--purple-dark); font-size: 11px; font-weight: 850; letter-spacing: .5px; }
.section-heading h3 { margin: 0; font-size: 15px; letter-spacing: -.35px; }

.dropzone { position: relative; display: flex; min-height: 178px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; padding: 24px; border: 1.5px dashed #bdb3ed; border-radius: 12px; background: #fbfaff; text-align: center; transition: border-color .18s, background .18s, transform .18s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--purple); background: #f5f2ff; transform: translateY(-1px); }
.dropzone:focus-within { outline: 3px solid #8f7aff; outline-offset: 3px; }
.file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; }
.upload-icon { color: var(--purple); font-size: 30px; font-weight: 400; line-height: 1.2; }
.dropzone strong { font-size: 13px; }
.dropzone > span:not(.upload-icon) { color: #5d47d2; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.dropzone small { margin-top: 6px; color: #8994a7; font-size: 10px; }
.horizontal-or { margin: 20px 0 12px; color: #949dad; font-size: 10px; letter-spacing: 1.6px; text-align: center; }
textarea { width: 100%; min-height: 90px; resize: vertical; padding: 12px; border: 1px solid #dfe3eb; border-radius: 9px; outline: none; background: #fff; color: #273550; font-size: 12px; line-height: 1.5; }
textarea:focus { border-color: #8f7aff; box-shadow: 0 0 0 3px #eeeaff; }
.import-actions { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 9px; margin-top: 10px; }
.btn { min-height: 42px; padding: 10px 13px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 800; }
.btn:disabled { opacity: .48; }
.btn-dark { display: inline-flex; justify-content: center; align-items: center; gap: 8px; background: #24324e; color: #fff; }
.btn-dark:hover { background: #17223a; }
.btn-light { border-color: #dfe3eb; background: #fff; color: #33405a; }
.btn-light:hover:not(:disabled) { border-color: #c9c1f5; background: #f8f6ff; }
.btn-accent { display: inline-flex; justify-content: center; align-items: center; gap: 8px; background: var(--purple); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--purple-dark); }
.filemeta { min-height: 17px; margin: 11px 0 0; color: #617086; font-size: 11px; overflow-wrap: anywhere; }
.data-warning, .error { margin: 10px 0 0; padding: 10px 11px; border-radius: 8px; font-size: 11px; line-height: 1.5; }
.data-warning { border: 1px solid #f0dda9; background: var(--amber-soft); color: var(--amber); }
.error { border: 1px solid #f3cbd1; background: var(--red-soft); color: var(--red); }

.options-list { min-width: 0; margin: 0; padding: 0; border: 0; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #eff1f5; }
.option > span { min-width: 0; }
.option strong { display: block; font-size: 12px; font-weight: 760; }
.option small { display: block; margin-top: 3px; color: #7d899c; font-size: 10.5px; line-height: 1.4; }
.option input { appearance: none; position: relative; width: 36px; height: 21px; flex: 0 0 auto; margin: 0; border: 1px solid #c7ced9; border-radius: 20px; background: #d6dbe4; transition: background .15s, border-color .15s; }
.option input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .15s; }
.option input:checked { border-color: var(--purple); background: var(--purple); }
.option input:checked::before { transform: translateX(15px); }
.option input:focus-visible { outline: 3px solid #a595ff; outline-offset: 3px; }
.option.compact { padding: 9px 0 12px 10px; border-bottom: 1px solid #eff1f5; }
.inline-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.inline-setting label { color: #5d6b81; font-size: 11px; }
.inline-setting select { width: min(175px, 55%); padding: 8px 28px 8px 9px; border: 1px solid #dde1e9; border-radius: 7px; background: #f8f9fc; color: #33415f; font-size: 11px; }

.results-panel { padding: 25px 26px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ready-chip { align-self: start; margin-top: 3px; padding: 5px 9px; border-radius: 20px; background: #eaf7ef; color: #10714f; font-size: 10px; font-weight: 800; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 3px 0 28px; }
.stat { min-width: 0; padding: 14px 16px; border: 1px solid #e8ebf1; border-radius: 10px; }
.stat span { display: block; color: #7b879a; font-size: 9px; font-weight: 800; letter-spacing: .65px; overflow-wrap: anywhere; }
.stat strong { display: block; margin-top: 5px; font-size: 28px; letter-spacing: -1px; }
.stat.standout { border-color: #dfd7ff; background: #f2efff; }
.stat.standout strong { color: var(--purple-dark); }
.tablerow { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.tablerow h4 { margin: 0; font-size: 12px; }
.tablerow span { color: #77849a; font-size: 10px; text-align: right; }
.table-wrap { min-width: 0; min-height: 286px; max-height: 470px; overflow: auto; border: 1px solid #e2e6ed; border-radius: 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; color: #3c4963; font-size: 11px; text-align: left; white-space: nowrap; }
thead { position: sticky; z-index: 1; top: 0; background: #f6f7fa; }
th { padding: 12px 15px; color: #59677f; font-size: 9.5px; font-weight: 820; letter-spacing: .6px; text-transform: uppercase; }
td { padding: 12px 15px; border-top: 1px solid #eceff4; }
tbody tr:nth-child(even) { background: #fbfcfe; }
.empty-state { padding: 65px 20px; color: #68768c; text-align: center; }
.results-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 18px; color: #738096; font-size: 10px; }
.privacy-mini { flex: 0 0 auto; color: var(--green); white-space: nowrap; }
.export-protection { padding: 14px; border: 1px solid #dfe3ec; border-radius: 10px; background: #f8f9fc; }
.export-protection.caution { border-color: #ebd08e; background: var(--amber-soft); }
.protection-control { display: flex; align-items: flex-start; gap: 10px; }
.protection-control input { width: 17px; height: 17px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--purple); }
.protection-control strong { display: block; font-size: 12px; }
.protection-control small { display: block; margin-top: 3px; color: #6f7c91; font-size: 10px; line-height: 1.5; }
.formula-risk { min-height: 0; margin: 8px 0 0 27px; color: #6552bd; font-size: 10px; }
.export-protection.caution .formula-risk { color: var(--amber); font-weight: 700; }
.export-area { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e8ebf1; }
.export-area > div:first-child strong { display: block; font-size: 13px; }
.export-area > div:first-child span { display: block; margin-top: 3px; color: #7a879b; font-size: 10.5px; }
.export-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.status { min-height: 0; margin: 10px 0 0; color: var(--green); font-size: 11px; }
.disclaimer { display: flex; gap: 12px; padding: 18px; border: 1px solid #e3e7f0; border-radius: 12px; background: #f0f3fa; }
.disc-icon { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid #bdc7d9; border-radius: 50%; color: #61728f; font-family: Georgia, serif; font-size: 14px; font-weight: 800; }
.disclaimer strong { font-size: 12px; }
.disclaimer p { margin: 3px 0 0; color: #68778e; font-size: 11px; line-height: 1.6; }

.features { padding-bottom: 96px; }
.features-head { max-width: 650px; margin: 0 auto 30px; text-align: center; }
.features h2, .guide h2, .faq h2 { margin: 8px 0 9px; font-size: clamp(28px, 4vw, 38px); line-height: 1.16; letter-spacing: -1.5px; }
.features-head > p { margin: 0; color: var(--muted); font-size: 13px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { min-width: 0; padding: 24px; border: 1px solid #e1e5ed; border-radius: 14px; background: #fff; }
.feat-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 9px; background: var(--purple-soft); color: var(--purple-dark); font-size: 10px; font-weight: 850; letter-spacing: .4px; }
.feature h3 { margin: 15px 0 6px; font-size: 16px; }
.feature p { margin: 0; color: #68758a; font-size: 12px; line-height: 1.7; }

.guide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 58px; align-items: center; margin-bottom: 94px; padding-top: 52px; padding-bottom: 52px; border-radius: 20px; background: #17233d; color: #fff; }
.guide .eyebrow { justify-content: flex-start; color: #b8aaff; }
.guide-copy > p { max-width: 590px; color: #bec7d7; font-size: 13px; line-height: 1.7; }
.guide .format-note { margin-top: 18px; padding: 12px 14px; border-left: 3px solid #8d79fb; background: rgba(255, 255, 255, .06); color: #d3d9e5; }
.guide-steps { display: flex; flex-direction: column; gap: 15px; margin: 0; padding: 0; list-style: none; }
.guide-steps li { display: flex; gap: 13px; padding: 15px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(255, 255, 255, .05); }
.guide-steps li > span { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 8px; background: #6d53ed; font-size: 11px; font-weight: 850; }
.guide-steps strong { font-size: 13px; }
.guide-steps p { margin: 3px 0 0; color: #bfc8d8; font-size: 11px; line-height: 1.55; }

.faq { max-width: 820px; padding-bottom: 90px; }
.faq > .eyebrow { justify-content: flex-start; }
.faq details { border-bottom: 1px solid #dce1ea; }
.faq summary { position: relative; padding: 18px 38px 18px 0; font-size: 14px; font-weight: 780; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; color: var(--purple); font-size: 20px; font-weight: 500; }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 690px; margin: -5px 0 18px; color: #65738a; font-size: 13px; line-height: 1.7; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 30px; padding-bottom: 35px; border-top: 1px solid #e0e4ec; color: #748197; font-size: 11px; }
.footer-brand { font-size: 18px; }
.footer-brand .brandmark { width: 28px; height: 28px; border-radius: 8px; font-size: 17px; }

@media (max-width: 1040px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .left-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .tiny-pill { display: none; }
}

@media (max-width: 760px) {
  .shell { padding-inline: 18px; }
  .nav { min-height: 68px; }
  .plain-link, .nav-cta { display: none; }
  .navright { gap: 9px; }
  .hero { padding-top: 58px; padding-bottom: 64px; }
  .eyebrow { gap: 6px; font-size: 9px; letter-spacing: 1.2px; }
  .eyebrow-line { width: 14px; }
  .hero h1 { max-width: 100%; margin-top: 18px; font-size: clamp(37px, 12.2vw, 54px); line-height: 1.03; letter-spacing: -2.4px; overflow-wrap: anywhere; }
  .intro { font-size: 14px; }
  .hero-actions { flex-direction: column; gap: 14px; }
  .pill-list { gap: 8px 14px; font-size: 10px; }
  .workspace-top { align-items: flex-start; }
  .workspace-top h2 { font-size: 25px; }
  .privacy-badge { max-width: 155px; font-size: 9px; line-height: 1.25; }
  .left-panel { display: flex; }
  .panel, .results-panel { padding: 18px; }
  .results-heading { align-items: flex-start; }
  .stats { gap: 6px; }
  .stat { padding: 10px; }
  .stat span { font-size: 8px; letter-spacing: .1px; }
  .stat strong { font-size: 24px; }
  .table-wrap { min-height: 255px; }
  .results-foot { align-items: flex-start; }
  .export-area { align-items: stretch; flex-direction: column; }
  .export-actions { width: 100%; }
  .export-actions .btn { flex: 1 1 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .guide { grid-template-columns: 1fr; gap: 30px; margin-inline: 0; border-radius: 0; }
  .footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (max-width: 420px) {
  .shell { padding-inline: 16px; }
  .brand { font-size: 19px; }
  .brandmark { width: 32px; height: 32px; font-size: 20px; }
  .hero h1 { font-size: 39px; }
  .workspace-top { flex-direction: column; }
  .privacy-badge { max-width: none; }
  .import-actions { grid-template-columns: 1fr; }
  .results-heading { flex-direction: column; }
  .results-heading .section-heading { margin-bottom: 0; }
  .ready-chip { margin: 0 0 15px; }
  .stat { padding: 9px 7px; }
  .stat strong { font-size: 22px; }
  .tablerow { align-items: flex-start; flex-direction: column; gap: 2px; }
  .tablerow span { text-align: left; }
  .results-foot { flex-direction: column; }
  .formula-risk { margin-left: 0; }
  .export-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  .option input { appearance: auto; }
  .live-dot { box-shadow: none; }
}

/* Input parsing controls added during the independent v0.2.1 audit */
.input-settings { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafaff; }
.input-settings > strong { display:block; margin-bottom: 10px; font-size: 13px; }
.input-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.input-settings-grid label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.input-settings-grid select { width:100%; min-width:0; border: 1px solid #d9ddea; border-radius: 8px; padding: 9px 7px; background:#fff; color: var(--ink); font-size: 12px; }
.input-settings > small { display:block; margin-top: 9px; color:var(--muted); line-height: 1.5; }
@media(max-width: 430px){ .input-settings-grid { grid-template-columns: 1fr; } }

.preview-note {margin: 10px 0 0; color: var(--muted); font-size: 11px; }
