:root{--ink:#17243c;--accent:#4f46e5;--surface:#fff;--line:#dce3ef}
body{background:#eef2f8;color:var(--ink)}
.navbar{background:#243457;backdrop-filter:none;box-shadow:0 4px 16px #17243c12}
header{color:var(--ink);padding:26px 12px}header h1{text-shadow:none;line-height:1.25}
.main-card,#invoicePreview{box-shadow:0 8px 28px #17243c0d;border:1px solid var(--line)}
footer{color:#405274;opacity:1}footer .footer-links a{opacity:1}footer a,footer a[style]{color:#354b78!important}
.back-link{color:#354b78;opacity:1}.meta{color:#59677c}
.ffc-article-en table,.ffc-article-ar table{display:block;max-width:100%;overflow-x:auto}
.ad-top,.ad-bottom,.ad-placeholder,.ad-space{display:none!important}
.language-switcher,.lang-toggle{display:none!important}
.ffc-language{display:flex;gap:4px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:10px;padding:3px;direction:ltr;flex-shrink:0}
.ffc-language button{min-height:40px;border:0;background:transparent;padding:7px 13px;border-radius:7px;cursor:pointer;color:#243457;font-weight:700}
.ffc-language button[aria-pressed=true]{background:var(--accent);color:#fff}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #f59e0b;outline-offset:3px}
.ffc-note,.ffc-handoff,.ffc-next{padding:16px;background:#f3f6ff;border:1px solid #d6def8;border-radius:12px;margin:16px 0;color:#273953;line-height:1.7}
.ffc-note button,.ffc-handoff button,.ffc-next button,.ffc-next a{border:1px solid #c5cfea;background:#fff;color:#3730a3;border-radius:8px;padding:10px 14px;margin:6px;cursor:pointer;font:inherit;font-weight:600;text-decoration:none;display:inline-block;min-height:44px}
.ffc-next select{max-width:100%;padding:12px;border:1px solid #c5cfea;border-radius:8px;background:#fff;font:inherit}
.ffc-note p,.ffc-handoff p,.ffc-next p{margin:0 0 8px}.ffc-error{color:#a31b31!important}
.ffc-print-tip{font-size:.88rem;color:#4b5c76;margin:10px 0}.ffc-article-ar[hidden],.ffc-article-en[hidden]{display:none!important}
.ffc-preferences{display:inline-block;padding:10px 14px;background:#fff;color:#354b78;border:1px solid #c5cfea;border-radius:8px;font:inherit;cursor:pointer;min-height:44px;margin-top:12px}
[dir=rtl] .breakdown-table th,[dir=rtl] .breakdown-table td,[dir=rtl] .preview-table th,[dir=rtl] .preview-table td{text-align:right}
[dir=rtl] ul,[dir=rtl] ol{margin-inline-start:22px;margin-inline-end:0}
.table-wrap{max-width:100%;overflow:auto}.breakdown-table{display:block;overflow:auto}.breakdown-table tbody,.breakdown-table thead{width:100%}
input[type=number],input[type=email],input[type=date]{direction:ltr;unicode-bidi:plaintext}
.preview-table td,#contractPreview p{overflow-wrap:anywhere;white-space:normal}
@media(max-width:768px){.container{padding:12px}.navbar{padding:12px;gap:12px}.navbar .logo{font-size:1rem}.navbar .nav-links{gap:6px;justify-content:flex-start;width:100%;order:3;flex-wrap:nowrap;overflow-x:auto;padding:3px 0 9px}.navbar .nav-links a{white-space:nowrap;padding:10px!important;min-height:44px;border-radius:8px;font-size:.88rem}.navbar{flex-direction:row;align-items:center}.ffc-language{margin-inline-start:auto}.main-card,#invoicePreview{padding:20px 16px;border-radius:14px}header h1{font-size:1.9rem}header p{font-size:1rem}.input-section,.form-grid,.two-col{grid-template-columns:1fr!important}.full-width{grid-column:1!important}.platforms-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.platform-card{padding:16px 10px}.platform-card h3{font-size:1.05rem}.platform-card .net-earnings{font-size:1.55rem}.winner-banner .amount{font-size:2rem}input,select,textarea{font-size:16px!important}.items-table{min-width:520px}.preview-table{width:100%;table-layout:fixed}.preview-table th:first-child,.preview-table td:first-child{width:46%}#contractPreview{padding:20px 14px}.ffc-next button{width:100%;margin:6px 0}.premium-section{margin-top:24px}.blog-grid,.template-grid{grid-template-columns:1fr!important}}
@page{size:A4;margin:16mm 14mm}
@media print{
 html,body{background:#fff!important;color:#000!important;min-height:0!important;height:auto!important;font-size:11pt}
 #draftBanner,.navbar,header,footer,.lang-toggle,.language-switcher,.ffc-language,.ffc-note,.ffc-handoff,.ffc-next,.ffc-print-tip,#ffc-consent-banner,.preview-actions,#freshbooksNote,.preview-header:has(#downloadBtn),.premium-section,.legal-disclaimer,.contract-type-info,.form-grid,.btn-generate,.btn-download{display:none!important}
 .container,.main-card{padding:0!important;margin:0!important;width:auto!important;max-width:none!important;box-shadow:none!important;border:0!important;min-height:0!important}
 body.ffc-contract-print *{visibility:visible!important}
 body.ffc-contract-print .main-card>*:not(#previewSection){display:none!important}
 body.ffc-contract-print #previewSection{display:block!important;animation:none!important}
 #contractPreview{position:static!important;inset:auto!important;width:auto!important;max-width:none!important;padding:0!important;margin:0!important;border:0!important;font:11pt/1.6 Georgia,'Times New Roman',serif!important}
 #contractPreview.arabic{font-family:Tahoma,Arial,sans-serif!important;direction:rtl}
 #contractPreview h2{font-size:17pt!important;break-after:avoid}
 #contractPreview .section{break-inside:auto!important;page-break-inside:auto!important;margin-bottom:12pt!important}
 #contractPreview .section-title,h2,h3,h4{break-after:avoid;page-break-after:avoid}
 #contractPreview p{orphans:3;widows:3}
 #contractPreview .signature-grid{break-inside:avoid;page-break-inside:avoid;margin-top:20pt!important}
 #contractPreview .legal-notice{break-inside:auto;font-size:9pt!important;padding:8pt!important;margin-top:12pt!important}
 #invoicePreview{display:block!important;padding:0!important;box-shadow:none!important;border:0!important;max-width:none!important}
 body.ffc-invoice-print .main-card{display:none!important}
 #invoicePreview .preview-header{display:flex!important;flex-direction:row!important}
 #invoicePreview .preview-parties{display:flex!important;flex-direction:row!important}
 .table-wrap{overflow:visible!important}.preview-table{display:table!important;width:100%!important;table-layout:fixed;border-collapse:collapse}
 .preview-table th:first-child,.preview-table td:first-child{width:48%}.preview-table td,.preview-table th{padding:7pt!important;font-size:10pt!important;overflow-wrap:anywhere}
 thead{display:table-header-group}tfoot{display:table-footer-group}tr{break-inside:avoid;page-break-inside:avoid}
 .preview-totals{break-inside:avoid;page-break-inside:avoid}.preview-notes{white-space:pre-wrap;orphans:3;widows:3}
 *{text-shadow:none!important;box-shadow:none!important;animation:none!important}a{color:inherit!important;text-decoration:none!important}
}

/* Keep explanatory headings legible on pale cards. */
.faq-item h3,.faq-item h4{color:#354b78}.faq-item{color:#273953}
/* Shared shell for tools, editorial pages and worked examples. */
.ffc-shell{box-sizing:border-box!important;position:relative!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:14px!important;width:100%!important;max-width:none!important;margin:0!important;padding:16px max(18px,calc((100vw - 1180px)/2))!important;background:#243457!important;border-radius:0!important;font:15px/1.5 system-ui!important;box-shadow:0 3px 14px #17243c12!important}
.ffc-shell .logo{font-size:1rem!important;color:#fff!important;text-decoration:none!important;white-space:nowrap}.ffc-shell .nav-links{display:flex!important;gap:4px!important;align-items:center!important;margin:0!important;flex:1;justify-content:center}.ffc-shell .nav-links a{color:#fff!important;text-decoration:none!important;white-space:nowrap;padding:10px 11px!important;border-radius:8px!important;min-height:44px!important;display:inline-flex!important;align-items:center!important}.ffc-shell .nav-links a[aria-current=page]{background:#ffffff24!important}.ffc-shell .nav-links a:hover{background:#ffffff18!important}.ffc-shell .ffc-language a{display:inline-flex;align-items:center;min-height:40px;padding:7px 11px;border-radius:7px;color:#243457!important;text-decoration:none;font-weight:700}.ffc-shell .ffc-language a[aria-current=true]{background:#4f46e5;color:#fff!important}.ffc-shell a:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.ffc-journey{max-width:900px;margin:24px auto;padding:24px;background:#fff;border:1px solid #dce3ef;border-radius:16px;line-height:1.8}.ffc-journey h2{font-size:1.35rem;color:#17243c}.ffc-journey ol{padding-inline-start:24px}.ffc-journey li{margin:10px 0}.ffc-journey a{color:#3730a3}.ffc-deep-work{margin:28px 0;padding-block:8px}.ffc-deep-work p{line-height:1.9}.ffc-net-target button{min-height:44px;background:#4f46e5;color:white;border:0;border-radius:8px;padding:12px 20px;font:inherit;cursor:pointer}.ffc-net-target input{width:100%;max-width:400px;padding:12px;border:1px solid #b7c3d8;border-radius:8px;font:inherit}.ffc-net-target label{display:block;margin-top:12px}.ffc-net-target form{display:grid;gap:12px}.ffc-workbook{padding:18px;background:#f3f6ff;border-radius:12px;margin:20px 0}.ffc-workbook a{display:inline-block;min-height:44px;padding-block:8px}
@media(max-width:900px){.ffc-shell .nav-links{order:3!important;width:100%!important;flex-basis:100%!important;justify-content:flex-start!important;overflow:auto!important;flex-wrap:nowrap!important;padding-bottom:4px!important}.ffc-shell .ffc-language{margin-inline-start:auto!important}.ffc-journey{padding:20px 16px}}
@media print{.ffc-shell,.ffc-journey,.ffc-net-target{display:none!important}}
/* Keyboard entry and editorial navigation share the same focus treatment. */
.skip-link{position:absolute;inset-inline-start:12px;top:-120px;background:#fff;color:#17243c;z-index:100001;padding:12px 18px;border-radius:8px;font:600 16px/1.5 system-ui;text-decoration:underline}.skip-link:focus{top:10px;outline:3px solid #f59e0b}.ffc-contents{margin:24px 0;padding:16px 20px;background:#f3f6ff;border:1px solid #dce3ef;border-radius:12px}.ffc-contents summary{cursor:pointer;font-weight:700;min-height:44px;display:list-item;padding:8px 0}.ffc-contents ol{padding-inline-start:24px;line-height:1.65}.ffc-contents li{margin:7px 0}.ffc-contents a{display:inline-block;padding:5px 0}h2[id]{scroll-margin-top:24px}h2:target{background:#fff5d6;border-radius:6px}.ffc-deep-work{border-top:1px solid #dce3ef;padding-top:20px}
@media print{.skip-link,.ffc-contents{display:none!important}.ffc-deep-work{break-inside:auto}}

.remove-row{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
@media print{.remove-row{display:none!important}}

/* Narrow screens: let grid children shrink and keep long estimates inside cards. */
.grid>*,.two-col>*,.form-grid>*,.rate-pair>*{min-width:0}
.rate-display .big-number,.rate-pair .amount,.breakdown-row>span,.platform-card .net-earnings{overflow-wrap:anywhere}
@media screen and (max-width:480px){
 .rate-pair,.templates-grid{grid-template-columns:minmax(0,1fr)!important}
 .field-group input,.field-group select,.field-group textarea,.ffc-net-target input{min-width:0;max-width:100%;box-sizing:border-box}
 .breakdown-row{gap:12px;flex-wrap:wrap}
 #ffc-consent-banner button{min-height:44px;margin-block:4px}
}
