/* Shared visual language with the MrPaloma Pollinations studio.
   Keep editor/tooltip IDs and visibility under the existing application scripts. */
:root {
    color-scheme: light;
    --ed-ink: #233129;
    --ed-muted: #58685d;
    --ed-green: #496449;
    --ed-line: #dfe5d9;
    --ed-paper: #f6f7f2;
}
body.editor-page { margin: 0; background: var(--ed-paper); color: var(--ed-ink); font-family: 'Segoe UI', system-ui, sans-serif; line-height: 1.65; }
.editor-page a { color: #3d623d; text-underline-offset: 3px; }
.editor-page :is(a, button, input, select, summary, [tabindex]):focus-visible { outline: 3px solid #66834b; outline-offset: 4px; }
.ed-shell.container { max-width: 1320px; padding: 0 28px 28px; }
.ed-header { max-width: 1320px; margin: auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--ed-line); }
.ed-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ed-ink) !important; font-size: 19px; font-weight: 700; }
.ed-brand img { border-radius: 10px; }
.ed-header nav { display: flex; flex-wrap: wrap; gap: 22px; font-size: 13px; }
.ed-header nav a { text-decoration: none; }
.ed-header nav a:hover { text-decoration: underline; }
.ed-skip { position: absolute; top: -100px; left: 20px; z-index: 1100; padding: 12px; background: white; }
.ed-skip:focus { top: 12px; }
.ed-hero { padding: 42px 0 30px; position: relative; }
.ed-eyebrow { display: block; color: var(--ed-green); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.ed-hero h1 { max-width: 950px; margin: 12px 0 16px; font-size: clamp(34px, 4.5vw, 58px); font-weight: 650; letter-spacing: -2px; line-height: 1.12; }
.ed-hero h1 span { color: var(--ed-green); }
.ed-hero p { max-width: 760px; font-size: 16px; color: var(--ed-muted); margin-bottom: 20px; }
.ed-features { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.ed-features li { padding: 5px 12px; background: #edf1e7; border: 1px solid var(--ed-line); border-radius: 30px; font-size: 12px; }
.ed-workspace-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 12px 0; }
.ed-workspace-heading h2 { font-size: 19px; font-weight: 650; margin: 0; }
.ed-workspace-heading p { margin: 0; font-size: 12px; color: var(--ed-muted); }
#row-editor { margin-top: 0 !important; }
#col-editor-container { min-width: 0; }
#editor-container { display: flex; gap: 18px; width: 100%; align-items: flex-start; min-height: 0; }
#editor-container .div-left { flex: 0 0 260px; min-width: 0; padding: 18px; border: 1px solid var(--ed-line); border-radius: 16px; background: #edf1e7; }
#editor-container .div-left-min { flex: 0 0 44px; }
#editor-container .div-right { flex: 1 1 0; min-width: 0; border: 1px solid var(--ed-line); border-radius: 16px; background: white; box-shadow: 0 8px 30px #23312908; }
.ed-sidebar-toggle { display: flex; align-items: center; gap: 8px; border: 0; padding: 0 0 12px; background: transparent; color: var(--ed-ink); font-size: 16px; font-weight: 650; }
#col-left-editor-min .ed-sidebar-toggle { justify-content: center; width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--ed-line); border-radius: 10px; background: white; }
#itemsWork > div > small { font-size: 12px; }
#itemsWork label { max-width: calc(100% - 24px); vertical-align: top; margin-left: 5px; font-size: 12px; }
#lstItemsWorks { max-height: 410px; overflow-y: auto; scrollbar-width: thin; padding: 2px; }
#lstItemsWorks .card { margin: 0 0 12px; border: 1px solid #d5ddcf; border-radius: 10px; overflow-wrap: anywhere; }
#lstItemsWorks .card-header { border-radius: 9px 9px 0 0; }
#lstItemsWorks .border-success { box-shadow: 0 0 0 2px #49644930; }
#stat-work2 .row { --bs-gutter-x: 12px; margin-bottom: 10px; }
#stat-work2 .btn { width: 100%; }
#stat-work2 small { font-size: 12px; }
#stat-work2 .border { border-color: var(--ed-line) !important; border-radius: 10px; }
.editor-page .btn { border-radius: 8px; font-weight: 600; padding: 8px 14px; font-size: 13px; }
.editor-page .btn-primary { background: var(--ed-green); border-color: var(--ed-green); }
.editor-page .btn-primary:hover { background: #354e35; border-color: #354e35; }
.editor-page .btn-secondary { background: white; color: var(--ed-ink); border-color: #c8d1c1; }
.editor-page .btn-warning { background: #f4df79; color: #383318; border-color: #e3cb63; }
.editor-page .btn-danger { background: #fff6f3; color: #983f30; border-color: #e7c5bb; }
.editor-page .btn-danger:hover { background: #f7e0d8; }
.tle-input { border: 1px solid #ccd6c5; background: #fff; padding: 5px 8px; border-radius: 6px; width: 95%; min-height: 32px; }
.ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--ed-line); border-radius: 16px 16px 0 0; background: #fafbf7; padding: 13px 12px 7px; }
.ql-toolbar.ql-snow .ql-formats { margin-right: 10px; margin-bottom: 6px; }
#editor.ql-container.ql-snow { height: 580px; border: 0; font-size: 16px; }
#editor .ql-editor { padding: 28px 32px; line-height: 1.8; }
#editor .ql-editor:focus { outline: 2px solid #66834b; outline-offset: -2px; }
#editor .ql-tooltip { max-width: 100%; white-space: normal; z-index: 5; }
#editor .ql-tooltip input { max-width: 100%; }
#stat-work { padding: 16px; border-top: 1px solid var(--ed-line); background: #fafbf8; border-radius: 0 0 16px 16px; overflow-wrap: anywhere; }
#stat-work > .row > .col { min-width: 150px; }
#stat-work small { font-size: 12px; color: var(--ed-muted); }
#stat-work b { color: var(--ed-ink); }
.ed-stat-action { min-height: 39px; display: flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid #ccd6c5; border-radius: 8px; padding: 8px; background: white; margin: 8px 0 0; font-size: 12px; }
.ed-stat-action label { margin: 0; cursor: pointer; }
.ed-analysis-toggle { width: fit-content; min-width: 260px; }
#donwloadText .col-1 { flex: 0 0 24px; padding: 0; }
.user-separator { border-bottom: 1px solid var(--ed-line); margin: 22px 0; width: 100%; }
.cursorUser { cursor: pointer; }
.cursorMove { cursor: move; }
.card-body-padding { padding: .3rem !important; }
#tooltipPalette, #tooltipSetting, #tooltipClickRight { display: none; background: white; border-radius: 12px; padding: 10px; font-size: 13px; box-shadow: 0 12px 36px #23312926; z-index: 1000; }
#tooltipClickRight { width: 220px; }
#tooltipPalette[data-show], #tooltipSetting[data-show], #tooltipClickRight[data-show] { display: block; }
.paletteCardHeader1 { background-color: #FFD700; }
.paletteCardHeader2 { background-color: #FFA500; }
.paletteCardHeader3 { background-color: #FF6347; }
.paletteCardHeader4 { background-color: #32CD32; }
.paletteCardHeader5 { background-color: #1E90FF; }
#tooltipClickRight .srchmrplm-ldng-container { height: 20px; margin-top: 10px; }
#tooltipClickRight .circle { display: inline-block; background: orange; height: 15px; width: 15px; border-radius: 50%; animation: ed-bounce 1.2s infinite; }
#tooltipClickRight #ball-2 { animation-delay: .1s; }
#tooltipClickRight #ball-3 { animation-delay: .2s; }
@keyframes ed-bounce { 40% { transform: translateY(8px); } 60% { transform: translateY(-8px); } }
.ed-section { margin-top: 30px; padding: 26px; border: 1px solid var(--ed-line); border-radius: 16px; background: white; }
.ed-section h2, .ed-shell > .row.bg-light h2 { font-size: 24px; font-weight: 650; letter-spacing: -.5px; }
.ed-shell .row.bg-light { background: transparent !important; }
.ed-section h3 { font-size: 17px; font-weight: 650; margin: 20px 0 10px; }
.ed-section h4 { font-size: 15px; }
.ed-section p { color: var(--ed-muted); }
.ed-section input[type=text] { max-width: 100%; min-height: 39px; padding: 6px 10px; border: 1px solid #c8d1c1; border-radius: 8px; margin: 0 6px 8px 0; }
.ed-section .btn { margin-bottom: 8px; }
.ed-section label { font-size: 13px; }
.ed-section input[type=checkbox], #stat-work input, #itemsWork input[type=checkbox] { accent-color: var(--ed-green); }
.resultConcordanze { margin-top: 14px; padding: 14px; border: 1px solid var(--ed-line); border-radius: 10px; overflow-wrap: anywhere; }
.resultConcordanze:empty { display: none; }
.ed-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: steps; }
.ed-guide-grid h3:before { counter-increment: steps; content: counter(steps, decimal-leading-zero); display: block; color: #667d51; font-size: 13px; margin-bottom: 10px; }
.ed-guide-grid p { font-size: 14px; margin: 0; }
.ed-note { padding: 14px 16px; margin-top: 22px; background: #f2f5ec; border-radius: 10px; font-size: 13px; }
.ed-faq details { border-bottom: 1px solid var(--ed-line); padding: 15px 0; }
.ed-faq details:last-child { border: 0; }
.ed-faq summary { cursor: pointer; font-weight: 600; }
.ed-faq details p { margin: 12px 0 0; font-size: 14px; }
.ed-articles > .row { align-items: center; padding: 15px 0; border-bottom: 1px solid var(--ed-line); }
.ed-articles > .row > .col:first-child { flex: 0 0 180px; }
.ed-articles img { max-width: 100%; height: auto; border-radius: 10px; }
.ed-articles h3 { margin-top: 0; }
.ed-articles p { font-size: 13px; }
.ed-history { margin-top: 28px; border-top: 1px solid var(--ed-line); padding-top: 20px; }
.ed-history summary { cursor: pointer; color: var(--ed-muted); }
.ed-history h3 { font-size: 16px; }
.ed-footer { padding-top: 30px; margin-top: 30px; border-top: 1px solid var(--ed-line); font-size: 13px; text-align: center; }
.ed-footer > div { margin: 10px 0 !important; }
.ed-shell [id], .ed-shell section { scroll-margin-top: 24px; }
@media (max-width: 900px) {
    #editor-container { gap: 12px; }
    #editor-container .div-left { flex-basis: 240px; padding: 14px; }
    .ed-workspace-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (max-width: 700px) {
    .ed-shell.container { padding: 0 16px 24px; }
    .ed-header { padding: 16px; flex-wrap: wrap; gap: 12px; }
    .ed-header nav { gap: 16px; font-size: 12px; }
    .ed-hero { padding: 30px 0 24px; }
    .ed-hero h1 { letter-spacing: -1.2px; }
    .ed-hero p { font-size: 14px; }
    #editor-container { flex-direction: column; }
    #editor-container .div-left, #editor-container .div-left-min { order: 1; }
    #editor-container .div-left, #editor-container .div-left-min, #editor-container .div-right { flex: 0 1 auto; width: 100%; }
    #col-left-editor-min .ed-sidebar-toggle { width: auto; gap: 8px; font-size: 13px; }
    #col-left-editor-min .ed-sidebar-toggle:after { content: 'Documenti salvati'; }
    #lstItemsWorks { max-height: 240px; }
    #editor.ql-container.ql-snow { height: 460px; }
    #editor .ql-editor { padding: 20px 18px; }
    #stat-work > .row { display: block; }
    #stat-work > .row > .col { padding: 10px 12px; }
    .ed-section { padding: 20px 16px; }
    .ed-guide-grid { grid-template-columns: 1fr; gap: 0; }
    .ed-section h2 { font-size: 21px; }
    .ed-articles > .row { display: block; margin: 0 !important; }
    .ed-articles img { width: 180px; margin-bottom: 12px; }
    .ed-section > .row { flex-wrap: wrap; }
    .ed-section .col { min-width: 0; }
    .ed-section input[type=text] { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { #tooltipClickRight .circle { animation: none; } }

/* Referral cards match the Pollinations studio, with typography scoped to this section. */
.affiliate-support { --muted: #728075; font-family: "DM Sans", sans-serif; font-size: 14px; line-height: 1.6; color: #233129; }
:where(.affiliate-support) :is(h2, h3, p) { margin: 0; line-height: inherit; }
.affiliate-support .card-kicker{display:block;font-size:8px;letter-spacing:1.35px;color:#89927e;font-weight:600;margin-bottom:2px}
.affiliate-support{margin:12px 0 32px;padding:28px;background:linear-gradient(135deg,#fff 0%,#f0f4e9 100%);border:1px solid #dce3d3;border-radius:18px;box-shadow:0 12px 32px rgba(35,49,41,.055)}.affiliate-heading{display:grid;grid-template-columns:.85fr 1.15fr;align-items:end;gap:40px;margin-bottom:20px}.affiliate-heading h2{font-family:Manrope,sans-serif;font-size:26px;line-height:1.25;letter-spacing:-1px;font-weight:600;margin-top:7px}.affiliate-heading>p{color:var(--muted);font-size:12px;line-height:1.75;max-width:530px}.affiliate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.affiliate-card{display:flex;align-items:flex-start;gap:14px;min-width:0;padding:17px;background:rgba(255,255,255,.88);border:1px solid #e0e6d9;border-radius:12px}.affiliate-icon{display:grid;place-content:center;width:38px;height:38px;flex:0 0 38px;border-radius:10px;color:#fff;font:700 16px Manrope,sans-serif}.affiliate-amazon .affiliate-icon,.affiliate-traderepublic .affiliate-icon{background:#26332b;color:#f4df79}.affiliate-nordvpn .affiliate-icon{background:#477fda}.affiliate-starlink .affiliate-icon{background:#50615a}.affiliate-card h3{font-size:12px;font-weight:650;margin:1px 0 3px}.affiliate-card p{font-size:11px;color:var(--muted);line-height:1.65}.affiliate-card a{color:#526f43;font-weight:650;text-decoration-thickness:1px;text-underline-offset:3px}.affiliate-card a:hover{color:#334c2b}.affiliate-disclosure{margin-top:14px;color:#89927e;font-size:10px}
@media (max-width: 700px) { .affiliate-support{padding:21px 17px;margin-top:4px}.affiliate-heading{grid-template-columns:1fr;gap:8px}.affiliate-heading h2{font-size:23px}.affiliate-grid{grid-template-columns:1fr} }
