/* Crescita Imprese — unico foglio di stile dell'app.
   Palette rilevata da crescitaimprese.it il 24 ottobre 2026.
   Testo principale 18px; nessun testo di interfaccia sotto 16px. */

:root {
  --ink: #153b3f;
  --accent: #b74620;
  --lime: #e5f0c7;
  --background: #f4f7f3;
  --muted: #435d60;
  --line: #cbd8d1;
  --font: Arial, Helvetica, sans-serif;
  --display: Arial, Helvetica, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-bottom: 130px; }
body { margin: 0; padding-bottom: 120px; background: var(--background); color: var(--ink); font: 400 18px/1.65 var(--font); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.3; color: inherit; }
h1 { font-size: clamp(32px, 3.7vw, 46px); letter-spacing: -.025em; margin: 10px 0 16px; }
h2 { font-size: 28px; margin: 0 0 18px; }
h3 { font-size: 23px; margin: 0 0 14px; }
h4 { font-size: 20px; margin: 20px 0 9px; }
.container { width: calc(100% - 48px); max-width: 1360px; margin: 0 auto; }
.skip { position: absolute; left: 20px; top: -100px; z-index: 1100; padding: 12px 18px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }
.eyebrow, .tag { font-size: 16px; font-weight: 700; color: var(--accent); letter-spacing: .06em; line-height: 1.5; }
.header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1400px; width: calc(100% - 48px); margin: auto; min-height: 116px; display: flex; align-items: center; gap: 28px; padding: 16px 0; }
.brand { text-decoration: none; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.brand img { width: 220px; height: 64px; object-fit: contain; object-position: left center; }
.brand span { font-size: 18px; font-weight: 700; }
.header nav { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.nav-link { border: 0; border-radius: 6px; padding: 12px 14px; background: transparent; font-size: 18px; min-height: 48px; }
.nav-link.active, .nav-link:hover { background: var(--lime); }
.site-return { font-size: 16px; font-weight: 700; padding: 12px 0; }
.network-bar { background: #fff; border-bottom: 1px solid var(--line); }
.network-inner { max-width: 1360px; width: calc(100% - 48px); margin: auto; padding: 20px 0; }
.network-label { display: block; font-size: 16px; color: var(--muted); margin-bottom: 16px; }
.network-brands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.network-brand { display: flex; justify-content: center; align-items: center; min-height: 80px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 18px; }
.network-brand img { width: 100%; max-width: 240px; height: 62px; object-fit: contain; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 42px 0 28px; }
.intro > div:first-child { max-width: 850px; }
.intro p:last-child { font-size: 20px; color: var(--muted); margin-bottom: 0; }
.time-pill { flex-shrink: 0; border: 1px solid var(--line); padding: 16px 20px; border-radius: 9px; background: var(--lime); }
.time-pill strong { display: block; font-size: 21px; }
.time-pill span { display: block; font-size: 16px; }
.project-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #fff; padding: 20px 24px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 8px; margin-bottom: 22px; }
.project-toolbar strong { display: block; font-size: 18px; }
.project-toolbar span { display: block; font-size: 17px; color: var(--muted); margin-top: 5px; }
.project-file-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.project-status { margin: 0 0 22px; font-size: 18px; color: var(--ink); }
.project-status:empty { display: none; }
.project-status.is-error, .validation { color: #98351b; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px; border-radius: 6px; border: 1px solid #8ea5a0; background: #fff; color: var(--ink); font-size: 18px; line-height: 1.4; font-weight: 700; text-decoration: none; text-align: center; }
.button:hover { background: var(--lime); }
.button:disabled { opacity: .6; }
.button-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.text-link { border: 0; background: transparent; color: var(--ink); font-size: 17px; line-height: 1.55; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; text-align: left; }
.text-link:hover { color: var(--accent); }
.work-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.quiz-card { display: grid; grid-template-columns: 195px minmax(0, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.journey { background: #edf3e9; padding: 26px 18px; border-radius: 12px 0 0 12px; border-right: 1px solid var(--line); min-width: 0; }
.journey > .eyebrow { margin-bottom: 26px; }
.steps { display: flex; flex-direction: column; gap: 25px; }
.step { display: flex; align-items: flex-start; gap: 10px; background: none; border: 0; padding: 0; text-align: left; color: var(--muted); }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; border: 1px solid #839d8f; background: #fff; font-size: 17px; font-weight: 700; }
.step strong { display: block; font-size: 17px; line-height: 1.5; }
.step small { display: block; font-size: 16px; line-height: 1.5; margin-top: 3px; }
.step.current .step-number { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.current strong { color: var(--ink); }
.step.complete .step-number { background: var(--lime); color: var(--ink); }
.journey-bottom { font-size: 16px; margin: 38px 0 0; color: var(--muted); }
.question-area { padding: 28px; min-width: 0; }
.progress-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; font-size: 16px; margin-bottom: 12px; color: var(--muted); }
.progress-top span:last-child { flex-shrink: 0; }
.progress-track { height: 7px; border-radius: 5px; background: #e7eee3; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); }
.question-content { padding-top: 30px; }
.question-kicker { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.question-content h2 { font-size: 29px; margin-bottom: 16px; overflow-wrap: anywhere; }
.question-description { font-size: 18px; color: var(--muted); margin-bottom: 24px; }
.project-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.project-field { min-width: 0; }
.wide-field, .project-field:only-child { grid-column: 1 / -1; }
.project-field label { display: block; font-size: 18px; font-weight: 700; line-height: 1.55; margin-bottom: 9px; }
.optional { font-size: 16px; font-weight: 400; color: var(--muted); }
.project-field input, .project-field select, .project-field textarea { display: block; width: 100%; min-width: 0; min-height: 52px; border: 1px solid #8fa59e; border-radius: 6px; background: #fff; padding: 12px 13px; font-size: 18px; line-height: 1.6; }
.project-field textarea { min-height: 130px; resize: vertical; }
.project-field select { padding-right: 30px; }
.project-field input:disabled, .project-field select:disabled, .project-field textarea:disabled { color: #526a62; background: #edf1e9; }
.project-field ::placeholder { color: #526a62; opacity: 1; }
.pending-choice { display: flex; align-items: flex-start; gap: 12px; padding: 16px; margin: 0 0 24px; background: #f2f6eb; border: 1px solid var(--line); border-radius: 7px; font-size: 18px; cursor: pointer; }
.pending-choice input { margin: 5px 0 0; width: 23px; height: 23px; accent-color: var(--accent); flex-shrink: 0; }
.pending-choice small { display: block; font-size: 16px; line-height: 1.6; color: var(--muted); margin-top: 4px; }
.project-rows { display: flex; flex-direction: column; gap: 24px; }
.project-row { background: #f7f9f4; border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.row-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.row-head strong { font-size: 18px; }
.remove-row { font-size: 16px; }
.add-row { margin-top: 20px; }
.table-total { margin: 18px 0 0; font-size: 18px; font-weight: 700; }
.hint { display: flex; gap: 12px; align-items: flex-start; padding: 17px; border-radius: 7px; background: var(--lime); font-size: 16px; line-height: 1.7; margin-top: 28px; }
.info-icon { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border: 1px solid currentColor; border-radius: 50%; font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.validation { font-size: 18px; font-weight: 700; margin: 18px 0 0; }
.validation:empty { display: none; }
.form-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; border-top: 1px solid var(--line); background: #fff; padding: 16px 24px; box-shadow: 0 -3px 18px #153b3f12; }
.form-actions .button-primary { min-width: 170px; }
.question-position { font-size: 18px; font-weight: 700; text-align: center; }
.info-column { min-width: 0; }
.incentive-card { background: var(--ink); color: #fff; padding: 27px 24px; border-radius: 12px; }
.incentive-card .tag { color: var(--lime); }
.incentive-card h2 { font-size: 26px; margin: 16px 0 24px; }
.incentive-card h3 { font-size: 21px; }
.incentive-card p { font-size: 17px; line-height: 1.7; color: #f3f7ee; }
.incentive + .incentive { border-top: 1px solid #76918a; padding-top: 24px; margin-top: 24px; }
.grant-line { margin-bottom: 12px; }
.grant-line strong { display: block; color: var(--lime); font-size: 31px; }
.incentive-card .footnote { font-size: 16px; }
.incentive-card .light-link { color: #fff; font-size: 17px; }
.privacy-note { background: var(--lime); border-radius: 9px; padding: 23px; margin-top: 24px; font-size: 17px; }
.privacy-note p { margin: 10px 0 0; }
.method-note { padding: 24px 0; font-size: 17px; line-height: 1.7; color: var(--muted); }
.footer { border-top: 1px solid var(--line); padding: 24px 0; margin-top: 30px; background: #fff; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; font-size: 16px; }
.footer .text-link { font-size: 16px; }
.browser-notice, .runtime-notice, .noscript { padding: 20px; margin: 24px 0; border: 1px solid #af785e; border-radius: 8px; background: #fff3e9; color: #76371e; font-size: 18px; }
.result-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 30px 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Scheda finale e documento esportato. */
.report-intro, .report-section { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 28px; margin-bottom: 24px; min-width: 0; }
.report-intro h2 { font-size: 34px; margin-top: 12px; overflow-wrap: anywhere; }
.report-intro p, .report-section p, .report-section li { font-size: 18px; line-height: 1.75; }
.report-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.report-section h3 { font-size: 25px; }
.report-section h4 { font-size: 21px; }
.long-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.report-table-wrap { overflow-x: auto; max-width: 100%; margin: 20px 0; }
.report-table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.65; }
.report-table th, .report-table td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 13px 12px; overflow-wrap: anywhere; }
.report-table th { background: var(--lime); color: var(--ink); font-weight: 700; }
.report-table .numeric { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.report-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.report-kpi { padding: 20px; border-radius: 8px; background: var(--lime); }
.report-kpi span { font-size: 17px; display: block; }
.report-kpi strong { display: block; font-size: 28px; line-height: 1.5; margin-top: 8px; overflow-wrap: anywhere; }
.report-section .report-warning { padding: 17px 20px; border-left: 4px solid var(--accent); background: #fff2e7; color: #73351d; font-size: 17px; }
.report-section .report-note, .report-foot { color: var(--muted); font-size: 16px; line-height: 1.8; }
.report-issues { margin: 0; padding: 0; list-style: none; }
.report-issues li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.report-issues li:last-child { border-bottom: 0; }
.report-issues strong { display: block; font-size: 19px; }
.report-issues p { margin: 7px 0; }
.report-tag { display: inline-block; font-size: 16px; font-weight: 700; padding: 5px 9px; margin-bottom: 8px; border-radius: 4px; background: var(--lime); }
.report-tag.review { background: #fff0da; color: #76371e; }
.report-tag.absent { background: #eef1e9; }
.report-premium-title { margin-top: 4px; }
.report-review summary, .report-passed-summary { font-size: 18px; font-weight: 700; cursor: pointer; }
.report-passed-summary { margin-top: 20px; }
.report-review ol { padding-left: 28px; }
.report-review li { padding: 18px 0; }
.report-logos { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 25px; margin: 24px 0; }
.report-logos img { width: auto; max-width: 240px; height: 65px; object-fit: contain; }
.report-logos span { font-size: 18px; font-weight: 700; }
.report-foot { padding: 16px 0; }
.project-label { font-size: 16px; font-weight: 700; color: var(--accent); }
.report-edit { margin-top: 8px; }
.report-section .report-coverage { font-weight: 700; }
.project-document { max-width: 1180px; padding: 30px 24px; margin: 0 auto; }
.project-document > h1 { font-size: 30px; }

/* Finestre native e alternativa per browser incorporati. */
dialog { width: calc(100% - 40px); max-width: 780px; max-height: calc(100vh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 28px; background: #fff; color: var(--ink); }
dialog:not([open]) { display: none; }
dialog::backdrop { background: #153b3f80; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.close-button { width: 50px; height: 50px; flex-shrink: 0; border: 1px solid var(--line); background: var(--lime); border-radius: 6px; font-size: 30px; }
dialog h2 { font-size: 28px; }
dialog h3 { font-size: 22px; }
dialog p, dialog li { font-size: 18px; }
.source-list { padding-left: 24px; }
.source-list li { padding: 8px 0; }
.dialog-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.dialog-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #153b3f80; z-index: 1001; }
dialog.dialog-fallback[open] { display: block; position: fixed; left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); margin: 0; z-index: 1002; }
.has-fallback-dialog { overflow: hidden; }

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .form-actions { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@supports (width: max(1px, 2px)) {
  .form-actions { padding-left: max(24px, calc((100vw - 1300px) / 2)); padding-right: max(24px, calc((100vw - 1300px) / 2)); }
}
@supports (height: 100dvh) { dialog { max-height: calc(100dvh - 48px); } }

@media (max-width: 1200px) {
  .work-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .quiz-card { display: block; }
  .journey { border-right: 0; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; padding: 20px; }
  .journey > .eyebrow { margin-bottom: 16px; }
  .steps { flex-direction: row; justify-content: space-between; gap: 12px; }
  .step > span:last-child { display: none; }
  .journey-bottom { display: none; }
  .project-fields { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .header-inner { flex-wrap: wrap; gap: 18px 24px; }
  .site-return { margin-left: auto; }
}

@media (max-width: 900px) {
  .work-layout { display: block; }
  .info-column { margin-top: 28px; }
  .incentive-card { padding: 28px; }
  .project-toolbar { align-items: flex-start; flex-direction: column; }
  .project-file-actions { width: 100%; }
  .report-layout { grid-template-columns: 1fr; gap: 0; }
  .intro { align-items: flex-start; }
  .time-pill { max-width: 230px; }
  .header nav { margin-left: 0; }
  .report-kpis { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .container, .header-inner, .network-inner { width: calc(100% - 32px); }
  .header-inner { padding: 16px 0; gap: 16px; }
  .brand img { width: 200px; height: 58px; }
  .header nav { width: 100%; gap: 8px; order: 3; }
  .nav-link { font-size: 16px; padding: 10px; }
  .site-return { max-width: 100px; font-size: 16px; }
  .network-brands { grid-template-columns: 1fr; gap: 12px; }
  .network-brand { min-height: 78px; }
  .network-brand img { max-width: 240px; height: 58px; }
  .intro { display: block; padding-top: 30px; }
  .intro p:last-child { font-size: 18px; }
  .time-pill { max-width: none; margin-top: 22px; }
  .project-toolbar { padding: 20px 16px; }
  .project-file-actions .button { flex: 1 1 140px; }
  .question-area { padding: 22px 18px; }
  .question-content h2 { font-size: 26px; }
  .progress-top { font-size: 16px; gap: 12px; }
  .project-row { padding: 18px 14px; }
  .hint { padding: 15px; }
  .form-actions { padding-left: 16px; padding-right: 16px; gap: 12px; }
  .form-actions .button { padding: 12px 16px; font-size: 18px; }
  .form-actions .button-primary { min-width: 135px; max-width: 62%; }
  .question-position { display: none; }
  .report-intro, .report-section { padding: 23px 18px; }
  .report-intro h2 { font-size: 28px; }
  .report-section h3 { font-size: 23px; }
  .report-table { min-width: 620px; font-size: 17px; }
  .report-logos { display: grid; grid-template-columns: 1fr; }
  .result-actions { width: 100%; }
  .result-actions .button { flex: 1 1 170px; }
  dialog { padding: 23px 20px; }
}

@media (max-width: 360px) {
  .brand img { width: 165px; }
  .header nav { display: grid; grid-template-columns: 1fr; }
  .site-return { max-width: 90px; }
  .steps { gap: 5px; }
  .step-number { width: 34px; height: 34px; font-size: 16px; }
}

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

@media print {
  @page { margin: 14mm; }
  html { font-size: 16px; }
  body { background: #fff; padding: 0; }
  .header, .intro, .network-bar, .footer, .project-toolbar, .project-status, .form-actions, .method-note, .result-actions, .report-edit, dialog, .dialog-backdrop, .skip { display: none !important; }
  .container { width: 100%; max-width: none; }
  .report-layout { display: block; }
  .report-intro, .report-section { border-color: #a4b5ac; padding: 18px; margin-bottom: 18px; }
  .report-intro p, .report-section p, .report-section li, .report-table { font-size: 16px; }
  .report-table { min-width: 0; table-layout: fixed; }
  .report-table-wrap { overflow: visible; }
  .report-table th, .report-table td { padding: 8px; }
  .report-kpis { grid-template-columns: 1fr; }
  .report-kpi { padding: 15px; }
  .report-section h3 { font-size: 22px; }
  .report-issues li, .report-kpi, .report-logos { break-inside: avoid; }
  .project-document { max-width: none; margin: 0; padding: 0; }
  .report-foot, .report-section .report-note, .report-section .report-warning { font-size: 16px; }
}
