.portal-page { background: #f6f9f7; }
.portal-page [hidden] { display: none !important; }
.portal-page :focus-visible { outline: 3px solid #d3902a; outline-offset: 4px; }
.portal-page .portal-main a:not(.btn), .portal-footer a { text-decoration: underline; text-underline-offset: 3px; }
.portal-page .portal-main button { -webkit-tap-highlight-color: transparent; }
.portal-page .btn { min-height: 48px; font-size: .94rem; line-height: 1.4; padding: 12px 22px; text-align: center; }
.portal-page .btn:disabled { opacity: .58; cursor: wait; transform: none; box-shadow: none; }
.portal-page button:disabled { cursor: not-allowed; }
.portal-main { padding: 24px 0 92px; min-height: calc(100vh - 170px); background: radial-gradient(ellipse at 8% 18%, #e9f5ec 0, transparent 40%); }
.portal-connection { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 28px; margin-bottom: 22px; color: #586b60; font-size: .81rem; flex-wrap: wrap; }
.portal-status-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: #238966; display: inline-block; }
.portal-connection.is-error .portal-status-dot { background: #ad5829; }
.portal-auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: start; gap: clamp(32px, 6vw, 86px); }
.portal-intro { padding: 24px 0 16px; }
.portal-eyebrow { display: block; color: #166d51; font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 14px; }
.portal-intro h1 { font-size: clamp(3rem, 4.8vw, 4.4rem); line-height: 1.08; letter-spacing: -.055em; margin-bottom: 22px; }
.portal-lead { max-width: 460px; font-size: 1.05rem; color: #56685f; line-height: 1.75; }
.portal-ree-intro { display: flex; align-items: center; gap: 16px; margin: 31px 0; padding-top: 24px; border-top: 1px solid #d8e6dd; }
.portal-ree-intro img { flex: 0 0 66px; width: 66px; height: 66px; object-fit: cover; object-position: 50% 25%; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 13px #17382312; }
.portal-ree-intro strong { font-size: .94rem; }
.portal-ree-intro p { font-size: .86rem; color: #607067; margin: 2px 0 0; line-height: 1.55; }
.portal-text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; border: 0; color: #116b4e; font: inherit; font-size: .87rem; font-weight: 750; padding: 8px 0; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.portal-text-button:disabled { color: #6a756f; text-decoration: none; }
.portal-steps { list-style: none; padding: 0; margin: 26px 0 24px; display: grid; gap: 20px; }
.portal-steps li { display: flex; align-items: flex-start; gap: 17px; }
.portal-steps li > span { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #e1eee6; color: #22644b; font-size: .69rem; font-weight: 800; }
.portal-steps strong { font-size: .91rem; }
.portal-steps p { color: #647269; margin: 3px 0 0; font-size: .82rem; line-height: 1.65; }
.portal-fine-print { font-size: .78rem; color: #65736c; max-width: 430px; line-height: 1.7; }
.portal-auth-card { background: white; padding: 13px 38px 24px; border-radius: 27px; box-shadow: 0 16px 58px #163e2810; border: 1px solid #dfebe3; min-width: 0; }
.portal-tabs { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 7px; border-bottom: 1px solid #e0e9e3; margin-bottom: 30px; }
.portal-tab { position: relative; background: transparent; border: 0; color: #687970; padding: 17px 4px; min-height: 52px; font-size: .86rem; font-weight: 750; cursor: pointer; white-space: normal; }
.portal-tab[aria-selected="true"] { color: #116b4e; }
.portal-tab[aria-selected="true"]::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; background: #16815b; border-radius: 3px 3px 0 0; }
.portal-card-heading h2 { font-size: clamp(1.75rem, 2.5vw, 2.25rem); letter-spacing: -.045em; line-height: 1.18; margin-bottom: 13px; }
.portal-card-heading > p { color: #607067; font-size: .87rem; line-height: 1.7; margin-bottom: 26px; }
.portal-card-heading .portal-eyebrow { font-size: .67rem; margin-bottom: 12px; }
.portal-form { min-width: 0; }
.portal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.portal-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.portal-form > .portal-field + .portal-field { margin-top: 22px; }
.portal-full { grid-column: 1 / -1; }
.portal-field label, .portal-recovery-content > label { font-size: .85rem; font-weight: 750; color: #203d2e; }
.portal-field input, .portal-field textarea, .portal-field select, #recovery-value { width: 100%; min-width: 0; min-height: 49px; padding: 12px 14px; border: 1px solid #cbdad0; border-radius: 10px; color: #1a3025; background: #fff; line-height: 1.5; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.portal-field textarea { resize: vertical; min-height: 80px; }
.portal-field input::placeholder, .portal-field textarea::placeholder { color: #78857e; opacity: 1; font-size: .88rem; }
.portal-field input:focus, .portal-field textarea:focus { outline: none; border-color: #28835d; box-shadow: 0 0 0 3px #def0e4; }
.portal-field input[aria-invalid="true"], .portal-field textarea[aria-invalid="true"] { border-color: #a94232; }
.portal-field-hint { font-size: .75rem; line-height: 1.6; color: #617168; }
.portal-field-error { color: #a33124; font-size: .8rem; font-weight: 650; line-height: 1.5; }
.portal-password { position: relative; display: flex; align-items: center; }
.portal-password input { padding-right: 67px; }
.portal-password > button { position: absolute; right: 3px; top: 3px; bottom: 3px; min-width: 56px; min-height: 43px; border: 0; border-radius: 7px; background: transparent; font-size: .76rem; color: #276449; font-weight: 750; cursor: pointer; }
.portal-password > button:hover { background: #f0f7f2; }
.portal-consent { margin: 23px 0; }
.portal-consent label, .portal-check-label { display: flex; gap: 11px; align-items: flex-start; font-size: .76rem; color: #53665a; line-height: 1.75; cursor: pointer; }
.portal-consent input, .portal-check-label input { margin: 4px 0 0; width: 19px; height: 19px; flex: 0 0 19px; accent-color: #117149; cursor: pointer; }
.portal-consent label { min-height: 44px; padding: 3px 0; }
.portal-consent .portal-field-error { display: block; margin-top: 7px; }
.portal-consent a { color: #176b4d; font-weight: 650; }
.portal-primary { width: 100%; justify-content: space-between; margin-top: 24px; }
.portal-consent + .portal-primary { margin-top: 0; }
.portal-form-note { margin: 14px 0 0; text-align: center; font-size: .73rem; color: #637268; line-height: 1.7; }
.portal-auth-footer { display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid #e5ece7; margin-top: 26px; padding-top: 19px; color: #65756b; font-size: .72rem; }
.portal-auth-footer > span { font-size: 1rem; color: #197349; }
.portal-alert { border: 1px solid #ebc8ab; border-left: 4px solid #ad652d; color: #75441f; background: #fff7ed; font-size: .86rem; border-radius: 9px; padding: 16px; margin-bottom: 22px; line-height: 1.65; overflow-wrap: anywhere; }
.portal-alert p { margin-bottom: 12px; }
.portal-alert p:last-child { margin-bottom: 0; }
.portal-alert.is-success { background: #edf8f0; color: #205b39; border-color: #c3dfcc; border-left-color: #458d60; }
.portal-inline-status { margin: 10px 0 0; min-height: 1em; font-size: .79rem; color: #22694a; overflow-wrap: anywhere; }
.portal-recovery-card { background: #fff8e6; border: 1px solid #e8d39e; border-radius: 21px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 42px; margin: 24px 0 32px; }
.portal-recovery-card .portal-eyebrow { color: #846019; }
.portal-recovery-card h2 { font-size: 1.7rem; line-height: 1.2; }
.portal-recovery-card p { font-size: .9rem; color: #705d35; }
.portal-recovery-content { min-width: 0; }
.portal-recovery-content > label { display: block; margin-bottom: 8px; }
#recovery-value { font: .95rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; resize: none; background: #fffef9; }
.portal-button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.portal-recovery-content .portal-check-label { margin-top: 20px; color: #634e25; }
.portal-recovery-content .portal-inline-status { min-height: 0; }
.portal-dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 14px 0 32px; }
.portal-dashboard-heading h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.18; margin-bottom: 10px; overflow-wrap: anywhere; }
.portal-dashboard-heading .portal-eyebrow { margin-bottom: 12px; }
.portal-dashboard-heading > .btn { flex-shrink: 0; margin-top: 4px; }
.portal-dashboard-subtitle { color: #5c7164; font-size: .95rem; margin-bottom: 15px; }
.portal-account-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #536a5b; font-size: .78rem; }
#account-email { overflow-wrap: anywhere; }
.portal-unverified { display: inline-block; background: #edf0e8; border: 1px solid #dce3d1; border-radius: 5px; padding: 2px 7px; font-size: .64rem; color: #616d43; font-weight: 750; }
.portal-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.portal-summary-card { padding: 22px; border-radius: 16px; border: 1px solid #dfe9e2; background: #fff; min-width: 0; }
.portal-summary-label { display: block; color: #607266; font-size: .69rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 10px; }
.portal-summary-card > strong { display: block; font-size: 1.12rem; line-height: 1.45; font-weight: 750; overflow-wrap: anywhere; }
.portal-summary-card .portal-status-value { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.portal-summary-card p { font-size: .72rem; color: #627268; margin: 9px 0 0; line-height: 1.65; }
#profile-progress { display: block; width: 100%; height: 5px; appearance: none; border: 0; border-radius: 20px; overflow: hidden; margin-top: 11px; background: #edf1ed; accent-color: #218553; }
#profile-progress::-webkit-progress-bar { background: #edf1ed; border-radius: 20px; }
#profile-progress::-webkit-progress-value { background: #218553; border-radius: 20px; }
#profile-progress::-moz-progress-bar { background: #218553; border-radius: 20px; }
.portal-company-id span { display: block; font-size: .65rem; color: #617567; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.portal-workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.portal-editor-column, .portal-sidebar { min-width: 0; }
.portal-profile-card { background: #fff; border: 1px solid #dde8e0; border-radius: 21px; padding: 30px; margin-bottom: 24px; }
.portal-section-heading { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; margin-bottom: 28px; }
.portal-section-heading h2 { font-size: 1.65rem; line-height: 1.2; letter-spacing: -.04em; margin-bottom: 10px; }
.portal-section-heading .portal-eyebrow { font-size: .65rem; margin-bottom: 10px; }
.portal-section-heading p { font-size: .83rem; color: #63736a; margin: 0; line-height: 1.7; }
.portal-unsaved { flex-shrink: 0; font-size: .66rem; color: #95601f; background: #fff5dc; padding: 4px 7px; border-radius: 5px; font-weight: 750; }
.portal-profile-section { padding: 0; border: 0; margin: 0 0 31px; min-width: 0; }
.portal-profile-section + .portal-profile-section { padding-top: 27px; border-top: 1px solid #e3ebe5; }
.portal-profile-section legend { font-size: 1rem; font-weight: 800; padding: 0 0 19px; width: 100%; }
.portal-profile-section + .portal-profile-section legend { float: left; padding: 0 0 8px; }
.portal-profile-section + .portal-profile-section legend + .portal-section-note { clear: both; }
.portal-optional { color: #6b7b70; font-weight: 400; font-size: .76rem; }
.portal-section-note { color: #69796e; font-size: .78rem; line-height: 1.75; margin-bottom: 21px; }
.portal-inline-button { align-self: flex-start; margin-top: -6px; font-size: .77rem; min-height: 35px; }
.portal-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #dde8df; padding-top: 24px; }
.portal-save-bar strong { font-size: .8rem; }
.portal-save-bar p { margin: 3px 0 0; font-size: .73rem; color: #5d7365; }
.portal-save-bar .btn { flex-shrink: 0; }
.portal-side-card { border: 1px solid #dce6dd; border-radius: 19px; padding: 25px; margin-bottom: 22px; background: #fff; }
.portal-side-card h2 { font-size: 1.34rem; line-height: 1.23; letter-spacing: -.035em; }
.portal-side-card .portal-eyebrow { font-size: .65rem; }
.portal-side-card > p { color: #5e7264; font-size: .81rem; line-height: 1.75; }
.portal-checklist { list-style: none; padding: 0; margin: 25px 0 0; display: grid; gap: 20px; }
.portal-checklist li { display: flex; gap: 12px; align-items: flex-start; }
.portal-task-mark { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border: 1px solid #d8e4dc; border-radius: 50%; color: #779181; font-size: .65rem; font-weight: 800; margin-top: 8px; }
.portal-task-button { text-align: left; border: 0; background: none; color: #254d36; font-size: .8rem; font-weight: 750; min-height: 36px; padding: 4px 0; cursor: pointer; line-height: 1.5; }
.portal-task-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.portal-checklist p { font-size: .72rem; line-height: 1.6; color: #6c7b70; margin: 0; }
.portal-task-state { font-size: .62rem; color: #7b795e; text-transform: uppercase; letter-spacing: .06em; font-weight: 750; }
.portal-checklist .is-complete .portal-task-mark { background: #19764d; color: #fff; border-color: #19764d; }
.portal-checklist .is-complete .portal-task-state { color: #2c7d4e; }
.portal-ree-card { background: #eaf5eb; border-color: #d6e6d7; }
.portal-ree-card > img { width: 68px; height: 68px; object-fit: cover; object-position: 50% 25%; border-radius: 50%; margin-bottom: 18px; border: 3px solid white; }
.portal-ree-card > .btn { width: 100%; justify-content: space-between; }
.portal-ree-card small { display: block; font-size: .69rem; color: #5b745f; line-height: 1.7; margin-top: 16px; }
.portal-next-card { background: transparent; }
.portal-next-card > a { color: #176947; font-size: .8rem; font-weight: 750; display: inline-flex; min-height: 44px; align-items: center; gap: 8px; }
.portal-next-card .portal-small-note { border-top: 1px solid #dbe6dc; padding-top: 15px; margin: 12px 0 0; font-size: .7rem; }
.portal-security details { border-top: 1px solid #e0e9e2; padding: 0; }
.portal-security summary { font-size: .88rem; font-weight: 750; color: #28593b; cursor: pointer; padding: 17px 0; min-height: 55px; }
.portal-security-form { padding-bottom: 24px; }
.portal-security-form > .btn { margin-top: 23px; }
.portal-data-actions { display: flex; gap: 20px; align-items: center; justify-content: space-between; border-top: 1px solid #e0e9e2; padding-top: 23px; margin-top: 4px; }
.portal-data-actions h3 { font-size: .91rem; margin-bottom: 7px; letter-spacing: -.02em; }
.portal-data-actions p { font-size: .76rem; color: #65776a; margin: 0; line-height: 1.7; }
.portal-data-actions .btn { font-size: .76rem; flex-shrink: 0; max-width: 190px; }
.portal-delete-note { margin: 20px 0 0; }
.portal-footer { background: #fff; border-top: 1px solid #e2ebe5; padding: 24px 0 110px; color: #65766c; font-size: .74rem; }
.portal-footer > .shell { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.portal-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.portal-footer nav > a { min-height: 32px; }
.portal-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.portal-page .ree-assistant { bottom: calc(18px + env(safe-area-inset-bottom)); }
.portal-page .ree-chat { max-height: calc(100dvh - 110px); }
.portal-page .portal-field, .portal-page h1, .portal-page h2, .portal-page [role="alert"] { scroll-margin-top: 106px; }

@media (max-width: 1080px) {
  .portal-auth-layout { gap: 36px; }
  .portal-auth-card { padding-left: 28px; padding-right: 28px; }
  .portal-workspace-grid { grid-template-columns: minmax(0, 1fr) 266px; gap: 20px; }
  .portal-profile-card { padding: 25px; }
  .portal-side-card { padding: 22px; }
  .portal-data-actions { flex-direction: column; align-items: flex-start; }
  .portal-data-actions .btn { max-width: none; }
  .portal-summary-card { padding: 20px; }
  .portal-section-heading { flex-wrap: wrap; }
  .portal-summary-card .portal-status-value { font-size: .87rem; }
}
@media (max-width: 840px) {
  .portal-main { padding-top: 18px; }
  .portal-connection { margin-bottom: 16px; justify-content: flex-start; }
  .portal-auth-layout { grid-template-columns: 1fr; max-width: 620px; margin: auto; gap: 20px; }
  .portal-intro { padding-top: 9px; }
  .portal-intro h1 { font-size: 3.1rem; max-width: 570px; }
  .portal-intro h1 br { display: none; }
  .portal-intro h1 br::after { content: " "; }
  .portal-lead { max-width: none; }
  .portal-ree-intro { margin: 20px 0 10px; padding-top: 18px; }
  .portal-steps { display: none; }
  .portal-fine-print { max-width: none; margin: 10px 0 0; }
  .portal-auth-card { padding: 11px 35px 26px; }
  .portal-card-heading h2 { font-size: 2rem; }
  .portal-card-heading h2 br { display: none; }
  .portal-dashboard-heading h1 { font-size: 2.45rem; }
  .portal-summary-grid { gap: 12px; }
  .portal-summary-card { padding: 17px; }
  .portal-summary-card > strong { font-size: .95rem; }
  .portal-summary-card .portal-status-value { align-items: baseline; }
  .portal-workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .portal-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .portal-side-card { margin: 0; }
  .portal-next-card { grid-column: 1 / -1; }
  .portal-next-card p { max-width: 600px; }
  .portal-data-actions { flex-direction: row; align-items: center; }
  .portal-recovery-card { grid-template-columns: 1fr; gap: 13px; padding: 26px; }
}
@media (max-width: 560px) {
  .portal-page .shell { width: calc(100% - 28px); }
  .portal-page .nav { height: 70px; }
  .portal-page .brand img { width: 145px; }
  .portal-main { padding-top: 12px; padding-bottom: 44px; }
  .portal-connection { font-size: .7rem; gap: 6px; margin-bottom: 13px; }
  .portal-intro { padding: 7px 5px 8px; }
  .portal-eyebrow { font-size: .64rem; letter-spacing: .11em; }
  .portal-intro h1 { font-size: clamp(2.15rem, 8.8vw, 2.85rem); margin-bottom: 16px; }
  .portal-lead { font-size: .92rem; line-height: 1.7; }
  .portal-ree-intro img { width: 55px; height: 55px; flex-basis: 55px; }
  .portal-ree-intro { gap: 12px; }
  .portal-ree-intro strong { font-size: .81rem; }
  .portal-ree-intro p { font-size: .77rem; }
  .portal-fine-print { font-size: .71rem; }
  .portal-auth-card { padding: 7px 21px 22px; border-radius: 20px; }
  .portal-tabs { gap: 3px; margin-bottom: 24px; }
  .portal-tab { font-size: .75rem; padding: 15px 2px; }
  .portal-card-heading h2 { font-size: 1.74rem; }
  .portal-card-heading > p { font-size: .8rem; margin-bottom: 22px; }
  .portal-fields { grid-template-columns: 1fr; gap: 20px; }
  .portal-field label { font-size: .81rem; }
  .portal-auth-footer { font-size: .65rem; }
  .portal-consent label { font-size: .73rem; }
  .portal-recovery-card { padding: 22px; border-radius: 16px; }
  .portal-recovery-card h2 { font-size: 1.5rem; }
  .portal-recovery-card p { font-size: .81rem; }
  .portal-recovery-card .btn { font-size: .8rem; }
  #recovery-value { font-size: .8rem; }
  .portal-dashboard-heading { flex-direction: column; gap: 15px; margin-top: 12px; margin-bottom: 22px; }
  .portal-dashboard-heading h1 { font-size: 2.2rem; }
  .portal-dashboard-heading > .btn { margin: 0; min-height: 44px; padding: 9px 18px; font-size: .82rem; }
  .portal-dashboard-subtitle { font-size: .84rem; }
  .portal-account-meta { font-size: .71rem; }
  .portal-summary-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 22px; }
  .portal-summary-card { padding: 17px 19px; border-radius: 13px; }
  .portal-summary-card .portal-status-value { font-size: .97rem; }
  .portal-company-id span { display: inline; margin-left: 4px; }
  .portal-summary-label { margin-bottom: 6px; }
  .portal-profile-card { padding: 23px 19px; border-radius: 17px; }
  .portal-section-heading h2 { font-size: 1.48rem; }
  .portal-section-heading p { font-size: .77rem; }
  .portal-profile-section legend { font-size: .92rem; }
  .portal-save-bar { flex-direction: column; align-items: stretch; gap: 16px; }
  .portal-save-bar .btn { width: 100%; }
  .portal-sidebar { grid-template-columns: 1fr; }
  .portal-next-card { grid-column: auto; }
  .portal-side-card { padding: 23px; }
  .portal-checklist { gap: 13px; }
  .portal-task-button { min-height: 44px; }
  .portal-data-actions { flex-direction: column; align-items: stretch; gap: 17px; }
  .portal-data-actions .btn { width: 100%; }
  .portal-security-form > .btn { width: 100%; }
  .portal-footer { padding-top: 24px; padding-bottom: 100px; }
  .portal-footer > .shell { gap: 10px; }
  .portal-footer nav { gap: 20px; }
  .portal-page .ree-assistant { right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .portal-page .ree-chat { bottom: calc(14px + env(safe-area-inset-bottom)); height: min(660px, calc(100dvh - 88px)); max-height: calc(100dvh - 88px); }
  .portal-page.portal-editing .ree-launcher { visibility: hidden; pointer-events: none; }
  .portal-page .portal-field, .portal-page h1, .portal-page h2, .portal-page [role="alert"] { scroll-margin-top: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-page *, .portal-page *::before, .portal-page *::after { scroll-behavior: auto !important; transition: none !important; }
}
