/* DS_AISA_REPLACEMENT_V1 — V2 functional extension — Thomas Fesq / Formatome */
:root{--v2-surface-product:#EFF8FC;--v2-surface-pale:#EFF8FC;--v2-accent-soft:#6EC1E4;--v2-shadow:0 12px 36px rgba(0,25,96,.05)}
*{box-sizing:border-box}html{scroll-padding-top:100px}body{background:var(--color-surface-page);text-rendering:optimizeLegibility}button,a,input,select,textarea{touch-action:manipulation}img,svg{max-width:100%}
.btn,.icon-btn,.mobile-menu,summary{min-height:44px}.btn{border-radius:12px;font-size:14px;line-height:1.4;padding:12px 18px;white-space:normal;text-align:center}button{cursor:pointer}button:disabled{cursor:not-allowed}.btn.ghost{color:var(--color-action-primary);background:var(--color-surface-subtle)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--color-focus-ring);outline-offset:3px}
.sidebar{width:244px;background:var(--color-surface-card);border-right:1px solid var(--color-border-default);padding:30px 20px}.brand-mark{border-radius:16px;background:var(--color-action-primary);color:white}.brand small{font-size:11px;letter-spacing:.04em}.nav-links{gap:7px}.nav-links a{min-height:48px;border-radius:12px;padding:12px 15px;font-weight:600}.nav-links a.active{color:var(--color-action-primary);background:var(--color-action-tint)}.nav-symbol svg{width:21px;height:21px;display:block}.side-bottom{border-radius:16px;background:var(--v2-surface-pale);padding:18px;color:var(--color-text-secondary)}
.content-shell{margin-left:244px}.topbar{min-height:88px;padding:19px 38px;gap:16px;border-bottom:1px solid var(--color-border-default);background:rgba(255,255,255,.97);align-items:center}.top-actions{gap:14px;flex-wrap:wrap;justify-content:flex-end}.v2-header-help{display:inline-flex;gap:9px;align-items:center;max-width:310px;border:1px solid var(--color-border-default);background:white;color:var(--color-action-primary);border-radius:12px;padding:11px 14px;font-size:12px;font-weight:700;line-height:1.4;min-height:44px;text-align:left}.v2-header-help svg{width:20px;flex:0 0 20px}.v2-header-help:hover{background:var(--color-surface-subtle)}
.main{max-width:1550px;margin:0 auto;padding:34px 38px 40px}.page-heading{margin-bottom:30px;align-items:flex-start}.page-heading h1{font-size:32px;line-height:1.15;letter-spacing:-.035em}.page-heading p{max-width:640px;line-height:1.6}.eyebrow{font-size:11px;letter-spacing:.08em;line-height:1.7}.card{border:1px solid var(--color-border-default);border-radius:20px;box-shadow:var(--v2-shadow);padding:26px}.card.soft{background:var(--v2-surface-pale);box-shadow:none}.card h2{font-size:20px;letter-spacing:-.02em}.card p{line-height:1.65}
.v2-hero{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr);gap:30px;align-items:center;overflow:hidden;background:var(--color-surface-dark);border-radius:28px;padding:40px;color:white;margin-bottom:30px}.v2-hero h1,.v2-hero h2{color:white;font-size:clamp(28px,3.3vw,45px);line-height:1.08;letter-spacing:-.045em;max-width:570px;margin:12px 0 18px}.v2-hero p{color:#E7F4FB;line-height:1.7;max-width:500px;font-size:15px}.v2-hero .eyebrow{color:var(--color-accent-highlight)}.v2-hero .btn.primary{background:var(--color-accent-highlight);color:var(--color-surface-dark);border-color:var(--color-accent-highlight)}.v2-hero .btn.secondary{background:transparent;color:white;border-color:#6EC1E4}.v2-hero .v2-card-art{border-radius:22px;overflow:hidden;align-self:stretch;display:flex;align-items:center}.v2-hero .v2-card-art svg{width:100%;height:auto;display:block}
.v2-page-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.v2-path{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0 30px}.v2-step{padding:18px;background:white;border:1px solid var(--color-border-default);border-radius:16px}.v2-step>span:first-child{display:inline-flex;width:30px;height:30px;border-radius:50%;background:var(--color-action-tint);color:var(--color-action-primary);font-weight:700;align-items:center;justify-content:center;margin-bottom:11px}.v2-step strong{display:block;font-size:14px}.v2-step small,.v2-step p{font-size:12px;line-height:1.6;color:var(--color-text-secondary);margin:7px 0 0}
.section-grid,.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.section-card,.product-card{padding:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--color-border-default);border-radius:20px;background:white;box-shadow:var(--v2-shadow)}.section-card:hover,.product-card:hover{border-color:#87AED0;transform:translateY(-2px);transition:transform var(--motion-duration)}.v2-card-art{background:var(--v2-surface-pale);overflow:hidden}.v2-card-art svg{display:block;width:100%;height:auto}.section-card>.v2-card-art{aspect-ratio:1.8}.product-card>.v2-card-art{aspect-ratio:1.6}.section-card .card-copy,.product-card .card-copy,.v2-card-copy{padding:22px;display:flex;flex:1;flex-direction:column;gap:11px}.section-card h2,.section-card h3,.product-card h2,.product-card h3{font-size:20px;line-height:1.25;letter-spacing:-.025em;margin:0}.section-card p,.product-card p{color:var(--color-text-secondary);font-size:14px;margin:0;line-height:1.6}.section-card .actions,.product-card .actions{margin-top:auto;padding-top:9px}
.v2-toolbar{display:flex;gap:14px;align-items:flex-end;margin:0 0 24px;flex-wrap:wrap;background:white;padding:18px;border:1px solid var(--color-border-default);border-radius:18px}.v2-toolbar .field{margin:0;flex:1;min-width:180px}.v2-toolbar input,.v2-toolbar select{min-height:46px}.v2-toolbar .btn{flex-shrink:0}.v2-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}.v2-detail>.v2-card-art{border-radius:24px}.v2-detail h1{font-size:36px;letter-spacing:-.035em}.v2-status{padding:15px 18px;border-radius:14px;background:var(--color-surface-subtle);border:1px solid var(--color-border-default);margin:16px 0;font-size:14px;line-height:1.6}
.v2-form{display:grid;gap:14px}.v2-form .field{margin:0}.field input,.field select,.field textarea{min-height:46px;font-weight:400}.field textarea{min-height:100px}.field span{line-height:1.5}.v2-order-line{display:flex;gap:16px;justify-content:space-between;align-items:center;padding:16px 0;border-bottom:1px solid var(--color-border-default)}.v2-order-line>div{min-width:0}.v2-order-line .actions{margin:0;flex-wrap:wrap}.v2-order-line .field{margin:0}.v2-price{font-size:24px;font-weight:700;color:var(--color-text-primary)}.v2-quantity{display:flex;align-items:center;gap:8px}.v2-quantity input{max-width:75px}
.v2-help-body{line-height:1.7}.v2-help-body h3{font-size:16px;margin-top:24px}.v2-help-body ol,.v2-help-body ul{padding-left:24px}.v2-help-body li{margin:9px 0}.v2-help-body .inline-note{padding:13px;background:var(--v2-surface-pale);border-radius:12px}
dialog{max-width:min(690px,calc(100vw - 32px));width:690px;border-radius:24px;padding:0;border:1px solid var(--color-border-default);box-shadow:0 30px 120px #00194C40;max-height:calc(100dvh - 40px);overflow:auto}dialog::backdrop{background:rgba(0,16,64,.48);backdrop-filter:blur(3px)}.dialog-content{padding:28px}.dialog-content .section-title{align-items:flex-start;gap:14px}.dialog-content .section-title h2{font-size:22px;line-height:1.3}.icon-btn{min-width:44px;min-height:44px}.table-list{min-width:0}.table-record>div{overflow-wrap:anywhere}.demo-tools{margin-top:34px;background:white;border-radius:16px;border:1px dashed #87AED0}.demo-tools summary{padding:14px 18px;color:var(--color-action-primary)}.demo-badge{background:var(--color-surface-subtle);font-size:11px;white-space:normal}.inline-note{line-height:1.7}.footer{margin-top:32px}.v2-bottom-nav,.v2-mobile-only{display:none}
@media(min-width:1600px){.section-grid,.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1150px){.section-grid,.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar{padding:18px 26px}.main{padding:28px 26px}.v2-hero{padding:30px;gap:22px}.topbar .context small{display:none}.v2-path{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1024px){.sidebar{width:195px;padding:26px 14px}.content-shell{margin-left:195px}.v2-hero{grid-template-columns:1fr}.v2-hero .v2-card-art,.v2-hero .v2-card-art svg{max-height:250px}.v2-detail{gap:20px}.topbar .avatar{display:none}}
@media(max-width:760px){.topbar{flex-wrap:wrap;gap:10px;padding:15px 20px}.top-actions{flex:1;justify-content:flex-end}.topbar .context{font-size:12px}.v2-header-help{font-size:11px;max-width:230px}.v2-detail{grid-template-columns:1fr}.v2-detail>.v2-card-art,.v2-detail>.v2-card-art svg{max-height:320px}}
@media(max-width:640px){.sidebar{width:auto;padding:12px 18px;position:relative;border-right:0;border-bottom:1px solid var(--color-border-default);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.sidebar .brand{margin:0}.sidebar .brand small,.sidebar .nav-label,.sidebar .side-bottom{display:none}.sidebar .nav-links{display:none;width:100%;padding-top:15px}.sidebar.expanded .nav-links{display:flex}.sidebar .mobile-menu{display:block;background:var(--color-surface-subtle);color:var(--color-action-primary);border-radius:10px;border:0;padding:10px 15px}.content-shell{margin-left:0}.topbar{padding:12px 18px;position:relative;display:grid;grid-template-columns:1fr;gap:10px;min-height:0}.topbar .context{display:flex;justify-content:space-between;font-size:12px}.topbar .context small{display:none}.top-actions{display:flex;width:100%;justify-content:space-between;gap:10px}.v2-header-help{max-width:none;flex:1;font-size:11px;padding:10px 12px;min-height:46px}.demo-badge{max-width:82px;font-size:9px;padding:6px 8px}.main{padding:24px 18px 94px;width:100%}.page-heading{display:block;margin-bottom:24px}.page-heading h1{font-size:29px}.page-heading p{font-size:14px}.beneficiary{margin-top:18px;max-width:none;padding:12px 14px;width:100%}.beneficiary .field{margin:0}.beneficiary select{min-height:44px}.card{padding:20px;border-radius:18px}.v2-hero{padding:26px 22px;border-radius:22px;gap:24px;margin-bottom:24px}.v2-hero h1,.v2-hero h2{font-size:32px}.v2-hero p{font-size:14px}.v2-hero .actions{display:flex;flex-direction:column;align-items:stretch}.v2-hero .v2-card-art,.v2-hero .v2-card-art svg{max-height:180px}.section-grid,.product-grid{grid-template-columns:1fr;gap:17px}.section-card>.v2-card-art{max-height:172px}.product-card>.v2-card-art,.product-card>.v2-card-art svg,.section-card>.v2-card-art svg{max-height:190px}.v2-card-copy,.section-card .card-copy,.product-card .card-copy{padding:20px}.v2-path{gap:10px}.v2-step{padding:14px}.v2-step strong{font-size:12px}.v2-toolbar{padding:15px;gap:12px}.v2-toolbar .field{min-width:0;flex:1 0 100%}.v2-toolbar .btn{width:100%}.v2-order-line{align-items:flex-start;flex-wrap:wrap;gap:12px}.v2-order-line .actions{width:100%;justify-content:flex-start}.v2-detail h1{font-size:28px}.dialog-content{padding:22px}.dialog-content .section-title h2{font-size:19px}dialog{max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);border-radius:20px}.v2-bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;padding:8px 7px max(10px,env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-top:1px solid var(--color-border-default);z-index:30;gap:2px;box-shadow:0 -5px 24px #00194C07}.v2-bottom-nav a{display:flex;flex:1;min-width:0;align-items:center;justify-content:center;flex-direction:column;gap:4px;color:var(--color-text-secondary);font-size:9px;min-height:48px;text-decoration:none;border-radius:10px;font-weight:600}.v2-bottom-nav a.active{background:var(--color-action-tint);color:var(--color-action-primary)}.v2-bottom-nav svg{width:21px;height:21px}.v2-mobile-only{display:block}.footer{font-size:11px;gap:15px;flex-wrap:wrap}.metrics{gap:8px}.metrics .card{padding:14px 10px}.metric strong{font-size:24px}.metric-label{font-size:11px}.grid.cols-3{grid-template-columns:1fr}.grid.cols-3.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.actions .btn{min-width:0}.data-row{flex-wrap:wrap;gap:12px}.row-end{flex-wrap:wrap;justify-content:flex-start}.table-record{padding:16px;gap:14px}.table-record .actions{display:flex;flex-direction:column;align-items:stretch}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}.section-card:hover,.product-card:hover{transform:none}}

.v2-more{margin-top:20px;color:var(--color-text-secondary)}.v2-more summary{font-size:12px;display:flex;align-items:center;padding:8px 12px}.v2-more nav{display:flex;flex-direction:column;gap:4px}.v2-more a{display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;border-radius:10px;color:var(--color-text-secondary);font-size:12px;text-decoration:none}.v2-more a:hover,.v2-more a.active{background:var(--color-surface-subtle);color:var(--color-action-primary)}.v2-more svg{width:18px;height:18px}@media(max-width:640px){.v2-more{display:none;width:100%;margin:10px 0 0}.sidebar.expanded .v2-more{display:block}.v2-more nav{display:flex;flex-direction:column}}

/* Existing R4 shell uses CSS grid. */
.app-shell{grid-template-columns:244px minmax(0,1fr)}.content-shell{margin-left:0}.sidebar{color:var(--color-text-primary)}.brand{color:var(--color-text-primary)}.brand small,.nav-label{color:var(--color-text-secondary)}.nav-links a{color:var(--color-text-secondary)}.nav-links a:hover{background:var(--color-action-tint);color:var(--color-action-primary)}.side-bottom strong{color:var(--color-text-primary)}.topbar{height:auto}.table-record .btn,.variant,.tab{min-height:44px}.check{min-height:44px;align-items:center}.beneficiary select{min-height:44px}.btn.ghost{padding:12px 15px}@media(max-width:1024px){.app-shell{grid-template-columns:195px minmax(0,1fr)}}@media(max-width:640px){.app-shell{display:block}.mobile-menu{position:static}.sidebar.expanded .nav-label{display:none}.topbar{height:auto}}

#main-content:focus{outline:none}@media(max-width:640px){.sidebar{flex-direction:row}.v2-toolbar>.actions{width:100%;gap:8px}.v2-toolbar>.actions>.btn{flex:1 1 calc(50% - 8px);width:auto}.v2-toolbar>.btn{width:auto;flex:1 1 45%}}

.v2-path{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.v2-toolbar .tabs{flex:1 1 100%;margin:0}.v2-toolbar .tabs .btn{width:auto;flex:0 1 auto}@media(max-width:640px){.v2-path{grid-template-columns:repeat(2,minmax(0,1fr))}.v2-path>.v2-step:last-child:nth-child(odd){grid-column:1/-1}.v2-toolbar .tabs{width:100%;gap:8px}.v2-toolbar .tabs .btn{width:auto;flex:1 1 calc(50% - 8px);padding:11px 9px}}

/* Structured shop options, correction R2. */
.v2-option-editor{border:1px solid var(--color-border-default);background:var(--v2-surface-pale);border-radius:16px;padding:16px}.v2-option-editor h3{font-size:15px;margin-bottom:12px}.v2-option-row{display:block;padding:16px 0;border-bottom:1px solid var(--color-border-default)}.v2-option-row:first-child{padding-top:0}.v2-option-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,.4fr);gap:10px 12px}.v2-option-row .field{margin:0;min-width:0}.v2-option-row .check{grid-column:1/-1;margin:0;min-height:44px}.v2-option-row input[type=number]{min-width:0}.v2-option-editor .actions{margin-top:12px}.v2-option-editor .inline-note{padding:8px 0 0}.v2-option-editor fieldset{margin:0;padding:0;border:0;min-width:0}.v2-option-editor legend{font-size:14px;font-weight:700;padding:0 0 7px}@media(max-width:640px){.v2-option-editor{padding:14px}.v2-option-fields{grid-template-columns:1fr}}
.footer a{display:inline-flex;align-items:center;min-height:44px;padding:10px 8px;border-radius:8px}.footer a:focus-visible{outline:3px solid var(--color-focus-ring);outline-offset:2px}

/* Original image assets, blue AISA integration R4. */
.v2-card-art img.v2-raster-art{display:block;width:100%;height:100%;object-fit:cover;object-position:center}.v2-hero .v2-card-art{aspect-ratio:1.6}.v2-detail>.v2-card-art{aspect-ratio:1.35;max-height:480px}.v2-detail>.v2-card-art img.v2-raster-art{max-height:480px}@media(max-width:1024px){.v2-hero .v2-card-art img.v2-raster-art{max-height:250px}}@media(max-width:760px){.v2-detail>.v2-card-art img.v2-raster-art{max-height:320px}}@media(max-width:640px){.v2-hero .v2-card-art img.v2-raster-art{max-height:180px}}
.v2-card-art img.v2-raster-art--product{object-fit:contain;background:var(--v2-surface-product)}.v2-activity-preview{display:grid;grid-template-columns:80px minmax(0,1fr);gap:14px;align-items:start;padding:16px 0;border-bottom:1px solid var(--color-border-default)}.v2-activity-preview:last-child{border-bottom:0}.v2-activity-preview>.data-row{border:0;padding:0;min-width:0}.v2-activity-thumb{width:80px;height:70px;border-radius:12px;overflow:hidden}.v2-activity-detail-art{height:240px;border-radius:16px;overflow:hidden;margin:8px 0 20px}.v2-activity-detail-art svg{display:block;width:100%;height:100%}@media(max-width:640px){.v2-activity-preview{grid-template-columns:72px minmax(0,1fr);gap:12px}.v2-activity-thumb{width:72px;height:66px}.v2-activity-detail-art{height:180px}}
.v2-activity-thumb>img.v2-raster-art,.v2-activity-thumb>svg{display:block;width:100%;height:100%;object-fit:cover;object-position:center}

/* AISA source families with proposed UI roles and preserved native logo ratio. */
body,input,select,textarea{font-family:var(--font-ui)}h1,h2,h4,h5,h6,.btn,.nav-links,.v2-bottom-nav,.v2-header-help,.tab,.mobile-menu{font-family:var(--font-heading)}h3{font-family:var(--font-ui)}.brand{align-items:center}.brand-logo{display:block;width:74px;height:auto;aspect-ratio:154/113;object-fit:contain;flex:0 0 auto;max-width:154px}.v2-hero a:focus-visible,.v2-hero button:focus-visible{outline-color:var(--color-accent-highlight)}@media(max-width:640px){.brand-logo{width:68px}}
