/* Customer workspace: the same navy, cream, coral and teal palette as the product stories. */
.portal-home:where(:has(#signed-in:not([hidden]))),.device-page{--ui-ink:#17243b;--ui-cream:#f7f2e9;--ui-paper:#fffdf9;--ui-coral:#b94d38;--ui-gold:#e2a83e;--ui-teal:#226d68;--ui-line:#e4ddd1;background:var(--ui-cream);color:var(--ui-ink)}
.portal-home:where(:has(#signed-in:not([hidden]))) .topbar,.device-page .topbar{background:var(--ui-paper);border-color:var(--ui-line);box-shadow:none}
.portal-home:where(:has(#signed-in:not([hidden]))) .shell{max-width:1200px;padding-top:30px}
.portal-home:where(:has(#signed-in:not([hidden]))) .card,.device-page .card{border-color:var(--ui-line);background:var(--ui-paper);box-shadow:0 12px 32px rgba(23,36,59,.055)}
.portal-home:where(:has(#signed-in:not([hidden]))) .eyebrow,.device-page .eyebrow{color:#9a442f}
.portal-home:where(:has(#signed-in:not([hidden]))) .hint,.portal-home:where(:has(#signed-in:not([hidden]))) .muted,.device-page .hint{color:#53616b}
.portal-home:where(:has(#signed-in:not([hidden]))) .button.primary,.device-page .button.primary{background:#174c4a;border-color:#174c4a;color:#fff}
.portal-home:where(:has(#signed-in:not([hidden]))) .button.primary:hover,.device-page .button.primary:hover{background:#103a3a;border-color:#103a3a}
.portal-home:where(:has(#signed-in:not([hidden]))) .button.subtle,.device-page .button.subtle{background:#fffdf9;border-color:#bfc5c5;color:#233b4a}
.portal-home:where(:has(#signed-in:not([hidden]))) .button.subtle:hover,.device-page .button.subtle:hover{background:#f6eadc;border-color:#c89176;color:#723825}
.portal-home:where(:has(#signed-in:not([hidden]))) input,.portal-home:where(:has(#signed-in:not([hidden]))) select,.portal-home:where(:has(#signed-in:not([hidden]))) textarea,.device-page input{border-color:#bfc9c7;background:#fff;color:#17243b}
.portal-home:where(:has(#signed-in:not([hidden]))) input:hover,.portal-home:where(:has(#signed-in:not([hidden]))) select:hover,.portal-home:where(:has(#signed-in:not([hidden]))) textarea:hover,.device-page input:hover{border-color:#6f8c8a}
.portal-home:where(:has(#signed-in:not([hidden]))) .form-grid label,.portal-home:where(:has(#signed-in:not([hidden]))) #agency-key-form>label,.device-page .form-grid label{color:#253a46}

/* Account banner and navigation. */
.portal-home .account-card{position:relative;isolation:isolate;overflow:hidden;align-items:center;padding:clamp(26px,4vw,43px);min-height:176px;border:1px solid #27364a;border-radius:24px;background:linear-gradient(115deg,#17243b 0%,#20394a 69%,#205955 100%);box-shadow:0 20px 42px rgba(23,36,59,.15)}
.portal-home .account-card::before{content:"";position:absolute;right:18%;top:-122px;width:340px;height:340px;border:1px solid rgba(255,255,255,.18);border-radius:50%;z-index:-1;pointer-events:none}
.portal-home .account-card::after{content:"";position:absolute;right:-58px;bottom:-135px;width:300px;height:300px;border-radius:50%;background:rgba(226,168,62,.14);z-index:-1;pointer-events:none}
.portal-home .account-card .eyebrow{color:#ffc871!important}
.portal-home .account-card h2{font-size:clamp(1.7rem,3.4vw,2.65rem);letter-spacing:-.04em}
.portal-home .account-card .muted{color:#e5e9ed!important}
.account-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:9px;margin-left:auto}
.portal-home .account-card .button{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.5);color:#fff}
.portal-home .account-card .button:hover{background:rgba(255,255,255,.23);border-color:#fff;color:#fff}
.portal-home .workspace-tabs{display:flex;flex-wrap:wrap;gap:4px;width:100%;padding:6px;margin:0 0 28px;border:1px solid #e2d8cb;border-radius:15px;background:#efe7da;box-shadow:none}
.portal-home .workspace-tab{flex:1 1 auto;border-radius:10px;color:#344451;font-weight:800}
.portal-home .workspace-tab:hover:not([aria-selected="true"]){background:#fff4e5;color:#793b2a}
.portal-home .workspace-tab[aria-selected="true"]{background:#17243b;color:#fff;box-shadow:0 4px 12px rgba(23,36,59,.15)}
.portal-home .workspace-tab:focus-visible{outline:3px solid #b94d38;outline-offset:2px}

/* Applications: two distinct product surfaces, both with readable dark text. */
.portal-home #app-access-card>.eyebrow{color:#9a442f}
.portal-home #app-access-card h2,.portal-home .commerce-orders-header h2{color:#17243b}
.portal-home .app-access-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:22px;margin-top:25px}
.portal-home .app-entry{display:flex;flex-direction:column;grid-column:auto;min-height:315px;padding:30px;border-radius:22px;color:#17243b;box-shadow:0 14px 34px rgba(23,36,59,.075)}
.portal-home .app-entry--featured{border:1px solid #e8cbb5;background:linear-gradient(145deg,#fffaf2,#f7ddca)}
.portal-home .app-entry--secondary{border:1px solid #c5dcd8;background:linear-gradient(145deg,#f7fbf9,#dcece8)}
.portal-home .app-entry::before{content:"";display:block;width:68px;height:5px;margin-bottom:22px;border-radius:99px;background:#c35c43}
.portal-home .app-entry--secondary::before{background:#226d68}
.portal-home .app-entry .app-monogram{width:58px;height:58px;border:1px solid #e3c5af;border-radius:17px;background:#fff9f0;color:#743d2b}
.portal-home .app-entry--secondary .app-monogram{border-color:#bdd8d4;background:#f8fffc;color:#175853}
.portal-home .app-entry .app-monogram.app-icon{border:0;background:transparent}
.portal-home .app-entry .app-kicker{color:#9a442f}
.portal-home .app-entry--secondary .app-kicker{color:#175d62}
.portal-home .app-entry h3{font-size:clamp(1.38rem,2.4vw,1.8rem);line-height:1.16}
.portal-home .app-entry .hint,.portal-home .app-entry--featured .hint{color:#41525d}
.portal-home .app-entry .app-status{border:1px solid #d4c5b7;background:#fffdf9;color:#514f4d}
.portal-home .app-entry .app-status.active{border-color:#a5d5bf;background:#dff2e6;color:#205d42}
.portal-home .app-entry .app-status.unavailable{border-color:#d5d5d5;background:#f2f1ed;color:#555}
.portal-home .app-entry .commerce-status{margin-top:19px!important;padding:12px 14px;border:1px solid rgba(23,36,59,.1);border-radius:10px;background:rgba(255,255,255,.55)}
.portal-home .app-entry .button-row{margin-top:auto;padding-top:20px}
.portal-home .app-entry .app-launch{background:#17243b;border-color:#17243b;color:#fff}
.portal-home .app-entry .app-launch:hover{background:#2c425c;border-color:#2c425c;color:#fff}
.portal-home .app-entry .app-action-secondary{background:#fffdf9;border-color:#c5a998;color:#783b2a}
.portal-home .app-entry .app-permissions{border-color:rgba(23,36,59,.17)}
.portal-home .app-entry .app-permissions summary{color:#234d57}
.portal-home .app-entry .app-member{border-color:rgba(23,36,59,.12)}
.portal-home .app-entry .app-member .hint{color:#52616a}
.portal-home .app-entry .app-member .button{border-color:#b6c9c4;background:#fff;color:#194b48}

/* Plans and orders: distinct headings and cards instead of repeated green panels. */
.portal-home .commerce-hero{border:1px solid #1d3445;background:#17243b;box-shadow:0 18px 38px rgba(23,36,59,.13)}
.portal-home .commerce-hero .eyebrow{color:#ffc871}
.portal-home .commerce-hero-copy>p:not(.eyebrow){color:#e4e9ed}
.portal-home .commerce-hero-media{background:radial-gradient(circle at 72% 28%,#f5cd78 0 11%,transparent 12%),radial-gradient(circle at 22% 78%,#d5ad8d 0 12%,transparent 13%),linear-gradient(145deg,#9d4b3c,#cf8056)}
.portal-home #agency-key-form{border-color:#e6c49a;background:#fff9ee}
.portal-home #agency-key-form .eyebrow{color:#9a442f}
.portal-home .commerce-app-section:nth-child(odd){border-top:5px solid #b94d38}
.portal-home .commerce-app-section:nth-child(even){border-top:5px solid #226d68}
.portal-home .commerce-app-section{background:#fffdf9}
.portal-home .commerce-kicker{color:#8d4432}
.portal-home .commerce-app-section:nth-child(even) .commerce-kicker{color:#1c625e}
.portal-home .commerce-current{background:#f4efe6;color:#43525a}
.portal-home .commerce-current.has-plan{background:#e2f0e7;color:#205b44}
.portal-home .plan-row{border-color:#e0d9cd;background:#fff}
.portal-home .plan-row.is-current{border-color:#226d68;box-shadow:0 0 0 2px rgba(34,109,104,.15)}
.portal-home .plan-price-main{color:#17243b}
.portal-home .plan-highlights li::before{color:#b94d38}
.portal-home .plan-media-slot{border-color:#dfd0be;background:radial-gradient(circle at 74% 24%,rgba(255,255,255,.85) 0 9%,transparent 9.5%),linear-gradient(135deg,#f9e7d4,#e8bf9b)}
.portal-home .commerce-app-section:nth-child(even) .plan-media-slot{border-color:#c1dbd7;background:linear-gradient(135deg,#e7f2ee,#a8d1cb)}
.portal-home .commerce-orders-header{padding:24px 28px;border:1px solid #e4ddd1;border-radius:20px;background:#fffdf9}
.portal-home .orders-summary-item{border-color:#e3d8ca;background:#fffdf9}
.portal-home .orders-summary-item:nth-child(4n+1){border-top:4px solid #17243b}
.portal-home .orders-summary-item:nth-child(4n+2){border-top:4px solid #e2a83e}
.portal-home .orders-summary-item:nth-child(4n+3){border-top:4px solid #226d68}
.portal-home .orders-summary-item:nth-child(4n){border-top:4px solid #b94d38}
.portal-home .orders-summary-item strong,.portal-home .order-amount strong{color:#17243b}
.portal-home .order-card{border-left:5px solid #226d68;background:#fffdf9}
.portal-home .order-card:nth-child(even){border-left-color:#b94d38}
.portal-home .demo-payment-panel{border-color:#e4ddd1;background:#f8f2e9}

/* Family forms and membership rows. */
.portal-home .family-card{position:relative;overflow:hidden;padding:30px 34px;border-color:#e9cbb5!important;background:linear-gradient(110deg,#fff9ef,#f5dcc8)!important}
.portal-home .family-card::after{content:"";position:absolute;right:-85px;top:-125px;width:285px;height:285px;border:1px solid rgba(145,73,46,.2);border-radius:50%;pointer-events:none}
.portal-home .family-card h2{font-size:clamp(1.7rem,3vw,2.4rem);letter-spacing:-.035em}
.portal-home .id-row{color:#665148}
.portal-home .id-row code{color:#17243b;border:1px solid #e4ccb8;background:#fffdf9}
.portal-home .status-pill{border:1px solid #e1c2aa;background:#fff9f0;color:#68412f}
.portal-home #family-columns{grid-template-columns:minmax(0,1.08fr) minmax(310px,.92fr);gap:22px}
.portal-home #family-columns>.card:first-child{border-top:5px solid #226d68}
.portal-home #family-admin-column{border-top:5px solid #b94d38}
.portal-home #family-columns .card h2{color:#17243b}
.portal-home .member-list li{border-color:#e9e1d6;padding:19px 0}
.portal-home .member-name{color:#17243b}
.portal-home .role,.portal-home .member-state.is-active{background:#dff0e6;color:#205b43}
.portal-home .member-state.is-inactive{background:#f6e8d8;color:#7c452c}
.portal-home .member-profile-facts{color:#35535a}
.portal-home .section-divider{background:#e7dfd3}
.portal-home .invite-link-result{border-color:#e0d5c5;background:#faf4eb}
.portal-home #privacy-card{border-top:5px solid #226d68}
.portal-home dialog{border:1px solid #d8cdc0;border-radius:20px;background:#fffdf9;color:#17243b;box-shadow:0 28px 70px rgba(23,36,59,.24)}
.portal-home dialog::backdrop{background:rgba(20,32,48,.55)}

.device-page .device-shell{max-width:820px}
.device-page .hero{max-width:none;margin:14px 0 24px;padding:clamp(26px,5vw,44px);border-radius:22px;background:#17243b;color:#fff}
.device-page .hero .eyebrow{color:#ffc871}
.device-page .hero p:last-child{color:#e3e9ed}
.device-page #device-enroll-view{border-top:5px solid #b94d38}
.device-page #device-profile-view{border-top:5px solid #226d68}
.device-page .status-pill{border:1px solid #d4e3d8;background:#e7f2e9;color:#205b43}

@media(max-width:850px){.portal-home #family-columns{grid-template-columns:1fr}.portal-home .app-access-list{gap:14px}.portal-home .app-entry{padding:24px}}
@media(max-width:700px){.portal-home .app-access-list{grid-template-columns:1fr}.portal-home .app-entry{min-height:0}.portal-home .commerce-orders-header{padding:21px}.portal-home .account-card{align-items:flex-start;flex-direction:column}.account-actions{margin-left:0;justify-content:flex-start}}
@media(max-width:480px){.portal-home .workspace-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:5px}.portal-home .workspace-tab{min-width:0;padding:11px 6px}.portal-home .account-card{padding:26px 22px}.portal-home .account-card .button{flex:0 1 auto}.portal-home .app-entry{padding:21px}.portal-home .app-entry .app-identity{align-items:flex-start}.portal-home .app-entry .button-row>.button{flex:1 1 100%}.portal-home .family-card{padding:24px 21px}.portal-home .orders-summary{gap:8px}.portal-home .orders-summary-item{padding:13px}.device-page .hero{padding:26px 22px}}
@media(forced-colors:active){.portal-home .app-entry,.portal-home .account-card,.portal-home .commerce-hero,.portal-home .workspace-tab[aria-selected="true"],.device-page .hero{border:1px solid CanvasText}}
