/* FE knowledge UI. Royal tokens with standalone fallback. */
.fec-knowledge{max-width:1200px;margin:0 auto;padding:20px 0 40px;font-family:var(--fe-font,IRANSans,IRANSansX,Tahoma,Arial,sans-serif);color:var(--fe-ink,#172232);line-height:1.9;overflow-wrap:anywhere}
.fec-knowledge nav{margin-block-end:12px;font-size:.9rem}.fec-knowledge a{color:var(--fe-gold-dark,#80591c)}
.fek-hero{background:var(--fe-navy,#0b1728);color:#fff;padding:clamp(20px,4vw,42px);border-radius:16px;border-bottom:3px solid var(--fe-gold,#c9a66b);margin-block-end:24px}.fek-hero h1{font-size:clamp(1.55rem,3vw,2.3rem);color:var(--fe-gold-light,#e8c990);margin:0 0 8px}.fek-hero p{margin:6px 0}
.fek-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.fek-detail{grid-template-columns:repeat(2,minmax(0,1fr))}.fek-card{padding:20px;border:1px solid #17223220;border-radius:12px;min-width:0;display:flex;flex-direction:column;align-items:flex-start}.fek-card h2,.fek-card h3{font-size:1.12rem;margin:0 0 8px;color:#172232}.fek-card h3 a,.fec-knowledge .fek-link{color:#172232;text-decoration:underline;text-underline-offset:3px}.fek-card p{margin:0 0 12px}.fek-link,.fec-knowledge .fek-button{margin-block-start:auto;display:inline-flex;align-items:center;min-height:44px;font-weight:600}.fec-knowledge .fek-button{background:var(--fe-navy,#0b1728);color:#fff;padding:8px 14px;border-radius:8px;text-decoration:none}.fek-note{background:var(--fe-ivory,#f8f5ef);border:1px solid var(--fe-border,#e0d5c2);padding:16px;border-radius:12px;margin-block-start:24px}.fec-knowledge a:focus-visible{outline:3px solid #80591c;outline-offset:3px}
@media(max-width:767px){.fek-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.fek-card{padding:14px}.fek-detail{grid-template-columns:1fr}}@media(max-width:430px){.fek-grid{grid-template-columns:1fr}}
.fek-pink{background:var(--fe-pastel-pink,#F4E3E8)}
.fek-peach{background:var(--fe-pastel-peach,#F6E7D8)}
.fek-lemon{background:var(--fe-pastel-lemon,#F6F1D6)}
.fek-mint{background:var(--fe-pastel-mint,#E5F1EA)}
.fek-lilac{background:var(--fe-pastel-lilac,#EEE7F6)}
.fek-ice{background:var(--fe-pastel-ice,#EAF3FB)}
/* Step53: shared legal library */
.fec-contracts .fek-note{margin-block:18px}.fec-contracts section>h2{font-size:1.25rem}.fec-contracts label{display:block;font-weight:600;min-width:0}.fec-contracts input:not([type=hidden]),.fec-contracts select,.fec-contracts textarea{display:block;width:100%;box-sizing:border-box;max-width:100%;min-height:44px;border:1px solid #b6a789;border-radius:8px;background:#fff;color:#0b1728;padding:9px;font:inherit;font-size:16px}.fec-contracts textarea{resize:vertical;line-height:1.9;margin-block:8px;white-space:pre-wrap}.fec-contract-filter{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto auto;gap:12px;align-items:end}.fec-contracts button{min-height:44px;padding:8px 14px;border:1px solid #0b1728;border-radius:8px;background:#0b1728;color:#fff;font:inherit;cursor:pointer}.fec-contracts button:disabled{opacity:.55;cursor:default}.fec-contracts button:focus-visible,.fec-contracts input:focus-visible,.fec-contracts select:focus-visible,.fec-contracts textarea:focus-visible{outline:3px solid #80591c;outline-offset:2px}.fec-contract-actions{display:flex;flex-wrap:wrap;gap:8px}.fec-contract-state{font-size:.85rem;font-weight:600;color:#473b29}.fec-contracts [data-fe-contract-reset]{background:#fff;color:#0b1728}@media(max-width:767px){.fec-contract-filter{grid-template-columns:1fr}.fec-contracts textarea{min-height:240px}.fec-contract-actions>*{flex:1 1 160px}}

/* Step54 shared document library, explicit scope wins against generic form rules. */
.fec-knowledge.fec-document-library .fec-contract-filter{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto auto;gap:12px;align-items:end}
.fec-knowledge.fec-document-library label{display:block;margin:0;font-weight:600;min-width:0}
.fec-knowledge.fec-document-library textarea,.fec-knowledge.fec-document-library select,.fec-knowledge.fec-document-library input:not([type=hidden]){display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #b6a789;border-radius:8px;color:#0b1728;background:#fff;font:inherit;font-size:16px;margin-block:6px 0}
.fec-knowledge.fec-document-library textarea{height:clamp(320px,60vh,620px);resize:vertical;line-height:2;direction:rtl;text-align:start;white-space:pre-wrap}
.fec-knowledge.fec-document-library .fec-contract-actions{display:flex;gap:10px;flex-wrap:wrap;margin-block:14px 0}
.fec-knowledge.fec-document-library button{min-height:44px;padding:10px 16px;border-radius:8px;font:inherit;font-weight:600;background:#0b1728;color:#fff;border:1px solid #0b1728;cursor:pointer}
.fec-knowledge.fec-document-library [data-fe-contract-reset]{background:#fff;color:#0b1728}
.fec-knowledge.fec-document-library button:disabled{opacity:.55;cursor:default}
.fec-knowledge.fec-document-library section>h2{margin-block:20px 12px}
@media(max-width:767px){.fec-knowledge.fec-document-library .fec-contract-filter{grid-template-columns:minmax(0,1fr)}.fec-knowledge.fec-document-library textarea{height:420px}.fec-knowledge.fec-document-library .fec-contract-actions>*{flex:1 1 160px}}
