.cabinet-model {
  --canvas: #fff;
  --radius: .5rem;
  background: var(--canvas);
}
.cabinet-model .wrap { width: min(1220px, calc(100% - 3rem)); }
.firm-demo { background: #202330; color: #fff; font-size: .75rem; }
.firm-demo .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-block: .32rem; }
.firm-demo a { color: inherit; }
.firm-header { padding: .9rem 0; }
.firm-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: .5rem 2rem; flex-wrap: wrap; }
.firm-brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.25rem; }
.firm-brand span {
  display: grid; place-items: center; width: 2.45rem; height: 2.45rem;
  background: var(--accent); color: white; border-radius: var(--radius); font-size: .82rem; letter-spacing: .05em;
}
.firm-header .cabinet-nav { align-items: center; gap: .2rem 1.1rem; border: 0; margin: 0; padding: 0; font-size: .88rem; }
.firm-header .cabinet-nav a:last-child { background: var(--accent); color: #fff; padding: .55rem .8rem; border-radius: var(--radius); }
.firm-main { padding-block: clamp(1.3rem, 4vw, 3.75rem) 4rem; }
.firm-main h1 { font-size: clamp(2.05rem, 5vw, 3.6rem); }
.firm-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(1rem, 5vw, 5rem); margin-bottom: clamp(2rem, 5vw, 4.5rem);
}
.firm-hero h1 { font-size: clamp(2.55rem, 5.7vw, 5.3rem); line-height: 1; margin-bottom: .37em; }
.firm-lede { font-size: clamp(1rem, 1.7vw, 1.22rem); max-width: 46ch; }
.firm-hero .actions { margin: 1.6rem 0 0; }
.firm-photo { display: block; width: 100%; height: auto; aspect-ratio: 1.22; object-fit: cover; border-radius: var(--radius); }
.firm-services { margin-block: 2rem; }
.firm-services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.firm-service { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.firm-service p, .firm-cta p, .firm-footer p { margin: 0; }
.firm-cta {
  background: var(--hero); border-radius: var(--radius); padding: clamp(1rem, 4vw, 2.5rem);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.4rem;
}
.firm-footer { background: var(--hero); padding-block: 2rem; }
.firm-footer .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 2rem; }
.firm-footer strong, .firm-footer a { color: var(--ink); font-weight: 750; }
.firm-footer p { overflow-wrap: anywhere; }
.firm-main .button, .firm-main button, .firm-main .card { border-radius: var(--radius); }
.firm-main > .grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,290px),1fr)); }
.firm-main .profile img { aspect-ratio: 1.18; object-position: center 29%; }
.sag.cabinet-model { --canvas: #fcfaff; --radius: 1rem; }
.sag .firm-hero { background: #f2ebfd; border-radius: 1.45rem; padding: clamp(1.1rem, 4vw, 3.5rem); }
.sag .firm-hero h1, .sag .firm-services h2 { font-weight: 500; font-family: Georgia, serif; }
.sag .firm-photo { aspect-ratio: 1.06; }
.ideal.cabinet-model { --accent: #164fc0; --radius: .35rem; }
.ideal .firm-header { background: #101f39; border: 0; }
.ideal .firm-brand, .ideal .firm-header .cabinet-nav a { color: #fff; }
.ideal .firm-hero { position: relative; isolation: isolate; overflow: hidden; display: block; background: #0e1b31; }
.ideal .firm-intro { position: relative; z-index: 1; padding: clamp(1.15rem, 5vw, 5rem); max-width: min(44rem, 100%); }
.ideal .firm-hero h1 { color: white; max-width: 12ch; }
.ideal .firm-hero p, .ideal .firm-hero a:not(.button) { color: #e5edff; }
.ideal .firm-photo { position: absolute; inset: 0; height: 100%; border-radius: 0; object-position: 70% 45%; }
.ideal .firm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#0e1b31 8%,#0e1b31ee 38%,#0e1b3120 100%); }
.ideal .firm-service { background: #f0f5ff; border: 0; padding: 1.4rem; }
.profit.cabinet-model {
  --canvas: #f9f3ea; --hero: #eee0d1; --ink: #362b25; --muted: #5b483b;
  --accent: #85432d; --line: #d9c5b5; --radius: .25rem;
}
.profit .firm-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr); }
.profit .firm-photo { border-radius: 48% 48% .2rem .2rem; aspect-ratio: 1.08; }
.profit .firm-hero h1, .profit .firm-services h2 { font-family: Georgia, serif; font-weight: 500; }
.vector.cabinet-model { --canvas: #f8fbf8; --radius: 0; }
.vector .firm-hero { background: #153d32; gap: 0; }
.vector .firm-intro { padding: clamp(1.15rem, 4.5vw, 4rem); }
.vector .firm-hero h1 { color: #fff; }
.vector .firm-hero p, .vector .firm-hero a:not(.button) { color: #d1efda; }
.vector .firm-hero .button { background: #c7edbc; border-color: #c7edbc; color: #153d32; }
.vector .firm-photo { height: 100%; min-height: 22rem; }
.vector .firm-service { border-top: 3px solid var(--accent); }
.tools-intro {
  display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); padding: 0;
  overflow: hidden; align-items: stretch; background: var(--hero); border: 0; border-radius: var(--radius);
}
.tools-intro > div { align-self: center; padding: clamp(1rem, 4.5vw, 3rem); }
.tools-intro p { margin: 0; max-width: 52ch; font-weight: 400; }
.tools-intro img { width: 100%; height: 100%; max-height: 17rem; object-fit: cover; display: block; }
.tools-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin-block: 1.5rem 1rem; }
.tools-index a {
  display: flex; align-items: center; gap: .55rem; padding: .9rem;
  border: 1px solid var(--line); background: white; border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 750;
}
.tools-index a:hover { border-color: var(--accent); text-decoration: underline; }
.tools-index [aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tools-workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.tools-workspace .card { width: 100%; max-width: none; margin: 0; padding: clamp(1rem, 3vw, 2rem); }
.tools-workspace form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 1rem; }
.tools-workspace form button { justify-self: start; grid-column: 1 / -1; margin-top: .6rem; }
.tools-workspace .message { font-weight: 700; }
.fiscal-resources ul { list-style: none; padding: 0; margin-bottom: 0; }
.fiscal-resources li + li { border-top: 1px solid var(--line); }
.fiscal-resources a { display: block; padding: .6rem 0; }
.tools-note { margin-top: 1rem; font-size: .88rem; }
@media (max-width: 760px) {
  .cabinet-model .wrap { width: calc(100% - 2rem); }
  .firm-header .cabinet-nav { gap: .3rem .8rem; }
  .firm-hero, .profit .firm-hero, .tools-workspace, .firm-services-grid { grid-template-columns: minmax(0, 1fr); }
  .firm-photo, .sag .firm-photo, .profit .firm-photo { aspect-ratio: 1.5; }
  .profit .firm-photo { border-radius: .25rem; }
  .vector .firm-photo { min-height: 0; height: auto; }
  .ideal .firm-hero::after { background: linear-gradient(90deg,#0e1b31f5,#0e1b3177); }
  .tools-index, .firm-footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-intro { grid-template-columns: minmax(0,1fr); }
  .tools-intro img { max-height: 10rem; }
}
@media (max-width: 380px) {
  .tools-workspace form, .firm-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}

html:has(.model-order) { scroll-padding-bottom: 5rem; }
.model-order { position: fixed; inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto; z-index: 5; }
.model-order .button { border-radius: 999px; box-shadow: 0 4px 18px #16122545; }
.model-order + .firm-footer { padding-bottom: 5rem; }
