/* AIOVI working surfaces v1. Opt-in only; marketing and Seller Link stay isolated.
   Existing page CSS owns structure. This file owns the shared visual primitives. */
@font-face{font-family:AIOVIGeist;src:url('/offer/fonts/Geist.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
body[data-aiovi-portal]{
  --navy:#081722;--navy2:#123044;--ink:#142936;--muted:#566773;
  --paper:#fffefa;--soft:#f7f5ef;--mist:#eef1ed;--line:#d7d9d2;
  --gold:#b89a60;--focus:#8f6f35;--ok:#286343;--warn:#805f24;--danger:#963d35;
  --ui-radius:12px;--ui-shadow:0 4px 18px #14293608;
  color:var(--ink);font-family:AIOVIGeist,system-ui,sans-serif;line-height:1.6;
  background:linear-gradient(108deg,#f4eee2 0%,#fffdf7 52%,#edf1f0 100%);
  min-width:0;min-height:100vh;margin:0;color-scheme:light;
}
body[data-aiovi-portal]::before,body[data-aiovi-portal]::after{content:none}
body[data-aiovi-portal] :where(main,section,article,div,form,fieldset){min-width:0}
body[data-aiovi-portal] :where(h1,h2,h3,h4,p,dd,strong,a,code){overflow-wrap:anywhere}
body[data-aiovi-portal] :where(h1,h2,h3,h4){color:var(--ink);letter-spacing:-.025em;line-height:1.25}
body[data-aiovi-portal] :where(h1){font-size:clamp(1.85rem,3vw,2.65rem);font-weight:600}
body[data-aiovi-portal] :where(h2){font-size:1.4rem;font-weight:600}
body[data-aiovi-portal] :where(.muted,.subtle,.help,.row-meta){color:var(--muted)}
body[data-aiovi-portal] .eyebrow{color:#806538;font-size:.72rem;font-weight:600;letter-spacing:.12em}
body[data-aiovi-portal] :where(.buyer-shell,.shell,.opportunity-shell){width:min(1180px,calc(100% - 64px));padding-top:38px;padding-bottom:72px}
body[data-aiovi-portal] :where(.page-heading,.dashboard-head,.workspace-intro){margin-bottom:26px}
body[data-aiovi-portal] :where(.page-heading h1,.dashboard-head h1){font-size:clamp(1.85rem,3vw,2.65rem);line-height:1.18;letter-spacing:-.035em}
body[data-aiovi-portal] :where(.page-heading p,.dashboard-head p){font-size:1rem;line-height:1.6;max-width:70ch}
/* Shared surfaces, including the accepted-answer section when PR #217 is integrated. */
body[data-aiovi-portal] :where(.surface,.card,.channel,.row-card,.item,.offer-card,.offer,.mini-card,.dashboard-tile,.today-card,.dashboard-profile,.procurement-brief,.brief-state,.inbox-card,.match-card,.evidence-card,.knowledge-stat,.upgrade){
  color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:var(--ui-radius);box-shadow:var(--ui-shadow);
}
body[data-aiovi-portal] :where(.card,.surface-pad,.procurement-brief){padding:26px}
body[data-aiovi-portal] :where(.row-card,.item,.offer-card,.today-card,.dashboard-profile){padding:20px}
body[data-aiovi-portal] :where(.row-card,.dashboard-tile){transition:transform 140ms ease,border-color 140ms ease,box-shadow 140ms ease}
body[data-aiovi-portal] :where(a.row-card,.dashboard-tile,.offer-card):hover{transform:translateY(-2px);border-color:#b9a77f;box-shadow:0 7px 20px #1429360d}
body[data-aiovi-portal] :where(a.row-card,.dashboard-tile,.offer-card):active{transform:translateY(0);box-shadow:inset 0 1px 4px #14293612}
body[data-aiovi-portal] :where(.dashboard-tile)::before{content:none}
body[data-aiovi-portal] .dashboard-tile{min-height:178px;padding:24px}
body[data-aiovi-portal] .dashboard-tile .metric{color:var(--ink);font-size:1.5rem}
body[data-aiovi-portal] :where(.section-head,.item-head,.today-card-head,.dashboard-profile,.workspace-intro){flex-wrap:wrap}
/* Real native controls, no substituted interaction or business logic. */
body[data-aiovi-portal] :where(button,.primary,.secondary,.secondary-btn,.primary-action,.decision-primary,.decision-secondary,.pipeline-filter,.action-link){
  font-family:inherit;font-size:.95rem;min-height:44px;max-width:100%;white-space:normal;
  border-radius:8px;padding:10px 16px;line-height:1.4;cursor:pointer;transition:transform 140ms ease,box-shadow 140ms ease;
}
body[data-aiovi-portal] :where(button,.primary,.primary-action,.decision-primary){background:var(--navy);color:#fffdf7;border:1px solid #a38a544d;box-shadow:0 4px 10px #08172214}
body[data-aiovi-portal] :where(.secondary,.secondary-btn,button.secondary,.decision-secondary,.pipeline-filter,.action-link){background:var(--paper);color:var(--ink);border:1px solid #c8d0cc;box-shadow:none}
body[data-aiovi-portal] button.offer-card{background:var(--paper);color:var(--ink);border:1px solid var(--line);box-shadow:var(--ui-shadow);text-align:left}
body[data-aiovi-portal] :where(.quiet-button,.icon-button,.text-action,.quiet-link){background:transparent;color:var(--ink);border:1px solid transparent;box-shadow:none;min-height:44px}
body[data-aiovi-portal] :where(button,.primary,.secondary,.primary-action):hover:not(:disabled){transform:translateY(-1px)}
body[data-aiovi-portal] :where(button,.primary,.secondary,.primary-action):active:not(:disabled){transform:translateY(0)}
body[data-aiovi-portal] :where(button:disabled,input:disabled,select:disabled){opacity:.55;cursor:not-allowed;transform:none;box-shadow:none}
body[data-aiovi-portal] :where(.danger){color:#963d35;background:#fff2ed;border-color:#bf8d7c}
body[data-aiovi-portal] :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){
  font:inherit;font-size:1rem;color:var(--ink);background:var(--paper);border:1px solid #bac6c4;border-radius:8px;min-height:44px;max-width:100%;padding:10px 12px;box-sizing:border-box;
}
body[data-aiovi-portal] :where(input[type=checkbox],input[type=radio]){accent-color:#886a34;flex-shrink:0}
body[data-aiovi-portal] :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid #8f6f35;outline-offset:3px}
body[data-aiovi-portal] :where(.segmented button.active,[aria-pressed=true],.choice-chip.selected){background:#fff9e9;color:var(--ink);border:1px solid #a68a4d;box-shadow:inset 0 -3px #a68a4d;font-weight:700}
body[data-aiovi-portal] :where(.status-chip,.pill,.ownership,.status){border:1px solid #c9d2cb;background:#edf1ed;color:#415b51;border-radius:6px;font-size:.8rem;font-weight:600;white-space:normal;max-width:100%}
body[data-aiovi-portal] :where(.status-chip.warn,.pill-invited){color:#76531f;background:#faf0d8;border-color:#d9c59b}
body[data-aiovi-portal] :where(.error,.field-error,.section-save-status.error){color:#963d35}
body[data-aiovi-portal] :where(.notice,.next-action,.empty-state,.pipeline-empty,.brief-state){background:#f5f3eb;border:1px solid var(--line);border-radius:10px;padding:20px;color:var(--muted)}
body[data-aiovi-portal] .next-action{border-left:3px solid var(--gold)}
body[data-aiovi-portal] .skeleton{background:linear-gradient(100deg,#e9ebe5,#f6f5ee,#e9ebe5)}
/* Buyer chrome retains the existing mobile menu and its handlers. */
body[data-aiovi-portal] .buyer-topbar{background:var(--navy);color:#f5f0e5;border-bottom:1px solid #b89a6038;backdrop-filter:none;gap:20px;padding:10px 32px;min-height:88px}
body[data-aiovi-portal] .buyer-brand img{width:144px;height:68px;max-height:68px;object-fit:contain}
body[data-aiovi-portal] :where(.buyer-company,.buyer-topbar .quiet-button,.buyer-topbar .icon-button){color:#d7dfdf}
body[data-aiovi-portal] .buyer-company{max-width:220px;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
body[data-aiovi-portal] :where(.buyer-nav a,.mobile-nav a){color:#dae1e0;min-height:44px;display:inline-flex;align-items:center;border-radius:6px;font-weight:500}
body[data-aiovi-portal] :where(.buyer-nav a:hover,.buyer-nav a[aria-current=page],.mobile-nav a[aria-current=page]){background:#ffffff0d;color:#fffdf7;box-shadow:inset 0 -2px var(--gold)}
body[data-aiovi-portal] .mobile-nav{background:var(--navy);border-bottom:1px solid #b89a6038;padding:8px 16px}
/* Reseller chrome: its existing session controller remains authoritative. */
body[data-aiovi-portal=reseller]{padding-top:0}
body[data-aiovi-portal] .portal-header{position:sticky;top:0;background:var(--navy);box-shadow:0 3px 12px #08172212;backdrop-filter:none;border-bottom:1px solid #b89a6038}
body[data-aiovi-portal] .portal-header-inner{height:auto;min-height:88px;flex-wrap:wrap;padding-block:8px}
body[data-aiovi-portal] .portal-brand img{width:144px;height:68px;object-fit:contain;display:block}
body[data-aiovi-portal] .portal-context-label{color:#c2cdce}
body[data-aiovi-portal] .portal-nav{height:auto;min-height:52px;flex-wrap:wrap;overflow:visible;padding-block:4px}
body[data-aiovi-portal] .portal-nav a{min-height:44px;color:#d0dcdd;border-radius:6px;font-weight:500}
body[data-aiovi-portal] .portal-nav a[aria-current=page]{background:#ffffff0b;box-shadow:inset 0 -2px var(--gold);color:#fffdf7}
body[data-aiovi-portal] .portal-org-wrap{min-width:0}
body[data-aiovi-portal] .portal-org-wrap select{color:#f8f4e8;background:#123044;border-color:#53615f;max-width:230px}
body[data-aiovi-portal] .portal-logout{min-height:44px!important;color:#d7dfdf!important;margin-left:auto!important}
/* Welcome is a working header, not a second marketing hero. */
body[data-aiovi-portal] .partner-hero{display:block;min-height:0;border:0;border-radius:0;background:none;box-shadow:none;margin:0 0 32px;color:var(--ink);overflow:visible}
body[data-aiovi-portal] .partner-hero::before{content:none}
body[data-aiovi-portal] .partner-hero-copy{padding:0;max-width:790px}
body[data-aiovi-portal] .partner-hero h1{font-size:clamp(1.85rem,3vw,2.65rem);line-height:1.15;margin:8px 0 16px;color:var(--ink)}
body[data-aiovi-portal] .partner-hero h1 em{color:var(--muted);font-weight:400}
body[data-aiovi-portal] .partner-hero p{color:var(--muted);font-size:1rem}
body[data-aiovi-portal] .partner-hero .eyebrow{color:#806538}
body[data-aiovi-portal] .hero-signals{margin-top:16px}
body[data-aiovi-portal] .hero-signals span{background:#fffefa;color:var(--muted);border-color:var(--line);border-radius:6px;font-weight:400}
/* Detail and comparison retain their own structures; long content reflows. */
body[data-aiovi-portal] :where(.drawer-panel,.request-dialog,dialog){background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:14px;max-width:calc(100vw - 24px);box-shadow:0 12px 60px #08172230}
body[data-aiovi-portal] :where(.detail-drawer){background:#08172270}
body[data-aiovi-portal] :where(dialog)::backdrop{background:#08172270}
body[data-aiovi-portal] :where(.detail-section,.detail-block){border-color:var(--line)}
body[data-aiovi-portal] :where(.customer-answer-text,.answer-source-text){white-space:pre-wrap;overflow-wrap:anywhere}
body[data-aiovi-portal] :where(table){border-collapse:collapse;width:100%;font-size:.9rem}
body[data-aiovi-portal] :where(th,td){border-color:var(--line);padding:12px;vertical-align:top;overflow-wrap:anywhere}
body[data-aiovi-portal] :where(th){background:#eef0e9;color:var(--ink);font-weight:600}
body[data-aiovi-portal] :where(.table-wrap,.comparison-scroll,.offer-comparison){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
body[data-aiovi-portal] :where(.today-list>a,.row-meta,.actions,.brief-actions,.decision-actions,.evidence-actions){flex-wrap:wrap}
body[data-aiovi-portal] :where(.today-list small){white-space:normal}
body[data-aiovi-portal] .today-list strong,body[data-aiovi-portal] .today-list small{display:block}
body[data-aiovi-portal] .company-row strong{overflow-wrap:anywhere;text-align:right}
body[data-aiovi-portal] .new-link code{white-space:normal;overflow-wrap:anywhere}
body[data-aiovi-portal=marketplace] main{width:min(1180px,calc(100% - 64px));max-width:none;margin:0 auto;padding:0 0 72px}
body[data-aiovi-portal=marketplace] main>header{background:var(--navy);color:#f5f0e5;margin:0 -32px 32px;padding:12px 32px;flex-wrap:wrap;gap:12px}
body[data-aiovi-portal=marketplace] main>header img{width:144px;height:68px;object-fit:contain;vertical-align:middle;margin-right:20px}
body[data-aiovi-portal=marketplace] main>header span{color:#c2cdce}
@media(max-width:1100px){
 body[data-aiovi-portal] .buyer-topbar{flex-wrap:wrap;gap:8px 20px;padding-inline:24px}
 body[data-aiovi-portal] .buyer-account{margin-left:auto}
 body[data-aiovi-portal] .buyer-nav{order:3;width:100%;margin:0}
 body[data-aiovi-portal] :where(.buyer-shell,.shell,.opportunity-shell){width:calc(100% - 40px)}
}
@media(max-width:820px){
 body[data-aiovi-portal] .buyer-topbar{padding:8px 16px;position:relative}
 body[data-aiovi-portal] .buyer-nav{display:none}
 body[data-aiovi-portal] .mobile-nav-button{display:inline-flex}
 body[data-aiovi-portal] .buyer-account{flex-wrap:nowrap;justify-content:flex-end;max-width:calc(100% - 132px);gap:4px;margin-left:0}
 body[data-aiovi-portal] .buyer-account button{padding-inline:8px;font-size:.85rem}
 body[data-aiovi-portal] .buyer-brand img{width:112px;height:62px;max-height:62px}
 body[data-aiovi-portal] .buyer-company{flex-basis:100%;max-width:100%;font-size:.8rem}
 body[data-aiovi-portal] :where(.buyer-brand img,.portal-brand img){width:124px;height:62px}
 body[data-aiovi-portal] .portal-header{position:relative}
 body[data-aiovi-portal] :where(.portal-header-inner,.portal-nav){width:calc(100% - 28px)}
 body[data-aiovi-portal] .portal-nav{gap:4px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-aiovi-portal] .portal-nav a{white-space:normal;font-size:.9rem;padding:10px}
 body[data-aiovi-portal] .portal-org-wrap{order:3;width:100%;margin:0}
 body[data-aiovi-portal] .portal-org-wrap select{width:100%;max-width:none}
 body[data-aiovi-portal] :where(.buyer-shell,.shell,.opportunity-shell){width:calc(100% - 28px);padding-top:26px}
 body[data-aiovi-portal] :where(.page-heading,.workspace-intro){align-items:flex-start;flex-direction:column;gap:18px}
 body[data-aiovi-portal] :where(.grid-2,.grid-3,.dashboard-grid,.seller-today,.profile-grid,.detail-grid,.task-grid,.offer-grid,.compare-grid,.match-grid){grid-template-columns:minmax(0,1fr)}
 body[data-aiovi-portal] :where(.card,.surface-pad,.procurement-brief,.request-dialog){padding:18px}
 body[data-aiovi-portal] :where(.row-card){grid-template-columns:minmax(0,1fr);gap:12px}
 body[data-aiovi-portal] .row-card-wrap:not(:has([data-delete-draft])) .row-card{padding-bottom:20px}
 body[data-aiovi-portal] :where(.row-side){align-items:flex-start;justify-content:flex-start;flex-wrap:wrap}
 body[data-aiovi-portal] :where(.filterbar,.inline,.company-row,.profile-intro){flex-wrap:wrap}
 body[data-aiovi-portal] :where(.filterbar input,.filterbar select){min-width:0;width:100%}
 body[data-aiovi-portal] .company-row strong{text-align:left}
 body[data-aiovi-portal=marketplace] main{width:calc(100% - 28px)}
 body[data-aiovi-portal=marketplace] main>header{margin-inline:-14px;padding-inline:14px}
}
@media(max-width:380px){
 body[data-aiovi-portal] .buyer-account{max-width:none;width:100%;justify-content:space-between}
 body[data-aiovi-portal] .buyer-company{flex-basis:100%}
 body[data-aiovi-portal] :where(.actions,.decision-actions,.brief-actions){flex-direction:column;align-items:stretch}
 body[data-aiovi-portal] :where(.actions>* ,.decision-actions>*,.brief-actions>*){width:100%;box-sizing:border-box}
}
@media(prefers-reduced-motion:reduce){body[data-aiovi-portal] *,body[data-aiovi-portal] *::before,body[data-aiovi-portal] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important;transform:none!important}}
