/* Personal Plan & billing, Workspace billing-owner card and the owner-billing dialogs. Shared Hedy tokens keep both appearances consistent. */
:root{--hcu-warning:#895317;--hcu-warning-bg:#fcf5e9;--hcu-error:#ad3838;--hcu-scrim:rgba(21,19,46,.3)}
html[data-theme=dark]{--hcu-warning:#ebc07e;--hcu-warning-bg:#33291e;--hcu-error:#ffa6a6;--hcu-scrim:rgba(0,0,0,.6)}
.account-hcu-page,.hcu-page{max-width:1040px;margin:0 auto;padding:6px 0 32px;min-width:0;container-type:inline-size}
.hcu-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:28px}
.hcu-header h1{font-size:34px;letter-spacing:-1px;margin:7px 0 10px;overflow-wrap:anywhere}
.hcu-lead{color:var(--muted);max-width:630px;font-size:14px;line-height:1.7}
.hcu-header>.hcu-actions{flex-shrink:0;margin-top:6px}
.hcu-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.hcu-small,.hcu-note{font-size:12px;line-height:1.7;color:var(--muted);margin:12px 0}
.hcu-badge{display:inline-flex;align-items:center;border-radius:99px;padding:4px 10px;font-size:11px;font-weight:600;color:var(--accent);background:var(--accent-bg);white-space:nowrap}
.hcu-back{display:inline-block;margin-bottom:22px;font-size:12px;color:var(--muted)}
.hcu-notice{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:16px 20px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:13px;margin:14px 0;line-height:1.6}
.hcu-notice>div{min-width:0}.hcu-notice strong{display:block;font-size:13px}.hcu-notice p{color:var(--muted);margin-top:4px}
.hcu-notice.warning{background:var(--hcu-warning-bg);border-color:color-mix(in srgb,var(--hcu-warning) 35%,var(--line))}.hcu-notice.warning strong{color:var(--hcu-warning)}
.hcu-notice ul{margin:8px 0 0 18px;padding:0;color:var(--muted)}.hcu-notice{flex-wrap:wrap}.hcu-notice>div:first-child{flex:1 1 22rem}.hcu-notice>.hcu-actions{flex:0 1 auto;max-width:100%}
.pf-plan-hero{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(230px,1fr);border:1px solid var(--line);border-radius:17px;overflow:hidden;background:var(--surface);margin:0 0 24px}
.pf-plan-main{padding:30px 32px}.pf-plan-main h2{font-size:32px;letter-spacing:-.8px;margin:9px 0;overflow-wrap:anywhere}.pf-plan-main>p{color:var(--muted);font-size:13px;margin:8px 0;line-height:1.7}.pf-plan-main .hcu-actions{margin-top:23px}
.pf-plan-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.pf-price{font-size:30px;font-weight:650;letter-spacing:-.8px;margin-top:18px;font-variant-numeric:tabular-nums}.pf-price span{font-size:12px;font-weight:400;color:var(--muted);letter-spacing:0;white-space:nowrap}
.pf-renewal{padding:30px;border-left:1px solid var(--line);background:var(--bg);display:flex;flex-direction:column;justify-content:center;gap:9px}
.pf-renewal h3{font-size:24px;letter-spacing:-.5px}.pf-renewal p{font-size:13px;color:var(--muted);line-height:1.7}
.pf-capacity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:18px 0 0}.pf-capacity>div{min-width:0}
.pf-capacity>div>span,.pf-capacity>div>strong{display:block}.pf-capacity>div>span{color:var(--muted);font-size:12px}
.pf-capacity>div>strong{margin:5px 0 9px;font-size:20px;line-height:1.3;font-weight:650;font-variant-numeric:tabular-nums}.pf-capacity small{color:var(--muted);font-size:12px;font-weight:400}
.pf-capacity progress{appearance:none;width:100%;height:5px;border:none;border-radius:8px;overflow:hidden;background:var(--surface-2)}
.pf-capacity progress::-webkit-progress-bar{background:var(--surface-2)}.pf-capacity progress::-webkit-progress-value{background:var(--accent)}.pf-capacity progress::-moz-progress-bar{background:var(--accent)}
.pf-capacity>div>p{margin:6px 0 0;font-size:12px;color:var(--muted)}
.pf-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:24px 0}
.pf-card,.pf-columns>section{border:1px solid var(--line);border-radius:14px;padding:24px;margin:0;min-width:0;background:var(--bg)}
.pf-columns h2,.pf-card h2{font-size:17px}.pf-columns p{font-size:13px;color:var(--muted);margin:8px 0;line-height:1.7}
.hcu-section-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:13px}.hcu-section-head h2{font-size:18px;margin:0;line-height:1.4}.hcu-section-head h3{font-size:15px;margin:0}
.hcu-section-head p{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.7;max-width:650px}.hcu-section-head>.hcu-actions{flex-shrink:0}
.pf-payment-row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid var(--line);font-size:13px}.pf-payment-row:first-of-type{border-top:0}.pf-payment-row span{color:var(--muted)}.pf-payment-row strong{text-align:right;overflow-wrap:anywhere}
.pf-invoice-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line);font-size:13px}.pf-invoice-row small{display:block;color:var(--muted);margin-top:4px}
.pf-company-list{display:grid;gap:8px;margin-top:12px}
.pf-company-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:13px}.pf-company-row>span:nth-child(2){flex:1;min-width:0}.pf-company-row strong{display:block;overflow-wrap:anywhere}.pf-company-row small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.hcu-company-icon{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:9px;background:var(--accent-bg);color:var(--accent);font-size:11px;font-weight:600}
.hcu-section{margin:28px 0}.pf-card.hcu-section{margin-top:0}
.hcu-progress{height:8px;border-radius:8px;background:var(--surface-2);overflow:hidden;margin:14px 0 18px}.hcu-progress>span{display:block;height:100%;background:var(--accent)}
.hcu-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0;padding:0 2px 22px;border-bottom:1px solid var(--line)}.hcu-metrics-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.hcu-metric{min-width:0}.hcu-metric dt{font-size:12px;color:var(--muted)}.hcu-metric dd{margin:5px 0 3px;font-size:19px;font-weight:600;letter-spacing:-.3px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.hcu-metric small{font-size:11px;color:var(--muted);display:block;line-height:1.6}
.hcu-purchased{margin:22px 0;padding:18px 20px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.hcu-purchased .hcu-section-head{margin-bottom:4px}.hcu-purchased .hcu-metrics{margin:10px 0 0;padding-bottom:0;border-bottom:0}
.hcu-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}
.hcu-table{width:100%;border-collapse:collapse;font-size:13px}.hcu-table th,.hcu-table td{text-align:left;padding:12px 14px;border-top:1px solid var(--line);vertical-align:top;white-space:nowrap}.hcu-table thead th{border-top:0;font-size:11px;color:var(--muted);font-weight:600;background:var(--surface)}
.hcu-company-name{color:var(--ink);font-weight:600;white-space:normal;overflow-wrap:anywhere}.hcu-company-meta{font-size:11px;color:var(--muted);margin-top:4px;white-space:normal}
.hcu-alloc-table td .hcu-actions{justify-content:flex-end;gap:6px}.hcu-alloc-table .btn{font-size:12px;padding:7px 11px;min-height:34px}
.hcu-company-empty{padding:24px;border:1px dashed var(--line);border-radius:12px;margin:0}
.hcu-explainer{font-size:13px;color:var(--muted);border-top:1px solid var(--line);padding-top:18px;margin-top:22px}.hcu-explainer summary{color:var(--ink);cursor:pointer}.hcu-explainer p{margin-top:12px;max-width:760px;line-height:1.7}
.hcu-pack-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.hcu-card{border:1px solid var(--line);border-radius:15px;padding:24px;background:var(--bg);margin-bottom:22px}
.hcu-pack-card{margin:0;display:flex;flex-direction:column;gap:10px;min-width:0}.hcu-pack-card h3{font-size:20px;font-weight:600;font-variant-numeric:tabular-nums;margin:0}.hcu-pack-card p{margin:0}.hcu-pack-card .btn{width:100%}
.pf-plan-toolbar{margin:22px 0 10px;text-align:center}
.pf-interval{display:flex;justify-content:center;align-items:center;gap:4px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--surface);width:max-content;max-width:100%;margin:0 auto 10px}
.pf-interval button{border:0;background:transparent;border-radius:7px;padding:9px 16px;font-size:13px;min-height:40px;color:var(--muted);cursor:pointer}.pf-interval button[aria-pressed=true]{background:var(--bg);color:var(--ink);box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 12%,transparent)}
.hcu-plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:25px 0}
.hcu-plan-card{border:1px solid var(--line);border-radius:16px;padding:25px 23px;background:var(--bg);display:flex;flex-direction:column;min-width:0}.hcu-plan-card.current{border-color:var(--accent);background:var(--surface)}
.hcu-plan-card h2{font-size:22px;overflow-wrap:anywhere}.hcu-plan-price{font-size:30px;font-weight:650;line-height:1.3;letter-spacing:-.8px;margin-top:20px;font-variant-numeric:tabular-nums}.hcu-plan-price span{font-size:12px;font-weight:400;color:var(--muted);letter-spacing:0;white-space:nowrap}
.hcu-features{list-style:none;padding:0;margin:20px 0;display:grid;gap:11px;font-size:13px;flex:1}.hcu-plan-card>.btn,.hcu-plan-card>.hcu-badge{margin-top:auto;align-self:flex-start}
.account-hcu-owner{display:flex;justify-content:space-between;align-items:center;gap:25px;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--surface);margin:25px 0}
.account-hcu-owner h2{font-size:21px;margin:8px 0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.account-hcu-owner p:not(.eyebrow){font-size:13px;color:var(--muted);max-width:620px;line-height:1.7;margin-top:6px}
.account-hcu-owner-actions{display:flex;flex-direction:column;align-items:center;gap:12px;flex-shrink:0}
.account-hcu-notice{padding:18px 21px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:13px;margin:18px 0;line-height:1.7}.account-hcu-notice h2{font-size:17px}.account-hcu-notice p{color:var(--muted);margin:5px 0}
.account-hcu-text-link{font-size:13px;line-height:1.5}
.account-hcu-page button:disabled,.hcu-page button:disabled,.account-hcu-owner button:disabled{color:var(--muted);background:var(--surface);border-color:var(--line);cursor:not-allowed;opacity:.7}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Dialogs */
.hcu-dialog{width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:0;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);background:var(--bg);color:var(--ink);overflow-y:auto}
.hcu-dialog::backdrop{background:var(--hcu-scrim);backdrop-filter:blur(3px)}
.hcu-dialog-form{padding:26px 30px 22px}.hcu-dialog .dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:13px}.hcu-dialog h2{font-size:22px;letter-spacing:-.5px;overflow-wrap:anywhere}
.hcu-dialog p{font-size:13px;color:var(--muted);line-height:1.7;margin:12px 0}.hcu-dialog .hcu-actions{margin-top:20px;justify-content:flex-end}.hcu-dialog .hcu-member-nav{justify-content:flex-start;margin-top:8px}
.hcu-dialog-summary{display:grid;gap:10px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:12px;margin:14px 0}.hcu-dialog-summary span{display:flex;justify-content:space-between;gap:12px;color:var(--muted)}.hcu-dialog-summary strong{color:var(--ink);text-align:right}
.hcu-field{display:grid;gap:7px;font-size:12px;font-weight:600;margin:17px 0}.hcu-field>span{font-weight:400;color:var(--muted)}.hcu-field small{font-weight:400;color:var(--muted);line-height:1.6}
.hcu-field input,.hcu-field select{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--ink);padding:11px 12px;font-size:14px;font-weight:400;min-height:44px}
.hcu-check{display:flex;align-items:flex-start;gap:10px;font-size:12px;margin:18px 0}.hcu-check input{margin-top:3px;accent-color:var(--accent)}
.hcu-hint{font-size:11px;color:var(--muted);margin-top:-8px;line-height:1.7}
.hcu-error{color:var(--hcu-error);font-size:12px;line-height:1.7;min-height:0;margin:12px 0 0}.hcu-warning{color:var(--hcu-warning);font-weight:600}
.pf-packs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0}.pf-pack{border:1px solid var(--line);border-radius:11px;padding:17px 12px;background:var(--bg);text-align:left;cursor:pointer}.pf-pack strong,.pf-pack span{display:block}.pf-pack strong{font-size:14px}.pf-pack span{font-size:12px;color:var(--muted);margin-top:6px}.pf-pack:hover:not(:disabled){border-color:var(--accent)}
.hcu-dialog [hidden]{display:none!important}
@media(max-width:1000px){.pf-plan-main,.pf-renewal{padding:25px}.pf-columns{gap:16px}.pf-columns>section{padding:21px}.hcu-plan-card{padding:22px 18px}}
@media(max-width:850px){.pf-plan-hero{grid-template-columns:1fr}.pf-renewal{border-left:0;border-top:1px solid var(--line)}.pf-columns{grid-template-columns:1fr}.hcu-plans{grid-template-columns:1fr}.hcu-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.hcu-pack-grid{grid-template-columns:1fr}.hcu-pack-card .btn{width:auto}.account-hcu-owner{align-items:flex-start;flex-direction:column}.account-hcu-owner-actions{align-items:flex-start}.pf-packs{grid-template-columns:1fr}}
@media(max-width:650px){.hcu-table-wrap{overflow:visible;border:0}.hcu-table,.hcu-table tbody{display:block;width:100%}.hcu-table thead{display:none}.hcu-table tr{display:block;padding:14px 18px;margin-bottom:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
 .hcu-table td{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 0;border:0;white-space:normal;min-width:0}.hcu-table td:before{content:attr(data-label);color:var(--muted);font-size:12px}.hcu-table td:first-child{display:block;font-size:15px}.hcu-table td:first-child:before,.hcu-table td:last-child:before{display:none}.hcu-alloc-table td .hcu-actions{justify-content:flex-start}}
@media(max-width:540px){.hcu-page,.account-hcu-page{padding-top:0}.hcu-header{display:block;margin-bottom:23px}.hcu-header h1{font-size:29px}.hcu-header>.hcu-actions{margin-top:17px}.pf-plan-main,.pf-renewal{padding:22px}.pf-capacity{gap:16px}.pf-plan-main .hcu-actions{display:grid;grid-template-columns:1fr}.hcu-metrics,.hcu-metrics-3{grid-template-columns:1fr;gap:14px}.hcu-notice{flex-direction:column;align-items:flex-start}.hcu-notice>div:first-child{flex-basis:auto}.hcu-dialog-form{padding:22px}.pf-interval button{padding:9px 12px;font-size:12px}}

.billing-hcu-details{margin:20px 0;border-block:1px solid var(--line);color:var(--ink)}
.billing-hcu-details>summary{cursor:pointer;min-height:48px;display:flex;align-items:center;gap:12px;padding:10px 4px;list-style:none;font-size:14px}
.billing-hcu-details>summary::-webkit-details-marker{display:none}
.billing-hcu-details>summary::after{content:'';width:7px;height:7px;flex:none;margin:0 6px 3px auto;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.billing-hcu-details[open]>summary::after{transform:rotate(225deg);margin-bottom:-3px}
.billing-hcu-details>summary span,.create-hcu-choice p,.hcu-project-share{font-size:12px;color:var(--muted)}
.billing-hcu-details>summary:focus-visible,.create-hcu-choice>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.billing-hcu-intro{max-width:65ch;margin:0 0 18px;color:var(--muted);font-size:14px;line-height:1.6}
.billing-hcu-body{padding:8px 0 14px;min-width:0}
.hcu-project-share{display:block;margin-top:4px;white-space:normal}
.create-hcu-choice{min-width:0;max-width:32rem;font-size:13px}
.create-hcu-choice>summary{cursor:pointer;padding:10px 0}
.create-hcu-choice p{margin:0 0 8px;line-height:1.5}
@media(max-width:560px){.billing-hcu-details>summary{display:grid;grid-template-columns:1fr auto;gap:3px 10px}.billing-hcu-details>summary span{grid-row:2}.billing-hcu-details>summary::after{grid-column:2;grid-row:1 / 3}}
