:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17241e;
  background: #edf2ee;
  font-synthesis: none;
  line-height: 1.5;
  --ink: #17241e;
  --muted: #64766c;
  --line: #d6e2da;
  --paper: #ffffff;
  --green: #178953;
  --green-bright: #57d68b;
  --green-soft: #e4f7ea;
  --amber: #9a6223;
  --amber-soft: #fff2dd;
  --night: #0d2018;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(circle at 90% 0%, #d7ece0 0, transparent 30rem), #edf2ee; }
button, select, textarea, input { font: inherit; }
a { color: inherit; }
.site-chrome { position: relative; z-index: 30; width: 100%; background: rgba(13,32,24,.98); border-bottom: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(14px); }
.site-chrome__inner { width: min(1180px, calc(100% - 32px)); min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 0 auto; }
.site-brand { flex: none; display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.site-brand img { display: block; width: 50px; height: 68px; object-fit: contain; }
.site-brand__text small,.site-brand__text strong{display:block}.site-brand__text small{color:var(--green-bright);font-size:.66rem;font-weight:850;letter-spacing:.12em;line-height:1.2;text-transform:uppercase}.site-brand__text strong{margin-top:3px;color:#fff;font-size:.96rem;line-height:1.2}
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(14px, 2vw, 28px); }
.site-nav a { position: relative; color: #fff; font-size: .72rem; font-weight: 850; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.site-nav a::after { content: ""; position: absolute; right: 0; bottom: -7px; left: 0; height: 1px; background: var(--green); transform: scaleX(0); transform-origin: right; transition: transform .18s ease; }
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.site-nav a:focus-visible, .site-brand:focus-visible, .site-nav-mobile summary:focus-visible, .site-nav-mobile nav a:focus-visible { outline: 3px solid rgba(23,137,83,.28); outline-offset: 5px; }
.site-nav__account { padding: 9px 12px; color: var(--night) !important; background: var(--green-bright); border-radius: 999px; }
.site-nav__account::after { display: none; }
.site-nav-mobile { display: none; position: relative; margin-left: auto; }
.site-nav-mobile summary { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; cursor: pointer; list-style: none; border-radius: 50%; }
.site-nav-mobile summary::-webkit-details-marker { display: none; }
.site-nav-mobile__icon { width: 25px; display: grid; gap: 5px; }
.site-nav-mobile__icon i { display: block; height: 2px; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
.site-nav-mobile[open] .site-nav-mobile__icon i:first-child { transform: translateY(7px) rotate(45deg); }
.site-nav-mobile[open] .site-nav-mobile__icon i:nth-child(2) { opacity: 0; }
.site-nav-mobile[open] .site-nav-mobile__icon i:last-child { transform: translateY(-7px) rotate(-45deg); }
.site-nav-mobile nav { position: absolute; top: calc(100% + 11px); right: 0; width: min(330px, calc(100vw - 30px)); display: grid; padding: 10px 18px 14px; background: rgba(13,32,24,.99); border: 1px solid rgba(255,255,255,.14); border-radius: 0 0 16px 16px; box-shadow: 0 18px 45px rgba(13,32,24,.24); }
.site-nav-mobile nav a { padding: 13px 2px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.14); font-size: .82rem; font-weight: 850; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.site-nav-mobile nav a:last-child { color: var(--green-bright); border-bottom: 0; }
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 28px; }

.share-panel { display: block; margin-top: 18px; padding: 24px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 30px rgba(22, 60, 39, .055); }
.share-panel h2 { margin: 0; color: var(--night); font-size: 1.2rem; letter-spacing: -.025em; }
.share-links { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.share-link { display: grid; place-items: center; width: 48px; min-width: 48px; height: 48px; min-height: 48px; color: #fff; text-decoration: none; transition: filter .16s ease, transform .16s ease; }
.share-link span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .72rem; font-weight: 900; line-height: 1; }
.share-link--facebook span { background: #0866ff; }
.share-link--x span { background: #000; }
.share-link--pinterest span { background: #cb2027; }
.share-link--email span { color: #334047; background: #eceeef; }
.share-link:hover { filter: brightness(.92); transform: translateY(-2px); }
.share-link:focus-visible { outline: 3px solid #1687ff; outline-offset: 3px; }

.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-bottom: 24px; }
.hero-copy { max-width: 760px; }
.eyebrow, .section-kicker { margin: 0 0 6px; color: var(--green); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 0; color: var(--night); font-size: clamp(2.8rem, 7vw, 5.8rem); line-height: .92; letter-spacing: -.075em; }
.lead { max-width: 650px; margin: 14px 0 0; color: #40544a; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 0; color: #4e665a; font-size: .88rem; font-weight: 700; }
.hero-links a:hover { color: var(--green); }
.hero-status { display: grid; justify-items: end; gap: 8px; }
.privacy-badge, .stage-badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.privacy-badge { color: #176c43; background: var(--green-soft); border: 1px solid #bfe6cc; }
.stage-badge { color: var(--amber); background: var(--amber-soft); border: 1px solid #efd3a7; }
.stage-badge.ready { color: #176c43; background: var(--green-soft); border-color: #bfe6cc; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.release-note { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(480px, 1.2fr); align-items: center; gap: 28px; padding: 22px 24px; margin-bottom: 18px; color: white; background: var(--night); border-radius: 20px; box-shadow: 0 18px 45px rgba(13, 32, 24, .14); }
.release-note .section-kicker { color: var(--green-bright); }
.release-note h2 { margin: 0; max-width: 470px; font-size: 1.16rem; line-height: 1.35; letter-spacing: -.02em; }

.workflow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel { min-width: 0; padding: 23px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 30px rgba(22, 60, 39, .055); }
.panel-file, .panel-config, .panel-process, .panel-preflight, .panel-optimizer, .panel-studio, .panel-release { grid-column: 1 / -1; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.panel h2 { margin: 0; color: var(--night); font-size: 1.2rem; letter-spacing: -.025em; }
.status, .score { flex: none; padding: 6px 10px; border-radius: 999px; font-size: .77rem; font-weight: 850; white-space: nowrap; }
.status.neutral { color: #62726a; background: #edf2ee; }
.status.blocked { color: var(--amber); background: var(--amber-soft); }
.status.ready, .score { color: #176c43; background: var(--green-soft); }
.score.pending { color: var(--amber); background: var(--amber-soft); }

.dropzone { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; color: #3f5b4d; background: #f7fcf8; border: 1.5px dashed #9ecbad; border-radius: 16px; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--green); background: #eef9f1; transform: translateY(-1px); }
.dropzone input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.drop-icon { display: grid; place-items: center; width: 42px; height: 42px; color: #167744; background: var(--green-soft); border-radius: 50%; font-size: 1.7rem; line-height: 1; }
.dropzone strong { font-size: 1rem; }
.dropzone small, .field-help, .machine small, .manual-gates small { color: var(--muted); font-size: .8rem; }
.field-help { margin: 11px 0 0; }
.file-summary { display: flex; justify-content: space-between; gap: 16px; margin-top: 13px; padding: 11px 13px; border-radius: 11px; font-size: .83rem; }
.file-summary.ok { color: #176c43; background: var(--green-soft); }
.file-summary.error { color: #934725; background: #fff0e8; }
.file-summary span { text-align: right; }
.archive-details { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.archive-details > div { min-width: 0; padding: 10px 11px; background: #f6f9f7; border: 1px solid #e2ebe5; border-radius: 11px; }
.archive-details dt { color: var(--muted); font-size: .72rem; font-weight: 800; }
.archive-details dd { margin: 4px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: .82rem; font-weight: 800; }
.model-preview { margin-top: 14px; padding: 14px; background: #f3f7f4; border: 1px solid #d8e5dc; border-radius: 16px; }
.model-preview__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.model-preview__heading h3 { margin: 0; color: var(--night); font-size: 1rem; }
.model-dimensions { padding: 6px 9px; color: #176c43; background: var(--green-soft); border-radius: 999px; font-size: .76rem; white-space: nowrap; }
.model-preview__stage { position: relative; width: 100%; height: clamp(280px, 42vw, 470px); overflow: hidden; background: #f3f7f4; border: 1px solid #dbe7de; border-radius: 12px; touch-action: none; }
.model-preview__stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.model-preview__stage canvas:active { cursor: grabbing; }
.model-preview__empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; color: var(--muted); text-align: center; pointer-events: none; }
.model-preview__status { margin: 9px 2px 0; color: var(--muted); font-size: .78rem; }
.hidden { display: none; }

.machine-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.machine { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) 18px; align-items: center; gap: 12px; padding: 13px; color: var(--ink); text-align: left; background: white; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.machine:hover { border-color: #7abe91; }
.machine.selected { background: #f1fbf4; border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.machine-code { color: var(--green); font-size: .82rem; font-weight: 900; }
.machine strong, .machine small { display: block; }
.machine small { margin-top: 2px; }
.machine-selected-label { display: inline-block; margin-top: 7px; padding: 3px 7px; color: white; background: var(--green); border-radius: 999px; font-size: .66rem; font-style: normal; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.radio { justify-self: end; width: 16px; height: 16px; border: 1px solid #95a99e; border-radius: 50%; }
.machine.selected .radio { border: 5px solid var(--green); }
.machine-compatibility { margin: -3px 0 16px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; font-size: .8rem; line-height: 1.45; }
.machine-compatibility.neutral { color: var(--muted); background: #f6f9f7; }
.machine-compatibility.ok { color: #17653a; background: #effaf3; border-color: #a9dabb; }
.machine-compatibility.error { color: #7a321c; background: #fff5ef; border-color: #e5b9a5; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field span { display: block; margin: 0 0 6px; color: #4c6257; font-size: .78rem; font-weight: 850; }
select { width: 100%; min-height: 45px; padding: 10px 12px; color: #20342a; background: white; border: 1px solid #c7d6cc; border-radius: 11px; }
input[type="text"], input[type="password"] { width: 100%; min-height: 45px; padding: 10px 12px; color: #20342a; background: white; border: 1px solid #c7d6cc; border-radius: 11px; }
select:focus, input[type="text"]:focus, input[type="password"]:focus, button:focus-visible, .manual-gates input:focus-visible + span { outline: 3px solid rgba(23, 137, 83, .22); outline-offset: 2px; }

.priority-fieldset { min-width: 0; margin: 18px 0 0; padding: 0; border: 0; }
.priority-fieldset legend { margin-bottom: 8px; color: #4c6257; font-size: .78rem; font-weight: 850; }
.priority-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.priority-card { display: flex; gap: 10px; min-width: 0; padding: 12px; background: #f6f9f7; border: 1px solid #e2ebe5; border-radius: 13px; cursor: pointer; }
.priority-card:hover { border-color: #8fc3a1; }
.priority-card.selected { background: #f1fbf4; border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.priority-card input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.priority-card strong, .priority-card small { display: block; }
.priority-card strong { color: var(--night); font-size: .88rem; }
.priority-card small { margin-top: 3px; color: var(--muted); font-size: .77rem; }

.processing-access { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding: 14px; background: #f6f9f7; border: 1px solid #e2ebe5; border-radius: 13px; }
.processing-privacy { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.processing-access > .field-help { grid-column: 1 / -1; margin: -3px 0 0; }
.upload-consent { display: flex; align-items: flex-start; gap: 11px; margin-top: 16px; padding: 14px; background: #fff9ed; border: 1px solid #efd6a8; border-radius: 13px; cursor: pointer; }
.upload-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); }
.upload-consent strong, .upload-consent small { display: block; }
.upload-consent small { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.optimizer-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.optimizer-actions .field-help { margin: 0; }
.processing-policy { margin-top: 16px; color: #40564b; background: #f7f9f8; border: 1px solid #dce6df; border-radius: 13px; }
.processing-policy summary { padding: 13px 15px; color: #2f473a; font-size: .8rem; font-weight: 850; cursor: pointer; }
.processing-policy[open] summary { border-bottom: 1px solid #dce6df; }
.processing-policy > div { display: grid; gap: 8px; padding: 13px 15px 15px; }
.processing-policy p { margin: 0; font-size: .78rem; line-height: 1.55; }
.optimization-results { display: grid; gap: 12px; margin-top: 18px; }
.optimization-summary { display: flex; justify-content: space-between; gap: 16px; padding: 13px 15px; background: var(--green-soft); border: 1px solid #bfe6cc; border-radius: 12px; }
.optimization-summary strong, .optimization-summary span { display: block; }
.optimization-summary span { color: var(--muted); font-size: .78rem; text-align: right; }
.result-card { padding: 16px; background: #f9fbfa; border: 1px solid var(--line); border-radius: 15px; }
.result-card.accepted { border-color: #9ed0ae; box-shadow: inset 3px 0 0 var(--green); }
.result-card.rejected { border-color: #e7c89d; box-shadow: inset 3px 0 0 #c88b3d; }
.result-card.local-candidate { border-color: #9ed0ae; box-shadow: inset 3px 0 0 var(--green); }
.result-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.result-heading small { color: var(--green); font-size: .7rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.result-heading h3 { margin: 2px 0 0; color: var(--night); font-size: 1rem; }
.result-heading > span { padding: 5px 8px; color: #176c43; background: var(--green-soft); border-radius: 999px; font-size: .72rem; font-weight: 850; }
.result-card.rejected .result-heading > span { color: var(--amber); background: var(--amber-soft); }
.result-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.result-metrics > div { min-width: 0; padding: 11px; background: white; border: 1px solid #e2ebe5; border-radius: 10px; }
.result-metrics span, .result-metrics small { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; }
.result-metrics strong { display: block; margin-top: 4px; overflow-wrap: anywhere; color: var(--night); font-size: .82rem; line-height: 1.4; }
.result-metrics strong { color: var(--green); font-size: 1rem; }
.result-card.rejected .result-metrics strong { color: var(--amber); }
.result-metrics small { margin-top: 3px; font-weight: 650; }
.result-tech { margin-top: 10px; color: #40564b; background: #f7f9f8; border: 1px solid #dce6df; border-radius: 11px; }
.result-tech summary { padding: 11px 13px; font-size: .77rem; font-weight: 850; cursor: pointer; }
.result-tech[open] summary { border-bottom: 1px solid #dce6df; }
.result-tech > :not(summary) { margin-left: 13px; margin-right: 13px; }
.result-tech > :last-child { margin-bottom: 13px; }
.result-card dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.result-card dl > div { min-width: 0; padding: 9px; background: white; border: 1px solid #e2ebe5; border-radius: 10px; }
.result-card dt { color: var(--muted); font-size: .7rem; font-weight: 800; }
.result-card dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: .78rem; font-weight: 800; }
.result-card p { margin: 8px 0 0; color: #4d6358; font-size: .8rem; }
.result-card .provenance { color: #6b7e74; font-size: .74rem; }
.download-candidate { display: inline-flex; margin-top: 12px; padding: 9px 12px; color: white; background: var(--green); border: 0; border-radius: 10px; font: inherit; font-size: .8rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.download-candidate:disabled { cursor: wait; opacity: .78; }

.bf-final-gate {
  width: min(560px, calc(100% - 28px));
  max-width: 560px;
  padding: 0;
  border: 1px solid #b7c9c0;
  border-radius: 18px;
  color: #17231d;
  background: #fff;
  box-shadow: 0 24px 80px rgba(5, 32, 22, .24);
}
.bf-final-gate::backdrop { background: rgba(4, 22, 16, .66); }
.bf-final-gate__inner { padding: clamp(24px, 5vw, 38px); }
.bf-final-gate__eyebrow { margin: 0 0 9px; color: #078444; font-size: .78rem; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.bf-final-gate h2 { margin: 0 0 14px; color: #092b20; font-size: clamp(1.65rem, 5vw, 2.25rem); line-height: 1.08; }
.bf-final-gate p { color: #526159; line-height: 1.58; }
.bf-final-gate__actions { display: flex; gap: 12px; margin-top: 24px; }
.bf-final-gate__actions button { min-height: 48px; padding: 11px 18px; border: 0; border-radius: 9px; color: #fff; background: #078444; font: inherit; font-weight: 750; cursor: pointer; }
.bf-final-gate__actions button:hover, .bf-final-gate__actions button:focus-visible { background: #056d39; }
@media (max-width: 520px) {
  .bf-final-gate__actions, .bf-final-gate__actions button { width: 100%; }
}
.result-notices { margin: 0; padding: 12px 12px 12px 31px; color: #6f542c; background: #fff9ed; border: 1px solid #efd6a8; border-radius: 12px; font-size: .78rem; }

.manual-gates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.manual-gates label { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px; background: #f6f9f7; border: 1px solid #e2ebe5; border-radius: 13px; cursor: pointer; }
.manual-gates input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.manual-gates span { min-width: 0; border-radius: 4px; }
.manual-gates strong, .manual-gates small { display: block; }
.manual-gates strong { font-size: .84rem; }
.manual-gates small { margin-top: 3px; }
.studio-version-row { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(280px, 1.3fr); align-items: end; gap: 18px; }
.studio-version-row p { margin: 0 0 4px; color: var(--muted); font-size: .82rem; }
.studio-gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.studio-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 13px 15px; border-radius: 12px; }
.studio-result strong, .studio-result span { display: block; }
.studio-result span { color: var(--muted); font-size: .8rem; text-align: right; }
.studio-result.blocked { background: var(--amber-soft); border: 1px solid #efd6a8; }
.studio-result.ready { background: var(--green-soft); border: 1px solid #bfe6cc; }

.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.check { display: flex; align-items: flex-start; gap: 11px; padding: 12px 13px; background: #f6f9f7; border-radius: 12px; }
.check-icon { flex: none; display: grid; place-items: center; width: 22px; height: 22px; color: #a15f23; background: var(--amber-soft); border-radius: 50%; font-size: .75rem; font-weight: 900; }
.check.ok .check-icon { color: #176c43; background: #d8f2e1; }
.check strong, .check span { display: block; }
.check strong { font-size: .88rem; }
.check span { margin-top: 2px; color: var(--muted); font-size: .78rem; }
.callout { display: flex; gap: 12px; margin-top: 16px; padding: 13px 15px; color: #755322; background: #fff9ed; border: 1px solid #efd6a8; border-radius: 12px; font-size: .82rem; }
.callout strong { flex: none; }
.callout--positive { color: #17653a; background: #effaf3; border-color: #a9dabb; }

.release-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: 18px; }
.release-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.primary, .secondary, .text-button { min-height: 42px; padding: 10px 14px; border: 0; border-radius: 11px; font-weight: 850; cursor: pointer; }
.primary { color: white; background: var(--green); }
.primary:hover { background: #116f42; }
.secondary { color: #176c43; background: var(--green-soft); }
.text-button { color: var(--muted); background: transparent; }
.primary:disabled { cursor: not-allowed; opacity: .45; }
textarea { width: 100%; min-height: 240px; resize: vertical; padding: 13px; color: #344b3f; background: #f9fbfa; border: 1px solid #d3e0d7; border-radius: 12px; font: 500 .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }

footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 24px 0 0; color: #75867d; font-size: .77rem; }
footer span:not(:first-child)::before { content: "·"; margin-right: 20px; }

/* R131 · testo operativo e dettagli su richiesta */
.bf-purpose {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin: 0 0 22px;
  padding: clamp(18px, 2.4vw, 26px);
  color: #eef8f2;
  background: linear-gradient(135deg, #082d21 0%, #0c3a2a 100%);
  border: 1px solid #174d39;
  border-radius: 20px;
}
.bf-purpose .section-kicker { color: #72d79b; }
.bf-purpose__intro { flex: 1 1 300px; min-width: 0; }
.bf-purpose__intro h2 { margin: 4px 0 7px; color: #fff; font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.12; letter-spacing: -.015em; }
.bf-purpose__intro > p:last-child { margin: 0; color: #c8ddd2; font-size: .92rem; line-height: 1.45; }
.bf-purpose__actions { display: flex; flex: 1 1 390px; flex-wrap: wrap; gap: 8px; }
.bf-purpose__actions span { padding: 8px 11px; color: #eaf7ef; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-size: .78rem; font-weight: 780; }
.bf-purpose__boundary { flex: 1 1 100%; margin: 0; padding: 10px 12px; color: #d5e7de; background: rgba(255,255,255,.045); border-left: 3px solid #71d99b; border-radius: 0 10px 10px 0; font-size: .82rem; line-height: 1.4; }
.bf-purpose__boundary strong { color: #fff; }
.bf-purpose__technical { flex: 1 1 100%; color: #d5e7de; border-top: 1px solid rgba(255,255,255,.14); }
.bf-purpose .bf-purpose__technical > summary { padding: 12px 0 0; color: #fff !important; font-size: .82rem; font-weight: 800; cursor: pointer; }
.bf-purpose__technical > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 14px; }
.bf-purpose__technical p { margin: 0; font-size: .79rem; line-height: 1.52; }
.bf-purpose__technical strong { color: #fff; }

/* Prima del caricamento il compito e l'azione vengono prima di una cornice 3D vuota. */
body:not(.bf-project-ready) #model-preview { display: none !important; }
.archive-disclosure { margin-top: 14px; color: #40564b; border: 1px solid #dce6df; border-radius: 12px; }
.archive-disclosure > summary { padding: 11px 13px; color: #2f473a; font-size: .8rem; font-weight: 820; cursor: pointer; }
.archive-disclosure[open] > summary { border-bottom: 1px solid #dce6df; }
.archive-disclosure .archive-details { margin: 0; padding: 12px; }
body:not(.bf-project-ready) :is(.panel-config, .panel-process, .panel-preflight, .panel-optimizer, .panel-studio, .panel-release) { display: none; }
body:not(.bf-project-ready) [data-telaio-consumer="bf"] [data-telaio-configuration] [data-telaio-section]:not([data-telaio-section="file"]) { display: none !important; }

@media (max-width: 900px) {
  .bf-purpose__technical > div { grid-template-columns: 1fr; }
  .release-note { grid-template-columns: 1fr; }
  .field-grid.three, .manual-gates, .studio-gates, .studio-version-row, .processing-access { grid-template-columns: 1fr; }
  .release-layout { grid-template-columns: 1fr; }
  .archive-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .priority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-card dl, .result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .site-chrome__inner { width: 100%; min-height: 82px; padding: 7px 15px; }
  .site-brand img { width: 46px; height: 62px; }
  .site-nav--desktop { display: none; }
  .site-nav-mobile { display: block; }
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 22px, 1180px); padding-top: 24px; }
  .share-panel { padding: 20px; }
  .share-links { gap: 4px; }
  .hero { flex-direction: column; }
  .hero-status { width: 100%; justify-items: start; }
  .stage-badge { max-width: 100%; border-radius: 18px; line-height: 1.35; overflow-wrap: anywhere; white-space: normal; }
  .release-note { padding: 20px; }
  .workflow, .field-grid, .checks { grid-template-columns: 1fr; }
  .panel-file, .panel-config, .panel-process, .panel-preflight, .panel-optimizer, .panel-studio, .panel-release { grid-column: auto; }
  .machine-picker { grid-template-columns: 1fr; }
  .panel { padding: 19px; }
  .panel-heading { flex-direction: column; }
  .file-summary { flex-direction: column; gap: 3px; }
  .file-summary span { text-align: left; }
  .model-preview__heading { flex-direction: column; gap: 7px; }
  .model-preview__stage { height: 300px; }
  .archive-details { grid-template-columns: 1fr; }
  .studio-result { align-items: flex-start; flex-direction: column; }
  .studio-result span { text-align: left; }
  .priority-grid, .result-card dl, .result-metrics { grid-template-columns: 1fr; }
  .bf-purpose { display: grid; gap: 13px; padding: 18px 16px; border-radius: 17px; }
  .bf-purpose__actions { gap: 6px; }
  .bf-purpose__actions span { padding: 7px 9px; }
  .optimizer-actions, .optimization-summary, .result-heading { align-items: flex-start; flex-direction: column; }
  .optimization-summary span { text-align: left; }
  footer { justify-content: flex-start; }
  footer span:not(:first-child)::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Import feedback stays visible without opening configuration or an empty 3D view. */
body.bf-import-feedback #model-preview { display: block !important; height: auto !important; min-height: 0 !important; aspect-ratio: auto !important; background: transparent; }
body.bf-import-feedback #model-preview > :not(#model-preview-stage),
body.bf-import-feedback #model-preview-stage > :not([data-telaio-preview-feedback]) { display: none !important; }
body.bf-import-feedback #model-preview-stage { height: auto !important; min-height: 0 !important; overflow: visible; touch-action: auto; }
body.bf-import-feedback #model-preview-stage [data-telaio-preview-feedback] { position: static !important; transform: none !important; width: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; }
