/* Typography — the font, the type scale and every text role — lives in css/typography.css. The shared
   components (cards, buttons, tabs, dialogs) live in css/components.css. */
:root{
    --hcf-navy:#213d66;--hcf-navy-dark:#193354;--hcf-navy-deep:#132b4a;
    --hcf-gold:#e4b64f;--hcf-gold-dark:#d4a73d;--hcf-ivory:#faf5e9;
    --hcf-canvas:#f7f8fb;--hcf-surface:#fff;--hcf-line:#e1e6ed;--hcf-line-dark:#cbd4df;
    --hcf-ink:#172941;--hcf-muted:#213d66;--hcf-green:#13815f;--hcf-danger:#c74343;--hcf-address-icon:#1a3f64;--hcf-field-min-height:40px;
    --hcf-shadow:0 12px 32px rgba(27,48,79,.08);--hcf-shadow-sm:0 3px 12px rgba(27,48,79,.08);
    /* Action colours, from the approved /calendar screen: slate buttons, a slate outline for secondary. */
    --hcf-action:#0f172a;--hcf-action-hover:#1e293b;--hcf-action-line:#334155;--hcf-action-soft:#f8fafc;
    --hcf-sidebar:250px;--hcf-sidebar-collapsed:88px;--hcf-sidebar-mobile:76px;--hcf-radius:14px;
    color:var(--hcf-text);background:var(--hcf-canvas);

}

*{box-sizing:border-box}
/* Blazor toggles panels, drawers and wizard steps with the hidden attribute, but the UA rule
   behind it is weaker than any class that sets display, so a styled element stays on screen
   while the markup says it is hidden. Bootstrap's reboot used to normalise this; keep it here
   now that the app no longer loads it. The !important is what makes the attribute win. */
[hidden]{display:none!important}
/* The Create Case unit field is backed by a datalist, and WebKit draws its own picker arrow
   inside such inputs. Bootstrap suppressed it; the app styles these fields itself and has
   never shown one, so keep it suppressed. Date inputs keep their picker. */
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}
html{min-height:100%;scroll-behavior:smooth}
body{min-height:100%;margin:0;background:var(--hcf-canvas)}
a{color:inherit;text-decoration:none}
h1,h2,h3,p{margin-top:0}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid rgba(33,103,213,.32);outline-offset:2px}
/* FocusOnNavigate targets the page heading so assistive technology announces route changes.
   Keep that programmatic focus without painting an outline around a non-interactive heading. */
h1[tabindex="-1"]:focus{outline:none}
.skip-link{position:fixed;left:10px;top:10px;z-index:9999;background:#fff;padding:10px 14px;border:2px solid var(--hcf-navy);transform:translateY(-150%)}
.skip-link:focus{transform:none}

.hcf-shell{min-height:100vh;display:grid;grid-template-columns:var(--hcf-sidebar) minmax(0,1fr);transition:grid-template-columns .18s ease}
.hcf-sidebar{position:sticky;top:0;height:100vh;z-index:50;display:flex;flex-direction:column;overflow:hidden;background:#fbf5e8;border-right:1px solid #e3dfd7;padding:10px 8px 0;color:var(--hcf-text-meta)}
.hcf-brand{position:relative;height:80px;display:flex;align-items:flex-start;padding:0 12px;margin:0}
.hcf-brand a{display:block;width:188px;overflow:hidden}
.hcf-brand img{display:block;width:188px;max-height:88px;object-fit:contain}
.hcf-sidebar-collapse{position:absolute;right:3px;top:26px;width:28px;height:28px;padding:4px;border:0;background:transparent;color:var(--hcf-text-meta)}
.hcf-sidebar-collapse .hcf-nav-icon{width:100%;height:100%;padding:3px;background:rgba(23,54,94,.07);stroke-width:2.2}
.hcf-create-case{min-height:58px;margin:2px 0 16px;border-radius:10px;background:var(--hcf-gold);display:flex;align-items:center;gap:16px;padding:0 20px;color:var(--hcf-text);font-size:var(--hcf-text-panel-title);font-weight:var(--hcf-weight-bold)}
.hcf-create-case .hcf-nav-icon{background:rgba(255,255,255,.4)}
.hcf-create-case:hover{background:var(--hcf-gold-dark);color:var(--hcf-text)}
.hcf-nav{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 0 12px;scrollbar-width:thin}
.hcf-nav>a,.hcf-nav-disabled{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:10px;padding:7px 11px;border-radius:10px;color:var(--hcf-text-meta);font-weight:var(--hcf-weight-bold);text-decoration:none}
.hcf-nav>a>span,.hcf-nav-disabled>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hcf-nav>a:hover{background:#e9edf3;color:var(--hcf-text)}
.hcf-nav>a:hover .hcf-nav-icon{background:#fff;color:var(--hcf-text-meta)}
.hcf-nav>a.active{background:var(--hcf-navy);color:var(--hcf-text-inverse);box-shadow:0 6px 16px rgba(23,54,94,.16)}
.hcf-nav>a.active .hcf-nav-icon{background:var(--hcf-gold);color:var(--hcf-text-accent)}
.hcf-nav-disabled{opacity:.48;cursor:not-allowed}
.hcf-nav-group{margin:0;padding:0}
.hcf-nav-group>summary{width:100%;min-height:48px;display:grid;grid-template-columns:34px minmax(0,1fr) 18px;align-items:center;gap:10px;padding:7px 11px;border-radius:10px;color:var(--hcf-text-meta);font-weight:var(--hcf-weight-bold);cursor:pointer;list-style:none}
.hcf-nav-group>summary::-webkit-details-marker{display:none}
.hcf-nav-group>summary:hover{background:#e9edf3;color:var(--hcf-text)}
.hcf-nav-group>summary:hover .hcf-nav-icon:first-child{background:#fff;color:var(--hcf-text-meta)}
.hcf-nav-group>summary.active{background:var(--hcf-navy);color:var(--hcf-text-inverse);box-shadow:0 6px 16px rgba(23,54,94,.16)}
.hcf-nav-group>summary.active .hcf-nav-icon:first-child{background:rgba(243,185,48,.17);color:var(--hcf-text-accent)}
.hcf-nav-group>summary .hcf-nav-icon:last-child{width:16px;height:16px;padding:0;background:transparent;transition:transform .16s ease}
.hcf-nav-group[open]>summary .hcf-nav-icon:last-child{transform:rotate(180deg)}
.hcf-nav-submenu{display:grid;gap:6px;padding:8px 0 10px 14px}
.hcf-nav-submenu>a,.hcf-nav-submenu>span{min-height:42px;display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:10px;padding:8px 12px;background:#fffdf8;color:var(--hcf-text-meta);font-weight:var(--hcf-weight-bold)}
.hcf-nav-submenu>a:hover{background:#6b84af;color:var(--hcf-text-inverse)}
.hcf-nav-submenu>a.active{background:var(--hcf-navy);color:var(--hcf-text-inverse)}
.hcf-nav-submenu>a.active .hcf-nav-icon{color:var(--hcf-text-accent)}
.hcf-nav-submenu>span[aria-disabled=true]{cursor:not-allowed}
.hcf-nav-submenu .hcf-nav-icon{width:28px;height:28px;padding:5px;border-radius:8px}
.hcf-nav-icon{display:block;width:32px;height:32px;padding:6px;border-radius:9px;background:rgba(23,54,94,.07);fill:none;stroke:var(--hcf-navy-dark);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:background-color .16s ease,color .16s ease}
.hcf-account-nav{margin:auto 5px 0;padding:10px 12px;display:grid;gap:7px;background:var(--hcf-gold);border-top:2px solid var(--hcf-gold);border-radius:7px 7px 0 0}
.hcf-account-nav a,.hcf-account-nav button{min-height:32px;display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:8px;border:0;background:transparent;color:var(--hcf-text-meta);padding:3px 0;text-align:left;font-weight:var(--hcf-weight-bold)}
.hcf-account-nav form{margin:0}
.hcf-account-nav .hcf-nav-icon{width:26px;height:26px;padding:5px;background:rgba(23,54,94,.08)}
.hcf-account-actions{display:grid;grid-template-columns:1fr;gap:2px;border-top:1px solid rgba(23,54,94,.14);padding-top:5px}
.hcf-account-actions>a,.hcf-account-actions form>button{width:100%;display:grid;grid-template-columns:26px minmax(0,1fr);min-width:0;min-height:32px;gap:8px;padding:2px 0;text-align:left;font-size:var(--hcf-text-table);line-height:1.1}
.hcf-account-actions span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}

body.sidebar-collapsed{--hcf-sidebar:var(--hcf-sidebar-collapsed)}
body.sidebar-collapsed .hcf-brand{height:auto;padding:0 0 8px;flex-direction:column;align-items:center;justify-content:flex-start;gap:6px}
body.sidebar-collapsed .hcf-brand a{width:58px}
body.sidebar-collapsed .hcf-brand img{width:58px;height:70px;max-height:none;object-fit:cover;object-position:left}
body.sidebar-collapsed .hcf-sidebar-collapse{position:static;right:auto;top:auto;transform:rotate(180deg)}
body.sidebar-collapsed .hcf-create-case{justify-content:center;padding:0;width:auto;margin:2px 0 16px}
body.sidebar-collapsed .hcf-create-case span,body.sidebar-collapsed .hcf-nav span,body.sidebar-collapsed .hcf-account-nav span{display:none}
body.sidebar-collapsed .hcf-account-nav{margin-left:0;margin-right:0;padding:8px;justify-items:center}
body.sidebar-collapsed .hcf-account-nav a,body.sidebar-collapsed .hcf-account-nav button{grid-template-columns:1fr;justify-items:center;padding:3px}
body.sidebar-collapsed .hcf-account-actions{display:grid;grid-template-columns:1fr;gap:1px;border-top:0;padding-top:0}
body.sidebar-collapsed .hcf-account-actions>a,body.sidebar-collapsed .hcf-account-actions form>button{min-height:32px;padding:2px 0}
body.sidebar-collapsed .hcf-account-actions .hcf-nav-icon{width:20px;height:20px;padding:3px}
body.sidebar-collapsed .hcf-nav>a,body.sidebar-collapsed .hcf-nav-disabled{grid-template-columns:1fr;justify-items:center;padding:8px}
body.sidebar-collapsed .hcf-nav-group>summary{grid-template-columns:1fr;justify-items:center;padding:8px}
body.sidebar-collapsed .hcf-nav-group>summary .hcf-nav-icon:last-child{display:none}
body.sidebar-collapsed .hcf-nav-group>summary .hcf-nav-icon:last-child,body.sidebar-collapsed .hcf-nav-submenu{display:none}

.hcf-main{min-width:0;background:var(--hcf-canvas)}
.hcf-content{padding:24px;max-width:1600px;margin:0 auto}

.hcf-page-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:4px 0 18px;padding:0;background:transparent;color:var(--hcf-text)}
.hcf-page-heading h1{margin:0}
.hcf-page-heading p{margin:4px 0 0}
.hcf-eyebrow{display:block;margin-bottom:5px}
.hcf-hero{border-radius:18px;color:var(--hcf-text-inverse);background:linear-gradient(105deg,#17365e,#2c6282);padding:24px;display:flex;justify-content:space-between;gap:2rem;align-items:center;margin-bottom:18px}
.hcf-hero p{color:var(--hcf-text-inverse-meta);margin:0}


.hcf-workspace-panel,.hcf-component-lab{padding:18px;margin-bottom:14px}
.hcf-workspace-panel>h2:first-child,.hcf-component-lab>h2:first-child{margin-bottom:18px}
.hcf-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.hcf-card{padding:14px;display:grid;gap:5px}
.hcf-card strong{color:var(--hcf-text)}
.hcf-card span,.hcf-card small{color:var(--hcf-text-meta)}

/* Shared field, from the /calendar screen: 40px, a light 1px border, 8px corners, white. Pages may
   inset a field's text (padding) or size its width, but not redraw its height, border or corners. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),select,textarea,.form-control,.form-select{width:100%;min-height:var(--hcf-field-min-height);border:1px solid var(--hcf-line)!important;border-radius:8px!important;background:#fff;padding:0 10px!important;outline:none;box-shadow:none!important}
select:not([multiple]):not([size]){-webkit-appearance:none;appearance:none;height:var(--hcf-field-min-height);padding-right:34px!important;background-image:linear-gradient(45deg,transparent 50%,var(--hcf-navy) 50%),linear-gradient(135deg,var(--hcf-navy) 50%,transparent 50%)!important;background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%!important;background-size:5px 5px,5px 5px!important;background-repeat:no-repeat!important;line-height:1.2}
input::placeholder,textarea::placeholder{color:var(--hcf-text-meta);opacity:1}
input:focus,select:focus,textarea:focus,.form-control:focus,.form-select:focus{border-color:#7897c0!important;box-shadow:0 0 0 3px rgba(60,105,165,.12)!important}
/* The date wrapper owns the frame and focus ring; its input must not draw a second field.
   Match the shared field selector's specificity and reset page-level input margins. */
.date-field>input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]){min-height:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
textarea,textarea.form-control{min-height:110px;padding:8px 10px!important;resize:vertical}
input[type=checkbox],input[type=radio]{width:auto;min-height:0;accent-color:var(--hcf-navy)}
/* Local replacements for the only two Bootstrap features the app used, so its 8.4MB bundle no
   longer has to be a render-blocking download on every page. */
.row.g-3{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.row.g-3>div{display:grid;align-content:start;gap:6px}
.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;animation:hcf-page-loader-spin .75s linear infinite}
.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}
/* A note under a field. A bare <small> is inline, so it ran onto the same line as the next field's
   label and read as one sentence ("... street, suite, city, state and ZIP. Email *"). */
.hcf-field-note{display:block;margin:4px 0 12px}
.hcf-form-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:18px}
.hcf-checkbox{display:flex!important;grid-auto-flow:column;justify-content:start;gap:8px!important;align-items:center;min-height:46px}
.hcf-filter-bar{display:grid;grid-template-columns:auto minmax(180px,1fr) auto minmax(160px,240px);gap:10px;align-items:center;margin-bottom:16px}
.hcf-inline-form{display:flex;gap:7px;align-items:center;margin:0}
.hcf-inline-form input{min-width:220px}



.hcf-table-wrap{overflow:auto;border:1px solid var(--hcf-line);border-radius:10px;margin:0 0 16px}
.hcf-table{width:100%;margin:0!important;border-collapse:collapse}
.hcf-table caption{padding:10px 12px;color:var(--hcf-text-meta);text-align:left;font-weight:var(--hcf-weight-bold)}
.hcf-table th,.hcf-table td{padding:10px 12px!important;border-bottom:1px solid #edf0f3!important;text-align:left;vertical-align:middle;background:#fff}
.hcf-table th{background:#fafafa!important}
.hcf-table tr:hover td{background:#fbfcfe}
.hcf-table td small{display:block;color:var(--hcf-text-meta);margin-top:3px}
.hcf-table-actions-cell{width:13rem;min-width:13rem}
.hcf-table-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.hcf-table-actions>:is(button,a){flex:none}



.hcf-avatar{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #dfe7f2;border-radius:999px;background:#eef3fa;color:var(--hcf-text-meta);font-size:var(--hcf-text-column);font-weight:var(--hcf-weight-label)}

.hcf-state{border:1px dashed #b9c4d0;border-radius:12px;background:#fff;padding:18px;margin:14px 0}
.hcf-state h2{margin-bottom:5px}
.hcf-state-error{border-color:#e1aaaa;color:var(--hcf-text-danger)}
.hcf-state-loading{display:flex;gap:10px;align-items:center}

/* ---------------------------------------------------------------- page loader */
/* Raised by js/page-loader.js through .hcf-booting / .hcf-navigating on <html>. Hidden by default
   so a document rendered without the script (or after it settles) shows nothing at all. */
#hcf-page-loader{display:none}
html.hcf-booting #hcf-page-loader,html.hcf-navigating #hcf-page-loader{display:block}
.hcf-page-loader-bar{position:fixed;inset:0 0 auto 0;z-index:1201;height:3px;background:rgba(33,61,102,.14);overflow:hidden}
.hcf-page-loader-bar span{display:block;width:40%;height:100%;border-radius:0 3px 3px 0;background:linear-gradient(90deg,var(--hcf-navy),var(--hcf-gold));animation:hcf-page-loader-slide 1.15s ease-in-out infinite}
.hcf-page-loader-veil{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;background:var(--hcf-canvas)}
.hcf-page-loader-card{display:flex;align-items:center;gap:11px;padding:13px 20px;border:1px solid var(--hcf-line);border-radius:999px;background:var(--hcf-surface);box-shadow:var(--hcf-shadow);color:var(--hcf-text-meta);font-weight:var(--hcf-weight-bold)}
.hcf-page-loader-spinner{width:17px;height:17px;flex:none;border:2px solid #cdd8e6;border-top-color:var(--hcf-navy);border-radius:50%;animation:hcf-page-loader-spin .9s linear infinite}
/* Once the shell is up, in-app navigation only veils the content region: the sidebar stays
   readable and clickable, and the veil is translucent so the page does not flash to a blank. */
html.hcf-navigating:not(.hcf-booting) body:has(.hcf-shell) .hcf-page-loader-veil{left:var(--hcf-sidebar);background:rgba(247,248,251,.82)}
/* Dead-man switch: if js/page-loader.js never runs (blocked or failed to load) the veil still
   uncovers the app instead of leaving a blank screen. */
.hcf-page-loader-veil,.hcf-page-loader-bar{animation:hcf-page-loader-timeout 1s linear 15s forwards}
@keyframes hcf-page-loader-timeout{to{opacity:0;visibility:hidden}}
@keyframes hcf-page-loader-spin{to{transform:rotate(360deg)}}
@keyframes hcf-page-loader-slide{0%{transform:translateX(-100%)}100%{transform:translateX(250%)}}
@media(prefers-reduced-motion:reduce){
  .hcf-page-loader-spinner{animation-duration:2.4s}
  .hcf-page-loader-bar span{width:100%;animation:none}
}


.hcf-overlay{position:fixed;inset:0;z-index:1000;display:flex;justify-content:flex-end;align-items:stretch;background:rgba(7,24,43,.44)}
.hcf-drawer{overflow:auto;padding:0}
.hcf-drawer>header{position:sticky;top:0;z-index:2}
.hcf-drawer>div{padding:18px;display:grid;gap:8px}
.hcf-drawer>div>label{margin-top:4px}
.hcf-compact-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;align-items:start}
.hcf-compact-form>label{display:grid;gap:5px}
.hcf-compact-form>.span-full,.hcf-compact-form>.hcf-form-actions,.hcf-compact-form>.validation-summary-errors{grid-column:1/-1}
.hcf-compact-form textarea{min-height:92px}

.hcf-login-shell{max-width:720px;margin:4rem auto;padding:1rem}
.hcf-login-panel{border-top:5px solid var(--hcf-gold)}
.hcf-login-form{display:grid;gap:9px}
.hcf-secret-once{display:block;overflow-wrap:anywhere;padding:1rem;border-radius:8px;background:#f4f6f8}
.hcf-toast{position:fixed;right:18px;bottom:18px;z-index:1100;max-width:420px;padding:12px 14px;border-left:5px solid var(--hcf-gold);border-radius:10px;color:var(--hcf-text-inverse);background:var(--hcf-navy-deep);box-shadow:var(--hcf-shadow)}
#blazor-error-ui{display:none;position:fixed;left:0;right:0;bottom:0;background:#fff1c9;padding:.8rem;z-index:2000}

@media(max-width:1100px){.hcf-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hcf-filter-bar{grid-template-columns:1fr 1fr}.hcf-filter-bar label{align-self:end}}
@media(max-width:900px){:root{--hcf-sidebar:var(--hcf-sidebar-mobile)}body.sidebar-collapsed{--hcf-sidebar:var(--hcf-sidebar-mobile)}.hcf-sidebar{padding-left:8px;padding-right:8px}.hcf-brand{height:76px;padding:0;justify-content:center}.hcf-brand a,body.sidebar-collapsed .hcf-brand a{width:56px}.hcf-brand img,body.sidebar-collapsed .hcf-brand img{width:56px;height:70px;max-height:none;object-fit:cover;object-position:left}.hcf-sidebar-collapse{display:none}.hcf-create-case{justify-content:center;padding:0}.hcf-create-case span,.hcf-nav span,.hcf-account-nav span{display:none}.hcf-account-nav{margin-left:0;margin-right:0;padding:8px 4px;justify-items:center}.hcf-account-nav a,.hcf-account-nav button{grid-template-columns:1fr;justify-items:center;padding:3px}.hcf-account-actions{grid-template-columns:1fr;gap:1px;border-top:0;padding-top:0}.hcf-nav>a,.hcf-nav-disabled,.hcf-nav-group>summary{grid-template-columns:1fr;justify-items:center;padding:8px}.hcf-nav-group>summary .hcf-nav-icon:last-child,.hcf-nav-submenu{display:none}.hcf-content{padding:16px}.hcf-page-heading{align-items:flex-start;flex-direction:column}.hcf-inline-form{align-items:stretch;flex-direction:column}.hcf-inline-form input{min-width:0}}
@media(max-width:620px){.hcf-content{padding:10px}.hcf-card-grid,.hcf-filter-bar,.hcf-compact-form{grid-template-columns:1fr}.hcf-compact-form>.span-full,.hcf-compact-form>.hcf-form-actions,.hcf-compact-form>.validation-summary-errors{grid-column:auto}.hcf-workspace-panel,.hcf-component-lab{padding:15px}.hcf-drawer{width:100vw}}

/* A published link with the actions that go with it. Shared by the Firms drawer and the intake
   enquiry queue: both show the same address, so both show it the same way. */
.portal-link-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 10px}
.portal-link-row input{flex:1 1 320px;min-width:0;min-height:var(--hcf-field-min-height);padding:8px 11px;border:1px solid var(--hcf-line-dark);border-radius:9px;background:var(--hcf-canvas);color:var(--hcf-text);font-family:var(--hcf-font-mono);font-size:var(--hcf-text-small)}
.portal-link-row input:focus{outline:2px solid var(--hcf-navy);outline-offset:1px;background:var(--hcf-surface)}
.portal-link-row>a{text-decoration:none;display:inline-flex;align-items:center}
.hcf-address-input {
    position: relative;
}

.hcf-address-dismiss {
    position: fixed;
    inset: 0;
    z-index: 29;
}

.input-with-icon {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: stretch !important;
    overflow: visible !important;
    min-height: var(--hcf-field-min-height);
    border: 1px solid var(--hcf-line-dark);
    border-radius: 10px;
    background: var(--hcf-surface);
}

.input-with-icon:focus-within {
    border-color: #7897c0;
    box-shadow: 0 0 0 3px rgba(60, 105, 165, .12);
}

/* The height is stated, not left to min-height. An <svg> with no height renders at the SVG default
   of 150px, and align-items:stretch then drags the whole field to 150px tall — which is what the
   attorney drawer's Firm Address box did on every page that does not scope its own .icon size. */
.input-with-icon > .icon {
    box-sizing: border-box !important;
    width: 48px !important;
    height: 42px;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 11px 13px !important;
    align-self: stretch !important;
    border-right: 1px solid var(--hcf-line-dark);
    color: var(--hcf-address-icon) !important;
    fill: none !important;
    stroke: currentColor !important;
}

.input-with-icon > input:not([type=checkbox]):not([type=radio]) {
    min-width: 0;
    min-height: 0 !important;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    padding: 10px 14px !important;
    box-shadow: none !important;
}

.hcf-address-input.input-with-icon .hcf-address-suggestions {
    grid-column: 1 / -1;
}

.hcf-address-suggestions {
    position: absolute;
    z-index: 30;
    top: 100%;
    right: 0;
    left: 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 18rem;
    margin-top: .25rem;
    border: 1px solid #ccd5dd;
    border-radius: .5rem;
    background: #fff;
    box-shadow: 0 .5rem 1.5rem rgb(18 40 60 / 16%);
    color: var(--hcf-text);
    font-family: var(--hcf-font);
    font-size: var(--hcf-text-table);
    font-weight: var(--hcf-weight-bold);
    letter-spacing: normal;
    line-height: 1.35;
    text-transform: none;
}

.hcf-address-suggestion {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    width: 100%;
    min-height: 2.9rem;
    padding: .65rem .8rem;
    border-bottom: 1px solid #e5eaee;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.hcf-address-pin {
    width: 1rem;
    height: 1rem;
    color: var(--hcf-text-meta);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hcf-address-suggestion:hover,
.hcf-address-suggestion:focus-visible {
    background: #f4f7f9;
}

.hcf-google-attribution {
    display: block;
    padding: .4rem .8rem;
    color: var(--hcf-text-meta);
    font-size: var(--hcf-text-caption);
    text-align: right;
    font-weight: var(--hcf-weight-regular);
    letter-spacing: normal;
    line-height: 1.2;
    text-transform: none;
}

.hcf-address-spinner {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: .8rem;
    width: 1rem;
    height: 1rem;
    margin-top: -.5rem;
    border: 2px solid #cbd4df;
    border-top-color: var(--hcf-navy);
    border-radius: 50%;
    animation: hcf-address-spin .7s linear infinite;
    pointer-events: none;
}

.hcf-address-input.is-searching > input {
    padding-right: 2.5rem !important;
}

@keyframes hcf-address-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hcf-address-spinner { animation-duration: 1.5s; }
}

/* Client picker: a directory search that reads like the address autocomplete, so a name is typed
   and chosen the same way an address is, with the same spinner while the firm is being searched. */
.hcf-picker-options {
    position: absolute;
    z-index: 30;
    top: 100%;
    right: 0;
    left: 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 18rem;
    margin-top: .25rem;
    border: 1px solid #ccd5dd;
    border-radius: .5rem;
    background: #fff;
    box-shadow: 0 .5rem 1.5rem rgb(18 40 60 / 16%);
    color: var(--hcf-text);
    font-family: var(--hcf-font);
    font-size: var(--hcf-text-table);
    font-weight: var(--hcf-weight-bold);
    letter-spacing: normal;
    line-height: 1.35;
    text-transform: none;
}

.hcf-picker {
    position: relative;
    display: block;
    min-width: 0;
}

.hcf-picker > input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #ccd7e2;
    border-radius: 8px;
    background: #fff;
    color: var(--hcf-text);
}

.hcf-picker.is-searching > input {
    padding-right: 2.5rem;
}

.hcf-picker-option {
    display: grid;
    grid-template-columns: 1.1rem minmax(0, 1fr) auto;
    gap: .15rem .65rem;
    align-items: center;
    width: 100%;
    padding: .55rem .8rem;
    border-bottom: 1px solid #e5eaee;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.hcf-picker-option:last-of-type { border-bottom: 0; }

.hcf-picker-option.is-active,
.hcf-picker-option:hover {
    background: #f4f7f9;
}

.hcf-picker-icon {
    grid-row: span 2;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--hcf-text-meta);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hcf-picker-name {
    overflow: hidden;
    color: var(--hcf-text);
    font-weight: var(--hcf-weight-bold);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hcf-picker-meta {
    color: var(--hcf-text-meta);
    font-size: var(--hcf-text-caption);
    font-weight: var(--hcf-weight-bold);
    white-space: nowrap;
}

.hcf-picker-detail {
    grid-column: 2 / -1;
    overflow: hidden;
    color: var(--hcf-text-meta);
    font-size: var(--hcf-text-caption);
    font-weight: var(--hcf-weight-regular);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hcf-picker-status {
    padding: .7rem .8rem;
    color: var(--hcf-text-meta);
    font-size: var(--hcf-text-column);
    font-weight: var(--hcf-weight-bold);
}

/* Collapsed rail submenus.
   The rail is only icons wide and .hcf-sidebar clips its overflow, so a group's submenu cannot
   open in place: sidebar.js adds .sidebar-rail (collapsed rail, or the narrow-viewport rail that
   the media query below forces) and lifts the open group's submenu out as a fixed-position
   flyout beside the icon. position:fixed is what escapes the clipping; sidebar.js supplies the
   coordinates because the rail scrolls. The labels are re-shown here - the rail rules above hide
   every span in .hcf-nav, and inside the flyout there is room for them again. */
body.sidebar-rail .hcf-nav-group[open]>.hcf-nav-submenu{
    display:grid;position:fixed;left:var(--hcf-flyout-left,88px);top:var(--hcf-flyout-top,0);z-index:80;
    min-width:246px;gap:4px;padding:8px;background:#fbf5e8;border:1px solid #e3dfd7;border-radius:12px;
    box-shadow:0 18px 40px rgba(23,54,94,.22)
}
body.sidebar-rail .hcf-nav-group[open]>.hcf-nav-submenu::before{
    content:attr(data-flyout-label);display:block;padding:2px 8px 6px;
    color:var(--hcf-text-meta);font-size:var(--hcf-text-caption);font-weight:var(--hcf-weight-label);letter-spacing:var(--hcf-tracking-caps);text-transform:uppercase;opacity:.72
}
body.sidebar-rail .hcf-nav-group[open]>.hcf-nav-submenu>a,
body.sidebar-rail .hcf-nav-group[open]>.hcf-nav-submenu>span{
    grid-template-columns:30px minmax(0,1fr);justify-items:stretch;gap:10px;padding:8px 12px;border-radius:10px
}
body.sidebar-rail .hcf-nav-group[open]>.hcf-nav-submenu>a>span,
body.sidebar-rail .hcf-nav-group[open]>.hcf-nav-submenu>span>span{display:block;white-space:nowrap}
/* The rail hides the chevron with the rest of the labels, which leaves nothing to say an icon
   has a submenu behind it. This caret in the corner of the icon is that hint. */
body.sidebar-rail .hcf-nav-group>summary{position:relative}
body.sidebar-rail .hcf-nav-group>summary::after{
    content:"";position:absolute;right:6px;top:50%;margin-top:-4px;
    border-left:5px solid currentColor;border-top:4px solid transparent;border-bottom:4px solid transparent;opacity:.5
}
body.sidebar-rail .hcf-nav-group[open]>summary::after{opacity:1}
