:root {
  --ink: #18243c;
  --muted: #65738a;
  --soft: #f5f7fc;
  --paper: #ffffff;
  --line: #e3e8f2;
  --brand: #3449d8;
  --brand-dark: #263ab9;
  --accent: #16a2a6;
  --green: #176d55;
  --shadow: 0 18px 60px rgba(23,41,82,.07);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fbfcff;
  color: var(--ink);
  font: 16px/1.58 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:hover { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(52,73,216,.35); outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:disabled:hover { transform: none; }
svg { display: block; }
.container { max-width: 1170px; padding: 0 28px; margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 78px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.035em; font-size: 21px; }
.logo-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(140deg, #3b53e6, #495ac7); box-shadow: 0 5px 15px rgba(52,73,216,.23); font-size: 20px; }
.logo em { color: var(--brand); font-style: normal; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { font-size: 13px; color: #516079; font-weight: 650; text-decoration: none; padding: 10px 11px; border-radius: 9px; transition: .15s; }
.nav a:hover, .nav a.active { color: var(--brand); background: #f0f2ff; }
.pill { display: inline-flex; gap: 8px; align-items: center; color: #436178; background: #eaf6f5; padding: 7px 12px; border-radius: 24px; font-size: 12px; font-weight: 750; letter-spacing: .015em; }
.pill::before { content: ''; width: 7px; height: 7px; background: #27a993; border-radius: 50%; }
.hero { position: relative; overflow: hidden; padding: 92px 0 70px; border-bottom: 1px solid #e9ecf5; background: radial-gradient(ellipse at 22% 8%, #e8f4ff 0%, transparent 38%), radial-gradient(ellipse at 79% 13%, #ebeafe 0%, transparent 42%), linear-gradient(180deg, #fff 0%, #f9fbff 100%); }
.hero h1 { max-width: 870px; font-size: clamp(42px, 5.2vw, 69px); letter-spacing: -.065em; line-height: 1.08; margin: 22px 0 22px; font-weight: 820; }
.hero h1 .highlight { color: var(--brand); }
.hero p { max-width: 640px; color: #586983; font-size: 18px; margin: 0; line-height: 1.75; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; align-items: center; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; appearance: none; border: 1px solid transparent; padding: 12px 18px; border-radius: 12px; font-size: 14px; line-height: 1.2; font-weight: 760; background: var(--brand); color: white; text-decoration: none; transition: .15s ease; white-space: nowrap; }
.button:hover:not(:disabled) { color: #fff; background: var(--brand-dark); transform: translateY(-1px); }
.button.secondary { background: var(--paper); color: #30415d; border-color: #dce3f2; }
.button.secondary:hover:not(:disabled) { background: #f6f8fd; color: var(--brand); }
.button.ghost { padding: 10px 12px; background: transparent; color: #506580; border-color: transparent; }
.button.ghost:hover:not(:disabled) { background: #eef1fa; color: #3449d8; }
.button .arrow { font-size: 18px; line-height: 1; }
.social-proof { display: flex; gap: 21px; flex-wrap: wrap; align-items: center; margin-top: 25px; color: #63728a; font-size: 12px; font-weight: 600; }
.social-proof span { display: inline-flex; align-items: center; gap: 7px; }
.social-proof .tick { color: #099378; font-size: 16px; }
.section { padding: 64px 0; }
.section-suptitle { color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800; }
.section-heading { font-size: clamp(27px,3.1vw,38px); letter-spacing: -.045em; line-height: 1.2; margin: 6px 0 10px; }
.section-subtitle { color: var(--muted); max-width: 680px; margin-top: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 28px; }
.tool-card { position: relative; background: white; border: 1px solid #e1e6f1; box-shadow: 0 6px 35px rgba(25,46,98,.035); padding: 29px; border-radius: 19px; display: flex; flex-direction: column; text-decoration: none; transition: .2s ease; min-height: 232px; }
.tool-card:hover { transform: translateY(-4px); border-color: #adb6f3; box-shadow: 0 18px 38px rgba(52,73,216,.075); color: inherit; }
.tool-symbol { display: grid; place-items: center; font-size: 28px; height: 52px; width: 52px; border-radius: 16px; background: #eaf0ff; color: var(--brand); }
.tool-card h3 { font-size: 20px; letter-spacing: -.03em; margin: 18px 0 7px; }
.tool-card p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 18px; }
.card-link { margin-top: auto; font-size: 13px; color: var(--brand); font-weight: 750; }
.detail-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.detail { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.detail-icon { display: inline-flex; color: var(--brand); background: #eef1ff; border-radius: 10px; width: 37px; height: 37px; align-items: center; justify-content: center; font-size: 20px; }
.detail h3 { margin: 13px 0 6px; font-size: 16px; }
.detail p { margin: 0; color: var(--muted); font-size: 13px; }
.page-hero { background: radial-gradient(ellipse at 85% 0%, #ebecff 0%, transparent 35%), #fff; padding: 46px 0 33px; }
.breadcrumb { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; font-size: 12px; color: #7d8798; margin-bottom: 18px; }
.breadcrumb a { color: #536989; text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.page-hero h1 { margin: 14px 0 12px; letter-spacing: -.055em; font-size: clamp(34px,4.7vw,54px); line-height: 1.15; max-width: 810px; }
.page-hero p { font-size: 16px; color: #5e7089; max-width: 720px; margin: 0; line-height: 1.8; }
.workspace-wrap { padding: 32px 0 56px; background: #f7f9fe; }
.workspace { border: 1px solid #e0e7f3; background: #fff; border-radius: 19px; padding: 24px; box-shadow: var(--shadow); }
.workspace-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 0 0 19px; border-bottom: 1px solid var(--line); }
.workspace-header h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.workspace-sub { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.private-tag { display: inline-flex; gap: 7px; align-items: center; background: #e9f7f1; color: #1b785d; font-weight: 750; border-radius: 22px; font-size: 11px; padding: 7px 11px; }
.private-tag::before { content: '●'; font-size: 8px; }
.workspace-body { padding-top: 22px; }
.upload { background: #fbfcff; border: 1.5px dashed #adbce0; border-radius: 14px; display: flex; justify-content: center; align-items: center; flex-direction: column; padding: 27px 18px; text-align: center; cursor: pointer; transition: .15s; }
.upload:hover, .upload.dragover { border-color: var(--brand); background: #f2f5ff; }
.upload-icon { width: 43px; height: 43px; display: grid; place-items: center; background: #eef1ff; color: var(--brand); border-radius: 13px; font-size: 22px; margin-bottom: 8px; }
.upload strong { display: block; font-size: 14px; }
.upload small { color: #7b8aa0; font-size: 12px; }
.upload .button { margin: 10px 0 8px; }
.upload-filename { color: #76869d; font-size: 11px; margin: 9px 0 0; max-width: 100%; overflow-wrap: anywhere; }
.options { display: flex; flex-wrap: wrap; gap: 15px; align-items: end; margin: 19px 0 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 210px; flex: 1; }
.field label { font-size: 12px; font-weight: 750; color: #485874; }
.field select, .field input { background: white; border: 1px solid #d5ddeb; border-radius: 10px; color: #26344d; padding: 11px 12px; min-height: 44px; width: 100%; }
.field-hint { color: #79869a; font-size: 12px; align-self: center; flex: 1; min-width: 190px; }
.editor-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 17px; margin-top: 23px; }
.editor-panel { min-width: 0; }
.editor-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 9px; }
.editor-heading label { color: #2d3c58; font-size: 13px; font-weight: 780; }
.editor-heading span { font-size: 11px; color: #8995a7; }
.editor-textarea { display: block; width: 100%; min-height: 310px; resize: vertical; padding: 17px; color: #35415c; background: #fcfdff; border: 1px solid #dce2ed; border-radius: 11px; font: 12.5px/1.75 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; tab-size: 2; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.editor-textarea.result { background: #f7f9ff; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; padding-top: 17px; }
.toolbar-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.status { color: #5c6e89; font-size: 13px; margin: 0; }
.status[data-kind="success"] { color: #15745b; }
.status[data-kind="error"] { color: #b04833; }
.warnings { margin: 17px 0 0; padding: 15px 17px; background: #fff9ed; border: 1px solid #f4dfad; border-radius: 11px; color: #795325; font-size: 12px; }
.warnings ul { margin: 5px 0 0; padding-left: 21px; }
.warnings li + li { margin-top: 4px; }
.warnings[hidden] { display: none; }
.article-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(280px,1fr); gap: 44px; }
.article h2 { font-size: 27px; letter-spacing: -.035em; margin: 32px 0 10px; line-height: 1.25; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 17px; margin: 20px 0 7px; }
.article p, .article li { color: #596a82; font-size: 14px; line-height: 1.85; }
.article ol, .article ul { padding-left: 23px; }
.article code { background: #f2f4fa; padding: 2px 5px; color: #3550aa; border-radius: 4px; font-size: 12px; }
.article .callout { padding: 18px 20px; border-left: 3px solid var(--brand); background: #f3f6ff; margin-top: 23px; font-size: 13px; color: #586a83; }
.side-card { background: white; border: 1px solid var(--line); padding: 24px; border-radius: 16px; margin-bottom: 16px; }
.side-card h3 { font-size: 15px; margin: 0 0 14px; }
.side-card a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: #4d5f7a; font-size: 13px; font-weight: 620; }
.side-card a:last-child { border-bottom: none; padding-bottom: 0; }
.side-card a:hover { color: var(--brand); }
.side-card p { color: #67778d; font-size: 13px; margin: 0; }
.faq-list details { background: #fff; border: 1px solid var(--line); padding: 17px 19px; border-radius: 11px; margin-bottom: 9px; }
.faq-list summary { cursor: pointer; font-size: 14px; font-weight: 750; }
.faq-list p { margin: 11px 0 0; font-size: 13px; color: #66778f; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 34px; background: white; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner p { color: #7a889b; font-size: 12px; margin: 0; }
.footer-inner a { color: #65758b; text-decoration: none; font-size: 12px; }
.footer-inner a:hover { color: var(--brand); }
.small-print { font-size: 12px; color: #8390a2; }
@media (max-width: 900px) {
  .nav { gap: 0; }
  .nav a { padding: 8px; }
  .article-grid { grid-template-columns: 1fr; gap: 22px; }
  .side-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .side-card { margin-bottom: 0; }
}
@media (max-width: 650px) {
  .container { padding: 0 18px; }
  .header-inner { min-height: 68px; flex-wrap: wrap; padding-top: 13px; padding-bottom: 9px; }
  .logo { font-size: 19px; }
  .nav { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 2px; }
  .nav a { font-size: 12px; padding: 6px 9px; }
  .hero { padding: 62px 0 58px; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 16px; }
  .section { padding: 45px 0; }
  .tool-grid, .detail-strip, .editor-grid, .side-column { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; padding: 23px; }
  .page-hero { padding: 27px 0; }
  .page-hero h1 { font-size: 35px; }
  .workspace-wrap { padding: 18px 0 38px; }
  .workspace { padding: 17px; border-radius: 14px; }
  .editor-grid { gap: 16px; }
  .editor-textarea { min-height: 210px; }
  .field { min-width: 100%; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .button { flex: 1; }
  .status { order: 1; }
}

.section-muted { background: #f5f7fc; }
.article-narrow { max-width: 800px; }
/* FileFixLab v2 additions */
.uncolored-link { color: inherit; text-decoration: none; }
.uncolored-link:hover { color: var(--brand); }
.lab-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; align-items:end; }
.lab-fields .field { min-width:0; }
.lab-output { margin-top:20px; overflow-wrap:anywhere; }
.lab-output:empty { display:none; }
.lab-table-wrap { max-width:100%; overflow:auto; border:1px solid #dce2ed; border-radius:12px; }
.lab-table { width:100%; border-collapse:collapse; text-align:left; font-size:13px; line-height:1.6; }
.lab-table tr+tr { border-top:1px solid #e6ebf3; }
.lab-table th, .lab-table td { padding:9px 13px; max-width:420px; overflow-wrap:anywhere; vertical-align:top; }
.lab-table th { color:#394e77; background:#f5f7ff; font-weight:700; }
.lab-pre { white-space:pre-wrap; overflow-wrap:anywhere; background:#f6f8fd; color:#354462; border-radius:12px; padding:18px; max-height:420px; overflow:auto; font:12px/1.6 ui-monospace,monospace; }
.lab-canvas { display:block; width:100%; height:auto; touch-action:none; background:#f7f9ff; border:1px solid #dae2f3; border-radius:12px; margin:20px 0; }
.lab-canvas[hidden]{display:none;}
.lab-hint { font-size:13px; color:#66778d; padding:16px 0 7px; }
.visually-hidden { position:absolute; height:1px; width:1px; padding:0; border:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
@media (max-width:650px){.lab-fields {grid-template-columns:1fr;}.lab-table th,.lab-table td {padding:8px 10px;}}

/* Searchable directory and compact workspaces. */
[hidden] { display: none !important; }
.container { max-width: 1280px; }
.site-header { background: #fff; }
.header-inner { min-height: 76px; gap: 24px; }
.logo { flex-shrink: 0; }
.logo-mark { border-radius: 10px; box-shadow: none; }
.nav { margin-left: auto; }
.header-search { display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: 12px; font-weight: 650; white-space: nowrap; }
.header-search > span { font-size: 23px; line-height: 1; }
.directory-hero { padding: 43px 0 32px; text-align: center; background: radial-gradient(ellipse at 50% 0%, #edf0ff, transparent 72%), #fff; border-bottom: 1px solid var(--line); }
.directory-eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; color: #646e89; font-size: 10px; font-weight: 750; letter-spacing: .14em; }
.directory-eyebrow > span { width: 6px; height: 6px; background: #5c6be3; border-radius: 50%; }
.directory-hero h1 { margin: 10px 0 8px; font-size: clamp(30px, 3.2vw, 43px); line-height: 1.2; letter-spacing: -.045em; }
.directory-hero p { margin: 0 auto; max-width: 680px; font-size: 14px; color: var(--muted); }
.directory-search-wrap { position: relative; max-width: 620px; margin: 23px auto 15px; }
.directory-search-wrap input { width: 100%; height: 54px; border: 1px solid #cbd2e6; border-radius: 11px; padding: 0 48px; background: #fff; color: var(--ink); font-size: 14px; box-shadow: 0 4px 14px #3449d809; }
.directory-search-wrap input::placeholder { color: #7c879e; }
.search-icon { position: absolute; left: 18px; top: 8px; font-size: 27px; color: #7b87a0; pointer-events: none; }
.directory-search-wrap kbd { position: absolute; right: 17px; top: 15px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; color: #8a93a5; font-family: inherit; font-size: 12px; line-height: 22px; pointer-events: none; }
.directory-trust { display: flex; justify-content: center; gap: 23px; margin-top: 15px; font-size: 11px; color: #6d7a90; }
.directory-section { padding: 34px 0 40px; }
.directory-layout { display: grid; grid-template-columns: 198px minmax(0, 1fr); gap: 34px; align-items: start; }
.directory-sidebar { position: sticky; top: 24px; }
.sidebar-label { margin: 9px 0 16px 12px; color: #818ba0; font-size: 10px; font-weight: 750; letter-spacing: .09em; }
.category-nav { display: flex; flex-direction: column; gap: 5px; }
.category-link { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: #596781; font-size: 13px; font-weight: 600; }
.category-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.category-link:hover { background: #f0f3fa; }
.category-link.selected { background: #ebedff; color: #3546c7; }
.category-count { margin-left: auto; font-size: 11px; font-weight: 500; opacity: .85; }
.directory-note { margin: 28px 10px 0; padding-top: 23px; border-top: 1px solid var(--line); }
.note-icon { display: block; color: #6a80a2; font-size: 24px; margin-bottom: 8px; }
.directory-note strong { display: block; font-size: 12px; font-weight: 650; }
.directory-note p { color: #78859b; font-size: 12px; line-height: 1.8; margin: 8px 0 13px; }
.directory-note a { text-decoration: none; font-size: 11px; color: #5a69a1; }
.directory-results { min-width: 0; }
.directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 21px; min-height: 57px; }
.directory-toolbar h2 { display: flex; align-items: center; gap: 9px; font-size: 21px; letter-spacing: -.035em; margin: 0 0 3px; }
#directory-count { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; height: 23px; padding: 0 6px; border-radius: 6px; font-size: 11px; letter-spacing: 0; font-weight: 650; color: #6c7690; background: #eaf0f7; }
#directory-summary { margin: 0; color: #7b879b; font-size: 12px; overflow-wrap: anywhere; }
.processing-filter { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.processing-filter label { font-size: 11px; color: #7b879b; }
.processing-filter select { padding: 8px 27px 8px 11px; border: 1px solid #dfe5f0; border-radius: 7px; font-size: 12px; background: #fff; color: #506079; min-height: 38px; }
.directory-results .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.directory-results .tool-card { padding: 19px; min-height: 208px; border-radius: 11px; box-shadow: 0 2px 4px #192e6202; }
.directory-results .tool-card:hover { transform: translateY(-2px); border-color: #9ba9e8; box-shadow: 0 6px 18px #3449d80a; }
.card-top { display: flex; align-items: center; gap: 9px; }
.directory-results .tool-symbol { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; background: #eeefff; color: #6863c9; }
.tool-symbol svg { width: 18px; height: 18px; }
.directory-results .category-csv { background: #eaf6ef; color: #3b8a67; }
.directory-results .category-image { background: #fff0e7; color: #bc794d; }
.directory-results .category-3d-print { background: #e9f3fb; color: #3c83a9; }
.directory-results .category-developer { background: #eef0f6; color: #637697; }
.card-category { font-size: 10px; color: #8490a3; }
.card-arrow { margin-left: auto; color: #9da7bc; font-size: 17px; }
.directory-results .tool-card h3 { font-size: 15px; line-height: 1.4; letter-spacing: -.02em; margin: 14px 0 6px; font-weight: 700; }
.directory-results .tool-card p { font-size: 12px; line-height: 1.7; color: #77849a; margin: 0 0 18px; }
.card-meta { margin-top: auto; padding-top: 11px; border-top: 1px solid #eff2f7; display: flex; gap: 7px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.card-formats { font-size: 10px; color: #8a95a7; }
.processing-badge { font-size: 10px; font-weight: 600; white-space: nowrap; }
.processing-badge.local { color: #438272; }
.processing-badge.server { color: #9e773c; }
.directory-empty { text-align: center; padding: 65px 24px; border: 1px dashed #d6ddee; border-radius: 12px; background: #fff; }
.directory-empty > span { font-size: 38px; color: #7b87a0; }
.directory-empty h3 { margin: 7px 0; font-size: 20px; }
.directory-empty p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.directory-bottom { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 25px; font-size: 11px; color: #8590a3; }
.directory-bottom a { text-decoration: none; }
.tool-page .page-hero { padding: 24px 0; background: #fff; }
.tool-page .breadcrumb { margin-bottom: 12px; }
.tool-page .page-hero h1 { font-size: 32px; margin: 0 0 10px; max-width: 100%; letter-spacing: -.035em; }
.tool-page .page-hero p { font-size: 14px; max-width: 850px; line-height: 1.7; }
.tool-page .page-hero .pill { display: none; }
.tool-page .workspace-wrap { padding: 24px 0 36px; }
.tool-page .workspace { border-radius: 12px; box-shadow: 0 6px 24px #17295204; }
.tool-page .workspace-header { padding-bottom: 13px; }
.tool-page .workspace-header h2 { font-size: 15px; }
.tool-page .workspace-body { padding-top: 16px; }
.tool-page .editor-textarea { min-height: 250px; }
.tool-page .upload { position: relative; padding: 16px; }
.tool-page .upload-icon { display: none; }
.tool-page .upload .button { margin: 10px 0 2px; }
.tool-page .upload-filename { margin-top: 5px; }
.tool-page .toolbar { padding: 16px 0 0; }
.tool-page .toolbar .status { flex-basis: 100%; font-size: 12px; }
.tool-page .section { padding: 38px 0; }
.tool-page .article h2 { font-size: 22px; }
@media (max-width: 1100px) {
 .directory-results .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .directory-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 24px; }
 .header-inner { gap: 12px; }
 .header-search { padding: 8px 10px; }
}
@media (max-width: 760px) {
 .header-inner { flex-wrap: wrap; padding-top: 14px; padding-bottom: 10px; }
 .header-inner .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; white-space: nowrap; gap: 6px; }
 .header-search { margin-left: auto; }
 .directory-hero { padding: 30px 0 24px; }
 .directory-layout { grid-template-columns: 1fr; gap: 23px; }
 .directory-sidebar { position: static; min-width: 0; }
 .sidebar-label, .directory-note { display: none; }
 .category-nav { flex-direction: row; gap: 7px; overflow-x: auto; padding-bottom: 7px; }
 .category-link { flex-shrink: 0; border: 1px solid var(--line); padding: 8px 11px; min-height: 40px; font-size: 12px; gap: 7px; background: #fff; }
 .category-link.selected { border-color: #cfd3f4; }
 .category-link svg { width: 15px; height: 15px; }
 .category-count { font-size: 10px; margin-left: 3px; }
 .directory-section { padding-top: 19px; }
 .processing-filter label { display: none; }
}
@media (max-width: 650px) {
 .header-inner .nav { gap: 0; }
 .header-inner .nav a { padding: 6px 8px; }
 .header-search { font-size: 11px; }
 .directory-hero h1 { font-size: 29px; }
 .directory-hero p { font-size: 13px; max-width: 350px; }
 .directory-eyebrow { font-size: 9px; }
 .directory-search-wrap { margin-top: 19px; }
 .directory-search-wrap input { height: 50px; padding-left: 41px; padding-right: 14px; font-size: 16px; }
 .search-icon { left: 14px; top: 7px; }
 .directory-search-wrap kbd { display: none; }
 .directory-trust { gap: 12px; font-size: 9px; }
 .directory-toolbar { margin-bottom: 15px; gap: 10px; }
 .directory-toolbar h2 { font-size: 20px; }
 #directory-summary { font-size: 11px; }
 .processing-filter select { max-width: 144px; font-size: 11px; }
 .directory-results .tool-grid { grid-template-columns: 1fr; gap: 11px; }
 .directory-results .tool-card { min-height: 0; padding: 16px; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; }
 .card-top { grid-row: 1 / 4; align-self: start; }
 .card-category, .card-arrow { display: none; }
 .directory-results .tool-card h3 { grid-column: 2; margin: 0 0 4px; font-size: 15px; }
 .directory-results .tool-card p { grid-column: 2; margin-bottom: 11px; font-size: 12px; }
 .card-meta { grid-column: 2; padding-top: 9px; }
 .directory-bottom { font-size: 10px; }
 .tool-page .page-hero { padding: 21px 0; }
 .tool-page .page-hero h1 { font-size: 27px; }
 .tool-page .page-hero p { font-size: 13px; }
 .tool-page .workspace-wrap { padding-top: 16px; }
 .tool-page .workspace { padding: 16px; }
 .tool-page .workspace-header { gap: 10px; }
 .tool-page .editor-textarea { min-height: 190px; }
 .tool-page .toolbar-actions .button { font-size: 12px; padding: 10px; }
 .tool-page .upload small { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 .tool-card, .button { transition: none; }
}

/* Selected files replace the empty drop prompt with a visible, actionable list. */
.tool-page .upload.has-files { border: 1.5px solid #7b9cda; background: #f2f6ff; align-items: stretch; text-align: left; cursor: default; }
.upload.has-files > strong { color: #254c87; font-size: 15px; }
.upload.has-files > strong::before { content: '✓'; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: #dce9ff; }
.upload.has-files > .button { align-self: flex-start; }
.selected-files { list-style: none; padding: 0; margin: 14px 0 0; width: 100%; max-height: 320px; overflow-y: auto; }
.selected-file { display: flex; align-items: center; gap: 12px; padding: 14px; background: white; border: 1px solid #dbe4f3; border-radius: 10px; }
.selected-file + .selected-file { margin-top: 8px; }
.file-type { flex: 0 0 46px; height: 52px; display: grid; place-items: center; border-radius: 8px; background: #eaf0fe; color: #3459a0; font-size: 11px; font-weight: 800; }
.selected-file-info { flex: 1; min-width: 0; }
.upload .selected-file-info strong { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; color: #23354e; }
.selected-file-info > span { display: block; margin-top: 3px; font-size: 12px; color: #66768d; }
.file-remove { flex-shrink: 0; min-height: 40px; padding: 8px 10px; border: 1px solid #dbe4f3; border-radius: 7px; background: white; color: #596a81; font: inherit; font-size: 12px; cursor: pointer; }
.file-remove:hover { color: #a12e40; background: #fff4f5; border-color: #e5b8c0; }
.upload:focus-visible, .file-remove:focus-visible { outline: 3px solid #4775d1; outline-offset: 3px; }
.second-upload { margin-top: 16px; }
@media(max-width: 480px) {
 .selected-file { gap: 9px; padding: 10px; flex-wrap: wrap; }
 .file-type { flex-basis: 38px; height: 44px; font-size: 10px; }
 .selected-file-info { flex-basis: calc(100% - 50px); }
 .file-remove { margin-left: 47px; }
}
.tool-page .upload.has-files { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.upload.has-files > strong, .upload.has-files > small { grid-column: 1; }
.tool-page .upload.has-files > .button { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0; }
.upload.has-files > .upload-filename, .upload.has-files > .selected-files { grid-column: 1 / -1; }
.upload.has-files > .selected-files { margin-top: 8px; }
@media(max-width: 480px) {
 .tool-page .upload.has-files { gap: 4px 8px; }
 .tool-page .upload.has-files > .button { padding: 9px 10px; font-size: 12px; }
}

.mesh-viewer { margin: 20px 0; border: 1px solid #dbe4f3; border-radius: 14px; padding: 16px; background: #fbfcff; }
.mesh-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.mesh-toolbar .field { flex: 1 1 180px; margin: 0; min-width: 0; }
.mesh-toolbar select { width: 100%; max-width: 100%; }
.mesh-camera { display: flex; flex-wrap: wrap; gap: 6px; }
.mesh-camera button { border: 1px solid #ccd7eb; border-radius: 7px; background: white; color: #345172; padding: 10px 12px; cursor: pointer; }
.mesh-camera button:focus-visible { outline: 3px solid #4775d1; outline-offset: 2px; }
.mesh-viewer .lab-canvas { display: block; width: 100%; height: 480px; max-height: 65vh; margin: 12px 0; touch-action: none; cursor: grab; }
.mesh-viewer .lab-canvas:active { cursor: grabbing; }
.mesh-viewer .lab-canvas:focus-visible { outline: 3px solid #4775d1; outline-offset: 2px; }
@media(max-width:480px) { .mesh-viewer { padding: 12px; } .mesh-toolbar .field { flex-basis: 100%; } .mesh-viewer .lab-canvas { height: 340px; } }
