/* Refinement layer (Nov 2026). Loaded last; adjusts details without changing the approved composition. */

/* Typography: avoid stranded words in headings and short last lines in body copy. */
:where(main) :where(h2, h3) { text-wrap: balance; }
:where(main) :where(p, li, dd, figcaption) { text-wrap: pretty; }

/* Responsive hero art: the <picture> wrapper must not affect the existing image layout. */
.home-opening-scene picture { display: contents; }

/* Two-column detail sections: separate stacked paragraphs. */
.detail-heading > div > p + p { margin-top: 1em; }
.detail-heading > div > p + .text-link { margin-top: 18px; display: inline-flex; }

/* Resources: keep each section's action with its explanation. */
.note-band .note-body > .text-link { margin-top: 22px; display: inline-flex; }
.next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin-top: 30px; }

/* Forms: clearer validation and availability states. */
.inquiry-form :is(input, select, textarea)[aria-invalid="true"] { border-color: #a33a2c; box-shadow: 0 0 0 1px #a33a2c33; }
.inquiry-form button[aria-busy="true"] { cursor: progress; opacity: .8; }
.inquiry-form button:disabled { cursor: not-allowed; }
.form-unavailable { margin: 0 0 22px; padding: 14px 18px; border-left: 3px solid #b0874a; background: #f6efe1; color: #3d3423; font-size: 15px; line-height: 1.7; border-radius: 0 10px 10px 0; }
.form-status .form-unavailable { margin: 0; }
.form-unavailable a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.form-status.is-error:not(:empty) { padding: 12px 16px; border-radius: 10px; background: #fbeeec; }
.form-confirmation:focus { outline: none; }
.form-confirmation:focus-visible { outline: 3px solid #a28448; outline-offset: 6px; border-radius: 12px; }

/* Keyboard focus is always visible on light and dark surfaces. */
:where(a, button, summary, select, input, textarea, [tabindex]):focus-visible { outline: 3px solid #b0874a; outline-offset: 3px; }
:where(.site-footer, .footer, .home-closing, .home-opening, .inner-hero) :where(a, button, summary):focus-visible { outline-color: #e8cf97; }

/* Tap targets on small screens. */
@media (max-width: 760px) {
  .footer-links a, .footer .footer-bottom a { display: inline-block; padding-block: 6px; }
}

/* Branded 404 */
.not-found { padding: clamp(80px, 12vw, 150px) 0 clamp(70px, 10vw, 120px); }
.not-found h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.05; margin: 14px 0 22px; }
.not-found h1 em { color: #8a6a32; }
.not-found p { max-width: 560px; font-size: 18px; line-height: 1.8; color: #46525d; }
.not-found .next-actions { margin-top: 34px; }
.not-found-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 28px; margin-top: 56px; border-top: 1px solid #d9cfbd; max-width: 820px; }
.not-found-links a { padding: 16px 0; border-bottom: 1px solid #e3dccd; color: #0b2035; font-weight: 600; text-decoration: none; }
.not-found-links a:hover { color: #8a6a32; }

/* Portal sign-in: loading and unavailable states */
#portal-message[data-loading] { color: #5d6a73; font-size: 15px; display: flex; align-items: center; gap: 10px; }
#portal-message[data-loading]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #c9b48a; border-top-color: transparent; animation: aethelon-spin .9s linear infinite; }
#portal-message.is-error { color: #8d2f22; background: #fbeeec; padding: 12px 14px; border-radius: 10px; font-size: 15px; line-height: 1.6; }
@keyframes aethelon-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #portal-message[data-loading]::before { animation: none; border-top-color: #c9b48a; } }

/* Walkthrough: status chips and readable tables on small screens */
.portal-demo .policy-status { display: inline-block; margin: 8px 0 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: #e9efe9; color: #2f5a3c; }
.portal-demo .policy-status:is([data-status="submitted"], [data-status="approved"], [data-status="pending"], [data-status="underwriting"]) { background: #f3ead8; color: #6b4f1d; }
.portal-demo .policy-status:is([data-status="declined"], [data-status="withdrawn"], [data-status="lapsed"], [data-status="cancelled"]) { background: #f3e3e0; color: #7d2f24; }
html[data-theme='night'] .portal-demo .policy-status { background: #23402f; color: #cfe7d6; }
@media (max-width: 760px) {
  .portal-demo .scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(to left, #0b20350f, transparent 28px) right / 28px 100% no-repeat; }
  .portal-demo .scroll table { min-width: 0; }
}

/* Editorial guide template (resources/*) */
.article-page { background: #faf7f1; }
.draft-banner { background: #f3e6c8; color: #4a3a17; font-size: 14px; line-height: 1.6; padding: 12px 0; border-bottom: 1px solid #e0cc9c; }
.article-narrow { max-width: 780px; }
.article-head { padding: clamp(56px, 8vw, 104px) 0 clamp(30px, 4vw, 48px); }
.article-crumbs { display: flex; gap: 10px; font-size: 14px; color: #6a5a3a; margin-bottom: 30px; }
.article-crumbs a { color: #0b2035; }
.article-head h1 { font-size: clamp(38px, 5.2vw, 62px); line-height: 1.08; margin: 12px 0 24px; color: #0b2035; }
.article-head h1 em { color: #8a6a32; }
.article-deck { font-size: clamp(19px, 2vw, 22px); line-height: 1.65; color: #3b4853; margin: 0; }
.article-meta { margin-top: 26px; padding-top: 18px; border-top: 1px solid #ddd2bd; font-size: 14px; color: #6b747b; }
.article-body { padding-bottom: clamp(70px, 9vw, 120px); }
.article-body > h2 { font-size: clamp(27px, 3vw, 34px); line-height: 1.2; margin: 58px 0 16px; color: #0b2035; }
.article-body > p, .article-body li { font-size: 18px; line-height: 1.85; color: #34414c; }
.article-body > p { margin: 0 0 1.1em; }
.article-answer { background: #fff; border: 1px solid #e3d8c3; border-left: 4px solid #b0874a; border-radius: 0 16px 16px 0; padding: 26px 30px; margin: 6px 0 20px; }
.article-answer p:last-child { margin: 10px 0 0; font-size: 19px; line-height: 1.75; color: #1d2b37; }
.article-table { overflow-x: auto; margin: 22px 0 26px; border: 1px solid #e0d6c4; border-radius: 14px; background: #fff; }
.article-table table { width: 100%; border-collapse: collapse; min-width: 540px; font-size: 15.5px; line-height: 1.55; }
.article-table th, .article-table td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid #eee6d7; }
.article-table thead th { background: #f4eee2; color: #0b2035; font-size: 13px; letter-spacing: .03em; }
.article-table tbody th { color: #0b2035; width: 32%; }
.article-table tr:last-child > * { border-bottom: 0; }
.article-figure { margin: 34px 0; }
.concept-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.concept-flow > div { position: relative; background: #0b2035; color: #e9e3d6; border-radius: 14px; padding: 20px 18px 22px; }
.concept-flow span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #c9a96a; color: #e2c48b; font-size: 13px; margin-bottom: 12px; }
.concept-flow strong { display: block; font-size: 17px; color: #fff; margin-bottom: 6px; }
.concept-flow small { display: block; font-size: 13.5px; line-height: 1.5; color: #c4ccd3; }
.article-figure figcaption { margin-top: 12px; font-size: 14px; line-height: 1.6; color: #5d6a73; }
.article-checklist { list-style: none; padding: 0; margin: 14px 0 26px; border-top: 1px solid #e3d8c3; }
.article-checklist li { position: relative; padding: 12px 0 12px 32px; border-bottom: 1px solid #e3d8c3; }
.article-checklist li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 12px; height: 7px; border-left: 2px solid #9a7638; border-bottom: 2px solid #9a7638; transform: rotate(-45deg); }
.article-cta { margin: 60px 0 30px; padding: 34px 36px; border-radius: 18px; background: #0b2035; color: #e6e0d4; }
.article-cta h2 { color: #fff; font-size: 28px; margin: 0 0 10px; }
.article-cta p { color: #cfd5da; font-size: 17px; line-height: 1.75; margin: 0; }
.article-cta .text-link { color: #e8cf97; }
.article-disclaimer { font-size: 14.5px !important; line-height: 1.7 !important; color: #5d6a73 !important; border-top: 1px solid #ddd2bd; padding-top: 18px; }
.article-sources h2, .review-record h2 { font-size: 22px; margin: 40px 0 12px; color: #0b2035; }
.article-sources ol { padding-left: 20px; } .article-sources li { font-size: 15.5px; line-height: 1.7; margin-bottom: 6px; }
.article-sources li span { color: #6b747b; }
.review-record { margin-top: 30px; padding: 4px 22px 18px; border: 1px dashed #c9b48a; border-radius: 14px; background: #fffaf0; }
.review-record h2 span { font-size: 14px; color: #8a6a32; font-family: inherit; }
.review-record table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.review-record th, .review-record td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid #eee2c8; vertical-align: top; }
.review-record th { width: 34%; color: #0b2035; }
@media (max-width: 760px) {
  .concept-flow { grid-template-columns: 1fr 1fr; }
  .article-cta { padding: 28px 24px; }
  .article-answer { padding: 22px 20px; }
}

/* Portal access links: two distinct, equal-weight entries (no pill). */
.header-logins { gap: 0 !important; }
.header-logins a, .header-logins a:last-child {
  position: relative; gap: 8px; border: 0 !important; border-radius: 0 !important;
  padding: 6px 14px !important; min-height: 40px; background: none; letter-spacing: .01em;
}
.header-logins a + a::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 16px; transform: translateY(-50%); background: #152b402e;
}
.header-logins a::before {
  content: ""; width: 15px; height: 15px; flex-shrink: 0; background: #8a6a32;
  -webkit-mask: var(--login-icon) center / contain no-repeat; mask: var(--login-icon) center / contain no-repeat;
}
.header-logins a[href*="advisor"] { --login-icon: url("assets/icon-login-advisor.svg"); }
.header-logins a[href*="client"] { --login-icon: url("assets/icon-login-client.svg"); }
.header-logins a > span.login-underline, .header-logins a { text-decoration: none; }
.header-logins a { background-image: linear-gradient(#a8874c, #a8874c); background-repeat: no-repeat; background-size: 0 1.5px; background-position: 50% calc(100% - 4px); transition: background-size .28s cubic-bezier(.22,.61,.36,1), color .2s; }
.header-logins a:is(:hover, :focus-visible), .header-logins a[aria-current="page"] { background-size: calc(100% - 28px) 1.5px; color: #0b2035; }
.header-logins a:last-child { padding-right: 0 !important; background-position: calc(100% - 0px) calc(100% - 4px); }
.header-logins a:last-child:is(:hover, :focus-visible), .header-logins a:last-child[aria-current="page"] { background-size: calc(100% - 14px) 1.5px; }
@media (max-width: 760px) {
  .header-logins a, .header-logins a:last-child { padding: 6px 9px !important; gap: 6px; font-size: 11px; min-height: 40px; }
  .header-logins a::before { width: 13px; height: 13px; }
}

/* About: portrait-format founder headshot (4:5) instead of a square crop. */
.about-cover .founder-cover-photo > img { width: 340px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 18px; }
.about-cover .founder-cover-caption { max-width: 340px; }
@media (max-width: 760px) { .about-cover .founder-cover-photo > img { width: 100%; max-width: 340px; } }

/* Portal imagery: show the whole emblem, never a cropped strip. */
.portal-signature-art {
  height: auto !important; aspect-ratio: 4 / 3; width: min(100%, 360px); margin: 32px 0 0;
  border-radius: 18px; background: #23201c url('assets/portal-emblem-824.webp') center / cover no-repeat;
  box-shadow: 0 18px 40px -22px #0b203566, inset 0 0 0 1px #ffffff14;
}
@media (max-width: 760px) { .portal-signature-art { display: none; } }
.portal-demo .workspace-banner-art {
  width: auto !important; height: 100%; aspect-ratio: 4 / 3; max-width: 46%;
  background: #23201c url('assets/portal-emblem-480.webp') center / cover no-repeat !important;
  mask-image: linear-gradient(to right, transparent 0, #000 22%) !important;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%) !important;
}

/* Homepage overview video */
.overview-trigger { display: inline-flex; align-items: center; gap: 10px; }
.overview-trigger .play-icon { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid #d8b977; position: relative; flex-shrink: 0; transition: background-color .25s, border-color .25s; }
.overview-trigger .play-icon::after { content: ""; position: absolute; left: 11px; top: 8.5px; border-left: 10px solid #d8b977; border-top: 6.5px solid transparent; border-bottom: 6.5px solid transparent; }
.overview-trigger:is(:hover, :focus-visible) .play-icon { background: #d8b977; }
.overview-trigger:is(:hover, :focus-visible) .play-icon::after { border-left-color: #0b2035; }
.overview-length { font-weight: 400; opacity: .7; }
.overview-dialog { width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 22px; background: #0b2035; color: #e8e2d6; box-shadow: 0 40px 120px -30px #000c; overflow: auto; }
.overview-dialog::backdrop { background: #050d18cc; backdrop-filter: blur(6px); }
.overview-shell { padding: 26px 30px 28px; }
.overview-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 18px; }
.overview-head .eyebrow { color: #d8b977; font-size: 11px; letter-spacing: .18em; margin: 0 0 6px; }
.overview-head h2 { color: #fff; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.2; margin: 0; }
.overview-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff33; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.overview-close:hover { background: #ffffff14; }
.overview-player { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.overview-player video { display: block; width: 100%; height: 100%; }
.overview-next { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(20px, 5vw, 64px); background: #071422ef; }
.overview-next[hidden] { display: none; }
.overview-next .eyebrow { color: #d8b977; margin: 0 0 18px; }
.overview-next-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid #ffffff22; }
.overview-next-links a { color: #fff; padding: 14px 0; border-bottom: 1px solid #ffffff22; font-size: clamp(15px, 1.6vw, 20px); text-decoration: none; }
.overview-next-links a:hover { color: #e8cf97; }
.overview-next-actions { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 26px; }
.overview-replay { background: none; border: 0; color: #e8cf97; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.overview-chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.overview-chapters button { display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 999px; border: 1px solid #ffffff26; background: #ffffff08; color: #e8e2d6; font-size: 14px; cursor: pointer; transition: background-color .2s, border-color .2s; }
.overview-chapters button span { color: #d8b977; font-variant-numeric: tabular-nums; font-size: 12px; }
.overview-chapters button:hover, .overview-chapters button[aria-current="true"] { background: #d8b9771f; border-color: #d8b977aa; }
.overview-transcript { margin-top: 16px; border-top: 1px solid #ffffff1f; padding-top: 12px; }
.overview-transcript summary { cursor: pointer; color: #e8cf97; font-size: 14px; font-weight: 700; }
.overview-transcript p { font-size: 15px; line-height: 1.7; color: #c9d1d8; margin: 10px 0 0; }
.overview-transcript strong { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .overview-dialog.is-open { animation: overview-in .35s cubic-bezier(.22,.61,.36,1) both; }
  .overview-dialog.is-open::backdrop { animation: overview-fade .35s ease both; }
}
@keyframes overview-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes overview-fade { from { opacity: 0; } }
@media (max-width: 760px) {
  .overview-shell { padding: 18px 14px 20px; }
  .overview-next-links { grid-template-columns: 1fr; }
  .overview-next-links a { padding: 9px 0; }
  .overview-chapters button { padding: 7px 11px; font-size: 13px; }
}
.overview-next-actions .button { display: inline-flex; align-items: center; gap: 14px; border-radius: 999px; padding: 14px 24px; font-size: 13px; font-weight: 700; text-decoration: none; }

/* ===== Consistent page-top band =====
   Service pages (.service-hero) and text pages (.inner-hero) share one band: same padding,
   label and headline position, headline size and (on desktop) the same overall height. */
main > :is(.service-hero, .inner-hero) { box-sizing: border-box; padding: 64px 0 72px; }
main > :is(.service-hero, .inner-hero) .eyebrow { margin: 0; }
main > :is(.service-hero, .inner-hero) h1 {
  font-size: clamp(40px, 4.3vw, 62px); line-height: 1.13; letter-spacing: -1.2px; margin: 26px 0 24px;
}
main > .service-hero .service-hero-grid { align-items: start; }
main > .service-hero .service-hero-aside > img { height: 360px; }
main > .service-hero .service-lead, main > .inner-hero .inner-lead { margin-top: 0; }
/* About: the portrait fits inside the same band height as every other page. */
.about-cover .founder-cover-photo > img { width: 288px; }
.about-cover .founder-cover-caption { max-width: 288px; margin-top: 10px; }
@media (min-width: 1051px) {
  main > :is(.service-hero, .inner-hero) { min-height: 548px; }
}
@media (max-width: 1050px) {
  main > .service-hero .service-hero-aside > img { height: 325px; }
}
@media (max-width: 680px) {
  main > :is(.service-hero, .inner-hero) { padding: 36px 0 44px; }
  main > :is(.service-hero, .inner-hero) h1 { font-size: 40px; letter-spacing: -.9px; margin: 20px 0 18px; }
  main > .service-hero .service-hero-aside > img { height: 240px; }
  .about-cover .founder-cover-photo > img { width: 100%; max-width: 260px; }
}
@media (max-width: 680px) { main > .inner-hero { min-height: 380px; } }

/* ===== Portal entry and sign-in screens ===== */
.portal-login-panel :is(input[type="email"], input[type="password"], input[type="text"]) { font-size: 16px; min-height: 48px; border-radius: 12px; }
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 74px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: #0b20350d; color: #0b2035; font: 700 13px/1 inherit; cursor: pointer; }
.password-toggle:hover { background: #0b20351a; }
@media (max-width: 760px) {
  /* Put the sign-in card right after the headline; supporting details follow. */
  .portal-entry-layout { display: flex !important; flex-direction: column; gap: 0; }
  .portal-entry-copy { display: contents; }
  .portal-entry-copy > * { order: 1; }
  .portal-login-panel { order: 2; margin: 10px 0 28px; }
  .portal-entry-copy > .portal-feature-list { order: 3; margin-top: 0; }
  .portal-entry-copy .portal-lead { margin-bottom: 18px; }
  .portal-login-panel .button { width: 100%; justify-content: center; min-height: 50px; }
}
@media (max-width: 760px) {
  .portal-entry-layout { align-items: stretch !important; text-align: left; gap: 0 !important; row-gap: 0 !important; }
  .portal-entry-copy > :is(.portal-back, .eyebrow, h1, .portal-lead) { text-align: left; align-self: stretch; }
  .portal-entry-copy > .portal-back { margin: 0 0 22px; }
  .portal-entry-copy > .eyebrow { margin: 0; }
  .portal-entry-copy > h1 { margin: 12px 0 14px; }
  .portal-entry-section { padding-top: 28px; }
}
